tomahawk selectOneRadio

I am trying to get two selectOneRadio components in the same group using the tomahawk selectOneRadio component. This component has a forceId parameter but it does not seem to work:

<t:selectOneRadio id="UNIQUEID" forceIdIndex="false" forceId="true" required="true" value="HELLO">

<j:selectItem itemValue="HELLO" itemLabel="HELLO" />

<j:selectItem itemValue="GOODBYE" itemLabel="GOODBYE" />

</t:selectOneRadio>

<t:selectOneRadio id="UNIQUEID" forceIdIndex="false" forceId="true" required="true" value="">

<j:selectItem itemValue="HELLOAGAIN" itemLabel="HELLO AGAIN" />

<j:selectItem itemValue="GOODBYEFORNOW" itemLabel="GOODBYE FOR NOW" />

</t:selectOneRadio>

The html output gives the first group an id of UNIQUEID and the second group an id of UNIQUEID_1

Any ideas?

[881 byte] By [ozzywindsurfera] at [2007-10-2 14:27:15]
# 1
The forceId attribute simple stops the form name being appended to the front of the id/name. This can be useful if you need to refer to the component using javascript.It is not used for stopping JSF enforcing unique ids between components.
ozzywindsurfera at 2007-7-13 12:47:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
I use it to make several radio buttons (in a table) have the all same name and it works.I wrote a blog ( http://jroller.com/page/obon?entry=my_first_experience_with_jsf) about it and someone suggested using his own component. Maybe you can try it.Oleg
obon386a at 2007-7-13 12:47:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Yes, the tomahawk selectOneRadio does work within a column element using a datatable. What if you want your grouped radio buttons in completely different areas of the screen though!
ozzywindsurfera at 2007-7-13 12:47:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4

oh, you mean it doesn't work in such case?

Actually, it makes me laugh out loud. Isn't that exactly what I told in my blog (above posting) about what is wrong with JSF? It is sad too.

Unfortunately, I have no solution for you. If you don't want to switch to Tapestry, you have to write your own radio component *just for that case*! Crass.

Oleg

obon386a at 2007-7-13 12:47:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...