Em Mon, 17 Aug 2009 22:12:13 -0300, Andrey Larionov <anlario...@gmail.com> escreveu:

One more question. How to pass enclosing component into nested. I mean
"self". In loop i render elements and i want to pass enclosing element
as parameter in template
For example: (start component template)
<div id="feedList"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xmlns:p="tapestry:parameter">
    <ul>
        <li t:type="loop" t:source="feeds" t:value="feed">
            <t:feedelement feed="feed" feedList="component:feedList"/>

You can only use component:componentId for components declared in the same template. A quick and dirty way would be to add a getSelf() { return this; } method in your component class and them pass feedList="self". A more elegant way would be to use the Environmental service, something I've never used but seems to be easy.

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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

Reply via email to