struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Raible" <matt_rai...@yahoo.com>
Subject Re: Is it possible to change the base tile on the fly
Date Tue, 25 Mar 2003 19:43:17 GMT
Cool, I'll do this with a controller then - thanks!

Matt

--- In struts@yahoogroups.com, Cedric Dumoulin <cedric@a...> wrote:
> 
>   Hi,
> 
>   I have a very simple solution:
> 
>     *   Create a struts action that switch to the appropriate layout (a
>       jsp), according to the user settings:
> 
>     <action     path="/switchLayout"
>                    type="...">
>         <forward  name="layout1"   path="/layouts/layout1.jsp"/>
>         <forward  name="layout2"   path="/layouts/layout2.jsp"/>
>         <forward  name="layout3"   path="/layouts/layout3.jsp"/>
>    </action>
> 
>     *   Then, use this action in the master definition in place of the
>       layout (path="switchLayout.do" ).
> 
> 
>   A better solution would be to be able to do that with a Tiles 
> controller: change the layout path in the controller. Unfortunately,
the 
> current tiles implementation doesn't allow to change the path of a tile 
> context. Maybe a future version.
> 
>      Cedric
> 
> Raible, Matt wrote:
> 
> >The reason I want to do this is to have two totally different skins
based on
> >a user's settings.  How can I change a baseLayout and all children
on the
> >fly?  Is it possible - can I just point to a specific
tiles-config.xml after
> >they login?
> >
> >I realize this is possible using stylesheets and some fancy CSS,
but I'd
> >like to explore doing this using Tiles.
> >
> >Thanks,
> >
> >Matt
> >
> >  
> >
> >>-----Original Message-----
> >>From: Cedric Dumoulin [mailto:cedric.dumoulin@l...]
> >>Sent: Wednesday, March 12, 2003 10:27 AM
> >>To: Struts Users Mailing List
> >>Subject: Re: Is it possible to change the base tile on the fly
> >>
> >>
> >>
> >>  It is possible to change a definition attribute like the 
> >>path on the 
> >>fly, but this will not change all the child definitions has 
> >>you expect.
> >>  This is because in the actual implementation all definitions have 
> >>their own copy of the attributes. There is no lookup to the 
> >>parent value.
> >>
> >>     Cedric
> >>
> >>Raible, Matt wrote:
> >>
> >>    
> >>
> >>>I have the following base tile definition that all my other 
> >>>      
> >>>
> >>definitions
> >>    
> >>
> >>>extend:
> >>>
> >>>	<definition name="baseLayout" path="/layouts/baseLayout.jsp">
> >>>		<put name="title.key"/>
> >>>		<put name="heading.key"/>
> >>>		<put name="header" value="/common/header.jsp"/>
> >>>		<put name="footer" value="/common/footer.jsp"/>
> >>>     </definition>
> >>>
> >>>Is it possible to change the "path" attribute of this 
> >>>      
> >>>
> >>definition on-the-fly
> >>    
> >>
> >>>- perhaps based on a value received in an Action?  If so, how?
> >>>
> >>>Thanks,
> >>>
> >>>Matt
> >>>
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: struts-user-unsubscribe@j...
> >>>For additional commands, e-mail: struts-user-help@j...
> >>>
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: struts-user-unsubscribe@j...
> >>For additional commands, e-mail: struts-user-help@j...
> >>
> >>    
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: struts-user-unsubscribe@j...
> >For additional commands, e-mail: struts-user-help@j...
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@j...
> For additional commands, e-mail: struts-user-help@j...


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


Mime
View raw message