On Fri, 2010-12-10 at 09:09 -0200, Thiago H. de Paula Figueiredo wrote: > On Fri, 10 Dec 2010 08:37:07 -0200, Richard Hill <r...@su3analytics.com> > wrote: > > > Hi All, > > Hi! > > > I have a simple page with a component in it. This component contains a > > zone. I would like to be able to update the zone from the parent page. > > First of all, it's a bad practice for a parent page or component to use > something from component. It's bad encapsulation. > I can see why it would be a bad design for a component to call/access it's parent, but I think there are legitimate cases when you might need a parent to update a child component.
> > At the moment I am using an actionlink handler in the parent to call the > > handler in the component - but this results in a full page re-render of > > the parent. > > If this ActionLink has a zone parameter, it will work as long as you > return a block, component instance, JSONObject, JSONArray or > MultiZoneUpdate instance. What I have actually done now is wrap the component in zone. So now I can update from the parent and from within the zone itself. > > So what's the best way of updating a component's zone from it's parent > > page? > > Remember that what you pass to the zone parameter of ActionLink, EventLink > and Form is an HTML id, not a Tapestry t:id. Therefore, all you need is to > create an ActionLink with zone="yourZoneClientId". > Cheers --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org