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



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to