UI Plugin

Add Grails UI tag for YUI ButtonGroup

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0
  • Fix Version/s: 1.2
  • Component/s: None
  • Labels:
    None
  • Patch Submitted:
    Yes

Description

Add support for YUI ButtonGroup / Radio Button
http://developer.yahoo.com/yui/examples/button/btn_example04.html

  1. buttons.gsp
    07/Nov/08 9:12 AM
    4 kB
    Mingfai Ma
  2. ButtonTagLib.groovy
    07/Nov/08 9:12 AM
    3 kB
    Mingfai Ma
  1. GRAILSPLUGINS-606_demo.png
    13 kB
    07/Nov/08 9:11 AM

Activity

Hide
Mingfai Ma added a comment -

added a demo gsp

Show
Mingfai Ma added a comment - added a demo gsp
Hide
Mingfai Ma added a comment -

added Button TagLib

Notice that:

  • it supports ButtonGroup / radio button only , but not any other YUI Button
  • it occupies the <gui:button> namespace for adding items to the ButtonGroup, but it doesn't support other YUI button and will throw UnsupportedOperationException if a button is not used inside a ButtonGroup
  • the demo page shows two ways to define the buttons in the buttonGroup, either as an ArrayList or with <gui:button> tag
  • there is one custom feature to handle event subscription.
Show
Mingfai Ma added a comment - added Button TagLib Notice that:
  • it supports ButtonGroup / radio button only , but not any other YUI Button
  • it occupies the <gui:button> namespace for adding items to the ButtonGroup, but it doesn't support other YUI button and will throw UnsupportedOperationException if a button is not used inside a ButtonGroup
  • the demo page shows two ways to define the buttons in the buttonGroup, either as an ArrayList or with <gui:button> tag
  • there is one custom feature to handle event subscription.
Hide
Mingfai Ma added a comment -

attached is a screenshot of the demo gsp page. it's simplified from the original YUI example

to run the demo, just drop the tag lib to the tag lib directory, and put the gsp in any where in the app.

Show
Mingfai Ma added a comment - attached is a screenshot of the demo gsp page. it's simplified from the original YUI example to run the demo, just drop the tag lib to the tag lib directory, and put the gsp in any where in the app.
Hide
Mingfai Ma added a comment -

updated

Show
Mingfai Ma added a comment - updated
Hide
Mingfai Ma added a comment -

updated

Show
Mingfai Ma added a comment - updated
Hide
David Trattnig added a comment - - edited

Why doesn't it additionally provide a tag for a standalone button (<gui:button>) without a button group? Think that's the more common use case.

Show
David Trattnig added a comment - - edited Why doesn't it additionally provide a tag for a standalone button (<gui:button>) without a button group? Think that's the more common use case.

People

Vote (2)
Watch (1)

Dates

  • Created:
    Updated: