You can add another action without a form-bean that will implement the
cancel functionality and in all other cases forward the request to your real
action where the ActionForm will be populated.

Tal Lev-Ami
Trivnet Ltd.

-----Original Message-----
From: Angie Lin [mailto:[EMAIL PROTECTED]]
Sent: Sun, September 29, 2002 10:26 PM
To: Struts Users Mailing List
Subject: Re: Help Re: cancel and session-scope form


Thanks for the tip, but I'm trying to avoid javascript as much as 
possible.  It looks like I'll have to go ahead and manage my session 
form manually, and use a request-scoped form so that the auto-population 
doesn't blow away the properties.  

Thanks again,
Angie

Eddie Bush wrote:

> Actually ... I've never done this before, but ...
>
> Why couldn't you invoke a javascript method on your Cancel button that 
> invoked the forms reset method?  That might be the easiest solution ...
>
> Eddie Bush wrote:
>
>> Just quickly thinking it over ...
>>
>> When your form submits, you're going to hit an action.  Your action 
>> is going to look and see what the user told you they wanted to do and 
>> act appropriately.  Now, that doesn't help you keep the form from 
>> being populated, but you can certainly keep from updating your 
>> persistent storage using this information - and know that, instead, 
>> you should request fresh data to repopulate the form with.  I like to 
>> rename my buttons to something like "action" or "userAction" - and 
>> give all of them the same name - so I can judge off the value of that 
>> parameter what the user is telling me they'd like to have happen.
>>
>> That's my "spontaneous, first-cut" answer.  I can't think of a way to 
>> circumvent the population ... 
>
>
>

-- 
Angie Lin
[EMAIL PROTECTED]
408.519.9250



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

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

Reply via email to