You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Steven Santiago <sm...@neca.com> on 2003/05/07 22:48:17 UTC

global-forward to action-mapping...Losing Form

Not sure if this is best practice but can anyone explain to me what is
happening to my DynaValidatorForm when the path of my global-forward
maps to an action path? Here is what I currently have:

<global-forwards>
 <forward name="sql_failure" path="/sqlFailure.do"/>
</global-forwards>

<action
      path="/sqlFailure"
      type="com.test.foo.action.ForwardAction"
      scope="request"
      name="VWDynaValidatorForm">
      <forward name="success" path="/web/sql_error.jsp"/>
</action>

The short version is that a have my DispatchAction catching the
SQLException passed up from my DAO. I set the sqlError property on the
VWDynaValidatorForm via:

VWDynaValidatorForm paymentAdjCodeForm = (VWDynaValidatorForm) form;
paymentAdjCodeForm.setSqlError("some error");
return mapping.findForward("sql_failure");

Some debugging in the ForwardAction shows that the property is now null,
which obviously is now null in my sql_error.jsp. However, if I set
directly in the request in my DispatchAction this is not an issue as the
param is present. We are trying to keep from setting things directly in
the request from our Actions and set them on our forms instead. What am
I missing or mis-understanding? Sorry for the long post.

Thanks,
Steve


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


[Double Post] RE: global-forward to action-mapping...Losing Form

Posted by Steven Santiago <sm...@neca.com>.
Mail server hiccup. Sorry about that.


-----Original Message-----
From: Steven Santiago [mailto:sms687@neca.com] 
Sent: Wednesday, May 07, 2003 8:21 PM
To: 'Struts Users Mailing List'; sms687@neca.com
Subject: RE: global-forward to action-mapping...Losing Form 


Any struts guru's have some insites for the issue below? Im sure it's
something newbie related.

steve

-----Original Message-----
From: Steven Santiago [mailto:sms687@neca.com] 
Sent: Wednesday, May 07, 2003 4:48 PM
To: Struts Users Mailing List
Subject: global-forward to action-mapping...Losing Form 


Not sure if this is best practice but can anyone explain to me what is
happening to my DynaValidatorForm when the path of my global-forward
maps to an action path? Here is what I currently have:

<global-forwards>
 <forward name="sql_failure" path="/sqlFailure.do"/> </global-forwards>

<action
      path="/sqlFailure"
      type="com.test.foo.action.ForwardAction"
      scope="request"
      name="VWDynaValidatorForm">
      <forward name="success" path="/web/sql_error.jsp"/> </action>

The short version is that a have my DispatchAction catching the
SQLException passed up from my DAO. I set the sqlError property on the
VWDynaValidatorForm via:

VWDynaValidatorForm paymentAdjCodeForm = (VWDynaValidatorForm) form;
paymentAdjCodeForm.setSqlError("some error"); return
mapping.findForward("sql_failure");

Some debugging in the ForwardAction shows that the property is now null,
which obviously is now null in my sql_error.jsp. However, if I set
directly in the request in my DispatchAction this is not an issue as the
param is present. We are trying to keep from setting things directly in
the request from our Actions and set them on our forms instead. What am
I missing or mis-understanding? Sorry for the long post.

Thanks,
Steve


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


RE: global-forward to action-mapping...Losing Form

Posted by Steven Santiago <sm...@neca.com>.
Any struts guru's have some insites for the issue below? Im sure it's
something newbie related.

steve

-----Original Message-----
From: Steven Santiago [mailto:sms687@neca.com] 
Sent: Wednesday, May 07, 2003 4:48 PM
To: Struts Users Mailing List
Subject: global-forward to action-mapping...Losing Form 


Not sure if this is best practice but can anyone explain to me what is
happening to my DynaValidatorForm when the path of my global-forward
maps to an action path? Here is what I currently have:

<global-forwards>
 <forward name="sql_failure" path="/sqlFailure.do"/> </global-forwards>

<action
      path="/sqlFailure"
      type="com.test.foo.action.ForwardAction"
      scope="request"
      name="VWDynaValidatorForm">
      <forward name="success" path="/web/sql_error.jsp"/> </action>

The short version is that a have my DispatchAction catching the
SQLException passed up from my DAO. I set the sqlError property on the
VWDynaValidatorForm via:

VWDynaValidatorForm paymentAdjCodeForm = (VWDynaValidatorForm) form;
paymentAdjCodeForm.setSqlError("some error"); return
mapping.findForward("sql_failure");

Some debugging in the ForwardAction shows that the property is now null,
which obviously is now null in my sql_error.jsp. However, if I set
directly in the request in my DispatchAction this is not an issue as the
param is present. We are trying to keep from setting things directly in
the request from our Actions and set them on our forms instead. What am
I missing or mis-understanding? Sorry for the long post.

Thanks,
Steve


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