eddelande-
Från: Budi Rostiarso [mailto:[EMAIL PROTECTED]
Skickat: den 15 mars 2004 11:31
Till: Struts Users Mailing List
Ämne: RE: Form Validation
Try putting max arg, because i think range validation must be supplied
with min and max (range) value.
Try putting max arg, because i think range validation must be supplied
with min and max (range) value.
min
${minYear}
m
Looks like there is a functional change or bug in the action input attribute
in Struts 1.1 - a forward name must be used instead of the location of a JSP
or Action. Not sure why this change happened between 1.1RC and 1.1rel -
maybe someone on the Struts dev team can answer?
-Original Message--
It didn't make any difference if I used an action or the JSP for the input
attribute.
-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 27, 2004 6:55 PM
To: Struts Users Mailing List
Subject: Re: form validation question
Ok, maybe, I'd hav
to:[EMAIL PROTECTED]
> Sent: Tuesday, January 27, 2004 3:27 PM
> To: Struts Users Mailing List
> Subject: Re: form validation question
>
> Andy:
>
> Any reason why you have the unusual "input" param..?
>
> > type="MyClass"
> >
rian W. [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 27, 2004 5:10 PM
To: 'Struts Users Mailing List'
Subject: RE: form validation question
Your orderForm does extend ValidatorForm instead of ActionForm right? The
struts validator plug-in relies on your forms extending ValidatorF
ECTED]
Sent: Tuesday, January 27, 2004 3:27 PM
To: Struts Users Mailing List
Subject: Re: form validation question
Andy:
Any reason why you have the unusual "input" param..?
type="MyClass"
> name="orderForm"
> valida
Andy:
Any reason why you have the unusual "input" param..?
type="MyClass"
> name="orderForm"
> validate="true"
> input="/OrderForm.do"
> scope="request">
>
>
>
I woud have thought you'd use this instead:
type="MyClass"
>
pressed, if the required field is empty, you
should get a message window indicating the field is required.
Brian Barnett
-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 27, 2004 1:16 PM
To: 'Struts Users Mailing List'
Subject: RE: form
-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 27, 2004 3:05 PM
To: Struts Users Mailing List
Subject: Re: form validation question
Andy:
What do you see in the source of the html page..? Maybe it is just a
question of display not working right.
Andy:
What do you see in the source of the html page..? Maybe it is just a question
of display not working right..?
Geeta
Andy Kriger wrote:
> I am having a curious problem with form validation. I submit a form, see in
> the logs that the form fails to validate, however, the webapp does not
> r
That was it, missing some JSTL TLD's. Thanks.
On Wed, Jan 21, 2004 at 02:24:27PM -0700, Richard Hightower wrote:
> Try this to see if it works:
>
>
>
> <%=error%>
>
>
>
> If the above works, make sure you imported the right tld for core.
> Core has a JSTL EL tld (c.tld), and a runt
Try this to see if it works:
<%=error%>
If the above works, make sure you imported the right tld for core.
Core has a JSTL EL tld (c.tld), and a runtime expression tld (crt.tld??)
Howsa 'bout showing your tablib import directive and your web.xml taglibs
that you have declared too
snafu, seems to work...
On Wed, Jan 21, 2004 at 02:34:18PM -0600, [EMAIL PROTECTED] wrote:
> I am having trouble accessing messages from a resource bundle when form
> validation fails.
>
> In a jar file under the WEB-INF/lib directory I have the following:
>
> net/neospire/extranet/resources/Ap
seems to be
cleared/re-created.
Any ideas as to why?
Brian
- Original Message -
From: "Brian McSweeney" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, May 30, 2003 11:04 AM
Subject: Re: Form validation over multipl
end the
info for the first jsp I send it to:
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 6:00 PM
Subject: Re: Form validation over multiple pages
> Hi there,
> I've been doing this exact thing the last couple of days and I have
Hi there,
I've been doing this exact thing the last couple of days and I have it
working.
My html:hidden tags looks like -
i.e. only difference is I don't explicitly specify the form name.
My form is a DynaValidatorForm and a bug which i've seen from rc1 right
up to the May 26 nightly so far me
With a little further investigation I see that the page value does not
get set in the validationForm using html:hidden approach as outlined
below. Ie, this doen't work:
When I print out the value of the page field in the action, it is still set
to zero.
How do you set the page property?
Als
With a little further investigation I see that the page value does not
get set in the validationForm using html:hidden approach as outlined
below. Ie, this doen't work:
When I print out the value of the page field in the action, it is still set
to zero.
How do you set the page property?
Al
The values specified in the are used by the validator as a
replacement for the generic pattern {0}. If you give a closer look to the
properties you should import(unless you won't specify yours) when using the
validator, one of these will be:
{0} is required
What the causes is actually the value
Andy Kriger ([EMAIL PROTECTED]) wrote:
> I have a validation rule that looks like this...
>
>depends="mask">
>
>
>
> mask
> ^\s*\d*\s*$
>
>
>
> However, it considers the phoneExt field required. Can anyone tell me why?
> I want th
if (this.isCancelled(request)) {
return mapping.findForward("cancel");
}
Joe
> -Original Message-
> From: Geeta Ramani [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 21, 2003 9:06 AM
> To: Struts Users Mailing List
> Subject: Re: Form Validation
>
Justin:
There is a html:cancel tag that you can use in your jsp which (according to
the docs) will indeed bypass the validate method in the form bean and go
directly to the action. In your perform/execute method all you need to do is
say something like:
if (request.getParameter("org.apache.struts
On Thu, Feb 20, 2003 at 10:29:51PM -0500, Ian Hunter wrote:
> It seems to work "right" for me.
That's nice.
Are you saying that after validating a form and upon returning to the
input page your form has the data the user entered, without adding any
special code (as in manually adding the fo
It seems to work "right" for me.
- Original Message -
From: "Justin F. Knotzke" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 20, 2003 10:27 PM
Subject: Form Validation
>
>
>Hi,
>
>I'd like to know if future versions of strut
What about to create a collection of errors with the page references and
display a unique error page with the list of the errors and the page where
they occurred?
Just an idea.
Marco
-Original Message-
From: Larry Zappeterrini [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 200
Richard,
in the action mapping you can specify the attribute "validate". This
attribute defaults to true in the ActionMapping class. With the Struts
Workflow Extension the class ApplicationMapping is used instead of
ActionMapping. In this class "validate" defaults to false. Thus, if you
want t
See the serverside.com
-Original Message-
From: Jordan Thomas [mailto:jordan@;vector7.com.au]
Sent: Wednesday, November 13, 2002 4:38 PM
To: [EMAIL PROTECTED]
Subject: Form validation
Hi,
I am wanting to do a step by step, wizard style interface. Does anyone
know of a good tutorial for
this page has links to several tutorials:
http://jakarta.apache.org/struts/resources/tutorials.html
cheers
matthew
On Wed, 13 Nov 2002 14:07:52 +0100
"Jordan Thomas" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am wanting to do a step by step, wizard style interface. Does anyone
> know of a good t
I assume you're using to display the messages. Add this to
your message resources file
errors.prefix=
I believe this requires version 1.1.
David
From: "Dan Tran" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECT
That sounds like it will probably work.
Thanks!
~ Keith
http://www.buffalo.edu/~kkamholz
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 2:10 PM
To: [EMAIL PROTECTED]
Subject: RE: Form Validation
I had this problem.
What you need
I had this problem.
What you need to do is to have two actions that point to the same
place... Here is an example out of my code...
When I use a link to get to the form I call createNew.do... After that,
the form action and everything else uses submitNew.do they go to the
same place, but
I'm nearly certain that the order is not guaranteed.
You may want to use the "indexed" attribute of html: form
fields.
http://husted.com/struts/resources/indexed-tags.htm
Here's a message I sent earlier today on the subject:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg32975.h
This input tag was listed first on the page and it is coming back first in the array
on the submit... I don't know if the ordering is guaranteed, but so far so good.
Noah Levitt <[EMAIL PROTECTED]> wrote:
>Hello,
>
>I don't know the answer to your question, but I have a
>question for you. How
Hello,
I don't know the answer to your question, but I have a
question for you. How do you know the that the value
submitted from the input field
will go into foo[1] and not some other index of foo?
Noah
On Thu, Jun 06, 2002 at 05:05:10PM -0400, [EMAIL PROTECTED] wrote:
> I solved the scope
I solved the scope problem on my form bean and have a new problem :)
I have a property in the form bean which is a String[]. I have several text input
fields on the JSP all using the same property name. However I want the values for
each of the text areas to be initialized to a particular ind
Okay Strutters,
I'm trying to solve the problem of losing my form data if the validate() function
finds an error. I have seen in this list that people have suggested having:
A) 2 actions each with it's own action mapping, one called before the form is rendered
on the JSP (instantiating the c
Subject: Re: Form validation
From: Vic C <[EMAIL PROTECTED]>
===
It is a good practice to make all getters and setters take strings as
arguments and return strings. HTTP is string based. Even on Int or Dates
or whatever.
The tricky part is that internaly they are implemented using nativ
All properties on an ActionForm should be declared as Strings for this
very reason.
After you have confirmed that only numerals were entered into the field,
THEN you can convert it to a business object that uses a binary type,
like int.
The ActionForm is a buffer for whatever people enter into
No.
An int won't hold a String no matter how hard you try.
Change the type to String, then add some validation, and see what happens.
JM
> -Original Message-
> From: Jivan, Rajiv [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 23, 2002 4:38 PM
> To: Struts Users Mailing List
> Subject:
Thanks!
-Original Message-
From: Ady Das-O'Toole [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 12:51 PM
To: Struts Users Mailing List
Subject: RE: Form Validation Question
You can also set validate=false in your mapping, but call the form's
validate method in y
You can turn off validation by specifying validate="false" in your action:
Mark
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: RE: Form
From: Zeltser, Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 12:45 PM
To: 'Struts Users Mailing List'
Subject: RE: Form Validation Question
How about creating 2 mappings where second mapping will have validation
turned off?
Mark.
-Original Message-
From: [E
tser, Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:45 PM
To: 'Struts Users Mailing List'
Subject: RE: Form Validation Question
How about creating 2 mappings where second mapping will have validation
turned off?
Mark.
-Original Message-
From: [EMAIL PROTE
How about creating 2 mappings where second mapping will have validation
turned off?
Mark.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, April 05, 2002 3:36 PM
To: [EMAIL PROTECTED]
Subject: Form Validation Question
Hello,
I'm using a single Acti
Two ActionMappings, one with validate=false and the other with
validate=true.
One Action class should be sufficient, though.
-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services
"Pritcha
t; -Original Message-
> From: keithBacon [mailto:[EMAIL PROTECTED]]
> Sent: 21 February 2002 17:32
> To: Struts Users Mailing List
> Subject: Re: form validation
>
>
> There are various solutions.
> I put a hidden variable on my form (& in the formBean) with
> t
There are various solutions.
I put a hidden variable on my form (& in the formBean) with the form name in
it.
If it's not there I know not to validate the form data.
Some people have 2 Actions & Action classes for this but I fear that would lead
to too much code duplication.
However some of my Act
The collections that are used in the drop-down's. Where are they created?
If they are created in your init method and stored in request scope. Then
they won't be there for the form unless they are created again when the
validation fails. You can store these collections in application scope so
th
In my experience, struts will repopulate all fields including any drop-down
menus but only if they are implemented using the tag. If you
are generating the drop-downs without the help of the struts taglib then it
cannot repopulate the form.
A) Are you using the struts tags for the drop-downs?
B
if your list is populated dynamically (say, using the options tag) you need
to repopulate the collection that you use to populate the list options. you
can do this in your reset method. if your list always uses the same values
as options, you might try storing these values in the application con
Xavier,
I would probably handle it in multiple steps (veeery personal opinion):
- "save" calls the Action that performs the validation
- if the validation fails, return the same page with errors on top (for
example) without opening the pop-up
- if the validation succeeds, you can return the same
Hi,
assuming you use validation as done by David's extensions (-> validation.xml,...)
you could change the Javascript-stuff in the validation.xml file
to call the pop-up-window...
hope this helps
Alexander Jesse
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent:
You can put in any url in the input attribute. So
there isn't a problem having input go through an
action.
David
--- "DEHAMER,BRIAN (HP-MountainView,ex1)"
<[EMAIL PROTECTED]> wrote:
> If I want to use form validation with my ActionForm
> bean, what should I
> specify for the "input" attribute o
Many developers recommend that the ActionForm properties all be String, so that
validation can be done on just what the user typed, and so that any error
messages can display to the user exactly what s/he typed. Yes, the controller
can do conversions for you, but I never use that feature.
Will
-
Actually, it returns 0. So there is no way to distinguish between an invalid
input or a "real" 0.
>
> What I mean is, is it possible to check when a string is entered into an
> input field that populates an int? It seems that the Controller populates
> the int with a 0, which makes it difficult
"Mike Dewhirst" <[EMAIL PROTECTED]>
> How is it possible to validate input in struts for formatting?
>
> What I mean is, is it possible to check when a string is entered into an
> input field that populates an int? It seems that the Controller populates
> the int with a 0, which makes it diffi
The validate() method is called by the Action when the validate property
for the mapping is true.
I have more than one mapping to the same Action. The mapping to create a
new form has validate=false. The mapping to insert a form has
validate=true.
-- Ted Husted, Husted dot Com, Fairport NY USA.
58 matches
Mail list logo