Patch already attached :-).

Sean Schofield wrote:
> Volker created TOMAHAWK-152 [1].  Patches are welcome.
> 
> Sean
> 
> [1]  http://issues.apache.org/jira/browse/TOMAHAWK-152
> 
> 
> On 2/21/06, Volker Weber <[EMAIL PROTECTED]> wrote:
> 
>>Hi Michael,
>>
>>i just test a bit. I could mak it work by using
>>itemValue="#{true}" and itemValue="#{false}".
>>           ^^    ^                 ^^     ^
>>
>>here is my example code:
>>
>><t:selectOneRadio id="draft" value="#{testBean.map['draft']}"
>>                  layout="spread" >
>>  <f:selectItem itemValue="#{true}" itemLabel="True" />
>>  <f:selectItem itemValue="#{false}" itemLabel="False" />
>></t:selectOneRadio>
>><br/>
>><t:radio for="draft" index="0"/>
>><br/>
>><t:radio for="draft" index="1"/>
>>
>>The check for selected is difference between layout=spread and other:
>>On pageDirection and lineDirection layout the stringvalues are checked
>>and on spread layout the real value objects are checked.
>>
>>I create a jira issue for this, but in the meantime you can use the
>>above workaround.
>>
>>Regards,
>>  Volker
>>
>>Michael Heinen wrote:
>>
>>>Hi Volker,
>>>
>>>Datafield is a Map containing Objects as values.
>>>The requested field 'draft' is of type Boolean.
>>>
>>>This works well when I use only the f:selectItem tags without
>>>layout="spread" and the two t:radio tags.
>>>
>>>Unfortunately I have to use "spread" for layout issues.
>>>
>>>
>>>-----Original Message-----
>>>From: Volker Weber [mailto:[EMAIL PROTECTED]
>>>Sent: Dienstag, 21. Februar 2006 01:51
>>>To: MyFaces Discussion
>>>Subject: Re: t:selectOneRadio has no preselection with spread layout
>>>
>>>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.
>>
> 
> 

-- 
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.

Reply via email to