You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christ Jochen <Jo...@entory.com> on 2007/10/17 19:22:53 UTC

[Struts Tiles] How to put a list of items to a nested tile?

Hi there,

 

in struts tiles:

 

Is there an easy method to put a list of items to a nested tile:

 

Here is my tiles-def.xml:

 

      <definition name="base.definition"
path="/common/layouts/layout_with_servicecolumn.jsp">

            <put name="footer" value="/common/tiles/footer.jsp" />

            ...

            <putList name="footeritems">

                  <item link="information.do" value="Back"
icon="back.gif" />

                  <item link="information.do" value="next"
icon="next.gif" />

            </putList>

      </definition>

 

 

In my layout_with_servicecolumn.jsp I want to insert my tile footer, but
how to "forward" my attribute footeritems to this tile?

 

<tiles:insert name="footer">

      <put...????????????????????????????? />

</tiles:insert>

 

 

 

 

in my footer.jsp I want to use this attribute by

 

 

<tiles:useAttribute name="footeritems"  />

 

 

thanks

 


Jochen


Re: [Struts Tiles] How to put a list of items to a nested tile?

Posted by Antonio Petrelli <an...@gmail.com>.
2007/10/17, Christ Jochen <Jo...@entory.com>:
> In my layout_with_servicecolumn.jsp I want to insert my tile footer, but
> how to "forward" my attribute footeritems to this tile?

You cannot do it! You have to create a definition, using "footer.jsp"
as the template, put the attribute (with putList) in this new
definition and, finally, put this definition as an attribute in
base.definition.

BTW, for Tiles 2.1 there is an open issue to realize this feature:
https://issues.apache.org/struts/browse/TILES-208

Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org