Re: different forwards from form

2002-12-03 Thread Gemes Tibor
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:

RE: different forwards from form

2002-12-03 Thread Andrew Hill
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

Re: different forwards from form

2002-12-03 Thread Marcus Biel
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,

Re: different forwards from form

2002-12-03 Thread Marcus Biel
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

RE: different forwards from form

2002-12-03 Thread edgar
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

Re: different forwards from form

2002-12-03 Thread Gemes Tibor
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

Re: different forwards from form

2002-12-03 Thread Marcus Biel
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

Re: different forwards from form

2002-12-03 Thread Gemes Tibor
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,