Win a copy of High Performance Python for Data Analytics this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

ValidatorForm exception in struts framework

 
Ranch Hand
Posts: 424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I set an ActionError to the ActionErrors collection, I get an unknown exception in the struts framework after validate() returns. I am using Struts 1.2.9. Any ideas?

public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)
{
ActionErrors errors = new ActionErrors();

String actionMethod = request.getParameter(UIGridGlobal.REQID_METHOD);

if (hiddenCurrentEvent != null && hiddenCurrentEvent.compareTo(UIGridGlobal.USER_EVENT_SEND_FORM) == 0){

if(priceBeginDate == null || priceBeginDate.compareTo("") == 0){
errors.add("no review action", new ActionError("errors.grid.ui.priceBeginDate"));
}

if(selectedDealers == null || selectedDealers.length == 0){
errors.add("no review action", new ActionError("errors.grid.ui.selectedDealers"));
}

}

return errors;
}
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The ActionError class has been deprecated in Struts Version 1.2.9. Use ActionMessage instead. Note that only ActionError is deprecated. ActionErrors is still good.
 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic