Hi,

Why not have everything in the layout component, both event handlers and zone? An example:

layout.tml:

...
<t:zone t:id="testzone">
<t:eventlink event="updatetestzone" zone="testzone">update time</t:eventlink>
                ${CurrentTime}
</t:zone>
..

Layout.java:

...
    @InjectComponent
    private Zone testzone;

    public Date getCurrentTime()
    {
        return new Date();
    }
    public Object onUpdatetestzone() {
        return testzone.getBody();
    }
...


Best Regards
Mats

____________________________________________
Mats Andersson
Ronsoft AB - Fridhemsvägen 8 - 372 25 Ronneby
Tel. 073-368 79 82
http://www.ronsoft.se
____________________________________________


Muhammad Mohsen skrev 2010-10-31 01:43:
Hello everyone,

I have a layout component, used by a page called "Start".
This layout component has a zone component in it that I intend to load components into it using ajax. The links supposed to initiate such update is in the layout component. But the link events must be handled by the page utilizing the layout component (after a search on google).

So after I added the following method to the "Start" page:

e.g.
onActionFromLayout(){
 ...
}

I couldn't refer to "Blocks" defined in the layout component from the Start page, because simply they doesn't exist in the Start page's tml file ! I can put those components in the Start page .tml file instead, but then I'll have to redefine all the components I could load by ajax into each other. As any component lead to the other one !

Generally, how can I tackle such organization issue ? May be you guys know some other easier\more efficient way to do that.

Please find attached a picture to elaborate my case.
Thank you all for your time.

--
/Regards,/
/Muhammad Gelbana
Java Software Programmer/



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

Reply via email to