I am not sure if I understand what you mean, but you can use
forceId/forceIdIndex also inside dataTables. The next snipped comes
from the myfaces examples [1]:
<t:dataTable value="#{forceIdBean.choices}" var="choice">
<h:column>
<t:inputText id="widget" value="#{choice}"
forceId="true" forceIdIndex="true"/>
</h:column>
</t:dataTable>
Then, you can access to your element using the id widget[x], where x
is the index...
Hope that helps,
Bruno
[1] http://www.irian.at/myfaces/forceId.jsf
2005/11/21, Airton Carrara <[EMAIL PROTECTED]>:
> Hi Bruno.
>
> How to use this id on the code?
>
> Suppose:
>
> ... <h:dataTable... var="users" ... <h:column> ...
>
> <t:inputHidden id="myId" forceId="true" value="#{users.name}"/>
> ...
>
> where "name" is coming from a database. How to use "myId" and its
> value on a target page/bean?
>
> Thanks a lot,
>
> Regards,
> Airton
>
>
> 2005/10/31, Bruno Aranda <[EMAIL PROTECTED]>:
> > You could use the forceId attribute of the t:inputHidden component.
> > For instance:
> >
> > <t:inputHidden id="myId" forceId="true" />
> >
> > will render a input type="hidden" component with clientId 'myId'. So
> > you can use this id safely in your code...
> >
> > Regards,
> >
> > Bruno
> >
> > 2005/10/31, CONNER, BRENDAN (SBCSI) <[EMAIL PROTECTED]>:
> > > Out of curiosity, did the rendered ID of the hidden field that
> > > represents a form's commandLinks get changed within the past couple of
> > > months from __LINK_TARGET__ to _link_hidden_? We had some code in our
> > > Tiles framework to automatically click a link on our page, and this
> > > assumed that the hidden field would be called __LINK_TARGET__, and this
> > > suddenly stopped working. Upon viewing the HTML source, we found that,
> > > if we changed our reference from __LINK_TARGET__ to _link_hidden_, our
> > > auto-click worked again.
> > >
> > > If this change occurred, my next question is: How can we refer to this
> > > hidden field in a manner that protects us against changes to its name?
> > >
> > > - Brendan
> > >
> >
>