While that might be a good suggestion, it doesn't breech the topic of
how to get the form to submit even when the user selects cancel.

I personally handle this by having a javascript variable called
"isCancelled" which I initialize to false.  The onclick handler for my
cancel button sets it to true.  In my validation JavaScript, I check
for this value first thing off the bat.

That's not a real good Struts way to do it, I'm sure, but it certainly
does work.  I haven't gotten to use the Struts validation stuff at
work yet (though I'm looking forward to using it in my next project),
so I'm not sure how you'd handle this if you are.  Perhaps someone
else has a suggestion compatible with Struts validation.

One thing I'll point out.  If you're using your buttons in typical
Struts fashion (ala lookup dispatch action), you won't want to disable
your buttons.  If you do, your action won't know what the user asked
to do and you'll wind up with some nasty exceptions :-)

Good Luck!

Eddie

On Apr 11, 2005 4:59 PM, Stunger, Kevin J <[EMAIL PROTECTED]> wrote:
> For long running actions, I always prefer to use transaction tokens
> (built into Struts) and a processing/wait page.  This keeps users busy
> watching instead of wondering why the page hasn't changed.
> 
> --Kevin
> 
> -----Original Message-----
> From: Derrick Koes [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 11, 2005 1:42 PM
> To: [EMAIL PROTECTED]
> Subject: html:cancel question
> 
> What do I need to do to disable
> buttons AND get cancel to work properly?

-- 
Eddie Bush

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to