struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henrique VIECILI" <viec...@softplan.com.br>
Subject Re: Returning an ActionError from an Action?
Date Thu, 01 Jul 2004 19:18:00 GMT
use the method saveErrors(ActionErrors);

In you Action:

ActionErrors errors = new ActionErrors();
// validation
errors.add("property", new ActionError("key"));

saveErrors(errors);

Henrique Viecili
  ----- Original Message ----- 
  From: DGraham@EvergreenInvestments.com 
  To: Struts Users Mailing List 
  Sent: Thursday, July 01, 2004 4:08 PM
  Subject: Returning an ActionError from an Action?



  Currently constrained to Struts 1.0. 

  Due to the nature of my application, I am unable to use an ActionForm to hold my form data
(I am pulling it directly from the request parameter map in the action).  As a result, I have
to perform my validation in the action, and I'm wondering if there is some way to leverage
ActionErrors from my action, or should I just use an application exception? 

  Dennis


------------------------------------------------------------------------------


  ---------------------------------------------------------------------
  To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
  For additional commands, e-mail: user-help@struts.apache.org
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message