You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "r.stranders" <r....@gmail.com> on 2007/03/07 19:45:50 UTC
Re: [Solved] Three state Boolean in selectOneRadio
Yes, I did. No success...
Andrew Robinson-5 wrote:
>
> Guess: have you tried:
>
> <f:selectItem itemValue="#{null}" itemLabel="#{messages['all']}" />
>
> On 3/7/07, r.stranders <r....@gmail.com> wrote:
>>
>> Hi,
>>
>> I've got the following problem. In one of my pages, I use a radiobutton
>> to
>> fill a value of a Boolean attribute. However, the radiobutton has three
>> states: true, false, and null. Unfortunately, I cannot get selectOneRadio
>> to
>> currectly set the 'null' value in my attribute when I select it. Instead,
>> the attribute becomes 'false'. Here is a snippet from my page:
>>
>> <h:outputLabel for="enabled" value="#{messages['user.accountExpired']}"
>> />
>> <h:selectOneRadio id="enabled"
>> value="#{criteria.accountNonExpired}">
>> <f:selectItem itemValue="true"
>>
>> itemLabel="#{messages['user.accountNotExpired']}" />
>> <f:selectItem itemValue="false"
>>
>> itemLabel="#{messages['user.accountExpired']}" />
>> <f:selectItem itemValue=""
>> itemLabel="#{messages['all']}" />
>> </h:selectOneRadio>
>> <h:message errorClass="fieldError" for="enabled" />
>>
>> The page is used to search for users. The radiobutton should give the
>> user
>> three options: get all users, get all expired users, and get all
>> non-expired
>> users.
>>
>> I tried everything. Any ideas?
>> --
>> View this message in context:
>> http://www.nabble.com/Three-state-Boolean-in-selectOneRadio-tf3363241.html#a9356545
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Three-state-Boolean-in-selectOneRadio-tf3363241.html#a9359418
Sent from the MyFaces - Users mailing list archive at Nabble.com.