Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with ActionErrors

 
Fred Artes
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my situation :

1) Action_A set a list in actionform (ActionForm_A)
2) go to jsp_A (an insert form)
3) Action_B save data posted in insert form

Action_A and Action_B work on the same form (ActionForm_A)

If before the call of Action B, actionForm throw an ActionError, control return to jsp_A. Two cases :

a) ActionForm_A has scope="request" --> I have an error because I don't have more list upload by Action_A in jsp_A

b) ActionForm_A has scope="session" --> all works but data in the insert form are not reset

Which is the best practise to resolve this problem ?

Sorry for my bad English
Thanks

[ December 12, 2008: Message edited by: Fred Artes ]
[ December 12, 2008: Message edited by: Fred Artes ]
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "not reset"? Wouldn't you want to keep the form values if there's a validation error?

In any case: are you redirecting or forwarding to the JSP? If you forward you can use a request-scope form.

f you have specialized form reset needs then implement reset() in the form.
 
Fred Artes
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by David Newton:
What do you mean by "not reset"? Wouldn't you want to keep the form values if there's a validation error?

In any case: are you redirecting or forwarding to the JSP? If you forward you can use a request-scope form.

f you have specialized form reset needs then implement reset() in the form.


Yes, I want keep form values if there is validation error. This is my struts-config



I have not a specialized form reset
 
Fred Artes
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm doing a simple findforward to jsp
Help please !!
 
Fred Artes
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nobody knows how I can resolve this problem ?
I'm surpriesed ......
[ December 17, 2008: Message edited by: Fred Artes ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic