You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tarek Nabil <Ta...@tco.ae> on 2006/05/02 06:42:28 UTC

FW: mapping.getInput()

 Not that it has anything to do with your problem, but why are you doing
it this way? Why don't you do

return mapping.getInputForward();

-----Original Message-----
From: Pat Slater [mailto:pslater33@yahoo.com] 
Sent: Sunday, April 30, 2006 7:22 PM
To: user@struts.apache.org
Subject: mapping.getInput()

When returning back to the input html form page on Exception,
mapping.getInput() returns correctly to that page but the form-fields
entered by the user are not there anymore..... This is a part of my
code:
   
  public ActionForward saveMethod(ActionMapping mapping, ActionForm
form,
           HttpServletRequest request, HttpServletResponse response)
throws Exception
   {
       //......................
     try {
         myWork = saveMyWork(); //This throws a DateFieldException
     } catch(DateFieldException e) {
         ActionMessages errors = new ActionMessages();
         ActionMessage error = new ActionMessage(
"errors.detail",e.getMessage() );
         errors.add( ActionMessages.GLOBAL_MESSAGE,error );
         saveErrors( request,errors );
         return new ActionForward( mapping.getInput() );
         //return mapping.findForward( "failureDate" );
     }
   //............
}
   
  Has anybody experienced this?
   
   

			
---------------------------------
Yahoo! Mail goes everywhere you do.  Get it on your phone.
********************************************DISCLAIMER********************************************
This email and any files transmitted with it are confidential and contain privileged or copyright 
information. If you are not the intended recipient you must not copy, distribute or use this email
or the information contained in it for any purpose other than to notify us of the receipt thereof.
If you have received this message in error, please notify the sender immediately, and delete this
email from your system.

Please note that e-mails are susceptible to change.The sender shall not be liable for the improper
or incomplete transmission of the information contained in this communication,nor for any delay in
its receipt or damage to your system.The sender does not guarantee that this material is free from
viruses or any other defects although due care has been taken to minimise the risk.
**************************************************************************************************

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


Re: FW: mapping.getInput()

Posted by Pat Slater <ps...@yahoo.com>.
I am using org.apache.struts.validator.DynaValidatorForm to define the form bean in struts-config.xml file.

  
Pat Slater <ps...@yahoo.com> wrote: Used return mapping.getInputForward(); with no change in the result.

Tarek Nabil  wrote:  Not that it has anything to do with your problem, but why are you doing
it this way? Why don't you do

return mapping.getInputForward();

-----Original Message-----
From: Pat Slater [mailto:pslater33@yahoo.com] 
Sent: Sunday, April 30, 2006 7:22 PM
To: user@struts.apache.org
Subject: mapping.getInput()

When returning back to the input html form page on Exception,
mapping.getInput() returns correctly to that page but the form-fields
entered by the user are not there anymore..... This is a part of my
code:
   
  public ActionForward saveMethod(ActionMapping mapping, ActionForm
form,
           HttpServletRequest request, HttpServletResponse response)
throws Exception
   {
       //......................
     try {
         myWork = saveMyWork(); //This throws a DateFieldException
     } catch(DateFieldException e) {
         ActionMessages errors = new ActionMessages();
         ActionMessage error = new ActionMessage(
"errors.detail",e.getMessage() );
         errors.add( ActionMessages.GLOBAL_MESSAGE,error );
         saveErrors( request,errors );
         return new ActionForward( mapping.getInput() );
         //return mapping.findForward( "failureDate" );
     }
   //............
}
   
  Has anybody experienced this?
   
   

   
---------------------------------
Yahoo! Mail goes everywhere you do.  Get it on your phone.
********************************************DISCLAIMER********************************************
This email and any files transmitted with it are confidential and contain privileged or copyright 
information. If you are not the intended recipient you must not copy, distribute or use this email
or the information contained in it for any purpose other than to notify us of the receipt thereof.
If you have received this message in error, please notify the sender immediately, and delete this
email from your system.

Please note that e-mails are susceptible to change.The sender shall not be liable for the improper
or incomplete transmission of the information contained in this communication,nor for any delay in
its receipt or damage to your system.The sender does not guarantee that this material is free from
viruses or any other defects although due care has been taken to minimise the risk.
**************************************************************************************************

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



  
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2�/min or less.

		
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.

Re: FW: mapping.getInput()

Posted by Pat Slater <ps...@yahoo.com>.
Used return mapping.getInputForward(); with no change in the result.

Tarek Nabil <Ta...@tco.ae> wrote:  Not that it has anything to do with your problem, but why are you doing
it this way? Why don't you do

return mapping.getInputForward();

-----Original Message-----
From: Pat Slater [mailto:pslater33@yahoo.com] 
Sent: Sunday, April 30, 2006 7:22 PM
To: user@struts.apache.org
Subject: mapping.getInput()

When returning back to the input html form page on Exception,
mapping.getInput() returns correctly to that page but the form-fields
entered by the user are not there anymore..... This is a part of my
code:
   
  public ActionForward saveMethod(ActionMapping mapping, ActionForm
form,
           HttpServletRequest request, HttpServletResponse response)
throws Exception
   {
       //......................
     try {
         myWork = saveMyWork(); //This throws a DateFieldException
     } catch(DateFieldException e) {
         ActionMessages errors = new ActionMessages();
         ActionMessage error = new ActionMessage(
"errors.detail",e.getMessage() );
         errors.add( ActionMessages.GLOBAL_MESSAGE,error );
         saveErrors( request,errors );
         return new ActionForward( mapping.getInput() );
         //return mapping.findForward( "failureDate" );
     }
   //............
}
   
  Has anybody experienced this?
   
   

   
---------------------------------
Yahoo! Mail goes everywhere you do.  Get it on your phone.
********************************************DISCLAIMER********************************************
This email and any files transmitted with it are confidential and contain privileged or copyright 
information. If you are not the intended recipient you must not copy, distribute or use this email
or the information contained in it for any purpose other than to notify us of the receipt thereof.
If you have received this message in error, please notify the sender immediately, and delete this
email from your system.

Please note that e-mails are susceptible to change.The sender shall not be liable for the improper
or incomplete transmission of the information contained in this communication,nor for any delay in
its receipt or damage to your system.The sender does not guarantee that this material is free from
viruses or any other defects although due care has been taken to minimise the risk.
**************************************************************************************************

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



		
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.