You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Dipl.-Ing. Torsten Liermann" <li...@liermann-it.de> on 2008/05/07 00:55:21 UTC
? Clientid of UIInput in tables
Hi, I would like to add faces messages to Input Elements within
a Table. How can I get the client id like the rendered client id
xyz:0:abc
xyz:1:abc
...
How how is it possible to iterate over a datatable?
Thanks for a tip
Torsten
Re: ? Clientid of UIInput in tables
Posted by "Dipl.-Ing. Torsten Liermann" <li...@liermann-it.de>.
Thanks! No other chance? I will only add validation messages
from an external system to a table cell....
On Tue, 6 May 2008 17:36:40 -0600
"Andrew Robinson" <an...@gmail.com> wrote:
>By calling getClientId(FacesContext) on a table, while it is iterating
>will give you the stamp.
>
>So, in your example:
>
>UIData data = (UIData)viewRoot.findComponent('xyz');
>UIComponent comp = data.findComponent('abc');
>
>data.setRowIndex(0);
>
>String id = comp.getClientId(facesContext);
>
>// this will return "xyz:0:abc"
>
>data.setRowIndex(-1);
>
>
>On Tue, May 6, 2008 at 4:55 PM, Dipl.-Ing. Torsten Liermann
><li...@liermann-it.de> wrote:
>> Hi, I would like to add faces messages to Input Elements within
>> a Table. How can I get the client id like the rendered client id
>> xyz:0:abc
>> xyz:1:abc
>> ...
>> How how is it possible to iterate over a datatable?
>>
>> Thanks for a tip
>> Torsten
>>
----
Dipl.-Ing. Torsten Liermann Tel: +49 151/11565077
Primelstrasse 22d Fax: +49 8106/358047
85591 Vaterstetten http://liermann-it.de
Re: ? Clientid of UIInput in tables
Posted by Andrew Robinson <an...@gmail.com>.
By calling getClientId(FacesContext) on a table, while it is iterating
will give you the stamp.
So, in your example:
UIData data = (UIData)viewRoot.findComponent('xyz');
UIComponent comp = data.findComponent('abc');
data.setRowIndex(0);
String id = comp.getClientId(facesContext);
// this will return "xyz:0:abc"
data.setRowIndex(-1);
On Tue, May 6, 2008 at 4:55 PM, Dipl.-Ing. Torsten Liermann
<li...@liermann-it.de> wrote:
> Hi, I would like to add faces messages to Input Elements within
> a Table. How can I get the client id like the rendered client id
> xyz:0:abc
> xyz:1:abc
> ...
> How how is it possible to iterate over a datatable?
>
> Thanks for a tip
> Torsten
>