My real concern is slightly different.  It boils down to the fact that it is 
incredibly hard (if not impossible in certain situations) to determine the 
automatically generated ClientID of a component (that's embedded in the current 
component) during @SetupRender.

This forces developers to  manage their own ids (as suggested by Paul and 
Thiago), and in my experience it's error prone and cumbersome.

Worst of all, it really slows down adoption (or acceptance) of Tapestry with 
JavaScript specialists.

J


On Mar 8, 2012, at 5:03 AM, Denis Stepanov wrote:

>> The pattern that Paul and Thiago are suggesting works fine if that component 
>> occurs a single time on a page.  However, if you use it multiple times, the 
>> client side zoneId (as well as the Tapestry JS initializers) are not unique 
>> any more, which causes the same zone to be updated all the time, no matter 
>> which EventLink got the click.
> 
> Again and again randomly generated zone id confuses developers. :)
> 
> Should I collect all mail posts with that problem at my issue: "Warn user or 
> disallow zone with randomly generated id"? :)
> 
> https://issues.apache.org/jira/browse/TAP5-1834
> 
> Denis
> 
> Mar 7, 2012 v 7:09 PM, Jochen Frey:
> 
>> That's definitely another way of solving this.  Still goes by way of the 
>> java file, but provides a different sort of flexibility.
>> 
>> Cheers!
>> J
>> 
>> On Mar 7, 2012, at 9:30 AM, Thiago H. de Paula Figueiredo wrote:
>> 
>>> On Wed, 07 Mar 2012 13:41:02 -0300, Jochen Frey <joc...@jochenfrey.com> 
>>> wrote:
>>> 
>>>> Thanks guys!
>>> 
>>> Hi!
>>> 
>>>> I have a lot of components that are re-used either in loops, or just 
>>>> embedded in multiple components (often in the same page).
>>>> 
>>>> The pattern that Paul and Thiago are suggesting works fine if that 
>>>> component occurs a single time on a page.  However, if you use it multiple 
>>>> times, the client side zoneId (as well as the Tapestry JS initializers) 
>>>> are not unique any more, which causes the same zone to be updated all the 
>>>> time, no matter which EventLink got the click.
>>> 
>>> Again, provide the id yourself, in this case dinamically 
>>> (id="${generatedId}"). When you don't provide the id yourself, Tapestry 
>>> components generate a random one when it finds the original id, based in 
>>> t:id, is already taken.
>>> 
>>> -- 
>>> Thiago H. de Paula Figueiredo
>>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, 
>>> and instructor
>>> Owner, Ars Machina Tecnologia da Informação Ltda.
>>> http://www.arsmachina.com.br
>> 
>> ---
>> joc...@jochenfrey.com
>> +1.415.366.0450
>> @jochen_frey
>> 
> 

---
  joc...@jochenfrey.com
  +1.415.366.0450
  @jochen_frey

Reply via email to