Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why is struts calling reset???

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a setup action which pre-populates a form and forwards it to a jsp page which displays the form. When the user submits the form it calls validate and if validate fails, reset for my ActionForm gets called before the jsp page is re-loaded.
I have my input attribute set to the same page that displays the form so I thought reset wouldn't get called again since it is part of the same request. The problem is my collection for my optionsCollection tag is going out of scope (or something) and I am getting an exception error.
Can anyone help me figure out what I am doing wrong???
-Dennis
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The reset method gets called on an ActionForm before it gets populated with the values from the request. Validate is called after the ActionForm is populated.
 
Maybe he went home and went to bed. And took this tiny ad with him:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic