hi Bruno,
SelectOneListBox don't exist in my extended implementation of myfaces
:(...
i can't use forceId.
I'm newby in jsf... and... generate my own HTMLSelectOneListBox... :P...
mmnn... is not a good idea.
But... based on this... me ask...
<h:selectOneListbox id="leftList" size="15" title="#{bean.rightListId} "
...
then... I need a bean to get the rendered id. How make this with the
FacesContext?
(with code example will be happy :D)
--
Mariano G. Petrakovsky
Programmer � Software Factory
AXG Tecnonexo - www.tecnonexo.com
Development facilities:Av. Maip� 1252 8� (C1006ACT) � Buenos Aires �
Argentina.
Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065.
Headquarters: 1604 Spring Hill Road, Suite 160 Vienna � VA 22182 � USA.
Tel.: (202) 986-7541 - Fax: (202) 787-3891.
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
� � � �
-----Mensaje original-----
De: Bruno Aranda [mailto:[EMAIL PROTECTED]
Enviado el: Viernes, 10 de Junio de 2005 14:01
Para: MyFaces Discussion
Asunto: Re: How to reference a component?
The easiest way to do this is to use the extended selectOneLisbox
components and use the attribute forceId, something like this:
<h:selectOneListbox id="leftList" size="15" title="rightList" ...
<h:selectOneListbox id="rightList" forceId="true" size="15" title=""...
The forceId attribute provokes that the clientId is the same that the
id you use with the id attribute.
If you want to keep to standard components, you must have to use a
backing bean where you dynamically generate the HtmlSelectOneListbox
components, then you could get the final id (client id) of the other
component using list1.setTitle(list2.getClientId(facesContext));
Hope this helps,
Bruno
2005/6/10, Mariano Petrakovsky <[EMAIL PROTECTED]>:
>
> How to reference an component inside the .jsp...???
>
> if I have an .jsp like this:
>
> <h:selectOneListbox id="leftList" size="15" title="" ...
> ...
> <h:selectOneListbox id="rightList" size="15" title=""...
>
> I need for instance... make title of first SelectOneListbox with the
> rightList id
>
> some like... <h:selectOneListbox id="leftList" size="15"
> title="rightList.id"
>
> (I need this because id rendered is different of id static, it's
add
> form:subview:... then i need the id rendered :))
>
> --
> Mariano G. Petrakovsky
> Programmer � Software Factory
> AXG Tecnonexo - www.tecnonexo.com
>
> Development facilities:Av. Maip� 1252 8� (C1006ACT) � Buenos Aires �
> Argentina.
> Tel.: (54-11) 4878-0005 - Fax: (54-11) 4878-0065.
>
> Headquarters: 1604 Spring Hill Road, Suite 160 Vienna � VA 22182 � USA.
> Tel.: (202) 986-7541 - Fax: (202) 787-3891.
>
> � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
�
> � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
�
> � � � �
>
>