You can do it as you did it in the validate method. For exemple :

 ActionErrors errors = new ActionErrors();

 if( dateFrom!=null &&
  !dateFrom.trim().equals("") &&
  !isValideDate(dateFrom)
  )
  errors.add(Constants.FROM_FIELD_ERROR, new
ActionError("error.dateformat"));
 if( dateTo!=null &&
  !dateTo.trim().equals("") &&
  !isValideDate(dateTo)
  )
  errors.add(Constants.TO_FIELD_ERROR, new ActionError("error.dateformat"));
 if(ddelai!=null && !ddelai.trim().equals("")){
  try{
  int value = Integer.parseInt(ddelai);
  if(udelai.equals(Constants.LIST_DEFAULT_VALUE)){
   errors.add(Constants.DELAI_FIELD_ERROR, new
ActionError("error.unitedelai.missing"));
  }
  if(value<=0)
   errors.add(Constants.DELAI_FIELD_ERROR, new
ActionError("error.integerformat"));
  }catch(NumberFormatException nfe){
  errors.add(Constants.DELAI_FIELD_ERROR, new
ActionError("error.integerformat"));
  }
 }

 return errors;

Arno.
  -----Message d'origine-----
  De : PALLUEL Sylvie [mailto:sylvie.palluel@;cnamts.fr]
  Envoye : lundi 4 novembre 2002 14:02
  A : [EMAIL PROTECTED]
  Objet : How to display an error from reset method (ActionForm) ?


  Hello,



  I'm using the reset method in a class which inherits from ActionForm to
initialize my form from database.



  This method can fail and generate an error that I want to display using
ActionErrors.

  How can I do this ?



  Thanks for your help.



  Sylvie.





  **********************************************************************
  This email and any files transmitted with it are confidential and
  intended solely for the use of the individual or entity to whom they
  are addressed. If you have received this email in error please notify
  the system manager.

  This footnote also confirms that this email message has been swept by
  MIMEsweeper for the presence of computer viruses.

  www.mimesweeper.com
  **********************************************************************

Reply via email to