I'm using STRUTS 1.2 and the "javawebparts ajaxparts" taglib. I'm trying to implement 'please wait' functionality in a JSP page. I wrote a Action/JSP page that has two display modes. The first display mode displays a 'please wait' graphic inside a DIV. At the end of this page display mode, I manually kick off an Ajax request for the same Action/JSP with a special flag in a hidden form element that tells the JSP to display in a different mode. This new content is displayed inside the DIV described.
When I check the parameter value on the server as follows: request.getParameter("operation")
Since the form elements in question are outside the DIV, this would not seem to be AJAX related, but I have not been able to solve this problem. I'm wondering if there's something about the STRUTS framework that I'm missing.
I figured out the issue, and it wasn't caching. I had declared the hidden form element outside the conditional logic that determined which of the two display modes to render, so it was being rendered twice with the same name. When I changed the hidden input to an input type=text, the problem immediately became apparent. I wish there were a way to "view source" on an HTML page that displayed the current innerHTML content of a DIV; that would make it much easier to debug this sort of thing.
Thanks again! Jonathan.
posted 11 years ago
Oh well, you could always check out the view source chart plugin for Firefox which allows you to view the source of an HTML page even if the DOM is being dynamically altered.
The moth suit and wings road is much more exciting than taxes. Or this tiny ad:
professionally read, modify and write PDF files from Java