This is (IMHO) a classic issue with tiles.  The Tiles meaning of
'inheritance' isn't quite the same as in Java or other OO concepts.  Tiles
inherit values from their parents, and can override those values.  However,
adding new values is not supported.  
        The only way [that I've found, anway] that you can support the
addition of new properties is to use the tiles importAttribute tag (see
http://jakarta.apache.org/struts/userGuide/struts-tiles.html#importAttribute
) in the main layout JSP, i.e. /layout/classicLayout.jsp, to pass the values
into a scope where they can be found by other tags such as <bean:write> and
use the values that way.

David Hibbs, ACS
Staff Programmer / Analyst
American National Insurance Company

> -----Original Message-----
> From: Oliver Wulff [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2003 5:16 AM
> To: [EMAIL PROTECTED]
> Subject: Tiles, Definition inheritence
> 
> Hi
> 
> I'm quite new to Tiles and I've got the following problem:
> 
> I've defined the following default definition:
> <definition name=".mainLayout" path="/layout/classicLayout.jsp">
>       <put name="title"  value="Berechtigung WEB with Tiles" />
>       <put name="header" value="/top_menu.jsp" />
>       <put name="menu"   value="/toc.jsp" />
>       <put name="footer" value="/footer.jsp" />
>       <put name="body"   value="/welcome.jsp" />
> </definition>
> 
> The classicLayout.jsp hasn't been changed (Struts examples).
> 
> Additionally, I've defined the following Definition:
> <definition name=".showOrgEinheit" extends=".mainLayout">
>       <put name="input" value="/getOrgEinheit.jsp" />
>       <put name="result" value="/showOrgEinheit.jsp" />
>       <put name="body" value="/layout/bodyTwoColumns.jsp" />
> </definition>
> 
> The bodyTwoColumns looks like this:
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> 
> <table border="0" width="100%" cellspacing="5">
> <tr>
>   <td width="50%" align="left">
>     <tiles:insert attribute='input'/>
>   </td>
>   <td width="50%" align="left">
>     <tiles:insert attribute='result' />
>   </td>
> </tr>
> </table>
> 
> My struts action forwards to the definition .showOrgEinheit 
> but I get the
> following error:
> [ServletException in:/layout/bodyTwoColumns.jsp] Error - Tag 
> Insert : No
> value found for attribute 'input'.'
> 
> Can anybody help me, please? Thank you a lot.
> 
> Cheers
> Oliver
> 
> 
> 
> 
> 
> 
> ******************* BITTE BEACHTEN *******************
> Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
> möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
> Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
> genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
> irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
> Ausschluss jeder Reproduktion zu zerstören und die absendende Person
> umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to