struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Dre├čler <to...@terragate.net>
Subject It is possible to recall an Action?
Date Mon, 09 Feb 2004 10:21:23 GMT
Hello
Depending on some sessionflags my jsp sides changing design.
(I use the tile plugin)
I call an action (/makeMenueSmall.do or /makeMenueBig.do) 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.
 


Thanks!!!

--------------------------------------------------------------------
My code snipes:
--------------------------------------------------------------------


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


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

	<global-forwards>  
		<forward name="forwardShowPageX" path="defaultLayout.showPageX" />
		<forward name="forwardShowPageY" path="defaultLayout.showPageY" />
		<forward name="forwardShowPageZ" path="defaultLayout.showPageZ" />
	</global-forwards>
[/code]


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

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



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