I have one action (under a button) that can be invoked from several different places on the site. When the users presses the button I want the action to be invoked but without changing the page and only reloading (with the same get parameters) it to see the new values.
Because the button is in number of different location I cant really determine where the call came from.
Is it possible to do it without multiple entries in the action mapping file ?
At the moment I'm redirecting to a conformation page and there I have a back button with a js "history.back()".
It works but it doesn't reload the page. Just gives the page from cache.
Here's a thought, could you hide an IFRAME on your page (put it in a hidden div) and then when your button is hit, set the src attribute of your IFRAME to the URL for your action. I think this will cause the IFAME to send the action to your server without affecting anything visible on the page. If you need you should be able to access the results of the action from your main page once the responce is returned to the IFRAME. You could probably make a custom tag for your button that will set up the DIV and IFRAME.
Also, I think you can do this kind of thing with ajax, but I've never used it so I'll defer to any one with ajax experience who has a slicker way to do this.
I don't understand the usecase. Can't you tie the button to a JavaScript function that sets a request value? Seems much easier than any IFRAME shenanigans.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.