You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by bmg125 <br...@reged.com> on 2008/12/17 21:48:40 UTC

[T5] Nested Zones

I know that this topic has come up a number or times in the past but I am
still struggling to get it to work.
I am trying to update a nested zone and I get the Javascript message: 
"Unable to localte Ajax Zone '...' for dynamic update".  

In several posts, and JIRA Cases, the solution has been to bind the zone's
id parameter.  I am not sure how this is done exactly.  I have used: 

@Component(id="zoneName") 
private Zone _zoneName; 

, but that doesn't seem to be doing the trick.  

Can someone tell me how to bind the id parameter of the zone in the
component class so that Tapestry will leave it alone during a partial ajax
update?

Thanks!

-- 
View this message in context: http://www.nabble.com/-T5--Nested-Zones-tp21060828p21060828.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: [T5] Nested Zones

Posted by bmg125 <br...@reged.com>.

Well, I thought I would post a note about what I did to actually get this to
work.  I think that this still seems like a work around and that tapestry
should make the dealings of its generated internal ids more transparent. 
Also, I didn't come up with this on my own, so thank Fanf for pointing me in
this direction.

The first thing I did was in my component I injected the RenderSupport
object.
This object has a method allocateClientId that I called on the zone during
the setup render.  This method returns the client id of the zone which I put
into a persistent property on the component.

In the template, I gave the zone both a t:id="zoneName" and an
id="prop:zoneId".

All of the components that needed to reference the zone used
zone="prop:zoneId".  

These seems to work for the most part, but I don't think it is very clear on
how to do it.  Hope this helps somone else that might need it.
-- 
View this message in context: http://www.nabble.com/-T5--Nested-Zones-tp21060828p21115259.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: [T5] Nested Zones

Posted by bmg125 <br...@reged.com>.
I have been thinking about this problem a little further and I don't think
that adding a static id on the zone is going to work. The problem that I
have is that this Zone lives inside a component.  This component could be
used multiple times and that would break the uniqueness of the id of the
zone. 

Does tapestry have the concept of scope?  This seems like it would solve the
potential problem of partial updates and changing ids. If the Zone is
changing then the changes within that zone's scope should be able to handle
the updated references. 

Does that make sense?  Is something like this possible with the current
code-base (T5.0.18)?
-- 
View this message in context: http://www.nabble.com/-T5--Nested-Zones-tp21060828p21073771.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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