Guess: have you tried:
<f:selectItem itemValue="#{null}" itemLabel="#{messages['all']}" />
On 3/7/07, r.stranders <[EMAIL PROTECTED]> 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.