[ https://issues.apache.org/jira/browse/TRINIDAD-865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550971 ]
Stephen Friedrich commented on TRINIDAD-865: -------------------------------------------- There was a lively discussion on the mailing list: http://www.nabble.com/-Trinidad--selectOneChoice-3A-Make--22unselectedLabel-22-item-go-away-after-selection--to14287137.html The addition item may be needed if it is really an option to _not_ select anything. So the item should only be removed from the list if there is a selection _and_ the selectOneChoice has required="true". In that case showing it in the list makes no sense at all. > tr:selectOneChoice: "unselectedLabel" still displays after selection has been > made > ---------------------------------------------------------------------------------- > > Key: TRINIDAD-865 > URL: https://issues.apache.org/jira/browse/TRINIDAD-865 > Project: MyFaces Trinidad > Issue Type: Bug > Affects Versions: 1.0.4-core > Reporter: Stephen Friedrich > Priority: Minor > > If I specify the "unselectedLabel" attribute of tr:selectOneChoice, then that > label always displays in the list, even if a selection has been made. > This is how I use the tag: > <tr:selectOneChoice id="productGroup" label="Group" > value="#{selectedProduct.productGroup}" required="true" > unselectedLabel="Please choose"> > <s:selectItems value="#{productGroupQuery.dataModel}" var="group" > label="#{group.name}"/> > </tr:selectOneChoice> > First it is simply ugly that the text "Please choose" is shown in the list. > More importantly if the user actually selects the "Please choose" item, then > he gets a validation error message, because of the required="true". -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.