>Greg Reddin ha scritto:
>>     <template-stuff/>
>>       <ui:insert name="header">Default Header Stuff</ui:insert>
>>     <more-template-stuff/>
>>       <ui:insert name="body">Default Body Stuff</ui:insert>
>>     <still-more-template-stuff/>
>>       <ui:insert name="footer">Default Footer Stuff</ui:insert>
>>
>> Then you extend it with a page like this:
>>
>>     <ui:composition template="/layout.xhtml">
>>         <ui:define name="body">
>>             Extended/Overridden Body Content
>>         </ui:define>
>>     </ui:composition>
>
>It seems that <tiles:put> already accepts the body so it "potentially" 
>could work (though it seems that Mehdi made a test and it doesn't 
>work). 
>Anyway the "default" part should be implemented.
>It could be something like:
>
><tiles:insert name="myAttribute" type="attribute">
>Default content
></tiles:insert>
>
>Or
>
><tiles:insert name="myAttribute" type="attribute" 
>defaultValue="/mydefault.jsp" defaultType="template" />
>
>Antonio
>
>P.S.: Should we use [Tiles 2.0] when referring to new Tiles? I asked 
>this because the site it is written to use [tiles] instead (anyway 
>[Tiles 2.0] is much clearer).

I have previously seen that some projects use their own costume tags to add 
this functionality for example xplanner does it this way:

<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"; prefix="tiles" %>
<%@ taglib uri="http://xplanner.org/xplanner-taglib"; prefix="xplanner" %>

<xplanner:content definition="tiles:edit" >
   ...
   <!- you can add 'put' tages -->
   <tiles:put name="editMessage">iteration.editor.edit_prefix</tiles:put>
   ...
  <!-- content goes here! -->
</xplanner:content>

Take a look at 'conent' tag source code. This can give you some idea.
Mehdi

PS I still get exception when use 'put' tag in my page (with and without body). 
'put' works in definitions but it results in exception in page.

                
---------------------------------
 All-new Yahoo! Mail - Fire up a more powerful email and get things done faster.

Reply via email to