Hi All,
I am trying to user Validation framework with Struts2 but struck at a
point,here are the details.
I am developing a import service which includes various steps like
1) Showing number of import options
2) Showing number of elgible files for the import (Import type selected in
step one)
Hi,
the problem of validation through annotations is they are applied every
time the action is called. You can try use method which you call from
your form. For example, if you want to validate only execute method,
write your own method with name validateExecute(). The principle is same
for
NorrisEShelton
YIM norrisshelton
From: Dave Newton newton.d...@yahoo.com
To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, August 28, 2009 6:19:45 PM
Subject: Re: [U] Email Validation Issue
Ginn, Timothy D Mr CTR USA TRADOC USAAC wrote:
I have run
UNCLASSIFIED
I have run into a bump in the road. I am trying to validate a list of
Strings that contain email addresses. I can't seem to get it to check
the emails to be a valid email using the annotation validation.
Could someone please let me know if this is possible or if I am doing
Ginn, Timothy D Mr CTR USA TRADOC USAAC wrote:
I have run into a bump in the road. I am trying to validate a list of
Strings that contain email addresses. I can't seem to get it to check
the emails to be a valid email using the annotation validation.
Could someone please let me know if this
--Conversion-validation-issue-tp18576772p22862154.html
Sent from the Struts - User mailing list archive at Nabble.com.
Right, that has been an interesting romp around in struts.
Jeromy, thanks for pointing me in the right direction and making me
think. I went back to basics, bit the bullet and improved my javascript
jedi abilities by installing firebug. That has really helped.
If this might help anyone else one
--- On Thu, 9/11/08, Gawain Hammond wrote:
1.) validation.js was missing in my html, I wasn't
using sx:head which seems to be the only tag that
generates a src path to it, I was using s:head
which afaik was my only choice in 2.0.11.1.
Upgrading to 2.1.2 resolved this.
I had to put this
away from my finishing this :-)
-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED]
Sent: 10 September 2008 01:19
To: Struts Users Mailing List
Subject: Re: ajax validation issue
Gawain Hammond wrote:
...
That's a lot of problems, and to work-around each problem
Gawain Hammond wrote:
A really nice solution so far has been to an action tag to populate
forms, which has worked nicely the rest of the time. I've really liked
using this approach to fill drop-downs, like so:
s:action namespace=/admin name=crud.Group.listAll
id=groupAction/
...
s:select
To: Struts Users Mailing List
Subject: Re: ajax validation issue
Gawain Hammond wrote:
A really nice solution so far has been to an action tag to populate
forms, which has worked nicely the rest of the time. I've really liked
using this approach to fill drop-downs, like so:
s:action namespace
I've started using struts 2.1.2 as I was having some issues after
enabling client side javascript validation on forms (some page requests
hang, and clicking back takes you to the page you're supposed to be on).
I decided to use client side validation to avoid the problems of
populating form
Gawain Hammond wrote:
...
That's a lot of problems, and to work-around each problem you've moved
to a more sophisticated and complicated solution hoping for the best.
You'll need to get the plain-old-validation working first. If validation
fails, your action's execute method is not
That's my experience too. That's why I wanted to avoid validation
after conversion error on a field.
Is there any interest in adding this functionality? I think that would
be fairly easy to add. If I understood the code correctly, it would be
a matter of extending the
But then again, eliminating the conversionError interceptor from the
stack would prevent conversion errors to appear as fieldErrors in the
input form, but this would force to use the conversion validator
everywhere a non String object is setted by the ParametersInterceptor
to show the error?
Is
--- On Tue, 7/22/08, Gabriel Belingueres [EMAIL PROTECTED] wrote:
But then again, eliminating the conversionError
interceptor from the stack would prevent conversion
errors to appear as fieldErrors in the input form,
but this would force to use the conversion validator
everywhere a non
Hi, I'm using Struts 2.1.2:
I have a validation file like this:
field name=codigoValidacion
!--
field-validator type=conversion short-circuit=true
message key=invalid.fieldvalue.codigoValidacion /
/field-validator
--
field-validator type=required short-circuit=true
Does this means eliminating the conversionError interceptor from the
default stack?
Yes ;-)
Regards
--
Lukasz
http://www.lenart.org.pl/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hi All,
Has any one come across this issue? . we dont have internet in our app
server and the struts2 validation fails as it cant access
www.opensymphony.com.
Thanks,
Nuwan.
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Is your DTD correct?
As a trivial test I turned off my WiFi and restarted a webapp that uses a
validation configuration file and no issues throught he startup or validation
process.
Dave
--- Nuwan Chandrasoma [EMAIL PROTECTED] wrote:
Hi All,
Has any one come across this issue? . we dont
@struts.apache.org
Sent: Wednesday, March 26, 2008 8:16 AM
Subject: Struts2 validation issue when internet is not available in the
application server.
Hi All,
Has any one come across this issue? . we dont have internet in our app
server and the struts2 validation fails as it cant access
www.opensymphony.com
This is my xml file. when we run in a local machine that has internet
access this works fine.
?xml version=1.0 encoding=UTF-8?
!DOCTYPE validators PUBLIC
-//OpenSymphony Group//XWork Validator 1.0.2//EN
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;
--- Nuwan Chandrasoma [EMAIL PROTECTED] wrote:
This is my xml file. when we run in a local machine that has internet
access this works fine.
?xml version=1.0 encoding=UTF-8?
!DOCTYPE validators PUBLIC
-//OpenSymphony Group//XWork Validator 1.0.2//EN
I am using jboss-4.0.5-GA
Dave Newton wrote:
--- Nuwan Chandrasoma [EMAIL PROTECTED] wrote:
This is my xml file. when we run in a local machine that has internet
access this works fine.
?xml version=1.0 encoding=UTF-8?
!DOCTYPE validators PUBLIC
-//OpenSymphony Group//XWork
--- Dave Newton [EMAIL PROTECTED] wrote:
--- Nuwan Chandrasoma [EMAIL PROTECTED] wrote:
This is my xml file. when we run in a local machine that has internet
access this works fine.
?xml version=1.0 encoding=UTF-8?
!DOCTYPE validators PUBLIC
-//OpenSymphony Group//XWork
.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/Struts-2-Validation-issue-tp15365657p15403293.html
Sent from
If s:property if failing to show any data this can only mean the data
is blank (unlikely) or the object is not available on the Value Stack.
If we look at your two use cases:
Case 1.data is posted to your application, the params are set in your
action and your action is invoked. Your code in
class and set the actionError the error message is
displayed along with the user object information. Is there anything I
missed why the user object information will now show up when XML
validation is used? Thanks.
--
View this message in context:
http://www.nabble.com/Struts-2-Validation
Hi, I'm trying to use the xml validation, the validation is executing and
detecting errors, but after the validation the method save gets called
instead of invoking the input action it's executing the 'success' action.
I've tried several things but still can't see what's missing, I'm using
Spring
--- Martin Castellanos [EMAIL PROTECTED] wrote:
Hi, I'm trying to use the xml validation, the validation is executing and
detecting errors, but after the validation the method save gets called
instead of invoking the input action it's executing the 'success' action.
I've tried several things
Action Class is: com.maca.web.BookAction
Validation file is placed next to the class: BookAction-save-validation.xml
Validation file for the book entity is: Book-validation.xml and it's placed
next to the Book class
On Feb 3, 2008 12:20 PM, Dave Newton [EMAIL PROTECTED] wrote:
--- Martin
--- Martin Castellanos [EMAIL PROTECTED] wrote:
Action Class is: com.maca.web.BookAction
Validation file is placed next to the class: BookAction-save-validation.xml
Validation file for the book entity is: Book-validation.xml and it's placed
next to the Book class
Signature means How is your
Oh, it's just a regular bean, doesn't implements or extends anything
On Feb 3, 2008 12:32 PM, Dave Newton [EMAIL PROTECTED] wrote:
--- Martin Castellanos [EMAIL PROTECTED] wrote:
Action Class is: com.maca.web.BookAction
Validation file is placed next to the class:
--- Martin Castellanos [EMAIL PROTECTED] wrote:
Oh, it's just a regular bean, doesn't implements or extends anything
That'll be an issue.
The workflow interceptor depends on the ValidationAware interface to decide
if it should modify the result.
Dave
On Feb 3, 2008 12:32 PM, Dave Newton
Thanks, I extended DefaultActionSupport and now it's working
On Feb 3, 2008 12:47 PM, Dave Newton [EMAIL PROTECTED] wrote:
--- Martin Castellanos [EMAIL PROTECTED] wrote:
Oh, it's just a regular bean, doesn't implements or extends anything
That'll be an issue.
The workflow interceptor
When I do the validation, this tag fails as the list comes null the second
time..
Any help is highly appreciated.
Thx
--
View this message in context:
http://www.nabble.com/Struts-Validation-issue-tp14255159p14255159.html
Sent from the Struts - User mailing list archive at Nabble.com
in context:
http://www.nabble.com/Struts-Validation-issue-tp14255159p14255159.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
will be appreciated.
example:
logic:present name=%=formName% property=someList
When I do the validation, this tag fails as the list comes null the
second
time..
Any help is highly appreciated.
Thx
--
View this message in context:
http://www.nabble.com/Struts-Validation-issue
PROTECTED]
Sent: Monday, December 10, 2007 10:37 AM
To: user@struts.apache.org
Subject: Struts Validation issue
Hi,
I am using Struts validation framework in my project. My form becomes
null
whenever I try to do some validation. The validation works fine but the
next
time it comes on the UI, the list
with option 1. I'd be interested to find out if there is
better solution too.
-Original Message-
From: Vaibhav Khare [mailto:[EMAIL PROTECTED]
Sent: Monday, December 10, 2007 10:37 AM
To: user@struts.apache.org
Subject: Struts Validation issue
Hi,
I am using Struts
] validation issue
The fieldexpression validator would handle most dependent checks, but i
think there's no out-of-the-box solution if we want the expression to act as
a guard condition alone and not as a validation. Please check the archives
for comments on this.
-Joseph
On 9/11/07, Jiang, Jane (NIH/NCI
PM
To: Struts Users Mailing List
Subject: Re: [S2] validation issue
The fieldexpression validator would handle most dependent checks, but i
think there's no out-of-the-box solution if we want the expression to act as
a guard condition alone and not as a validation. Please check the archives
Hi all!
I´m trying to validate two fields that depends on another field.
What I was doing in S1 is (for field in):
field property=in depends=requiredif
msg name=validwhen
key=ErrorMessages.applicationIdRepresent.sameReference/
arg position=0 key=ProcessorHTTPDetails.in/
msg name=mask
try validwhen validation rule. It exists in struts, maybe exists too in
struts2.
El mar, 11-09-2007 a las 16:27 +0200, Pablo Vázquez Blázquez escribió:
Hi all!
I´m trying to validate two fields that depends on another field.
What I was doing in S1 is (for field in):
field property=in
Hola Jorge,
I think there is not a validwhen validator, either...
Any idea? Thanks.
Jorge Martín Cuervo escribió:
try validwhen validation rule. It exists in struts, maybe exists too in
struts2.
El mar, 11-09-2007 a las 16:27 +0200, Pablo Vázquez Blázquez escribió:
Hi all!
I´m trying to
sorry, i have no experience with struts2.
I only use classic struts:
http://struts.apache.org/1.3.8/faqs/validator.html
Maybe you can create your own validwhen validator rule in struts2. I
integrated commons validator in my own project and i reused some struts
validwhen code.
Validwhen uses
In Struts2 there are no forms...
Yes, no forms.
I think there is an interceptor interface called ValidationAware and
there it can be the cue, but I´m not sure and I suppose there should
be another easier way of doing what I want...
Jorge Martín Cuervo escribió:
sorry, i have no experience
Did you look into expression validator?
-Original Message-
From: Pablo Vázquez Blázquez [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 11, 2007 10:28 AM
To: Struts Users Mailing List
Subject: [S2] validation issue
Hi all!
I´m trying to validate two fields that depends on another
] [EMAIL PROTECTED] wrote:
Did you look into expression validator?
-Original Message-
From: Pablo Vázquez Blázquez [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 11, 2007 10:28 AM
To: Struts Users Mailing List
Subject: [S2] validation issue
Hi all!
I´m trying to validate two
action
but doesn't like the contact action. Does anyone have a clue what's going
on or where I should look? I'm at the end of my rope and am about to throw
out the validation altogether. Thanks in advance.
--
View this message in context:
http://www.nabble.com/Bizarre-validation-issue
--- tglenister wrote:
When I call contact from either page, the validation
fails (no matter what the input) and the fields are
cleared out. Basically it likes the doregister
action but doesn't like the contact action. Does
anyone have a clue what's going on or where I should
look?
At
I'm trying to set up a very basic(generic) validation with struts 1.1 (and
tiles) and I can not get it to work. I'm not getting any errors or anything.
Validation simply doesn't take affect.
I believe I have everything in place. Here is some snippets from my file.
Please let me know if you
]
Sent: Tuesday, May 09, 2006 2:58 PM
To: user@struts.apache.org
Subject: Validation Issue - Validation Not Taking Affect
I'm trying to set up a very basic(generic) validation with struts 1.1 (and
tiles) and I can not get it to work. I'm not getting any errors or anything.
Validation simply doesn't
, May 09, 2006 2:58 PM
To: user@struts.apache.org
Subject: Validation Issue - Validation Not Taking Affect
I'm trying to set up a very basic(generic) validation with struts 1.1 (and
tiles) and I can not get it to work. I'm not getting any errors or anything.
Validation simply doesn't take affect.
I
I've tried several things, but the form filed is not being validated. Am I
doing the nested form attribute right in the validator.xml?
josh t [EMAIL PROTECTED] wrote: I'm trying to set up a very basic(generic)
validation with struts 1.1 (and tiles) and I can not get it to work. I'm not
This is what's happening:
1) User submit form with invalid data to /Control.do
2) Struts finds action mapping for /Control.do and sees validate=true
3) Struts call's the form's validate()
4) validate returns false
5) Since validation fails, Struts forwards to the input url
6) Go to step 2
There
I used the latest version of validator jar (commons-validator-1.2.0.jar). I
had to update struts.jar also and the TLDs from an earlier version to the
latest version for validator to work fine. Now I am getting the following
exception.
[1/30/06 16:51:29:689 EST] 759dc768 InsertTag E
Hi,
I am using the validator framework for form validation. Validation doesnt
seem to happen and no error messages are displayed. However the form is
getting pre-populated with the user input. Can anyone tell me what I am
missing here?
struts-config.xml
-
action
Make sure you're using the right validator class. The ValidatorForm keys off
the formname,
ValidatorActionForm keys off the action name. This has happened to me before.
Also make sure your
properties are named the same.
Paul
__
Do You Yahoo!?
I tried subclassing both ValidatorForm and ValidatorActionForm and it still
doesnt work. Checked the properties too. I even tried using a custom error
message using resource=false
This is always evaluating to true even if I submit the form with errors.
logic:notPresent
What is the form definition for privacyPrefForm? Where is the tag for
your strFirstName field in your form?
Are you using a debugger at all?
-Richard
Karthik Manimaran wrote:
Hi,
I am using the validator framework for form validation. Validation doesnt
seem to happen and no error messages
This is the form definition
form-bean name=privacyPrefForm type=
com.bofa.ecomm.snf.web.privacy.PrivacyPreferencesBean
/form-bean
The JSP file is as follows:
%@ page language=java %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@
Hi,
Name of form into validation.xml is the path of your Action
and not the name of your Action :
form name=/Control
field property=strFirstName depends=required
arg0 key=privacyPrefForm.strFirstName/
/field
/form
Declare in your AplicationResources
(see example into
Karthik,
I don't think you will be able to access your query parameter when you
post your form. Your action attribute in your html:form tag should just
be /Control
Have you looked at the struts-example application?
-Richard
Karthik Manimaran wrote:
Hi,
I am using the validator framework
Hi,
I tried this. Using debug info I can see that the validate method is being
called. But no errors are being returned.
Thanks and regards,
Karthik.
On 1/29/06, Angelo zerr [EMAIL PROTECTED] wrote:
Hi,
Name of form into validation.xml is the path of your Action
and not the name of your
The validation can silently fail if it is not configured correctly. Make sure
you have the plug-in correctly configured with the 2 validation files -- one
for the validators and the other your validation forms.
Also if you upgraded to a new version of Validator your validator
I get the following error:
[1/29/06 17:35:13:701 EST] 4e5645a ValidatorPlug I
org.apache.struts.validator.ValidatorPlugIn Loading validation rules file
from '/WEB-INF/validator-rules.xml'
[1/29/06 17:35:13:721 EST] 4e5645a ServletInstan E SRVE0100E: Did not
realize init() exception thrown by
I am not saying this is your problem, but I've had times where jar files get
seemingly corrupted for no reason. I haven't figured out why but at least
twice a year a JAR file just dies on me. Try reinstalling Struts and copy the
default validation files out and start from there.
Paul
Yes. Tried the same and it works now.
I got a different problem now though.
The following action results in validation being called recursively
resulting in server crash.
action path=/Control type=com.bofa.ecomm.snf.web.global.Control
name=privacyPrefForm scope=request validate=true
Make your input=something.jsp
-
What are the most popular cars? Find out at Yahoo! Autos
problem with Validator. Hope it works
for you too.
From: Karthik Manimaran [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: Struts Users Mailing List user@struts.apache.org
Subject: Re: Validation Issue
Date: Sun, 29 Jan 2006 16:42:11 -0500
Hi,
I tried this. Using
your records.
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
Sent: Friday, September 16, 2005 4:37 AM
To: user@struts.apache.org
Subject: Re: Validation Issue
Amol Yadwadkar wrote:
Hi List,
I am using Validation Framework.
field
property
Hi List,
I am using Validation Framework.
field
property=clientTaxId
depends=required,mask
arg0 key=loanAppForm.clientTaxId/
arg1
name=mask key=prompt.taxid /
Amol Yadwadkar wrote:
Hi List,
I am using Validation Framework.
field
property=clientTaxId
depends=required,mask
arg0 key=loanAppForm.clientTaxId/
arg1 name=mask key=prompt.taxid /
var
var-namemask/var-name
var-value${taxid}/var-value
The client side JavaScript thats generated includes a bCancel var - which
if set to true causes the validation to be skipped. So for your previous
processing, you can just set this variable to true and submit the form.
- Original Message -
From: wo_shi_ni_ba_ba [EMAIL PROTECTED]
Sent:
thank you
--- Niall Pemberton [EMAIL PROTECTED]
wrote:
The client side JavaScript thats generated includes
a bCancel var - which
if set to true causes the validation to be
skipped. So for your previous
processing, you can just set this variable to true
and submit the form.
- Original
If I understand correctly struts provide both client
side and server side validation so that for someone
reason a validation error got slipped by the client
the server validation would still be able to catch it,
am I right?
thanks
--- Niall Pemberton [EMAIL PROTECTED]
wrote:
The client side
Hi
If you define validate=false in the struts config file then your form will not
be validated when you click either PREV or NEXT buttons. Then if you want to
validate on clicking the NEXT button, you can validate the form by explicitely
calling the validate method like
ActionErrors errors=
dear folks,
I am using struts validator framework for both
clientside and serverside validation. On the jsp
page, I have a previous and next button, if the user
clicks previous I don't want to validate; if the user
clicks next I want to validate. However I can not
modify the javascript function
Use the html:cancel tag for your Previous button.
On Wed, 9 Mar 2005 15:30:27 -0800 (PST), wo_shi_ni_ba_ba
[EMAIL PROTECTED] wrote:
dear folks,
I am using struts validator framework for both
clientside and serverside validation. On the jsp
page, I have a previous and next button, if the
thanks, but I need it to be links to a graphics
instead of button, any alternative?
--- Hubert Rabago [EMAIL PROTECTED] wrote:
Use the html:cancel tag for your Previous button.
On Wed, 9 Mar 2005 15:30:27 -0800 (PST),
wo_shi_ni_ba_ba
[EMAIL PROTECTED] wrote:
dear folks,
I am using
If you want to set some value befroe generated javascript to do validation.
You can wrtie a your own javascript function and then invoke its
generated function.
eg:
change jsp page
html:form onsubmit=return myFunction(this)
action=/logon method=post
write a new function in your own javascript
thanks that works too.
--- Anthony Hong [EMAIL PROTECTED] wrote:
If you want to set some value befroe generated
javascript to do validation.
You can wrtie a your own javascript function and
then invoke its
generated function.
eg:
change jsp page
html:form onsubmit=return
Hello. I'm trying to create a mask for use in password fields that accepts:
- UPPERCASE A-Z
- lowercase a-z
- Numbers 0-9
- Special Characters !,@,#,$,%,^,,(,), and *
In the validation.xml file I have the following defined.
form-validation
global
constant
Subject: Struts 1.2.4/Validator 1.1.3 and constant validation
issue with '' for constant-value
Hello. I'm trying to create a mask for use in password fields
that accepts:
- UPPERCASE A-Z
- lowercase a-z
- Numbers 0-9
- Special Characters
Thanks, pedro
Couldnt resolve this one! upgraded to struts 1.2.4 and used a reqular
expression to validate instead.
Not quite the method i wanted to take but one which resolved the issue.
Thanks for your contribution
Andy
Pedro Salgado wrote:
Have you checked if you aren't duplicating
hi,
i have created my own validator class for validating certain fields
which are
beyond the default validation scope (e.g. telephone, postcode, username
already
exists etc.) and have linked it to the validator-rules.xml file.
when the input field is invalid, i do get the appropriate error msg
Have you checked if you aren't duplicating configurations on more than 1
file? (configFile1, ..., configFileN... N replaces configurations that are
also present (duplicate) in 1).
Are you working with modules?
Is the forward pointing to a correct action? (try putting validate =
false...
88 matches
Mail list logo