Re: Zone within a Zone problem
Hm... I think that normal behavior is that if you have zone with in a zone once an in nor zone is refreshed it triggers the refresh of the outer zone as well, is there a way to stop this? cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714220.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
Other code is normal html code. I will show you the code of the link click @OnEvent("selectComponent") public void selectComponent(ShotComponent component) { selectedComponent = component; ajaxResponseRenderer.addRender("zoneComponent", zoneComponent); } I have tried to put in the link in the inner zone and to use the special ^ but the effect is the same, the outer component is updated as well and then the fact that I have placed the normal id on the inner zone is becoming the problem because once it is refreshed the links is broken, if I remove the normal id it works but still the outer zone is updated somehow I am really confused with this :) cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714219.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
On Sat, Jun 30, 2012 at 7:18 PM, bhorvat wrote: > It seems that the inner zone is not triggering the outer to refresh as well. > I guess I am just not wiring things up properly as this should not be the > case. This is what I have > > > > > > Simplified ShotDetails > > >Link > > > other stuff > > So once the link is clicked it refreshes the zoneData as well as > zoneComponent, which should not be the case, right? Yes. Can we see more code please? > > cheers > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714216.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
On Sat, Jun 30, 2012 at 7:06 PM, bhorvat wrote: > Well that was my starting point where I encountered the problem in the first > place. Once the outer zone refreshes it changes the zone id and the link > does not work any more. The zone id is change but the link that was pointing > to that zone is not changed > > But now I get where I was wrong I didnt put normal id only t:id > > > > Can you please explain why is the normal id important in this case? I was > under the impression that t:id would be converted to id at the end. > t:id is the server side id (unique for the template). The client id in the generated html doesn't have to be the same. If you have one instance of the component then most frequently it's the same, but if the component is lets say in a loop than of you have t:id="mydiv" you'll can get client id's like "mydiv" "mydiv_0", "mydiv_1" etc. Now the zone component has and "id" parameter that let's you specify what it's client id is gonna be (see the docs [1]). This is because the zone's client id is an important parameter. This is what was happening in your case. You might as well bind the zone's id with a Property in the java class etc. It doesn't have to be the same as the t:id. [1] http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Zone.html > Cheers and thanks for patience > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714215.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
It seems that the inner zone is not triggering the outer to refresh as well. I guess I am just not wiring things up properly as this should not be the case. This is what I have Simplified ShotDetails Link other stuff So once the link is clicked it refreshes the zoneData as well as zoneComponent, which should not be the case, right? cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714216.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
Well that was my starting point where I encountered the problem in the first place. Once the outer zone refreshes it changes the zone id and the link does not work any more. The zone id is change but the link that was pointing to that zone is not changed But now I get where I was wrong I didnt put normal id only t:id Can you please explain why is the normal id important in this case? I was under the impression that t:id would be converted to id at the end. Cheers and thanks for patience -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714215.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
Hi, On Sat, Jun 30, 2012 at 4:30 PM, bhorvat wrote: > Hi, > > Can you please help me with the first approach since the second one is great > if the link is surrounded by the zone it needs to refresh but if it is > not... > > so I have > > > > > > > > How do I use zone.getClientId(), where do I put it, in the link? or in the > zone, or both? I tried a bunch of option but no luck Here you have the case where the link is rendered before the zone it refreshes. This means that the clientId of zone you want to refresh is not yet generated. Just bind the id parameter explicitly. Do this: > > cheers > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714212.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
Hi, Can you please help me with the first approach since the second one is great if the link is surrounded by the zone it needs to refresh but if it is not... so I have How do I use zone.getClientId(), where do I put it, in the link? or in the zone, or both? I tried a bunch of option but no luck cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714212.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
Ok tnx it is good to know :D cheers -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714205.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
On Sat, Jun 30, 2012 at 1:31 PM, bhorvat wrote: > Solution #2 works greate, thanks for that. > It is strange that once the zone is updated and changes the id's it does not > change the id's of those components/links that depend on that id It changes the client id's. You are talking mainly about server parameters that are later used mainly in javascript. I don't think what you are suggesting is even possible. Once you get used to it believe me it's not a problem at all. Cheers > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714200.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
Solution #2 works greate, thanks for that. It is strange that once the zone is updated and changes the id's it does not change the id's of those components/links that depend on that id -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194p5714200.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone problem
Hi, After the update of the first zone - the second zone's Id is changed (tapestry does this when the zone updates). Check with firebug or something. Solution: 1: Inject the zone and take make getClientId() (to take the generated id) 2: From the docs in http://tapestry.apache.org/ajax-and-zones.html "If the Form or Link is enclosed by the Zone itself, then the zone parameter may be set to the special value ^. The carat is evaluated, on the client side, by searching up form the form or link element for the first enclosing element with the t-zone CSS class. In this way, the client-side coordination can occur without having to know what the specific client-side id of the Zone is. Because of this, in many cases, it is no longer necessary to specify the Zone's id parameter." Just do wrote: > I have a Zone and inside I have a component that has a zone, after the first > zone is refreshed the link that refreshes the second zone does not work. Is > there a problem with this combination or am I missing something? > > > > component="selectedComponent" /> > > > > And the Component is > > > class="showThumbsButton right">All > > // A lot of html code > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Zone within a Zone problem
I have a Zone and inside I have a component that has a zone, after the first zone is refreshed the link that refreshes the second zone does not work. Is there a problem with this combination or am I missing something? And the Component is All // A lot of html code -- View this message in context: http://tapestry.1045711.n5.nabble.com/Zone-within-a-Zone-problem-tp5714194.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone
superslip103 wrote: Thanks dh actually was just about to post the solution as I figured it out literally minutes ago.. Do you know why it needs to be id and not t:id? "t:id" and "id" are two really diffents things. t:id is the id for Tapestry 5 back-end, it's kind of the java identifier of the component. id is what is called "clientId" by Tapestry5, it's the Dom id of the component. Most of the time, the second one is derivated from the first one. But : - it is done "on demand", with RenderSupport#generateClientId or something like that ; - it is no done for all components at the same moment in the render pipeline ; - this id is not persisted All in all, this lead to some strange behavior, the one you describe supposedly being one of them. Personally, I believe that it is one of the more painful things in Tapestry, somewhere where I do think to a more state-full way of handling the things would be better. Why not a @statefull component annotation to keep all the state of a component that relies heavily on state, like AJAXified components do ? -- Francois Armand Etudes & Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- http://fanf42.blogspot.com InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone
Thanks dh actually was just about to post the solution as I figured it out literally minutes ago.. Do you know why it needs to be id and not t:id? dh ning wrote: > > Try , I faced > same problem last week and fixed like this. > > DH > - Original Message - > From: "superslip103" > To: > Sent: Tuesday, February 17, 2009 7:42 PM > Subject: Zone within a Zone > > >> >> I'm trying to display a zone within a component (i.e not a page), which >> is >> itself being displayed in a Zone, by clicking on an ActionLink >> >> in my tml file I have >> >> >> > context="coverage.exchangeListing.id" zone="editBenchmarkZone">Edit >> Benchmark >> >> >> then further on: >> >> >> >> >> >>Benchmark Index for Stock: >> ${exchangeListing.name} >>> exchangeListing="exchangeListing"/> >> >> >> >> >> However I get the error message: "Unable to locate Ajax Zone >> "editBenchmarkZone" for dynamic update". >> Am I allowed to do do this? Or have I just missed a trick somewhere? >> >> >> -- >> View this message in context: >> http://www.nabble.com/Zone-within-a-Zone-tp22055490p22055490.html >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > -- View this message in context: http://www.nabble.com/Zone-within-a-Zone-tp22055490p22056151.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Zone within a Zone
Try , I faced same problem last week and fixed like this. DH - Original Message - From: "superslip103" To: Sent: Tuesday, February 17, 2009 7:42 PM Subject: Zone within a Zone > > I'm trying to display a zone within a component (i.e not a page), which is > itself being displayed in a Zone, by clicking on an ActionLink > > in my tml file I have > > > context="coverage.exchangeListing.id" zone="editBenchmarkZone">Edit > Benchmark > > > then further on: > > > > > >Benchmark Index for Stock: > ${exchangeListing.name} > exchangeListing="exchangeListing"/> > > > > > However I get the error message: "Unable to locate Ajax Zone > "editBenchmarkZone" for dynamic update". > Am I allowed to do do this? Or have I just missed a trick somewhere? > > > -- > View this message in context: > http://www.nabble.com/Zone-within-a-Zone-tp22055490p22055490.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >
Zone within a Zone
I'm trying to display a zone within a component (i.e not a page), which is itself being displayed in a Zone, by clicking on an ActionLink in my tml file I have Edit Benchmark then further on: Benchmark Index for Stock: ${exchangeListing.name} However I get the error message: "Unable to locate Ajax Zone "editBenchmarkZone" for dynamic update". Am I allowed to do do this? Or have I just missed a trick somewhere? -- View this message in context: http://www.nabble.com/Zone-within-a-Zone-tp22055490p22055490.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org