From: Timo Schnölzer <[EMAIL PROTECTED]> 

> Hi folks, 
> 
> I try to build a datatable in clay like: 
> 
>I try to build a datatable in clay like:
>
        ><component jsfid="zeitraumTable" extends="dataTable"
>allowBody="false">
>               <attributes>
                        ><set name="value"
>value="[EMAIL PROTECTED]" />
                        ><set name="var" value="e" />
                ></attributes>
>
                ><element renderId="0" jsfid="radioColumn" />
                ><element renderId="1" jsfid="typbezeichnungColumn" />
        >       
        ></component>
>
>In order to realise a "choose one row" my customer likes to use a radio
>input type. 
>
        ><component jsfid="radioColumn" extends="column" id="radioColumn">
        >       <element renderId="1" jsfid="outputText" facetName="header">
                        ><attributes>
                                ><set name="value" value="" />
                        ></attributes>
                ></element>
                ><element renderId="2" jsfid="t:selectOneRadio" id="radio">
                        ><attributes>
                                ><set name="value"
>value="[EMAIL PROTECTED]" />
                                ><set name="for" value="radioColumn" />
                        ></attributes>
                        ><element renderId="1" jsfid="selectItem">
                                ><attributes>
                                        ><set name="itemValue"
>value="#{e.PK}" />
                                ></attributes>
                        ></element>
                ></element>
        ></component>
>
>Not using the "for" attribute i get the error to use it. After that the
>error that index has to be postiv.
>Looking into the src shows the following lines:
> 

This is a custom myfaces component that requires and "index" component property.
I looked at the source code for the component and the tag but here is not any 
java doc on what the "index" property is used for.  I didn't see it listed as
a component under myfaces tomahawk but it's in the source.

 
I would first try setting the "index" property value.
<element renderId="2" jsfid="t:selectOneRadio" id="radio">
   <attributes>
     <set name="value" value="[EMAIL PROTECTED]" />
     <set name="for" value="radioColumn" />
     <set name="index" value="1"/>
  </attributes>
</element>

You could also try using the standard JSF runtime "selectOneRadio" component
instead of the tomahawk "t:selectOneRadio".

Gary


> java.lang.IllegalStateException: positive index must be given 
> at 
> org.apache.myfaces.renderkit.html.ext.HtmlRadioRenderer.renderRadio(HtmlRadi 
> oRenderer.java:90) 
> at 
> org.apache.myfaces.renderkit.html.ext.HtmlRadioRenderer.encodeEnd(HtmlRadioR 
> enderer.java:56) 
> 
> 88 if (index < 0) 
> 89 { 
> 90 throw new IllegalStateException("positive index must be 
> given"); 
> 91 } 
> 
> 
> How do i have to configure this ???? 
> 
> 
> Thx 
> 
> Timo 
> 
> 
> 
> 
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
> 

Reply via email to