You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Ajax Components

Do I have to specify both id and t:id for Zone components?

The examples for the Zone component (in the Component Reference) consistently specify both id and t:id and this is probably a good idea.

Generally speaking, if you don't specify the client-side id (the id attribute), it will be the same as the Tapestry component id (t:id).

However, there are any number of exceptions to this rule. The Zone may be rendering inside a Loop (in which case, each rendering will have a unique client side id). The Zone may be rendering as part of a partial page render, in which case, a random unique id is inserted into the id. There are other examples where Tapestry component ids in nested components may also clash.

The point is, to be sure, specify the exact client id. This will be the value for the zone parameter of the triggering component (such as a Form, PageLink, ActionLink, etc.).

  • No labels