You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ve...@Lntinfotech.com on 2003/10/01 10:44:20 UTC
Re: Using multiple validators on one jsp
Hi Brain,
Though it is possible, I would advise you to use a button and call a
function to submit the required form.
Secondly You need to be careful of having a single input element of type
text in out form since, a "Enter" key press in that would submit the form.
Take actions accordingly.
I know i didn't explain the solution to your requirement. These are just
general guidelines
-----------------------------------------------------------------------------------
Veerendra Jote
Sr Software Engineer
Insurance Group
L&T Infotech Ltd.
-----------------------------------------------------------------------------------
Be careful of your thoughts; they may become words at any moment.
"Brian McSweeney" <br...@aurium.net>
01/10/03 02:58 PM
Please respond to "Struts Users Mailing List"
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
cc:
Subject: Using multiple validators on one jsp
Hi all,
Say I have a jsp that takes two input parameters - one is an email and
the other is a credit card.
However I have two submit buttons, so if you enter the email, it runs
Action 1, and if you enter
The credit card it runs Action 2.
I want to use the validator to validate the parameters as being correct
emails and credit cards.
However I'm not sure if this can be done. For example, if I put at the
top of my page
<html:javascript form="form1"/> which might contain the email parameter,
then only the
email will get validated in either case. Alternatively if I put at the
top of my page:
<html:javascript form="form2"/> which might contain the credit card
parameter, then only the
credit card will get validated.
What I want is - if the user enters an email, then the email gets
validated, and if he enters a
credit card, then that gets validated.
Is this possible?
Thanks,
Brian
RE: Using multiple validators on one jsp
Posted by Brian McSweeney <br...@aurium.net>.
Hi Veerendra,
Thanks for the reply. If there is no clean way to do what I'm looking
for in
Struts, then I will look into writing my own methods to validate.
However if
it can be done using the validator I would prefer it.
Thanks for the email though,
Perhaps someone else will know if it's possible.
Cheers,
Brian
-----Original Message-----
From: Veerendra.Jote@Lntinfotech.com
[mailto:Veerendra.Jote@Lntinfotech.com]
Sent: 01 October 2003 08:44
To: Struts Users Mailing List
Subject: Re: Using multiple validators on one jsp
Hi Brain,
Though it is possible, I would advise you to use a button and call a
function to submit the required form.
Secondly You need to be careful of having a single input element of type
text in out form since, a "Enter" key press in that would submit the
form.
Take actions accordingly.
I know i didn't explain the solution to your requirement. These are just
general guidelines
------------------------------------------------------------------------
-----------
Veerendra Jote
Sr Software Engineer
Insurance Group
L&T Infotech Ltd.
------------------------------------------------------------------------
-----------
Be careful of your thoughts; they may become words at any moment.
"Brian McSweeney" <br...@aurium.net>
01/10/03 02:58 PM
Please respond to "Struts Users Mailing List"
To: "'Struts Users Mailing List'"
<st...@jakarta.apache.org>
cc:
Subject: Using multiple validators on one jsp
Hi all,
Say I have a jsp that takes two input parameters - one is an email and
the other is a credit card.
However I have two submit buttons, so if you enter the email, it runs
Action 1, and if you enter
The credit card it runs Action 2.
I want to use the validator to validate the parameters as being correct
emails and credit cards.
However I'm not sure if this can be done. For example, if I put at the
top of my page
<html:javascript form="form1"/> which might contain the email parameter,
then only the
email will get validated in either case. Alternatively if I put at the
top of my page:
<html:javascript form="form2"/> which might contain the credit card
parameter, then only the
credit card will get validated.
What I want is - if the user enters an email, then the email gets
validated, and if he enters a
credit card, then that gets validated.
Is this possible?
Thanks,
Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org