You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Fabiano Choueiri <fa...@camara.gov.br> on 2006/01/16 14:45:31 UTC
Getting the name of the component being redered.
Hi all.
I made a component that consists in two validfields ( month and
year ) and they are working fine.
What I want is that when the first input text (Month) is
completely filled the focus goes to the
next field (Year). I tried a simple javascript but when
Tapestry renders the input texts I dont know the names generated to
that input text and I need the name to make the javascript.
How can I get the name of the input text and other html elemenst
generated by Tapestry ?
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Getting the name of the component being redered.
Posted by Numa Schmeder <nu...@euroconsumers.com>.
Hello,
First you must give a name to your components to be able to retrieve it:
<span jwcid="test@InsertText" value="ognl:myText"></span>
then in the java:
getComponents("test").getName();
or in the html:
the name of my component is <span jwcid="@InsertText"
value="ognl:components.test.name">Test name</span>
It works the same for any tapestry components, TextField etc...
<input type="text" jwcid="test@TextField" value="ognl:testFieldValue"/>
then in the java:
getComponents("test").getName();
or in the html:
the name of my component is <span jwcid="@InsertText"
value="ognl:components.test.name">Test name</span>
Bye
Numa
Le 16 janv. 06 à 14:45, Fabiano Choueiri a écrit :
>
> Hi all.
>
> I made a component that consists in two validfields ( month and
> year ) and they are working fine.
> What I want is that when the first input text (Month) is
> completely filled the focus goes to the
> next field (Year). I tried a simple javascript but when
> Tapestry renders the input texts I dont know the names generated to
> that input text and I need the name to make the javascript.
>
> How can I get the name of the input text and other html elemenst
> generated by Tapestry ?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org