struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <ahardy.str...@cyberspaceroad.com>
Subject Re: Tiles attributes problem
Date Sat, 06 Mar 2004 09:51:15 GMT
David,
it's a bit difficult to know what's going on without seeing your action 
mapping which calls that .default definition.

On 03/05/2004 10:08 PM David Erickson wrote:
> First the sample code:
> 
> XML defintion:
> <definition name=".default" path="/tiles/layouts/base.jsp">
> 
> <put name="header" value="/tiles/header.jsp"/>
> 
> <put name="menu" value=".menu.main"/>
> 
> <put name="body" value="${body}"/>
> 
> <put name="footer" value="/tiles/footer.jsp"/>
> 
> <put name="logon" value="/tiles/logon.jsp"/>
> 
> <put name="title" value="CMC/FLEX Sales Web"/>
> 
> <put name="messages" value="/tiles/messages.jsp"/>
> 
> <put name="path" value="{path}"/>
> 
> </definition>
> 
> 
> 
> my editUsers.jsp
> 
> <%@ taglib uri="struts-tiles.tld" prefix="tiles" %>
> 
> <tiles:insert definition=".default" controllerUrl="/admin/editUsers.do"
> flush="true">
> 
> <tiles:put name="path" value="/admin/userManagement"/>
> 
> <tiles:put name="menu" value=".menu.prospect"/>
> 
> <tiles:put name="body" value="/WEB-INF/apps/admin/editUsers.jsp"/>
> 
> </tiles:insert>
> 
> 
> 
> Now here's the problem, my controller action basically prepares its view by
> doing some logic and placing things in the request etc.  My editUsers.jsp
> (the body content one) relies on the tiles attribute path for links to other
> webpages.  This is the crazy thing, if i set my TilesAction (editUsers.do)
> to return null as its actionForward somehow the tiles context does not get
> passed to my editUsers.jsp!! However if I DO return an actionForward its
> fine!  What the heck is up with that?  Having to return an actionForward
> defeats the purpose OF the tile does it not??  Any ideas?  (PS the way I
> found out it works if I specify a forward was in my struts-config i set
> success as the forward to /WEB-INF/apps/admin/editUsers.jsp... but that
> obviously messed up my whole definition by not using anything but that
> content page)
> 
> Thank in advance,
> 
> David
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
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