thanks so much Ted for your help on this...

It's highly appreciated!

Theron



                                                                                       
                      
                    Ted Husted                                                         
                      
                    <husted@apach        To:     Struts Users Mailing List 
<[EMAIL PROTECTED]>  
                    e.org>               cc:                                           
                      
                                         Subject:     Re: PROBLEM, was Re: Can this be 
done at all using     
                    02/15/02             Form objects within  strutsframework          
                      
                    03:05 PM                                                           
                      
                    Please                                                             
                      
                    respond to                                                         
                      
                    Struts Users                                                       
                      
                    Mailing List                                                       
                      
                                                                                       
                      
                                                                                       
                      



Typically, there will be seperation ActionMappings for presenting the
form and storing the form. They may both use the same Action class, but
different ActionMappings. One has validate=false, the other has
validate=true.

Another way to go would be to make mode a property on your form. Then in
your validate method, you can skip the validation if
getMode().equals("Add").

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Java Web Development with Struts.
-- Tel +1 585 737-3463.
-- Web http://www.husted.com/struts/



[EMAIL PROTECTED] wrote:
>
> Ted (or anyone else):
>
> I am having a problem (I'm a newbie) with calling an Action.do to
"preload"
> form data.
>
> The problem I am having is that I want to have "validation=true" so that
my
> form will perform validation...
>
> What's happening is I have a menu (from a jsp file) with the following:
>
> <html:link page="/BillingAction.do?Mode=Add">
>
> I have a BillingForm with a "validate()" method that I wish to use....
>
> Apparently, struts always calls the forms validation() prior to my Action
> perform().    Since the form has not yet come up, my required fields
> validation is returning validation errors....
>
> Is there a way to have an Action be a part of a link and NOT have the
> corresponding form's validation called until you hit the "submit" button
on
> the form?    That's the way I thought it was supposed to behave but it is
> not the case...
>
> Is there a way around this?    I need to have "validation=true" in my
> struts.config file but the framework will call "validation()" even before
> the form is brought up  when I select the link tag :-(
>
> thanks for any help,
> Theron
>
> --
> 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]>




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

Reply via email to