You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Roberto Ramírez Vique <ro...@gmail.com> on 2006/11/02 23:52:00 UTC

use unique id's generated by tapestry

Hello!

I want to use something that I supose tapestry already made for me.

I'll try to explain because probably some of you have, or have had this
question, and probably the answer to my question is that this is not
possible or shouldn't be done, but I'm not sure.

I want to use the tapestry generated Id's. I have seen that in tapestry,
when an element is inside a For component (supose we have a TextField with
id= name), and this element is part of a dynamic form, is generated with a
different id in each loop, this Id use to be like: tapestryIdName_X (where X
is the index in the loop, or the index-1). I want to know if is possible to
use the clientId that I've debugged and saw that is the correct one.
I would like to use this id in two situations, one just to know the id of a
TextField and the other to know the Id of my own component.

Thanks you,
-- 
Robert Ramírez Vique
Computer Science Engineer

Re: use unique id's generated by tapestry

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
Hello Jesse,

thanks for your response, but I'm afraid my problem was that I'm using
tapestry 4.0 (clientId is public accessible in 4.0, no?). (sorry for not
warning you before).

Well, As I explained before I've tried using the clientId, always inside a
For component. In this For loop I have a component (the one I want to
unequivocally identify), but I've tried accessing inside the component class
to the getClientId but always return to me the same ID.

Thanks you in advance,
         robert

On 11/3/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>
> IComponent.getClientId() or IComponent.getId()
>
> getClientId() is only relevant "in context"...ie calling it inside a For
> loop would be good.
>
> On 11/2/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> >
> > Hello!
> >
> > I want to use something that I supose tapestry already made for me.
> >
> > I'll try to explain because probably some of you have, or have had this
> > question, and probably the answer to my question is that this is not
> > possible or shouldn't be done, but I'm not sure.
> >
> > I want to use the tapestry generated Id's. I have seen that in tapestry,
> > when an element is inside a For component (supose we have a TextField
> with
> > id= name), and this element is part of a dynamic form, is generated with
> a
> > different id in each loop, this Id use to be like: tapestryIdName_X
> (where
> > X
> > is the index in the loop, or the index-1). I want to know if is possible
> > to
> > use the clientId that I've debugged and saw that is the correct one.
> > I would like to use this id in two situations, one just to know the id
> of
> > a
> > TextField and the other to know the Id of my own component.
> >
> > Thanks you,
> > --
> > Robert Ramírez Vique
> > Computer Science Engineer
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>


-- 
Robert Ramírez Vique
Computer Science Engineer

Re: use unique id's generated by tapestry

Posted by Jesse Kuhnert <jk...@gmail.com>.
Whenever you're not sure about something there are always branches....Very
cheap and easy to use and allows for easier collaboration on code.

On 11/4/06, andyhot <an...@di.uoa.gr> wrote:
>
> Patrick Moore wrote:
> > I am hardly close to being an expert ... :-) So I always qualify what
> > I am saying because some of the times I was just making a mistake in
> > my understanding. For me clientId was not working if I had a component
> > nested in a @For loop.
>
> clientId also didn't work for me...
>
> AFAIK, there's currently no way to get to the unique id that each
> component generates,
> esp. if those components are in a loop (or in subcomponents)
> and you need their 'client' id to apply javascripts...
>
> Additionally, elements in form generate unique ids per form and not per
> page (just like
> you described in http://issues.apache.org/jira/browse/TAPESTRY-1131 )
>
> However, i've already fixed both those issues but would like to have a
> word with Jesse
> before going ahead with the commit + want to describe the methodology
> and other
> possible solutions (and their pitafalls) in our wiki...
>
> So, please, stay tuned!
>
> >
> > On 11/3/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> >> Hello Pat!
> >>
> >> first of all, thanks you for your comments !
> >>
> >> Well, I'm really not an expert developer on tapestry, and for sure
> >> you have
> >> tried this. But the div tag shouldn't be something like:
> >> <div dojoType="tp:widget1" sid="ognl.foo.clientId" jwcid="@Any"/>
> >> I tell you this because to me in this way is working .. tapestry uses
> >> the
> >> clientId for me.
> >>
> >> Btw, I'm using tapestry 4.0, and you are using 4.1 since you can
> >> access to
> >> IComponent.clientId :P
> >>
> >> Thanks,
> >>         robert
> >>
> >>
> >> On 11/3/06, Patrick Moore <tr...@gmail.com> wrote:
> >> >
> >> > I just realized that what I said was not completely clear. if you
> have
> >> > this:
> >> >
> >> > <span jwcid="@For" source="1..2">
> >> >     <span jwcid="@mycomponent">
> >> > </span>
> >> >
> >> > with mycomponent template like this:
> >> >
> >> > <input jwcid="foo@Hidden" id="ognl.components.foo.idPath"/>
> >> > <div dojoType="tp:widget1" sid="ognl.foo.clientId"/>
> >> >
> >> > you would end up with generated out put like this:
> >> >
> >> > <input type="hidden" id="my.path.foo"/>
> >> > <div dojoType="tp:widget1" sid="my.path.foo"/>
> >> >
> >> > <input type="hidden" id="my.path.foo_0"/>
> >> > <div dojoType="tp:widget1" sid="my.path.foo"/>
> >> >
> >> > so the second instance of the div tag would refer to the first
> >> > instance of the hidden field, not the second like it should.
> >> >
> >> > I hope that is clearer. If anyone discovers I am wrong please let me
> >> > know the solution.
> >> >
> >> > -Pat
> >> > On 11/2/06, Patrick Moore <tr...@gmail.com> wrote:
> >> > > However see :
> >> > > http://issues.apache.org/jira/browse/TAPESTRY-1131
> >> > >
> >> > >
> >> > > use clientId does not always generate  a unique Id on a page level
> >> > > basis. If another component tried to access the first component's
> >> > > clientId,  the result returned would be the first id not the
> correct
> >> > > uniquified value.
> >> > >
> >> > > -Pat
> >> > >
> >> > > On 11/2/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> >> > > > IComponent.getClientId() or IComponent.getId()
> >> > > >
> >> > > > getClientId() is only relevant "in context"...ie calling it
> >> inside a
> >> > For
> >> > > > loop would be good.
> >> > > >
> >> > > > On 11/2/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> >> > > > >
> >> > > > > Hello!
> >> > > > >
> >> > > > > I want to use something that I supose tapestry already made
> >> for me.
> >> > > > >
> >> > > > > I'll try to explain because probably some of you have, or
> >> have had
> >> > this
> >> > > > > question, and probably the answer to my question is that this
> >> is not
> >> > > > > possible or shouldn't be done, but I'm not sure.
> >> > > > >
> >> > > > > I want to use the tapestry generated Id's. I have seen that in
> >> > tapestry,
> >> > > > > when an element is inside a For component (supose we have a
> >> > TextField with
> >> > > > > id= name), and this element is part of a dynamic form, is
> >> generated
> >> > with a
> >> > > > > different id in each loop, this Id use to be like:
> >> tapestryIdName_X
> >> > (where
> >> > > > > X
> >> > > > > is the index in the loop, or the index-1). I want to know if is
> >> > possible
> >> > > > > to
> >> > > > > use the clientId that I've debugged and saw that is the
> >> correct one.
> >> > > > > I would like to use this id in two situations, one just to
> >> know the
> >> > id of
> >> > > > > a
> >> > > > > TextField and the other to know the Id of my own component.
> >> > > > >
> >> > > > > Thanks you,
> >> > > > > --
> >> > > > > Robert Ramírez Vique
> >> > > > > Computer Science Engineer
> >> > > > >
> >> > > > >
> >> > > >
> >> > > >
> >> > > > --
> >> > > > Jesse Kuhnert
> >> > > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >> > > >
> >> > > > Open source based consulting work centered around
> >> > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >> > > >
> >> > > >
> >> > >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> > For additional commands, e-mail: users-help@tapestry.apache.org
> >> >
> >> >
> >>
> >>
> >> --
> >> Robert Ramírez Vique
> >> Computer Science Engineer
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: use unique id's generated by tapestry

Posted by andyhot <an...@di.uoa.gr>.
Patrick Moore wrote:
> I am hardly close to being an expert ... :-) So I always qualify what
> I am saying because some of the times I was just making a mistake in
> my understanding. For me clientId was not working if I had a component
> nested in a @For loop.

clientId also didn't work for me...

AFAIK, there's currently no way to get to the unique id that each
component generates,
esp. if those components are in a loop (or in subcomponents)
and you need their 'client' id to apply javascripts...

Additionally, elements in form generate unique ids per form and not per
page (just like
you described in http://issues.apache.org/jira/browse/TAPESTRY-1131 )

However, i've already fixed both those issues but would like to have a
word with Jesse
before going ahead with the commit + want to describe the methodology
and other
possible solutions (and their pitafalls) in our wiki...

So, please, stay tuned!

>
> On 11/3/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
>> Hello Pat!
>>
>> first of all, thanks you for your comments !
>>
>> Well, I'm really not an expert developer on tapestry, and for sure
>> you have
>> tried this. But the div tag shouldn't be something like:
>> <div dojoType="tp:widget1" sid="ognl.foo.clientId" jwcid="@Any"/>
>> I tell you this because to me in this way is working .. tapestry uses
>> the
>> clientId for me.
>>
>> Btw, I'm using tapestry 4.0, and you are using 4.1 since you can
>> access to
>> IComponent.clientId :P
>>
>> Thanks,
>>         robert
>>
>>
>> On 11/3/06, Patrick Moore <tr...@gmail.com> wrote:
>> >
>> > I just realized that what I said was not completely clear. if you have
>> > this:
>> >
>> > <span jwcid="@For" source="1..2">
>> >     <span jwcid="@mycomponent">
>> > </span>
>> >
>> > with mycomponent template like this:
>> >
>> > <input jwcid="foo@Hidden" id="ognl.components.foo.idPath"/>
>> > <div dojoType="tp:widget1" sid="ognl.foo.clientId"/>
>> >
>> > you would end up with generated out put like this:
>> >
>> > <input type="hidden" id="my.path.foo"/>
>> > <div dojoType="tp:widget1" sid="my.path.foo"/>
>> >
>> > <input type="hidden" id="my.path.foo_0"/>
>> > <div dojoType="tp:widget1" sid="my.path.foo"/>
>> >
>> > so the second instance of the div tag would refer to the first
>> > instance of the hidden field, not the second like it should.
>> >
>> > I hope that is clearer. If anyone discovers I am wrong please let me
>> > know the solution.
>> >
>> > -Pat
>> > On 11/2/06, Patrick Moore <tr...@gmail.com> wrote:
>> > > However see :
>> > > http://issues.apache.org/jira/browse/TAPESTRY-1131
>> > >
>> > >
>> > > use clientId does not always generate  a unique Id on a page level
>> > > basis. If another component tried to access the first component's
>> > > clientId,  the result returned would be the first id not the correct
>> > > uniquified value.
>> > >
>> > > -Pat
>> > >
>> > > On 11/2/06, Jesse Kuhnert <jk...@gmail.com> wrote:
>> > > > IComponent.getClientId() or IComponent.getId()
>> > > >
>> > > > getClientId() is only relevant "in context"...ie calling it
>> inside a
>> > For
>> > > > loop would be good.
>> > > >
>> > > > On 11/2/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
>> > > > >
>> > > > > Hello!
>> > > > >
>> > > > > I want to use something that I supose tapestry already made
>> for me.
>> > > > >
>> > > > > I'll try to explain because probably some of you have, or
>> have had
>> > this
>> > > > > question, and probably the answer to my question is that this
>> is not
>> > > > > possible or shouldn't be done, but I'm not sure.
>> > > > >
>> > > > > I want to use the tapestry generated Id's. I have seen that in
>> > tapestry,
>> > > > > when an element is inside a For component (supose we have a
>> > TextField with
>> > > > > id= name), and this element is part of a dynamic form, is
>> generated
>> > with a
>> > > > > different id in each loop, this Id use to be like:
>> tapestryIdName_X
>> > (where
>> > > > > X
>> > > > > is the index in the loop, or the index-1). I want to know if is
>> > possible
>> > > > > to
>> > > > > use the clientId that I've debugged and saw that is the
>> correct one.
>> > > > > I would like to use this id in two situations, one just to
>> know the
>> > id of
>> > > > > a
>> > > > > TextField and the other to know the Id of my own component.
>> > > > >
>> > > > > Thanks you,
>> > > > > --
>> > > > > Robert Ramírez Vique
>> > > > > Computer Science Engineer
>> > > > >
>> > > > >
>> > > >
>> > > >
>> > > > --
>> > > > Jesse Kuhnert
>> > > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
>> > > >
>> > > > Open source based consulting work centered around
>> > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>> > > >
>> > > >
>> > >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> > For additional commands, e-mail: users-help@tapestry.apache.org
>> >
>> >
>>
>>
>> -- 
>> Robert Ramírez Vique
>> Computer Science Engineer
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use unique id's generated by tapestry

Posted by Patrick Moore <tr...@gmail.com>.
I am hardly close to being an expert ... :-) So I always qualify what
I am saying because some of the times I was just making a mistake in
my understanding. For me clientId was not working if I had a component
nested in a @For loop.

On 11/3/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> Hello Pat!
>
> first of all, thanks you for your comments !
>
> Well, I'm really not an expert developer on tapestry, and for sure you have
> tried this. But the div tag shouldn't be something like:
> <div dojoType="tp:widget1" sid="ognl.foo.clientId" jwcid="@Any"/>
> I tell you this because to me in this way is working .. tapestry uses the
> clientId for me.
>
> Btw, I'm using tapestry 4.0, and you are using 4.1 since you can access to
> IComponent.clientId :P
>
> Thanks,
>         robert
>
>
> On 11/3/06, Patrick Moore <tr...@gmail.com> wrote:
> >
> > I just realized that what I said was not completely clear. if you have
> > this:
> >
> > <span jwcid="@For" source="1..2">
> >     <span jwcid="@mycomponent">
> > </span>
> >
> > with mycomponent template like this:
> >
> > <input jwcid="foo@Hidden" id="ognl.components.foo.idPath"/>
> > <div dojoType="tp:widget1" sid="ognl.foo.clientId"/>
> >
> > you would end up with generated out put like this:
> >
> > <input type="hidden" id="my.path.foo"/>
> > <div dojoType="tp:widget1" sid="my.path.foo"/>
> >
> > <input type="hidden" id="my.path.foo_0"/>
> > <div dojoType="tp:widget1" sid="my.path.foo"/>
> >
> > so the second instance of the div tag would refer to the first
> > instance of the hidden field, not the second like it should.
> >
> > I hope that is clearer. If anyone discovers I am wrong please let me
> > know the solution.
> >
> > -Pat
> > On 11/2/06, Patrick Moore <tr...@gmail.com> wrote:
> > > However see :
> > > http://issues.apache.org/jira/browse/TAPESTRY-1131
> > >
> > >
> > > use clientId does not always generate  a unique Id on a page level
> > > basis. If another component tried to access the first component's
> > > clientId,  the result returned would be the first id not the correct
> > > uniquified value.
> > >
> > > -Pat
> > >
> > > On 11/2/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > > > IComponent.getClientId() or IComponent.getId()
> > > >
> > > > getClientId() is only relevant "in context"...ie calling it inside a
> > For
> > > > loop would be good.
> > > >
> > > > On 11/2/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> > > > >
> > > > > Hello!
> > > > >
> > > > > I want to use something that I supose tapestry already made for me.
> > > > >
> > > > > I'll try to explain because probably some of you have, or have had
> > this
> > > > > question, and probably the answer to my question is that this is not
> > > > > possible or shouldn't be done, but I'm not sure.
> > > > >
> > > > > I want to use the tapestry generated Id's. I have seen that in
> > tapestry,
> > > > > when an element is inside a For component (supose we have a
> > TextField with
> > > > > id= name), and this element is part of a dynamic form, is generated
> > with a
> > > > > different id in each loop, this Id use to be like: tapestryIdName_X
> > (where
> > > > > X
> > > > > is the index in the loop, or the index-1). I want to know if is
> > possible
> > > > > to
> > > > > use the clientId that I've debugged and saw that is the correct one.
> > > > > I would like to use this id in two situations, one just to know the
> > id of
> > > > > a
> > > > > TextField and the other to know the Id of my own component.
> > > > >
> > > > > Thanks you,
> > > > > --
> > > > > Robert Ramírez Vique
> > > > > Computer Science Engineer
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Jesse Kuhnert
> > > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > > >
> > > > Open source based consulting work centered around
> > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
>
> --
> Robert Ramírez Vique
> Computer Science Engineer
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use unique id's generated by tapestry

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
Hello Pat!

first of all, thanks you for your comments !

Well, I'm really not an expert developer on tapestry, and for sure you have
tried this. But the div tag shouldn't be something like:
<div dojoType="tp:widget1" sid="ognl.foo.clientId" jwcid="@Any"/>
I tell you this because to me in this way is working .. tapestry uses the
clientId for me.

Btw, I'm using tapestry 4.0, and you are using 4.1 since you can access to
IComponent.clientId :P

Thanks,
        robert


On 11/3/06, Patrick Moore <tr...@gmail.com> wrote:
>
> I just realized that what I said was not completely clear. if you have
> this:
>
> <span jwcid="@For" source="1..2">
>     <span jwcid="@mycomponent">
> </span>
>
> with mycomponent template like this:
>
> <input jwcid="foo@Hidden" id="ognl.components.foo.idPath"/>
> <div dojoType="tp:widget1" sid="ognl.foo.clientId"/>
>
> you would end up with generated out put like this:
>
> <input type="hidden" id="my.path.foo"/>
> <div dojoType="tp:widget1" sid="my.path.foo"/>
>
> <input type="hidden" id="my.path.foo_0"/>
> <div dojoType="tp:widget1" sid="my.path.foo"/>
>
> so the second instance of the div tag would refer to the first
> instance of the hidden field, not the second like it should.
>
> I hope that is clearer. If anyone discovers I am wrong please let me
> know the solution.
>
> -Pat
> On 11/2/06, Patrick Moore <tr...@gmail.com> wrote:
> > However see :
> > http://issues.apache.org/jira/browse/TAPESTRY-1131
> >
> >
> > use clientId does not always generate  a unique Id on a page level
> > basis. If another component tried to access the first component's
> > clientId,  the result returned would be the first id not the correct
> > uniquified value.
> >
> > -Pat
> >
> > On 11/2/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > > IComponent.getClientId() or IComponent.getId()
> > >
> > > getClientId() is only relevant "in context"...ie calling it inside a
> For
> > > loop would be good.
> > >
> > > On 11/2/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> > > >
> > > > Hello!
> > > >
> > > > I want to use something that I supose tapestry already made for me.
> > > >
> > > > I'll try to explain because probably some of you have, or have had
> this
> > > > question, and probably the answer to my question is that this is not
> > > > possible or shouldn't be done, but I'm not sure.
> > > >
> > > > I want to use the tapestry generated Id's. I have seen that in
> tapestry,
> > > > when an element is inside a For component (supose we have a
> TextField with
> > > > id= name), and this element is part of a dynamic form, is generated
> with a
> > > > different id in each loop, this Id use to be like: tapestryIdName_X
> (where
> > > > X
> > > > is the index in the loop, or the index-1). I want to know if is
> possible
> > > > to
> > > > use the clientId that I've debugged and saw that is the correct one.
> > > > I would like to use this id in two situations, one just to know the
> id of
> > > > a
> > > > TextField and the other to know the Id of my own component.
> > > >
> > > > Thanks you,
> > > > --
> > > > Robert Ramírez Vique
> > > > Computer Science Engineer
> > > >
> > > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Robert Ramírez Vique
Computer Science Engineer

Re: use unique id's generated by tapestry

Posted by Robert Binna <r....@synedra.com>.
Tanks a lot. That really helps.

regards, Robert

Jesse Kuhnert schrieb:
> Not anymore they don't.
>
> On 11/9/06, Robert Binna <r....@synedra.com> wrote:
>>
>> Hi.
>>
>> Thanks, but I know about this method getClientId(), but each component
>> looses its client id information after rendering is finished and so the
>> parent component will never know.
>>
>> regards
>>        Robert
>>
>>
>>
>> Roberto Ramírez Vique schrieb:
>>
>> > Hello,
>> >
>> > I'm not sure because I've never used it ... but I think tapestry 
>> 4.1(I'm
>> > using 4.0 because 4.1 is not stable) let you know which is the
>> > clientId for
>> > a component:
>> >
>> >
>> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/IComponent.html#getClientId() 
>>
>> >
>> >
>> > I don't know if this is what you've asked.
>> >
>> > regards,
>> >         r.
>> >
>> > On 11/9/06, Robert Binna <r....@synedra.com> wrote:
>> >
>> >>
>> >> Hi
>> >>
>> >> You are right.
>> >> There seems to be situation when you get the right id, but I just 
>> came
>> >> across one where this is not the case. After that I take a short
>> >> look at the tapestry code and I wonder why my sugested solution ever
>> >> worked.
>> >>
>> >> My Question is, can anyone give me a hint how to implement dojo 
>> wrapper
>> >> widgets in a correct way, that depend on other components.
>> >> Eg.: I just wanted to create a Tooltip component with the dojo 
>> tooltip
>> >> that can be used an any other tapestry component, but
>> >>         therefore I would need to have the client id of the 
>> component,
>> I
>> >> want to show the tooltip for.
>> >>
>> >> I think this is realy a demand, because other users I am in contact
>> >> with, start making hacks around pseudo css classes to get the ids 
>> back
>> >> in return.
>> >>
>> >> kind regards,
>> >>        Robert
>> >>
>> >>
>> >>
>> >>
>> >> Roberto Ramírez Vique schrieb:
>> >>
>> >> > I'm using this method (also using tap 4.0.2), but seems to be not
>> >> > working.
>> >> > For me it gets the next supposed "id", I mean, if I have a 
>> component
>> >> > named
>> >> > legalId the id in the page is legalId  but when I executed the 
>> method
>> >> > I get
>> >> > : legalId_0 ... probably I make any mistake...
>> >> >
>> >> > thanks,
>> >> >        robert
>> >> >
>> >> >
>> >> >
>> >> > On 11/5/06, Karthik N <ka...@gmail.com> wrote:
>> >> >
>> >> >>
>> >> >> yes i did use idPath for the hidden field.
>> >> >>
>> >> >> but i'm using tapestry 4.0.2 - could that be the reason i'm seeing
>> >> >> different
>> >> >> results than you are?
>> >> >>
>> >> >> On 11/5/06, Patrick Moore <tr...@gmail.com> wrote:
>> >> >> >
>> >> >> > did you assign the hidden field's id using idPath?
>> >> >> >
>> >> >> > Also I am using the 4.1.1 SVN build.
>> >> >> >
>> >> >> > I am having some success with this method (borrowed from 
>> another's
>> >> >> > email) in finding the unique ids but I haven't throughly 
>> tested it
>> >> >> > yet:
>> >> >> >
>> >> >> > public String getUniqueId(AbstractComponent component) {
>> >> >> >         return getRequestCycle().getUniqueId(
>> >> >> > 
>> TapestryUtils.convertTapestryIdToNMToken(component.getIdPath()));
>> >> >> > }
>> >> >> >
>> >> >> > Hopefully there is a better solution soon!
>> >> >> >
>> >> >> > -Pat
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use unique id's generated by tapestry

Posted by Jesse Kuhnert <jk...@gmail.com>.
Not anymore they don't.

On 11/9/06, Robert Binna <r....@synedra.com> wrote:
>
> Hi.
>
> Thanks, but I know about this method getClientId(), but each component
> looses its client id information after rendering is finished and so the
> parent component will never know.
>
> regards
>        Robert
>
>
>
> Roberto Ramírez Vique schrieb:
>
> > Hello,
> >
> > I'm not sure because I've never used it ... but I think tapestry 4.1(I'm
> > using 4.0 because 4.1 is not stable) let you know which is the
> > clientId for
> > a component:
> >
> >
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/IComponent.html#getClientId()
> >
> >
> > I don't know if this is what you've asked.
> >
> > regards,
> >         r.
> >
> > On 11/9/06, Robert Binna <r....@synedra.com> wrote:
> >
> >>
> >> Hi
> >>
> >> You are right.
> >> There seems to be situation when you get the right id, but I just came
> >> across one where this is not the case. After that I take a short
> >> look at the tapestry code and I wonder why my sugested solution ever
> >> worked.
> >>
> >> My Question is, can anyone give me a hint how to implement dojo wrapper
> >> widgets in a correct way, that depend on other components.
> >> Eg.: I just wanted to create a Tooltip component with the dojo tooltip
> >> that can be used an any other tapestry component, but
> >>         therefore I would need to have the client id of the component,
> I
> >> want to show the tooltip for.
> >>
> >> I think this is realy a demand, because other users I am in contact
> >> with, start making hacks around pseudo css classes to get the ids back
> >> in return.
> >>
> >> kind regards,
> >>        Robert
> >>
> >>
> >>
> >>
> >> Roberto Ramírez Vique schrieb:
> >>
> >> > I'm using this method (also using tap 4.0.2), but seems to be not
> >> > working.
> >> > For me it gets the next supposed "id", I mean, if I have a component
> >> > named
> >> > legalId the id in the page is legalId  but when I executed the method
> >> > I get
> >> > : legalId_0 ... probably I make any mistake...
> >> >
> >> > thanks,
> >> >        robert
> >> >
> >> >
> >> >
> >> > On 11/5/06, Karthik N <ka...@gmail.com> wrote:
> >> >
> >> >>
> >> >> yes i did use idPath for the hidden field.
> >> >>
> >> >> but i'm using tapestry 4.0.2 - could that be the reason i'm seeing
> >> >> different
> >> >> results than you are?
> >> >>
> >> >> On 11/5/06, Patrick Moore <tr...@gmail.com> wrote:
> >> >> >
> >> >> > did you assign the hidden field's id using idPath?
> >> >> >
> >> >> > Also I am using the 4.1.1 SVN build.
> >> >> >
> >> >> > I am having some success with this method (borrowed from another's
> >> >> > email) in finding the unique ids but I haven't throughly tested it
> >> >> > yet:
> >> >> >
> >> >> > public String getUniqueId(AbstractComponent component) {
> >> >> >         return getRequestCycle().getUniqueId(
> >> >> > TapestryUtils.convertTapestryIdToNMToken(component.getIdPath()));
> >> >> > }
> >> >> >
> >> >> > Hopefully there is a better solution soon!
> >> >> >
> >> >> > -Pat
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: use unique id's generated by tapestry

Posted by Robert Binna <r....@synedra.com>.
Hi.

Thanks, but I know about this method getClientId(), but each component 
looses its client id information after rendering is finished and so the 
parent component will never know.

regards
       Robert



Roberto Ramírez Vique schrieb:

> Hello,
>
> I'm not sure because I've never used it ... but I think tapestry 4.1 (I'm
> using 4.0 because 4.1 is not stable) let you know which is the 
> clientId for
> a component:
>
> http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/IComponent.html#getClientId() 
>
>
> I don't know if this is what you've asked.
>
> regards,
>         r.
>
> On 11/9/06, Robert Binna <r....@synedra.com> wrote:
>
>>
>> Hi
>>
>> You are right.
>> There seems to be situation when you get the right id, but I just came
>> across one where this is not the case. After that I take a short
>> look at the tapestry code and I wonder why my sugested solution ever
>> worked.
>>
>> My Question is, can anyone give me a hint how to implement dojo wrapper
>> widgets in a correct way, that depend on other components.
>> Eg.: I just wanted to create a Tooltip component with the dojo tooltip
>> that can be used an any other tapestry component, but
>>         therefore I would need to have the client id of the component, I
>> want to show the tooltip for.
>>
>> I think this is realy a demand, because other users I am in contact
>> with, start making hacks around pseudo css classes to get the ids back
>> in return.
>>
>> kind regards,
>>        Robert
>>
>>
>>
>>
>> Roberto Ramírez Vique schrieb:
>>
>> > I'm using this method (also using tap 4.0.2), but seems to be not
>> > working.
>> > For me it gets the next supposed "id", I mean, if I have a component
>> > named
>> > legalId the id in the page is legalId  but when I executed the method
>> > I get
>> > : legalId_0 ... probably I make any mistake...
>> >
>> > thanks,
>> >        robert
>> >
>> >
>> >
>> > On 11/5/06, Karthik N <ka...@gmail.com> wrote:
>> >
>> >>
>> >> yes i did use idPath for the hidden field.
>> >>
>> >> but i'm using tapestry 4.0.2 - could that be the reason i'm seeing
>> >> different
>> >> results than you are?
>> >>
>> >> On 11/5/06, Patrick Moore <tr...@gmail.com> wrote:
>> >> >
>> >> > did you assign the hidden field's id using idPath?
>> >> >
>> >> > Also I am using the 4.1.1 SVN build.
>> >> >
>> >> > I am having some success with this method (borrowed from another's
>> >> > email) in finding the unique ids but I haven't throughly tested it
>> >> > yet:
>> >> >
>> >> > public String getUniqueId(AbstractComponent component) {
>> >> >         return getRequestCycle().getUniqueId(
>> >> > TapestryUtils.convertTapestryIdToNMToken(component.getIdPath()));
>> >> > }
>> >> >
>> >> > Hopefully there is a better solution soon!
>> >> >
>> >> > -Pat
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use unique id's generated by tapestry

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
Hello,

I'm not sure because I've never used it ... but I think tapestry 4.1 (I'm
using 4.0 because 4.1 is not stable) let you know which is the clientId for
a component:

http://tapestry.apache.org/tapestry4.1/tapestry-framework/apidocs/org/apache/tapestry/IComponent.html#getClientId()

I don't know if this is what you've asked.

regards,
         r.

On 11/9/06, Robert Binna <r....@synedra.com> wrote:
>
> Hi
>
> You are right.
> There seems to be situation when you get the right id, but I just came
> across one where this is not the case. After that I take a short
> look at the tapestry code and I wonder why my sugested solution ever
> worked.
>
> My Question is, can anyone give me a hint how to implement dojo wrapper
> widgets in a correct way, that depend on other components.
> Eg.: I just wanted to create a Tooltip component with the dojo tooltip
> that can be used an any other tapestry component, but
>         therefore I would need to have the client id of the component, I
> want to show the tooltip for.
>
> I think this is realy a demand, because other users I am in contact
> with, start making hacks around pseudo css classes to get the ids back
> in return.
>
> kind regards,
>        Robert
>
>
>
>
> Roberto Ramírez Vique schrieb:
>
> > I'm using this method (also using tap 4.0.2), but seems to be not
> > working.
> > For me it gets the next supposed "id", I mean, if I have a component
> > named
> > legalId the id in the page is legalId  but when I executed the method
> > I get
> > : legalId_0 ... probably I make any mistake...
> >
> > thanks,
> >        robert
> >
> >
> >
> > On 11/5/06, Karthik N <ka...@gmail.com> wrote:
> >
> >>
> >> yes i did use idPath for the hidden field.
> >>
> >> but i'm using tapestry 4.0.2 - could that be the reason i'm seeing
> >> different
> >> results than you are?
> >>
> >> On 11/5/06, Patrick Moore <tr...@gmail.com> wrote:
> >> >
> >> > did you assign the hidden field's id using idPath?
> >> >
> >> > Also I am using the 4.1.1 SVN build.
> >> >
> >> > I am having some success with this method (borrowed from another's
> >> > email) in finding the unique ids but I haven't throughly tested it
> >> > yet:
> >> >
> >> > public String getUniqueId(AbstractComponent component) {
> >> >         return getRequestCycle().getUniqueId(
> >> > TapestryUtils.convertTapestryIdToNMToken(component.getIdPath()));
> >> > }
> >> >
> >> > Hopefully there is a better solution soon!
> >> >
> >> > -Pat
> >> >
> >> >
> >>
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Robert Ramírez Vique
Computer Science Engineer

Re: use unique id's generated by tapestry

Posted by Robert Binna <r....@synedra.com>.
Hi

You are right.
There seems to be situation when you get the right id, but I just came 
across one where this is not the case. After that I take a short
look at the tapestry code and I wonder why my sugested solution ever worked.

My Question is, can anyone give me a hint how to implement dojo wrapper 
widgets in a correct way, that depend on other components.
Eg.: I just wanted to create a Tooltip component with the dojo tooltip 
that can be used an any other tapestry component, but
        therefore I would need to have the client id of the component, I 
want to show the tooltip for.

I think this is realy a demand, because other users I am in contact 
with, start making hacks around pseudo css classes to get the ids back 
in return.

kind regards,
       Robert




Roberto Ramírez Vique schrieb:

> I'm using this method (also using tap 4.0.2), but seems to be not 
> working.
> For me it gets the next supposed "id", I mean, if I have a component 
> named
> legalId the id in the page is legalId  but when I executed the method 
> I get
> : legalId_0 ... probably I make any mistake...
>
> thanks,
>        robert
>
>
>
> On 11/5/06, Karthik N <ka...@gmail.com> wrote:
>
>>
>> yes i did use idPath for the hidden field.
>>
>> but i'm using tapestry 4.0.2 - could that be the reason i'm seeing
>> different
>> results than you are?
>>
>> On 11/5/06, Patrick Moore <tr...@gmail.com> wrote:
>> >
>> > did you assign the hidden field's id using idPath?
>> >
>> > Also I am using the 4.1.1 SVN build.
>> >
>> > I am having some success with this method (borrowed from another's
>> > email) in finding the unique ids but I haven't throughly tested it
>> > yet:
>> >
>> > public String getUniqueId(AbstractComponent component) {
>> >         return getRequestCycle().getUniqueId(
>> > TapestryUtils.convertTapestryIdToNMToken(component.getIdPath()));
>> > }
>> >
>> > Hopefully there is a better solution soon!
>> >
>> > -Pat
>> >
>> >
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use unique id's generated by tapestry

Posted by Roberto Ramírez Vique <ro...@gmail.com>.
I'm using this method (also using tap 4.0.2), but seems to be not working.
For me it gets the next supposed "id", I mean, if I have a component named
legalId the id in the page is legalId  but when I executed the method I get
: legalId_0 ... probably I make any mistake...

thanks,
        robert



On 11/5/06, Karthik N <ka...@gmail.com> wrote:
>
> yes i did use idPath for the hidden field.
>
> but i'm using tapestry 4.0.2 - could that be the reason i'm seeing
> different
> results than you are?
>
> On 11/5/06, Patrick Moore <tr...@gmail.com> wrote:
> >
> > did you assign the hidden field's id using idPath?
> >
> > Also I am using the 4.1.1 SVN build.
> >
> > I am having some success with this method (borrowed from another's
> > email) in finding the unique ids but I haven't throughly tested it
> > yet:
> >
> > public String getUniqueId(AbstractComponent component) {
> >         return getRequestCycle().getUniqueId(
> > TapestryUtils.convertTapestryIdToNMToken(component.getIdPath()));
> > }
> >
> > Hopefully there is a better solution soon!
> >
> > -Pat
> >
> >
>
>


-- 
Robert Ramírez Vique
Computer Science Engineer

Re: use unique id's generated by tapestry

Posted by Karthik N <ka...@gmail.com>.
yes i did use idPath for the hidden field.

but i'm using tapestry 4.0.2 - could that be the reason i'm seeing different
results than you are?

On 11/5/06, Patrick Moore <tr...@gmail.com> wrote:
>
> did you assign the hidden field's id using idPath?
>
> Also I am using the 4.1.1 SVN build.
>
> I am having some success with this method (borrowed from another's
> email) in finding the unique ids but I haven't throughly tested it
> yet:
>
> public String getUniqueId(AbstractComponent component) {
>         return getRequestCycle().getUniqueId(
> TapestryUtils.convertTapestryIdToNMToken(component.getIdPath()));
> }
>
> Hopefully there is a better solution soon!
>
> -Pat
>
>

Re: use unique id's generated by tapestry

Posted by Patrick Moore <tr...@gmail.com>.
did you assign the hidden field's id using idPath?

Also I am using the 4.1.1 SVN build.

I am having some success with this method (borrowed from another's
email) in finding the unique ids but I haven't throughly tested it
yet:

public String getUniqueId(AbstractComponent component) {
        return getRequestCycle().getUniqueId(TapestryUtils.convertTapestryIdToNMToken(component.getIdPath()));
}

Hopefully there is a better solution soon!

-Pat

On 11/4/06, karthik.nar <ka...@gmail.com> wrote:
>
>
> Pat, I tried an example similar to the one you've mentioned above.  My
> observation however is that the output will be something like this:
>
> <input type="hidden" id="my.path.foo"/>
> <div dojoType="tp:widget1" sid="my.path.foo"/>
>
> <input type="hidden" id="my.path.foo"/>
> <div dojoType="tp:widget1" sid="my.path.foo"/>
>
> i.e. in the second instance of input type="hidden"
> the id="my.path.foo" and *NOT* id="my.path.foo_0" as you had suggested.
>
> Any comments?
>
>
>
> Patrick Moore-4 wrote:
> >
> > I just realized that what I said was not completely clear. if you have
> > this:
> >
> > <span jwcid="@For" source="1..2">
> >     <span jwcid="@mycomponent">
> >  </span>
> >
> > with mycomponent template like this:
> >
> > <input jwcid="foo@Hidden" id="ognl.components.foo.idPath"/>
> > <div dojoType="tp:widget1" sid="ognl.foo.clientId"/>
> >
> > you would end up with generated out put like this:
> >
> > <input type="hidden" id="my.path.foo"/>
> > <div dojoType="tp:widget1" sid="my.path.foo"/>
> >
> > <input type="hidden" id="my.path.foo_0"/>
> > <div dojoType="tp:widget1" sid="my.path.foo"/>
> >
> > so the second instance of the div tag would refer to the first
> > instance of the hidden field, not the second like it should.
> >
> > I hope that is clearer. If anyone discovers I am wrong please let me
> > know the solution.
> >
> > -Pat
> >
> --
> View this message in context: http://www.nabble.com/use-unique-id%27s-generated-by-tapestry-tf2564504.html#a7181627
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use unique id's generated by tapestry

Posted by "karthik.nar" <ka...@gmail.com>.

Pat, I tried an example similar to the one you've mentioned above.  My
observation however is that the output will be something like this:

<input type="hidden" id="my.path.foo"/>
<div dojoType="tp:widget1" sid="my.path.foo"/>

<input type="hidden" id="my.path.foo"/>
<div dojoType="tp:widget1" sid="my.path.foo"/>

i.e. in the second instance of input type="hidden"
the id="my.path.foo" and *NOT* id="my.path.foo_0" as you had suggested.

Any comments?



Patrick Moore-4 wrote:
> 
> I just realized that what I said was not completely clear. if you have
> this:
> 
> <span jwcid="@For" source="1..2">
>     <span jwcid="@mycomponent">
>  </span>
> 
> with mycomponent template like this:
> 
> <input jwcid="foo@Hidden" id="ognl.components.foo.idPath"/>
> <div dojoType="tp:widget1" sid="ognl.foo.clientId"/>
> 
> you would end up with generated out put like this:
> 
> <input type="hidden" id="my.path.foo"/>
> <div dojoType="tp:widget1" sid="my.path.foo"/>
> 
> <input type="hidden" id="my.path.foo_0"/>
> <div dojoType="tp:widget1" sid="my.path.foo"/>
> 
> so the second instance of the div tag would refer to the first
> instance of the hidden field, not the second like it should.
> 
> I hope that is clearer. If anyone discovers I am wrong please let me
> know the solution.
> 
> -Pat
> 
-- 
View this message in context: http://www.nabble.com/use-unique-id%27s-generated-by-tapestry-tf2564504.html#a7181627
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use unique id's generated by tapestry

Posted by Patrick Moore <tr...@gmail.com>.
I just realized that what I said was not completely clear. if you have this:

<span jwcid="@For" source="1..2">
    <span jwcid="@mycomponent">
 </span>

with mycomponent template like this:

<input jwcid="foo@Hidden" id="ognl.components.foo.idPath"/>
<div dojoType="tp:widget1" sid="ognl.foo.clientId"/>

you would end up with generated out put like this:

<input type="hidden" id="my.path.foo"/>
<div dojoType="tp:widget1" sid="my.path.foo"/>

<input type="hidden" id="my.path.foo_0"/>
<div dojoType="tp:widget1" sid="my.path.foo"/>

so the second instance of the div tag would refer to the first
instance of the hidden field, not the second like it should.

I hope that is clearer. If anyone discovers I am wrong please let me
know the solution.

-Pat
On 11/2/06, Patrick Moore <tr...@gmail.com> wrote:
> However see :
> http://issues.apache.org/jira/browse/TAPESTRY-1131
>
>
> use clientId does not always generate  a unique Id on a page level
> basis. If another component tried to access the first component's
> clientId,  the result returned would be the first id not the correct
> uniquified value.
>
> -Pat
>
> On 11/2/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> > IComponent.getClientId() or IComponent.getId()
> >
> > getClientId() is only relevant "in context"...ie calling it inside a For
> > loop would be good.
> >
> > On 11/2/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> > >
> > > Hello!
> > >
> > > I want to use something that I supose tapestry already made for me.
> > >
> > > I'll try to explain because probably some of you have, or have had this
> > > question, and probably the answer to my question is that this is not
> > > possible or shouldn't be done, but I'm not sure.
> > >
> > > I want to use the tapestry generated Id's. I have seen that in tapestry,
> > > when an element is inside a For component (supose we have a TextField with
> > > id= name), and this element is part of a dynamic form, is generated with a
> > > different id in each loop, this Id use to be like: tapestryIdName_X (where
> > > X
> > > is the index in the loop, or the index-1). I want to know if is possible
> > > to
> > > use the clientId that I've debugged and saw that is the correct one.
> > > I would like to use this id in two situations, one just to know the id of
> > > a
> > > TextField and the other to know the Id of my own component.
> > >
> > > Thanks you,
> > > --
> > > Robert Ramírez Vique
> > > Computer Science Engineer
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo/(and a dash of TestNG), team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use unique id's generated by tapestry

Posted by Patrick Moore <tr...@gmail.com>.
However see :
http://issues.apache.org/jira/browse/TAPESTRY-1131


use clientId does not always generate  a unique Id on a page level
basis. If another component tried to access the first component's
clientId,  the result returned would be the first id not the correct
uniquified value.

-Pat

On 11/2/06, Jesse Kuhnert <jk...@gmail.com> wrote:
> IComponent.getClientId() or IComponent.getId()
>
> getClientId() is only relevant "in context"...ie calling it inside a For
> loop would be good.
>
> On 11/2/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
> >
> > Hello!
> >
> > I want to use something that I supose tapestry already made for me.
> >
> > I'll try to explain because probably some of you have, or have had this
> > question, and probably the answer to my question is that this is not
> > possible or shouldn't be done, but I'm not sure.
> >
> > I want to use the tapestry generated Id's. I have seen that in tapestry,
> > when an element is inside a For component (supose we have a TextField with
> > id= name), and this element is part of a dynamic form, is generated with a
> > different id in each loop, this Id use to be like: tapestryIdName_X (where
> > X
> > is the index in the loop, or the index-1). I want to know if is possible
> > to
> > use the clientId that I've debugged and saw that is the correct one.
> > I would like to use this id in two situations, one just to know the id of
> > a
> > TextField and the other to know the Id of my own component.
> >
> > Thanks you,
> > --
> > Robert Ramírez Vique
> > Computer Science Engineer
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: use unique id's generated by tapestry

Posted by Jesse Kuhnert <jk...@gmail.com>.
IComponent.getClientId() or IComponent.getId()

getClientId() is only relevant "in context"...ie calling it inside a For
loop would be good.

On 11/2/06, Roberto Ramírez Vique <ro...@gmail.com> wrote:
>
> Hello!
>
> I want to use something that I supose tapestry already made for me.
>
> I'll try to explain because probably some of you have, or have had this
> question, and probably the answer to my question is that this is not
> possible or shouldn't be done, but I'm not sure.
>
> I want to use the tapestry generated Id's. I have seen that in tapestry,
> when an element is inside a For component (supose we have a TextField with
> id= name), and this element is part of a dynamic form, is generated with a
> different id in each loop, this Id use to be like: tapestryIdName_X (where
> X
> is the index in the loop, or the index-1). I want to know if is possible
> to
> use the clientId that I've debugged and saw that is the correct one.
> I would like to use this id in two situations, one just to know the id of
> a
> TextField and the other to know the Id of my own component.
>
> Thanks you,
> --
> Robert Ramírez Vique
> Computer Science Engineer
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com