myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Friedrich <>
Subject Re: [Trinidad] selectOneChoice: Make "unselectedLabel" item go awayafter selection?
Date Wed, 12 Dec 2007 13:40:26 GMT
Well, first of all the name "unselectedLabel" suggests to me that this is the label that is
used if there is no selection.
"no selection" is very different from "selection of empty value".
The documentation does not help either - the behaviour is not stated.

I see that both types of use cases need to be supported:
1) "Please choose" item that makes sure the user _must_ make a conscious selection here and
show a validation error if he leaves the field empty. (As opposed to simply pre-select the
first entry.)
* Have an empty option that can be selected.

Hey - what about this idea: If the selectOneChoice has required="true" then
hide the bogus item as soon as there is a selection.
If required="false" (or missing) then leave the item there, because it 
makes sense to select it.

... and of course document that behavior!

> I think that this is a good behavior. If there is no unselectedLabel, 
> then component works as you expected.
> Why do you think that isn't an expected behavior?
> Regards,
> Luka

View raw message