Hi,
Why would I want to use the Struts ActionForm validate() method when I can
achieve the same functionality using Javascript? I assume that the user
would never disable javascript.
Regards ,
Madhu
-
To unsubscribe, e
What happens of the user disables javascript in their browser?
> from:Madhu Nair <[EMAIL PROTECTED]>
> date:Tue, 19 Aug 2003 07:05:01
> to: [EMAIL PROTECTED]
> subject: Re: Why would I want to use the ActionForm validate() method
>
>
> Hi,
>
Hi,
Why would I want to use the Struts ActionForm validate() method when I can
achieve the same functionality using Javascript?
Regards ,
Madhu
-
Madhu Nair
Member of Technical Staff,
Persistent Systems Private Limited,
Pune 411016 INDIA.
Tel: +91-20
Hi;
When the user clicks submit on page 2 of a form, I need to check page 1 also because
they may have gotten to page 2 with a bookmark.
My page 1 validation is with the page 1 form validate. page 2 has a different form.
Should I:
1.. Look for the page 1 form attached to the session and if
, I need to check page 1 also because they may have gotten to page 2 with a bookmark.
My page 1 validation is with the page 1 form validate. page 2 has a different form.
Should I:
1.. Look for the page 1 form attached to the session and if it's not there, go back
to page 1? And if so, how
;Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, July 25, 2003 2:40 PM
Subject: Re[9]: validate = false does not work
> Hello Michael,
>
> even in version 1.0 there is no line 1955 in ActionServlet!? Has
> anyone changed the sources?
>
> Can
ting with requestSave. I don´t get it, why Struts is calling the
MO> validate method of my proposalForm.
MO> Thanks Michael
MO> - Original Message -
MO> From: "Dirk Markert" <[EMAIL PROTECTED]>
MO> To: "Struts Users Mailing List" <[EMAIL PROTECTED]&
Hi Dirk,
I´m using version 1.0.
I´m starting with requestSave. I don´t get it, why Struts is calling the
validate method of my proposalForm.
Thanks Michael
- Original Message -
From: "Dirk Markert" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[E
.
***
MO> Hi Dirk,
MO> thanks for your help. I don´t think that the validate get´s called
MO> elsewhere. See... config. always forward success is called. it crashes
MO> from end of proposalAdd to proposalEdit.
MO> type="epool.controller.re
Hi Dirk,
thanks for your help. I don´t think that the validate get´s called
elsewhere. See... config. always forward success is called. it crashes
from end of proposalAdd to proposalEdit.
see the stack trace says, that struts
Hello Michael,
***
MO> no there is no validate call in the whole project. i searched for references
MO> und declarations.
By default, validate is performed for every action mapping. If another action mapping
is usin
no there is no validate call in the whole project. i searched for references
und declarations.
what does
validate
true
in the web.xml mean? perhaps is there anything wrong?
- Original Message -
From: "Dirk Markert" <[EMAIL PROTECTED]>
To: "Stru
The action that you are mentioning comes into picture only when the forward
is success... and if the validate attribute is true for that action then,
validate method for that particualr formBean will be called.
But I think Michel is mentioning about the validate method being called in
the action
Hello Michael,
may be your /proposalEdit.action??
***
DM> Hello Michael,
DM> there is/was no problem with validation. Perhaps another action
DM> mapping is calling your validate ac
Hello Michael,
there is/was no problem with validation. Perhaps another action
mapping is calling your validate action?
***
MO> No, I have restarted everything. I´ve got an older version of struts. Was
MO> there a problem once? I
ECTED]>
Sent: Friday, July 25, 2003 10:48 AM
Subject: RE: validate = false does not work
I dont see any error in what is mentioned out here. Only doubt for me is
that if u have changed the XML file in the middle and have not restarted the
webserver...
try restarting web server once...
-Ori
, 2003 1:57 PM
To: 'Struts Users Mailing List'
Subject: validate = false does not work
Hi,
Validate=false in my struts-config.xml does not work. The validate Method is
called alway. Can anybody help me? See:
Is there any error?
I´m using an older version
Hi,
Validate=false in my struts-config.xml does not work. The validate Method is called
alway. Can anybody help me? See:
Is there any error?
I´m using an older version of struts..
depends="required,date">
datePatternStrict
dd-MM-
-
-Original Message-
From: Guillaume Cormier [mailto:[EMAIL PROTECTED]
Sent: July 22, 2003 3:50 PM
To: Struts Users Mailing List
Subject: Re: Struts 1.1 Final - Validate Date
sers Mailing List
Subject: Re: Struts 1.1 Final - Validate Date field in struts-validator.war
I don't understand want you mean validation.xml (not validator.xml)
is include in the package struts-validator.war
Please, verify that the date field is valid only if you enter a date
lik
depends="required,date">
datePatternStrict
dd.MM.
depends="required,integer,intRange">
Not enough info. Please post your date validation in validator.xml.
-Original Message-
From: Guillaume Cormier [mailto:[EMAIL PROTECTED]
Sent: July 21, 2003 11:20 AM
To: [EMAIL PROTECTED]
Subject: Struts 1.1 Final - Validate Date field in struts-validator.war
I am not able to
humm..was a dumb mistake :) in struts-config i had validate set to "false"
:)
- Original Message -
From: "Khalid K." <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, July 21, 2003 10:23 AM
Subject: val
Hello all,
If an ActionForm bean's scope is "session", does the validate() method get
called only once ??
I have several actions that post to the same form, but it seems that the
validate method is only called once when the form gets created
Any help is appreciated.
Kh
I am not able to validate the date field when I am in French Canadian Mode. SomeOne have the same problem ?
Details :
When I click on "French Canadian | Francais Canadien - On the JavaScript Type Form the integer field should fall in a range of 100-200 and the date field should have a f
Thursday, July 17, 2003, 8:02:12 PM, you wrote:
WS> Martin wrote:
>> I am curious, I cannot get the form to reappear with the data that I am
>> validating.
WS> I have my forms in session scope and don't have this problem. What scope
WS> are your forms in?
Hi Wendy - I was initially placing th
Martin wrote:
> I am curious, I cannot get the form to reappear with the data that I am
> validating.
I have my forms in session scope and don't have this problem. What scope
are your forms in?
--
Wendy Smoak
:42:18 PM, you wrote:
MN> I am curious, I cannot get the form to reappear with the data that I am
MN> validating. I've implemented the validate() method on my ActionForm, it
MN> validates ok, but I would like to have the data that was on the form
MN> (regardless of whether the da
I am curious, I cannot get the form to reappear with the data that I am
validating. I've implemented the validate() method on my ActionForm, it
validates ok, but I would like to have the data that was on the form
(regardless of whether the data was correct or not) repopulated.
I tried some
g displayed properly. What could be the reason?
-Original Message-
From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 10, 2003 12:32 PM
To: [EMAIL PROTECTED]
Subject: RE: What should be in validate() method when using struts validator package
HI again
this pdf gives
hi,
well then..
do not perform any validations in the validate method. (leave it
empty).
do this email validation in the action class. so if ur email is
invalid add that to errors and also get other data from db and then
Thanks Nagendra
But on the JSP page I want to show both the errors as well as the data (
form bean variable which are populated in the performAction() method of
action class. )
i.e. in validate method if email address is invalid then I am adding the
errors and forwarding to JSP page, this
hi pankaj,
type="com.onstar.myonstar.process.web.controller.EmailCreationAction"
name="emailCreationForm"
validate="true"scope="request"input="/emailcreation.mo">
path="/jsp/virtualadvis
s.xml
--nagi
---Original Message---
From: Struts Users Mailing
List
Date: Thursday, July
10, 2003 12:10:40 PM
To: 'Struts Users Mailing
List'
Subject: RE: What
should be in validate() method wh
Hi All,
I am validating email address entered by user, using in validate method
of formBean. If the email address is invalid I am adding the errors.
Struts Config entries:
OR
Second one is going into the loop and first one is not getting the
values from
: Re: What should be in validate() method when using struts validator package
hi,
struts validator provides both client side as well as server side validations.
if u want to use the serverside validations , u have to extend the validatorForm
instead of ActionForm and remove the validate() method
hi,
struts validator provides both client side as well as server side
validations.
if u want to use the serverside validations , u have to extend the
validatorForm instead of ActionForm and remove the validate() method all
together.
but, in my
What should be in validate() method when we use Struts Validator package?
Should it be an empty method?
My current validate() method (without using Struts Validator) is as follows:(What
should it be if I implement validations in validator-rules.xml and validations.xml)?
Pl. suggest.
public
Hi,
I am using struts 1.1 and i have the following
requirement, and need help in desinging it
I have some applications which will need the user to
login using userid and password, the user is already
logged to the website, but needs this for electronic
signature.
my problem is how do i take the use
an find
out what it is from the netscape javascript debug console. Under the
Tools menu I think.
Adam
sriram wrote:
I'm not using struts validator package.
I'm just checking if a mandatory field is null or not using the following code in validate() function of ActionForm.
public Actio
ttp://www.netspread.com
- Original Message -
From: "MaFai" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, July 06, 2003 9:00 PM
Subject: Do any one send me the simplest validate strut for me?
> Hello, struts-user,
>
> I have read the strut example again a
I'm not using struts validator package.
I'm just checking if a mandatory field is null or not using the following code in
validate() function of ActionForm.
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
Ac
sriram wrote:
I'm using Netscape 4.7
And the erors here are not javascript.
Simple validations performed in validate() method of ActionForm.
I'm using an image in place of a submit button (using tag).
In case value is not provided for a mandatory field, the validate() method will ch
I'm using Netscape 4.7
And the erors here are not javascript.
Simple validations performed in validate() method of ActionForm.
I'm using an image in place of a submit button (using tag).
In case value is not provided for a mandatory field, the validate() method will chk
for null and
It's weird how many people have javascript issues with validator. What
version of Netscape are you using and what errors are you getting?
sriram wrote:
I'm using Struts 1.0 and I have written some validations in the validate() method in ActionForm . For example, some of the fields o
file, and I see that the action mapping for
"saveSubscription" is not set to validate. You can edit this to make it
perform validation by adding the attribute
validate="true"
to the mapping.
There are plenty of good resources, tutorials etc on the struts website
to help get you
I'm using Struts 1.0 and I have written some validations in the validate() method in
ActionForm . For example, some of the fields on the form are mandatory and so if the
form is submitted with giving input in those fields, appropriate messages are
displayed. This is working fine in Int
Hello, struts-user,
I have read the strut example again and again.Attempt to use the simple
validate in my validateform.But it failed,I still
can not find the reason,so do any one send me the example which is only need
to validate the field required.
Thanks!
Best
On the other hand, there is a message like this:
Currently, commons-validator doesn't validate your xml file against the
DTD so you won't see a syntax error.
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
in the console log. And no errors. No errors in the loc
ally
> incorrect text in the file, and I didn't get an error anywhere I could
> find. On the other hand, there is a message like this:
Currently, commons-validator doesn't validate your xml file against the
DTD so you won't see a syntax error.
>
> INFO: Loading validati
validation file.
My form bean name matches my validation form name, which matches the
name in my action mapping. I have validate=true in my action mapping.
I have a validation rule defined for a field on the form. (Two,
actually: required and integer.) Nothing.
I'm using a DynaValida
form name, which matches the
name in my action mapping. I have validate=true in my action mapping.
I have a validation rule defined for a field on the form. (Two,
actually: required and integer.) Nothing.
I'm using a DynaValidatorActionForm, in case that matters. Oh, and this
is
All the Javascript code from validator-rules.xml starting from"function
validateMaxLength(form)"
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 9:37 AM
To: Struts Users Mailing List
Subject: RE: Validate Client side(Javasc
EMAIL">mailto:[EMAIL</a> PROTECTED]
> Sent: Wednesday, June 25, 2003 9:29 AM
> To: Struts Users Mailing List
> Subject: Re: Validate Client side(Javascript) code shows up in the page
>
>
> What version are you using? This sounds like a bug that was fixed som
r (HAL)
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 11:12 AM
To: 'Struts Users Mailing List'
Subject: Validate Client side(Javascript) code shows up in the page
Hello,
I got the following configuration in the struts-config.xml,
when I go to the html page the Ja
Struts version 1.1rc2
-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 9:29 AM
To: Struts Users Mailing List
Subject: Re: Validate Client side(Javascript) code shows up in the page
What version are you using? This sounds like a bug that
What version are you using? This sounds like a bug that was fixed some
time ago.
David
--- "Mounagurusamy, Jayakumar (HAL)" <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> I got the following configuration in the struts-config.xml,
>
>
> value="WEB-INF/resources/validator/validator-rules.
Hello,
I got the following configuration in the struts-config.xml,
when I go to the html page the JavaScript code shows up in the page which
suppose not to be there. When look into the source code through view source,
I see the following code and remaining out side the tag? I am
for (int i=0;i
(B
(B
(B
(B
(BThis work all item in array.
(BBut, I don't know that is best way...
(B
(B- Original Message -
(BFrom: "Ben Anderson" <[EMAIL PROTECTED]>
(BTo: <[EMAIL PROTECTED]>
(BSent: Thursday, June
I have a page with multiple checkboxes (I'm using ) and I
need to validate that at least one of them is checked.
This doesn't seem to work. I've been reading through Struts Chapter 12 pdf
about validation, but can't seem to find
reset()
populate()
validate()
I believe
sandeep
--- Sashi Ravipati <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have the form info in my action and it passes the
> form's
> validation, but if I add an error the displayed
> page doesn't have the form info.
> Th
A very similar discussion is taking place on irc.darkmyst.org 6667 right
now
-Original Message-
From: Sashi Ravipati [mailto:[EMAIL PROTECTED]
Sent: Friday, June 13, 2003 8:44 AM
To: [EMAIL PROTECTED]
Subject: lost form data when validate returns errors
Hi
I have the form info in
Hi
I have the form info in my action and it passes the form's
validation, but if I add an error the displayed page doesn't have the form info.
The error displays properly, but I lose all the form data.?
Will the reset() method be called when a validation error occurs?
Sashi
For validation that can only be done against the database, should this go
in the validate method or in the execute method?
I usually do it in execute() and keep basic validations in the Validator
framework.
For example checking that a customer doesn't alerady exist before inserting
i
For validation that can only be done against the database, should this go in
the validate method or in the execute method?
For example checking that a customer doesn't alerady exist before inserting
it, or checking that a user has entered a valid address before the execute
method is call
mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 04, 2003 11:35 AM
> > To: Struts Users Mailing List
> > Subject: validator: how to validate if either of two fields
> > is present andvalid
> >
> >
> > we have a form we are displaying to the user.
or an integer value depending
on the field.
We are currently using validator for the rest of the app (1.1 rc1).
How can we achive this validation using validator?
Writing a custom validate method does not seem to be a good solution
because you can only validate one field at a time.
We tho
t;
> Cheers,
> Krishna
>
> > -Original Message-
> > From: Krishnakumar N
> > Sent: Wednesday, June 04, 2003 2:04 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Validation : Can't validate integer fields...
> >
> >
>
Resending as previous mail seems to have got lost.
Cheers,
Krishna
> -Original Message-
> From: Krishnakumar N
> Sent: Wednesday, June 04, 2003 2:04 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Validation : Can't validate integer fields...
>
&g
Hi,
I'm new to this group. I'm a java developer working currently on projects
for the Norwegian National Lottery.
In an input form, I'm trying to validate user input on the client, making
sure that the values are integers. My problem is that no message is
presented for "error
Excellent. Thank you.
Bradley M. Handy wrote:
I ran into this problem last week. I fixed this by creating an initial
action mapping (ie. showform) to show the form and not validate anything.
Then make sure all submit buttons submit to your action mapping that does
validate. Not too hard. I
I ran into this problem last week. I fixed this by creating an initial
action mapping (ie. showform) to show the form and not validate anything.
Then make sure all submit buttons submit to your action mapping that does
validate. Not too hard. I've included a sample configuration to
illus
m with data from the identified story. If not, it just renders an
empty form. The problem is that the validator seems to be engaged prior
to this method ever being called and I'm seeing my "HEADLINE is
required" message.
How do I render an empty form in this scenario? I want to
I found out that that with validate=true the mydispatchaction *never* is
called.
The requestprocessor instanciates the actionform calls the reset() and
validate() methods of the actionform. The validate() methods gives an
error because nothing has been filled in. It does not call the
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 3:21 PM
To: Struts Users Mailing List
Subject: Re: validate= true destroys form defaults
This is my be a long shot, but I encountered it before.
Makesure to make all your actions to have the same scope In this case:
request. Do not leav
arch 25, 2003 12:01 PM
Subject: validate= true destroys form defaults
> Hi,
> I use a dispatchaction to set actionform parameters using the actionform
> setter methods (I do not write it to the session!). The flow is this way:
>
> 1. Url: http://localhost:8080/mydispatchaction.do?m
using its setter methods.
2. This mydispatchaction.do forwards to the jsp. There the information
from the database is presented and can be changed and submitted again to
the mydispatchaction.do?method=save
This all works as expected.
Unfortunatly as soon as I switch on the validate switch in the
Return Receipt
Your RE: validate business data
document
We have a couple different approaches. But one is to create some custom
validator Fields that can be plugged in to the validator. Then all
errors, buisiness or otherwise, are done by the DynaValidatorForm.
Makes our actions simpler.
-Dennis
On Fri, 2003-03-14 at 14:47, Dan Allen wrote:
> *This
Rick Reumann ([EMAIL PROTECTED]) wrote:
> On Fri, 14 Mar 2003 15:47:57 -0600
> Dan Allen <[EMAIL PROTECTED]> wrote:
>
> > How do most of you handle this? Do you create a validateData()
> > method in your Action class or is this something that the Model
> > objects should be able to handle?
>
-User List
Subject: validate business data
Naturally all screening of data should be done by the
ActionForm/Validator interface, but when it comes time to looking
for duplicate usernames/emails or other such business conflicts,
this must be done in the business logic layer.
How do most of you
On Fri, 14 Mar 2003 15:47:57 -0600
Dan Allen <[EMAIL PROTECTED]> wrote:
> How do most of you handle this? Do you create a validateData()
> method in your Action class or is this something that the Model
> objects should be able to handle?
Assuming you have the data in the correct form when you'
Hi,
What we have done in our application is created a
busniess logic bean,
so we create the instance of this bean in Action class
and then get an ArrayList of all the messages ( error
or display) and then put these messages in
ActionErrors in Action class and forward it to jsp
So we keep the busin
Naturally all screening of data should be done by the
ActionForm/Validator interface, but when it comes time to looking
for duplicate usernames/emails or other such business conflicts,
this must be done in the business logic layer.
How do most of you handle this? Do you create a validateData()
me
truts Users Mailing List
> Subject: RE: How to populate a form with data and then have the
> DynaValidatorForm validate it afterwards
>
>
> > Have 2 actions:
> >
> > -PopulateFormAction
> > -ProcessFormAction
> >
> > When the user clicks to edit
e request to the action and was
forwarding to a page that contained the tile referencing the action.
Endless loop. I got it to work but putting validate="false" in the action
and the making my GetMonitorAction look like this:
if (form instanceof DynaActionForm) {
D
ch of the form components using the Monitor object in the request:
The user then submits the form. The Sturts Validator will validate the form
input. If there is a validation error Struts will redisplay the JSP. But
at this point there won't be a Monitor object in the request.
r [mailto:[EMAIL PROTECTED]
> Sent: jeudi 13 mars 2003 18:12
> To: Struts Users Mailing List
> Subject: RE: How to populate a form with data and then have the
> DynaValidatorForm validate it afterwards
>
>
> Have 2 actions:
>
> -PopulateFormAction
> -ProcessFormAction
>
&
m with data and then have the
> DynaValidatorForm validate it afterwards
>
>
> I defined a tile like this:
>
> path="/monitors/monitor_urlmonitor_edit_form.jsp"
> controllerUrl="/getMonitor.do"
> >
>
>
I defined a tile like this:
Basically my getMonitor action gets the monitor from the database and then
the JSP displays the information in a form so the user can edit it. Here's
my problem: When the user clicks to edit the Monitor, I want to populate
the form with the info from the databa
allows you
to have two steps in the mapping. The first step is to present the blank
form, the second step is to process the form submission. Only validate the
step where the submission occurs. I usually prefer the second method.
Cheers,
Larry
-Original Message-
From: Ruud Steeghs [mailto
There's a strange situation regarding to the
ValidatorForm.
I want to display an empty Form (e.g. for a new
functionality), but all validation rules have already
fired.
I don't think this was the case using a regular
ActionForm, however with ValidatorForm all fields are
being validated before they
- Original Message -
From: "atta ur rehman" <[EMAIL PROTECTED]>
To: "struts users mailing list" <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 9:33 AM
Subject: html:file tag and exception in validate method
Dear all,
One of our JSP has html:file tag
Any comments, anybody?
- Original Message -
From: "atta ur rehman" <[EMAIL PROTECTED]>
To: "struts users mailing list" <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 9:33 AM
Subject: html:file tag and exception in validate method
Dear all,
One of
Dear all,
One of our JSP has html:file tag in it. Whenever validate method of the associated
ActionFrom returns any errors, the JSP container throws ClassCastException.
java.lang.ClassCastException
at
com.newatlanta.servletexec.SERequestDispatcher.forward(SERequestDispatcher.java:171
just wrote it up so I doubt it will compile, but
it's a good starting point!
Hope this helps,
Kevin Williams
> Hello,
>
> what is the right way to validate date as input, where mask is MM/dd/yy
> ?
>
> any examples of code would be very welcome.
>
> can it be
Hello,
what is the right way to validate date as input, where mask is MM/dd/yy ?
any examples of code would be very welcome.
can it be validated on client side only (by JScript)? and how?
the depends="required,date" doesn't work - it checks for blank only.
thank you for
est of the list) for the
patience w/ which you answer -- it makes the list and struts itself
valuable.
I normally wouldn't say this, but the author posted about whether or
not a form's fields would be filled before validate() is called. My
reaction was the same initially as several others
Bravo Mr Smart man... It is much easier for you to just ignore the
question, instead of attack people .. and everyone will be happy ..
-Original Message-
From: James Childers [mailto:[EMAIL PROTECTED]]
Sent: 13 February 2003 20:42
To: Struts Users Mailing List
Subject: RE: validate
l.
having said that, i still think we should all try to read the API before
posing questions. let's all keep up the good work.
-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 13, 2003 3:50 PM
To: Struts Users Mailing List
Subject: Re: valid
101 - 200 of 472 matches
Mail list logo