Thank you Lance.
I will try your solution as soon as possible.
Then i will write to you again telling about the results obtained.


2012/9/11 Lance Java <lance.j...@googlemail.com>

> Lets assume you are writing a LinkTree component which accepts a
> LinkTreeModel parameter. LinkTreeModel has a visitAll method which takes a
> LinkNodeVisitor.
>
> You could do something like this (not tested)
>
> LinkTree.tml
> -----------
> <t:block id="linkBlock">
>    <t:eventlink event="linkEvent">${linkLabel}</t:eventlink>
> </t:block>
>
> LinkTree.java
> -------------
> public class LinkTree {
>         @InjectComponent
>         private RenderCommand linkBlock;
>
>         @Property
>         private String linkEvent;
>
>         @Property
>         private String linkLabel;
>
>         @Parameter
>         private LinkTreeModel model;
>
>         public RenderCommand onBeginRender() {
>                 return new RenderCommand() {
>                         public void render(MarkupWriter writer, final
> RenderQueue queue) {
>                                 model.visitAll(new LinkNodeVisitor() {
>                                         public void visit(final
> LinkTreeNode node) {
>                                                 queue.push(new
> RenderCommand() {
>                                                         public void
> render(MarkupWriter writer, RenderQueue queue2) {
>
> LinkTree.this.linkEvent = node.getEvent();
>
> LinkTree.this.linkLabel = node.getLabel();
>
> queue2.push(linkBlock);
>                                                         }
>                                                 });
>                                         }
>                                 });
>                         }
>                 };
>         }
> }
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/how-to-refresh-page-zone-inside-a-component-tp5716201p5716214.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
>
>

Reply via email to