On Thu, 19 Feb 2015 14:14:55 -0200, Chris Poulsen <mailingl...@nesluop.dk> wrote:

Coul be clash of zone ids in the html? - try generating unique zone id
(client side id, not t:id) e.g using the supplied t:id + something

You've nailed it, Chris. :) When using Zones, in one way of the other you need to pass Tapestry what zone client id (i.e. HTML id) to update. In this case, we have two Zones with the same t:id because they're in different component instances. No explicit client id was passed using the "id" attribute so, when the page is rendered, each get a different id, the first one being the t:id, the other ones the t:id concatenated with some unique value. When you're handling an event, there's no rendering involved, so zone.getClientId() returns the t:id, and the first zone is updated. This isn't exactly a Tapestry bug: I'd call it a limitation. The fix, as Chris said, is to provide explicit ids by using Zone's id parameter. For example:

<t:zone ... id="prop:zoneId">

@Inject
private ComponentResources resources;

public String getZonedId() {
        return resources.getId() + "-zone";
}


or wrap the link in the zone and use zone ^ (may be too simplistic for a real use).

I don't think that's too simplistic, provided you're always updating the same zone and the link is inside the zone. In this case, you cannot use AjaxResponseRenderer.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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

Reply via email to