You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michael Heinen <mh...@recommind.com> on 2006/02/20 21:14:55 UTC
RE: t:selectOneRadio has no preselection with spread layout
Sorry, I don't want to push my question
but does anybody know whether this is a bug or whether I do something
wrong?
________________________________
From: Michael Heinen
Sent: Freitag, 17. Februar 2006 18:00
To: 'MyFaces Discussion'
Subject: t:selectOneRadio has no preselection
Hi all,
I have trouble with the t:selectOneRadio. The items are not preselected
anymore.
They are neither preselected when I enter the page nor after submits
(with both: immediate = false or true)
When I remove layout="spread" and the two t:radio items, everything
works fine!
Here is my snipplet:
<h:panelGroup>
<t:selectOneRadio id="draft"
value="#{DynaAnnoControllerBean.document.datafield['draft']}"
layout="spread">
<f:selectItem itemLabel="Ja"
itemValue="true"/>
<f:selectItem itemLabel="Nein"
itemValue="false"/>
</t:selectOneRadio>
<t:radio for="draft" index="0" />
<t:radio for="draft" index="1" />
...
</h:panelGroup>
Michael
Re: t:selectOneRadio has no preselection with spread layout
Posted by Volker Weber <us...@weber-oldenburg.de>.
Hi,
must be something special with your setup, it always worked for me.
But this did not mean there is no bug anywhere :-).
What kind of bean is the 'datafield' property of document object?
The value objects of f:selectItem are String, if you use boolean in
datafield, there is no match when check for preselection.
try itemValue="#{true}" this will result in a boolean value object.
Regards,
Volker
Werner Punz wrote:
> Looks like a bug to me...
>
>
>
> Michael Heinen schrieb:
>
>> Sorry, I don’t want to push my question
>>
>> but does anybody know whether this is a bug or whether I do something
>> wrong?
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> *From:* Michael Heinen
>> *Sent:* Freitag, 17. Februar 2006 18:00
>> *To:* 'MyFaces Discussion'
>> *Subject:* t:selectOneRadio has no preselection
>>
>>
>>
>> Hi all,
>>
>>
>>
>> I have trouble with the t:selectOneRadio. The items are not
>> preselected anymore.
>>
>> They are neither preselected when I enter the page nor after submits
>> (with both: immediate = false or true)
>>
>>
>>
>> When I remove layout="spread" and the two t:radio items, everything
>> works fine!
>>
>>
>>
>> Here is my snipplet:
>>
>>
>>
>> <h:panelGroup>
>>
>> <t:selectOneRadio id="draft"
>> value="#{DynaAnnoControllerBean.document.datafield['draft']}"
>> layout="spread">
>>
>> <f:selectItem itemLabel="Ja"
>> itemValue="true"/>
>>
>> <f:selectItem itemLabel="Nein"
>> itemValue="false"/>
>>
>> </t:selectOneRadio>
>>
>>
>>
>> <t:radio for="draft" index="0" />
>>
>> <t:radio for="draft" index="1" />
>>
>>
>>
>> ...
>>
>>
>>
>> </h:panelGroup>
>>
>>
>>
>>
>>
>> Michael
>>
>
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.
Re: t:selectOneRadio has no preselection with spread layout
Posted by Werner Punz <we...@gmx.at>.
Looks like a bug to me...
Michael Heinen schrieb:
> Sorry, I don’t want to push my question
>
> but does anybody know whether this is a bug or whether I do something wrong?
>
>
>
> ------------------------------------------------------------------------
>
> *From:* Michael Heinen
> *Sent:* Freitag, 17. Februar 2006 18:00
> *To:* 'MyFaces Discussion'
> *Subject:* t:selectOneRadio has no preselection
>
>
>
> Hi all,
>
>
>
> I have trouble with the t:selectOneRadio. The items are not preselected
> anymore.
>
> They are neither preselected when I enter the page nor after submits
> (with both: immediate = false or true)
>
>
>
> When I remove layout="spread" and the two t:radio items, everything
> works fine!
>
>
>
> Here is my snipplet:
>
>
>
> <h:panelGroup>
>
> <t:selectOneRadio id="draft"
> value="#{DynaAnnoControllerBean.document.datafield['draft']}"
> layout="spread">
>
> <f:selectItem itemLabel="Ja"
> itemValue="true"/>
>
> <f:selectItem itemLabel="Nein"
> itemValue="false"/>
>
> </t:selectOneRadio>
>
>
>
> <t:radio for="draft" index="0" />
>
> <t:radio for="draft" index="1" />
>
>
>
> ...
>
>
>
> </h:panelGroup>
>
>
>
>
>
> Michael
>