This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 + Ajax response handling

 
Nick Sher
Ranch Hand
Posts: 78
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic