You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Digdas <aa...@nxp.com> on 2010/07/08 12:15:33 UTC

t:selectOneRadio in a4j:repeat

With the following example, I am not able to find the "for" for the t:radio
tag.

		<h:form id="lotExperimentForm">
			<a4j:repeat value="#{enumHelper.yesNo}" id="rep">
				<t:selectOneRadio id="wafer2" layout="spread">
					<f:selectItem itemValue="test1" />
					<f:selectItem itemValue="test2" />

				</t:selectOneRadio>
			</a4j:repeat>
			<t:radio for="lotExperimentForm:rep:0:wafer2" index="1"></t:radio>
		</h:form>


When I leave out the layout="spread" and the t:radio, and I inspect the
source of the page, the id="lotExperimentForm:rep:0:wafer2".

How can I find out the id?

Without the a4j:repeat, the name of the id is simple:
lotExperimentForm:wafer2. This works.
-- 
View this message in context: http://old.nabble.com/t%3AselectOneRadio-in-a4j%3Arepeat-tp29105396p29105396.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:selectOneRadio in a4j:repeat

Posted by Digdas <aa...@nxp.com>.
This does not work with the example provided. The string is not found (I
think part of the problem is that the Id is build up in the wrong phase,
after the check for the "for.." line.

I have found my solution:
(Code snipplet with the relevant info)

<rich:dataTable..>
<t:selectOneRadio id="wafer1" value="#{stepe.wafer1SplitGroup}" 
forceIdIndex="false">
							<s:selectItems var="sg" value="#{stepe.splitGroups}"
noSelectionLabel=""/>
							<s:convertEntity/>
						</t:selectOneRadio>

						<rich:column>
							<f:facet name="header">1</f:facet>
							<t:radio for="wafer1" index="#{index+1}"></t:radio>
							<f:facet name="footer">
								<t:radio for="wafer1" index="0"></t:radio> 
							</f:facet> 
						</rich:column>
</rich:dataTable>

This works as I would expect... (See forceIdIndex to false + the
t:selectOneRadio within the rich:datatable, but outside the rich:column)

Thanks for the answer.


Michael Kurz wrote:
> 
> Try to prepend a colon to the id (might help to make id "absolute"):
> 
> for=":lotExperimentForm:rep:0:wafer2"
> 
> Regards
> Michael
> 
> -------- Original-Nachricht --------
>> Datum: Thu, 8 Jul 2010 03:15:33 -0700 (PDT)
>> Von: Digdas <aa...@nxp.com>
>> An: users@myfaces.apache.org
>> Betreff: t:selectOneRadio in a4j:repeat
> 
>> 
>> With the following example, I am not able to find the "for" for the
>> t:radio
>> tag.
>> 
>> 		<h:form id="lotExperimentForm">
>> 			<a4j:repeat value="#{enumHelper.yesNo}" id="rep">
>> 				<t:selectOneRadio id="wafer2" layout="spread">
>> 					<f:selectItem itemValue="test1" />
>> 					<f:selectItem itemValue="test2" />
>> 
>> 				</t:selectOneRadio>
>> 			</a4j:repeat>
>> 			<t:radio for="lotExperimentForm:rep:0:wafer2" index="1"></t:radio>
>> 		</h:form>
>> 
>> 
>> When I leave out the layout="spread" and the t:radio, and I inspect the
>> source of the page, the id="lotExperimentForm:rep:0:wafer2".
>> 
>> How can I find out the id?
>> 
>> Without the a4j:repeat, the name of the id is simple:
>> lotExperimentForm:wafer2. This works.
>> -- 
>> View this message in context:
>> http://old.nabble.com/t%3AselectOneRadio-in-a4j%3Arepeat-tp29105396p29105396.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/t%3AselectOneRadio-in-a4j%3Arepeat-tp29105396p29114674.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: t:selectOneRadio in a4j:repeat

Posted by Michael Kurz <mi...@gmx.at>.
Try to prepend a colon to the id (might help to make id "absolute"):

for=":lotExperimentForm:rep:0:wafer2"

Regards
Michael

-------- Original-Nachricht --------
> Datum: Thu, 8 Jul 2010 03:15:33 -0700 (PDT)
> Von: Digdas <aa...@nxp.com>
> An: users@myfaces.apache.org
> Betreff: t:selectOneRadio in a4j:repeat

> 
> With the following example, I am not able to find the "for" for the
> t:radio
> tag.
> 
> 		<h:form id="lotExperimentForm">
> 			<a4j:repeat value="#{enumHelper.yesNo}" id="rep">
> 				<t:selectOneRadio id="wafer2" layout="spread">
> 					<f:selectItem itemValue="test1" />
> 					<f:selectItem itemValue="test2" />
> 
> 				</t:selectOneRadio>
> 			</a4j:repeat>
> 			<t:radio for="lotExperimentForm:rep:0:wafer2" index="1"></t:radio>
> 		</h:form>
> 
> 
> When I leave out the layout="spread" and the t:radio, and I inspect the
> source of the page, the id="lotExperimentForm:rep:0:wafer2".
> 
> How can I find out the id?
> 
> Without the a4j:repeat, the name of the id is simple:
> lotExperimentForm:wafer2. This works.
> -- 
> View this message in context:
> http://old.nabble.com/t%3AselectOneRadio-in-a4j%3Arepeat-tp29105396p29105396.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>