2002. december 3. 09:37 dátummal Marcus Biel ezt írtad:
I got a form for editing a data records.
When I hit cancel I want to display an other page then when I hit
submit.
How to do this ?
Read the docs! Take a look at the struts-example.war, or read the struts-tips
at husted.com:
One way is to do a forward from within the action. Ie: both buttons still
submit to same action to start with, but if its detected that it was a
cancel then the action immediately returns an ActionForward that forwards
the request on to the action/jsp/etc... that you want to go to if they hit
No, my problem is different!
A simple reset would be easy -
but I want to hit reset when I am editing -
when editing and I hit submit, it calls an action,
that updates the record,
then it forwards to a new jsp, that's says:
Your record has been edited successfully.
Now if I add a cancel button,
That's just what I thought would be best.
But how can I see in my Action which button was hit ?
[EMAIL PROTECTED] schrieb:
One way is to do a forward from within the action. Ie: both buttons still
submit to same action to start with, but if its detected that it was a
cancel then the action
PROTECTED]]
Sent: Tuesday, December 03, 2002 4:06 AM
To: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Subject: Re: different forwards from form
That's just what I thought would be best.
But how can I see in my Action which button was hit ?
[EMAIL PROTECTED] schrieb:
One way is to do a forward
2002. december 3. 10:01 dátummal Marcus Biel ezt írtad:
No, my problem is different!
No. Your problem is the same.
Now if I add a cancel button, it works,
but also forwards to this same page,
instead of to the regular start page.
If you add a cancel button, you can handle the cancel event
I thought (isCancelled(request))
would be a user defined method.
Are you sure I can simple use this method,
and he will know the user hit the cancel button ?
marcus
[EMAIL PROTECTED] schrieb:
2002. december 3. 10:01 dátummal Marcus Biel ezt írtad:
No, my problem is different!
No. Your
2002. december 3. 10:22 dátummal Marcus Biel ezt írtad:
I thought (isCancelled(request))
would be a user defined method.
Are you sure I can simple use this method,
and he will know the user hit the cancel button ?
If the cancel button was generated with html:cancelcancel/html:cancel
Hth,
8 matches
Mail list logo