Ali Raza wrote:
Greetings,

Is there any way to determine whether a page has been refresehed ? Is there
some object in the request Map or something to indicate that the page has
been refreshed from the client instead of actual postback from some submit
button  ?
My problem is that when the page is refreshed the last submit button to be
pressed remains in the request map and the corresponding action is performed
when the decode method of my cutsom component is called when the page is
refreshed...

Any help would be much appreciated ...

If you use Shale's ViewController feature [1] you get access to a number of life-cycle hooks, including an isPostBack() method you can use to answer this. You may also find useful the setPostBack() method and/or the preprocess() method, which is only called if the request is a postback.

L.

[1] http://struts.apache.org/struts-shale/features-view-controller.html


Thanx
A
--
"A sixteenth century inventor called Wan Hu designed a rocket-propelled
chair on which he planned to ascend into heaven. He built an open cabin, to
which he fitted 47 rockets underneath and above, and two kites to keep him
aloft. Wan Hu disappeared in flame and smoke and was never seen again. A
crater on the moon is now named after him, so in one sense he made it to the
heavens after all. This is the first recorded design of something
approximating to a manned space rocket."

The Chinese Space Programme.
From Conception to Future Capabilities.
Brian Harvey


Reply via email to