Hi Sashi,
Don't know if you've received any replies to this, but I initially handled it the same
as you, but ran into problems when I was going back to the servlet for drop-down
actions etc. I only wanted validation errors to appear when the user hit the save
button, so I ended up just
I found that the approach with 2 action mappings worked fine and I got
the impression when I first chose this method that it is intended to be
use this way.
I also used your method to check whether to validate, in situations
where I had a list of records where some could be edited and some
thanks for the feedback.
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 12:57 PM
To: Struts Users Mailing List
Subject: Re: How to ignore validation when form loads (first time)
I found that the approach with 2 action mappings worked fine
, 2003 12:57 PM
To: Struts Users Mailing List
Subject: Re: How to ignore validation when form loads (first time)
I found that the approach with 2 action mappings worked fine and I got
the impression when I first chose this method that it is intended to be
use this way.
I also used your method
PROTECTED]
Subject: RE: How to ignore validation when form loads (first time)
Even my code is working with 2 action mappings, but I have 15 JSP pages
so I will have to have 30 action mappings which is worrying me.
[EMAIL PROTECTED] 06/19/03 01:04PM
thanks for the feedback.
-Original
to validate right in the form class.
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 19, 2003 1:24 PM
To: [EMAIL PROTECTED]
Subject: RE: How to ignore validation when form loads (first time)
Even my code is working with 2 action mappings, but I have 15 JSP
To: Struts Users Mailing List
Subject: RE: How to ignore validation when form loads (first time)
Then are you interested in checking for an action button in the validate() to
just return null()?this way you control when you want to validate right in
the form class.
-Original Message-
From
Sashi wrote:
I do not want to validate when page loads, so how can I avoid it unless I
give
validate=false in the action mapping?
Override the validate method in your Form bean, and only call
super.validate() when appropriate. How to decide that is up to you. I use
a LookupDispatchAction, so
as far as I am concerned, there is nothing wrong with having two action
mappings. It is alot easier than coding something in the form class. I
have heard of projects with many hundreds of action mappings, with no
adverse impact on the project.
Wendy Smoak wrote:
Sashi wrote:
I do not want to
9 matches
Mail list logo