• 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
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

Struts 2 + Ajax response handling

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using Struts 2.1.6 and Tiles 2.0.x with Ajax. I have an action configuration which returns a tiles result. Now I want to use this action with AJAX. I am using the bind tag to generate a listener and update a div.

When the action executes it returns a tiles result and updates the div with the new content. However, all the action properties (any lists, objects and variables are lost, they are not displayed). When there is an error, only the error key is displayed and its description is not picked up from the resource bundle. This used to work without AJAX.

How can I fix this? When I looked at the data returned using 'afterNotifyTopics', it displays complete response HTML from server but I don't need all this. I just need some action properties back so that I can update the error message and data on the page.

Please help.
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic