Hello again,
I'm trying to use the Tomahawk t:selectOneRadio and t:radio components
to use the spread layout feature. Here's the clay-config.xml
configuration for my component definitions:
<component jsfid="selectPaymentType" extends="t:selectOneRadio">
<attributes>
<set name="id" value="paymentType" />
<set name="value" value="[EMAIL PROTECTED]" />
<set name="layout" value="spread" />
</attributes>
<element renderId="1" jsfid="selectItem">
<attributes>
<set name="itemLabel" value="Pay with a credit card" />
<set name="itemValue" value="1" />
</attributes>
</element>
<element renderId="2" jsfid="selectItem">
<attributes>
<set name="itemLabel" value="Pay with a certificate" />
<set name="itemValue" value="2" />
</attributes>
</element>
</component>
<component jsfid="selectPaymentTypeCreditCardOption" extends="t:radio">
<attributes>
<set name="for" value="paymentType" />
<set name="index" value="0" />
</attributes>
</component>
<component jsfid="selectPaymentTypeCertificateOption" extends="t:radio">
<attributes>
<set name="for" value="paymentType" />
<set name="index" value="1" />
</attributes>
</component>
And I'm using them on the page with:
<span jsfid="selectPaymentType" />
<span jsfid="selectPaymentTypeCreditCardOption" />
<span jsfid="selectPaymentTypeCertificateOption" />
When I try and load the page, I'm getting an IllegalStateException
saying the "for" attribute of the t:radio component isn't set:
java.lang.IllegalStateException: mandatory attribute 'for'
at
org.apache.myfaces.renderkit.html.ext.HtmlRadioRenderer.renderRadio(HtmlRadioRenderer.java:85)
at
org.apache.myfaces.renderkit.html.ext.HtmlRadioRenderer.encodeEnd(HtmlRadioRenderer.java:56)
at
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
at
org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:379)
at
org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:375)
at
org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:375)
at
org.apache.shale.clay.component.Clay.encodeChildren(Clay.java:399)
at
org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:377)
at
org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:375)
at
org.apache.shale.clay.component.Clay.encodeChildren(Clay.java:399)
at
org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:377)
at
org.apache.shale.clay.component.Clay.recursiveRenderChildren(Clay.java:375)
at
org.apache.shale.clay.component.Clay.encodeChildren(Clay.java:399)
at
org.apache.shale.clay.faces.ClayViewHandler.recursiveRender(ClayViewHandler.java:407)
at
org.apache.shale.clay.faces.ClayViewHandler.renderView(ClayViewHandler.java:345)
at
org.apache.shale.view.faces.ViewViewHandler.renderView(ViewViewHandler.java:146)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:107)
The configuration for the t:radio component looks alright (to my eyes at
least):
<component jsfid="t:radio" componentType="org.apache.myfaces.HtmlRadio">
<attributes>
<set name="id" bindingType="VB" />
<set name="rendered" bindingType="VB" />
<set name="binding" bindingType="VB" />
<set name="enabledOnUserRole" bindingType="VB" />
<set name="visibleOnUserRole" bindingType="VB" />
<set name="for" bindingType="VB" />
<set name="index" bindingType="VB" />
</attributes>
</component>
So what am I missing?
Thanks,
Rich
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]