[
https://issues.apache.org/jira/browse/WW-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lukasz Lenart resolved WW-3209.
-------------------------------
Resolution: Won't Fix
> 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
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)