You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by José Moreira <jm...@e-terno.net> on 2003/07/07 15:33:20 UTC

Struts Tiles definitions

	Hello, is it possible to associate a request variable like 'action' to
struts tiles definitions, in the tiles-definition.xml ? 

Usually i have an index.jsp requesting a layout depending on the value
of the 'action' request parameter like this:

 <logic:present parameter="action" scope="request" >
        
        <logic:equal parameter="action" value="add" scope="request">
            <tiles:insert definition="site.mainLayout.addEvent"
flush="true" />
        </logic:equal>

        <logic:equal  parameter="action" value="edit" scope="request">
            <tiles:insert definition="site.mainLayout.editEvent"
flush="true" />
        </logic:equal>

        <logic:equal  parameter="action" value="confirmDelete"
scope="request">
            <tiles:insert
definition="site.mainLayout.confirmDeleteEvent" flush="true" />
        </logic:equal>

    </logic:present>


And what about the 'best-pratice' of it ?


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


Re: Struts Tiles definitions

Posted by Peter Smith <ps...@infonow.com>.
Hi José,

I wonder if a RelayAction could be of help to you.  Here is a link:

http://www.husted.com/struts/tips/011.html

Peter
-- 
Peter Smith
Software Engineer
InfoNow Corporation

> From: José Moreira <jm...@e-terno.net>
> Reply-To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Date: 07 Jul 2003 14:33:20 +0100
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: Struts Tiles definitions
> 
> Hello, is it possible to associate a request variable like 'action' to
> struts tiles definitions, in the tiles-definition.xml ?
> 
> Usually i have an index.jsp requesting a layout depending on the value
> of the 'action' request parameter like this:
> 
> <logic:present parameter="action" scope="request" >
>       
>       <logic:equal parameter="action" value="add" scope="request">
>           <tiles:insert definition="site.mainLayout.addEvent"
> flush="true" />
>       </logic:equal>
> 
>       <logic:equal  parameter="action" value="edit" scope="request">
>           <tiles:insert definition="site.mainLayout.editEvent"
> flush="true" />
>       </logic:equal>
> 
>       <logic:equal  parameter="action" value="confirmDelete"
> scope="request">
>           <tiles:insert
> definition="site.mainLayout.confirmDeleteEvent" flush="true" />
>       </logic:equal>
> 
>   </logic:present>
> 
> 
> And what about the 'best-pratice' of it ?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 


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