• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Problem with ActionErrors

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nobody knows how I can resolve this problem ?
I'm surpriesed ......
[ December 17, 2008: Message edited by: Fred Artes ]
reply
    Bookmark Topic Watch Topic
  • New Topic