This is a question related to action and tile.
<action path="someURL"
name="submitForm"
type="someActionClass">
<forward
name="success"
path=".pages.tileDef1"/>
</action>
-------------------------------
tile definition:
<definition
name=".pages.Base"
path="/pages/common/layouts/baseLayout.jsp">
<put name="footer"
value="/pages/common/header.jsp" />
<put name="content"
value="/pages/content/home_content.jsp" />
<put name="footer"
value="/pages/common/footer.jsp" />
</definition>
<definition
name=".pages.tileDef1" extends=".pages.Base">
<put name="content"
value="/pages/content/real_content.jsp" />
</definition>
After someActionClass executed successfully, it
displays page .pages.tileDef1, but the URL on
browser still shows someURL. If user clicks
browser's refresh button, the 'submitForm' will
be submitted again and 'someActionClass' will be
executed again which end up processing the
'submitForm' multiple times depends
on how many time user clicks refresh. It becomes worse
if the content of the form will be written to
database.
How do I know (while I am in action code) if it comes
from the real button click or the refresh button
click?
Or I could show a different URL after the form is
processed, then a dummy action has to be added. Not a
clean way to do.
<action path="someURL"
name="submitForm"
type="someActionClass">
<forward
name="success"
path="/do/dummy"/>
</action>
<action path="/dummy"
name="dummyForm"
type="dummyActionClass">
<forward
name="success"
path=".pages.tileDef1"/>
</action>
Thanks,
Lijuan
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]