File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts 2 + Ajax response handling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 + Ajax response handling" Watch "Struts 2 + Ajax response handling" New topic
Author

Struts 2 + Ajax response handling

Nick Sher
Ranch Hand

Joined: Nov 10, 2008
Posts: 78
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.


Nick
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 + Ajax response handling
 
Similar Threads
Struts2_Ajax tags not working
Struts Form With AJAX
Struts 2.1.6: keeping information in the same div - using tree node
Struts - Ajax help needed!
Help me... Pls