struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramadoss Chinnakuzhandai" <rchinnakuzhan...@register.com>
Subject RE: Action class calling other Action class
Date Mon, 01 Mar 2004 20:12:01 GMT
When I try to call actionA from actionB by forwarding to the path which mapped to actionA it
is not actually invoking actionA.

 <action name="myaccountDomainActionForm" type="com.register.struts.account.AccountDomainAction"
scope="session" path="/myaccount/domains">     
      <!-- <set-property property="secure" value="true"/> -->
	  <forward name="success" path="myaccount.dmdetails" redirect="false" />
	  <forward name="requiresLogin" path="myaccount.login" redirect="false" />
	  <forward name="restoreDefaultDNSSettings" path="myaccount.dmdetails.outsidedns.restore.confirm"
redirect="false" />
	  <forward name="addMoreDNS" path="myaccount.dmdetails.dns.add" redirect="false" />
	  <forward name="manageRegdNameServers" path="myaccount.dmdetails.dns.registered" redirect="false"
/>
    </action>	


<action name="myaccountDomainActionForm" type="com.register.struts.account.AccountDomainAction"
scope="session" path="/myaccount/domains">     
      <!-- <set-property property="secure" value="true"/> -->
	  <forward name="success" path="myaccount.dmdetails" redirect="false" />
	  <forward name="requiresLogin" path="myaccount.login" redirect="false" />
	  <forward name="restoreDefaultDNSSettings" path="myaccount.dmdetails.outsidedns.restore.confirm"
redirect="false" />
	  <forward name="addMoreDNS" path="myaccount.dmdetails.dns.add" redirect="false" />
	  <forward name="manageRegdNameServers" path="myaccount.dmdetails.dns.registered" redirect="false"
/>
    </action>	

-----Original Message-----
From: Gopalakrishnan, Jayesh [mailto:Jayesh.Gopalakrishnan@schwab.com]
Sent: Friday, February 27, 2004 5:18 PM
To: Struts Users Mailing List
Subject: RE: Action class calling other Action class


You could do this by just forwarding to an action mapping entry for
ActionClassB.

In you action mapping for ActionClassA, have multiple forwards.
And the logic in ActionClassA would forward to whichever, with 1 of them
being ActionClassB.

	<action path="/actionA" 
        		type="ActionClassA"
				name="form"
				scope="request">
				<forward name="SUCCESS"  path="/do/actionB"
/>
				<forward name="FAILURE"  path="/test.jsp" />
				<forward name="CANCEL"  path="whatever" />
		</action>    	

		<action path="actionB"
        		type="ActionClassB"
				name="form"
				scope="request">
				<set-property property="secure" value="true"
/>
				<forward name="SUCCESS"  path="/any.jsp" />
				<forward name="FAILURE"
path="/anyOther.jsp" />
		</action>


hth
-jayash

-----Original Message-----
From: Ramadoss Chinnakuzhandai [mailto:rchinnakuzhandai@register.com]
Sent: Friday, February 27, 2004 12:29 PM
To: struts-user@jakarta.apache.org
Subject: Action class calling other Action class


Hi,
  
I hv ActionClassA ======>Display JSP of ActionClassA having a link to Edit
JSP of ActionClassB======>ActionClassB=====>Edit JSP of
ActionClassB======>ActionClassB(Update records)=====>dispatch control over
to ActionClassA.


My question is that  Can I forward my control to ActionClassA from
ActionClassB? or is there any better approach/alternative??

Tnx in advance,

-Ramadoss





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


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