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 <[EMAIL PROTECTED]> 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="[EMAIL PROTECTED]" 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Robert Ramírez Vique
Computer Science Engineer

Reply via email to