• 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

loosing fielderror when result to another action

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am unable to see a <s:fielderror/> on the view.jsp, even though I know the validator is populating it.



If I do the following, it works, but this is not what I want. I want to perform the processing inside of ViewAction:



Thanks,
James
 
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
If you redirect to a new action, it's a new instance, and the original action's properties are lost. You could consider using the store interceptor.
 
J Young
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunately I'm trying not to use type="redirect-action", rather I want an include. (This is because of problems we have with handling redirects. Firewalls, etc..)

So everything is happening in the same request. I tried your suggestion. When I debugged the MessageStoreInterceptor, it went something like this:

MessageStoreInterceptor.before for EditAction -> do nothing
MessageStoreInterceptor.before for ViewAction -> try to retrieve error messages from session (they're not there yet)
MessageStoreInterceptor.after for ViewAction -> do nothing
MessageStoreInterceptor.after for EditAction -> try to store error messages to session (to late)

 
reply
    Bookmark Topic Watch Topic
  • New Topic