[ 
https://issues.apache.org/jira/browse/WW-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052728#comment-13052728
 ] 

Roland McIntosh commented on WW-3209:
-------------------------------------

In particular, if the <s:optgroup> tag supported the "cssClass" and "id" 
attributes then script events and styles could more easily be attached to them. 
 As an alternative, the OptGroup tag could simply support Dynamic Attributes.  
In any case, it appears that OptGroup.java needs some (but not all) of the 
functionality provided by UIBean.

> Select components do not allow setting attributes and JavaScript events on 
> <option /> tags
> ------------------------------------------------------------------------------------------
>
>                 Key: WW-3209
>                 URL: https://issues.apache.org/jira/browse/WW-3209
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Other
>    Affects Versions: 2.1.8
>            Reporter: Tim Stavenger
>            Priority: Minor
>             Fix For: 2.2.x
>
>
> The combobox, select, optiontransferselect  and any other tag that uses the 
> <option /> or <optgroup /> tags do not allow you to set any additional 
> attributes or JavaScript events besides the value posted back to the server 
> and the value displayed to the user.
> I had a scenario where the client wanted a hover to appear for each option in 
> a multi-select component. I could have used the title attribute or the 
> onchange/onclick events of <option />, but couldn't because Struts didn't 
> support them (at least without modifying Struts). I ended up with a different 
> implementation that listened for onchange and onclick events for the <select 
> /> tag. It works, but isn't exactly what the user wanted. I could also have 
> just manually used the <select> and <option> tag, but would have lost 
> everything else Struts provides.
> See http://www.w3schools.com/tags/tag_optgroup.asp and 
> http://www.w3schools.com/tags/tag_option.asp for the available attributes and 
> events.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to