struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Dre├čler <>
Subject It is possible to recall an Action?
Date Mon, 09 Feb 2004 10:21:23 GMT
Depending on some sessionflags my jsp sides changing design.
(I use the tile plugin)
I call an action (/ or / who only should change a variable
in session scope.
After this, I wish to recycle the same page output using this action before. 

To solve this problem I tried to save the forward strings in every Action.
I recall them in  MakeMenueSmallAction or MakeMenueBigAction later.
But I realised that I lost the code from my other action classes :(
and the jsp's missed objects in request scope. 
Or simple: it's possible to recall a Action?

A solution could be to put all objects in session, but I need the
Objects only in request scope.

If you have any ideas, 
please let me know.


My code snipes:

[code leftbar.jsp]
 	<logic:present name="isMenueBig" scope="session">
		Big Menue
		<html:link page="/">(-)</html:link>	
	<logic:notPresent name="isMenueBig" scope="session">
		Small Menue
		<html:link page="/">(+)</html:link>

[schnip struts-config.xml]
		<action path="/makeMenueSmall" type="MakeMenueSmallAction" />
		<action path="/makeMenueBig" type="MakeMenueBigAction" />

		<forward name="forwardShowPageX" path="defaultLayout.showPageX" />
		<forward name="forwardShowPageY" path="defaultLayout.showPageY" />
		<forward name="forwardShowPageZ" path="defaultLayout.showPageZ" />

[code tiles.xml]
	<definition name="default.default" path="/layouts/defaultLayout.jsp">
        	<put name="head" value="/view/head.jsp" />
        	<put name="leftbar" value="/view/leftbar.jsp" />

	<definition name="defaultLayout.showPageX extends="default.default">
      		<put name="title" value="Title X"/>
        	<put name="main" value="/view/pageX.jsp" />
	<definition name="defaultLayout.showPageY extends="default.default">
      		<put name="title" value="Title Y"/>
        	<put name="main" value="/view/pageY.jsp" />
	<definition name="defaultLayout.showPageZ extends="default.default">
      		<put name="title" value="Title Z"/>
        	<put name="main" value="/view/pageZ.jsp" />

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message