Re: struts 2 validation if use with spring

2013-03-11 Thread Lukasz Lenart
2013/3/9 john lee : > i just checked your demo, looks like the first tricky is to define proxy > action name signin in struts.xml It isn't any trick, it's the normal why how to define many actions base on one action class. > struts.xml > > > /example/Login.jsp > Welcome > > > *

Re: struts 2 validation if use with spring

2013-03-08 Thread john lee
? is this the only way to lett struts2/spring validation works? thanks so much in advance john From: Lukasz Lenart To: Struts Users Mailing List ; john lee Sent: Friday, March 8, 2013 7:27 AM Subject: Re: struts 2 validation if use with spring 2013/3/

Re: struts 2 validation if use with spring

2013-03-08 Thread Lukasz Lenart
2013/3/8 john lee : > Lukasz, > > thanks for your help, i just tried, but still not works > > any other suggestion? I have prepared a small demo app https://github.com/lukaszlenart/struts2-spring-validation Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ --

Re: struts 2 validation if use with spring

2013-03-08 Thread john lee
Lukasz, thanks for your help, i just tried, but still not works any other suggestion? thanks in advance john From: Lukasz Lenart To: Struts Users Mailing List Sent: Friday, March 8, 2013 12:01 AM Subject: Re: struts 2 validation if use with spring

Re: struts 2 validation if use with spring

2013-03-07 Thread Lukasz Lenart
2013/3/8 john lee : > As specified in the docs [1][2], validation file name must match schema: class-name-validation.xml -> LoginAction-signin-validation.xml [1] http://struts.apache.org/development/2.x/docs/validation.html#Validation-DefiningValidationRules [2] http://struts

struts 2 validation if use with spring

2013-03-07 Thread john lee
Problem   I use struts2/spring 3 as integration, and need to use struts2 validation.xml as well, Basically, the action name in the login.jsp/struts.xml  is pseudo class name, but is implemented in the applicationContext.xml In order to let validation.xml works, I defined  all the possible XX

Re: struts 2 validation error

2013-03-06 Thread Lukasz Lenart
2013/3/7 john lee : > Java backtrace for programmers: > -- > freemarker.template.TemplateModelException: Method public java.util.List > org.apache.struts2.components.Form.getValidators(java.lang.String) threw an > exception when invoked on org.apache.struts2.components.Form@d6147e >

struts 2 validation error

2013-03-06 Thread john lee
please advise thanks in advance john ** error: Template processing error: "Method public java.util.List org.apache.struts2.components.Form.getValidators(java.lang.String) threw an exception when invok

Re: Struts 2 validation

2010-04-29 Thread Alex Rodriguez Lopez
If you define action alias for specific methods in your struts.xml (you can do so with wildcards too), then you can use this format --validation.xml as stated below. http://struts.apache.org/2.1.8.1/docs/validation.html Defining Validation Rules Validation rules can be specified: Per Action c

Struts 2 validation

2010-04-29 Thread David Harland
Hi, Is there any way of creating a struts validation xml for a specific method or is the only way of doing through an Action method eg. public String saveSomething() { return SUCCESS; } public void validateSaveSomething() { // } Thanks Dave. -

Struts 2 - Validation - Different jsp, one save method

2010-03-02 Thread Julien ROTT
Hi, I have a save method in an action. Due to configuration, data can come from the same form on different jsp. Each jsp having different required fields. For example, an address form. On one jsp the "Country" field is required, on another one the "Country" field is NOT required... Can I specify

Re: struts 2 validation error

2010-01-06 Thread Greg Lindholm
age without entering > action class then raising an null pointer exception.I need that "list" even > if the validation fails. > > Please help me to get out of this problem > > expecting your kind interaction > > thanks in advance > > rakesh > -- > View th

Re: struts 2 validation error

2010-01-04 Thread Paweł Wielgus
m there to jsp page without entering > action class then raising an null pointer exception.I need that "list" even > if the validation fails. > > Please help me to get out of this problem > > expecting your kind interaction > > thanks in advance > > rakesh &g

struts 2 validation error

2010-01-03 Thread Rakesh K nair
nd interaction thanks in advance rakesh -- View this message in context: http://old.nabble.com/struts-2-validation-error-tp27009670p27009670.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscri

Re: Struts 2, validation and s:actionerror

2009-10-30 Thread carl ballantyne
The code below works a treat but just to help anyone out who might be trying to do the same thing you can also use the tag which does a similar thing but without the fine control on the formatting. Quoting Greg Lindholm : So, fieldErrors is a Map>, the key is the field name and the value

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread Greg Lindholm
More info for the committer: It looks like the javadoc on org.apache.struts2.components.IteratorComponent contains info that Map is supported but it is not getting into the tag doc perhaps because the is messed up and not on it's own line. Also a note that a Map will iterate on the entrySet() wo

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread Greg Lindholm
Hey, you are correct. Just dove into the code and I found that is uses a MakeIterator utility class that if given a Map will call entrySet(). Maybe a commiter will be kind enough update the iterator tag doc to include a Map example and a note on how Map is converted to an Iterator. 2009/10/2

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread Paweł Wielgus
Hi Greg, i was about writing that one should read iterator tag docs because one can use maps in s:iterator value, but instead i've just read it myself and the info about iterating maps is not there. I use s:iterator where value is a map and it works in 2.1.6 just adding key or value inside iterator

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread carl ballantyne
Thanks Greg, that does the trick. I am now able to display the validation errors at the top of the form. Quoting Greg Lindholm : So, fieldErrors is a Map>, the key is the field name and the value is a List of messages. I don't think you can use directly on a Map as a Map is not iteratable (

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread Greg Lindholm
So, fieldErrors is a Map>, the key is the field name and the value is a List of messages. I don't think you can use directly on a Map as a Map is not iteratable (check the iterator tag doc [1]). I think you will need to iterate on either the entry set or the key set . As for %{top}, this gives

Re: Struts 2, validation and s:actionerror

2009-10-27 Thread carl ballantyne
Okay that makes sense. Thanks for that! But your example used a hardcoded fieldname. In order to dynamically loop the fieldnames and display the errors for each of those fields I have tried: ERROR1: ERROR2 But it always outputs the whole list, ie firs

Re: Struts 2, validation and s:actionerror

2009-10-26 Thread Greg Lindholm
There are three buckets for error messages; general errors, general messages and field errors. and display the general errors and general messages. Most validation will product field errors which by default get rendered beside the field with the error. You can control how field errors get displa

Struts 2, validation and s:actionerror

2009-10-26 Thread carl ballantyne
Hi Everyone, I am new to Struts 2 and trying to make the switch from Struts 1. I cannot figure out how to get the validation to display the messages/errors in the input form with the use of the s:actionerror or s:actionmessage tags. It never outputs anything despite the validation appearin

Re: Struts 2 Validation issues

2009-10-23 Thread Konstantyn Harasevich
Hello Struts 2 in action is good book to resolve yours questions. Greeting - Original Message - From: "Eileen Hurley" To: Sent: Thursday, October 22, 2009 10:07 AM Subject: Struts 2 Validation issues All, I have problems with xml validation and Struts 2 (2.

Struts 2 Validation issues

2009-10-23 Thread Eileen Hurley
All, I have problems with xml validation and Struts 2 (2.0.14). The validation as I see it is not displaying the error messages (I extend ActionSupport). The defaultstack includes the validation interceptor. I believe the problem is related to my struts.xml configuration and the interceptor

RE: Struts 2 Validation

2009-07-08 Thread Martin Gainty
i. > Date: Wed, 8 Jul 2009 15:23:53 -0700 > From: robsonsil...@gmail.com > To: user@struts.apache.org > Subject: Re: Struts 2 Validation > > > People, > > If someone want help me about my university project, here is my e-mail: > robsonsil...@gmail.com . I can

Re: Struts 2 Validation

2009-07-08 Thread Robson Rodrigues
; > > > > > > > here is my jsp: > > > > <%@ page language="java" contentType="text/html; charset=ISO-8859-1" > > pageEncoding="ISO-8859-1"%> > > <%...@page import="br.com.robson.modelo.Cliente"

Re: Struts 2 Validation

2009-07-08 Thread Robson Rodrigues
8859-1"%> > > <%...@page import="br.com.robson.modelo.Cliente" %> > > <%...@page import ="java.util.*" %> > > <%@ taglib prefix="s" uri="/struts-tags" %> > > > > "http://www.w3.org/TR/html

Struts 2 Validation

2009-07-07 Thread Robson Rodrigues
nsert title here Novo Cliente I hope you can help me Hugs! -- View this message in context: http://www.nabble.com/Struts-2-Validation-tp24382602p24382602.html Sent from the Struts - User mailing list archive at Nabble.com.

Re: Struts-2 Validation

2009-05-07 Thread NR031
user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Struts-2-Validation-tp23421029p23440767.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: Struts-2 Validation

2009-05-07 Thread Dave Newton
NR031 wrote: 1) How to validate a Date format in Struts 2 I have my -validation.xml like this : Please enter your Date of birth Perhaps with the date validator: http://struts.apache.org/2.x/docs/date-validator.html 2) How to compare two fields I a

Struts-2 Validation

2009-05-06 Thread NR031
Thanks in advance, -- View this message in context: http://www.nabble.com/Struts-2-Validation-tp23421029p23421029.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr

RE: Struts 2 validation is not working for comma separated number entered in text field which has property type integer

2009-01-20 Thread jitendra
Hi Lukasz, Thanks for the solution. I will try this. Regards, Jitendra _ From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] Sent: Monday, January 19, 2009 2:39 PM To: Struts Users Mailing List Subject: Re: Struts 2 validation is not working for comma separated number

Re: Struts 2 validation is not working for comma separated number entered in text field which has property type integer

2009-01-19 Thread Lukasz Lenart
2009/1/19 jitendra : > My question is how I can validate the Integer value which has the commas in > it. Basically, we don't want to add any custom validator for this field > because if we do so then we have to apply this validation through out our > application and it is around 150 places. The be

Struts 2 validation is not working for comma separated number entered in text field which has property type integer

2009-01-19 Thread jitendra
Hi, We are using the struts2.0.6 framework as part of our business application. Recently we found that there is a validation issue with struts2 frame - work. Let me explain my problem first. In a jsp page, I have defined a s:text field and the field property is Integer type(defined in bean). No

Re: Struts 2 Validation Problem

2008-12-31 Thread Felipe Fraga
Hello, I don't see this happening in 2.0.14. Are you using any custom validators? Any custom stack? Felipe Fraga On Wed, Dec 31, 2008 at 5:42 AM, Windy Hung wrote: > Hi > I use action field validation for my form. > When I press "submit" button multiple times to test a field validation of >

Struts 2 Validation Problem

2008-12-30 Thread Windy Hung
Hi I use action field validation for my form. When I press "submit" button multiple times to test a field validation of "requiredstring", each invalid value message is printed and is stacked on each other. That means if I press "submit" button 5 times, the invalid warning message is printed out

RE: Advanced Struts 2 Validation Question...

2008-11-13 Thread Shannon, Andrew
- Andrew -Original Message- From: Burton Rhodes [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2008 11:25 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Advanced Struts 2 Validation Question... Thanks to all! Implementing Validatable was simple and works great. I am t

Re: Advanced Struts 2 Validation Question...

2008-11-13 Thread Burton Rhodes
Thanks to all! Implementing Validatable was simple and works great. I am thinking of moving all my action objects that need it to Validatable. per Bill's suggestion... one less file to worry about. :) On Thu, Nov 13, 2008 at 9:58 AM, Dave Newton <[EMAIL PROTECTED]> wrote: > --- On Thu, 11/13/08,

Re: Advanced Struts 2 Validation Question...

2008-11-13 Thread Dave Newton
--- On Thu, 11/13/08, Burton Rhodes wrote: > How do I use validation in an [Action]-validation.xml file > to validate several fields? > > I need to implement the following logic for 3 fields on a > form: Company, FirstName, LastName. > > Psedo Code: > > If Company empty, then FirstName and LastN

RE: Advanced Struts 2 Validation Question...

2008-11-13 Thread Jishnu Viswanath
:: EXCELLENCE -Original Message- From: Burton Rhodes [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2008 9:06 PM To: Struts Users Mailing List Subject: Advanced Struts 2 Validation Question... How do I use validation in an [Action]-validation.xml file to validate several fields? I need

Re: Advanced Struts 2 Validation Question...

2008-11-13 Thread Bill Harper
Implement Valiadateable in your action and the Workflow interceptor will call validate() before and action method If your validate() method adds ActionErrors then the messages go back to the input form. You will also need to configure / annotate an "input" result. I can't remember off the top of

Re: Advanced Struts 2 Validation Question...

2008-11-13 Thread Néstor Boscán
if you want javascript validation you will have to create your own theme and own validation. You will have to create your own validator class and modify the form-close-validation.ftl. This is what I've done in the past. Once you figure out the details you start creating and reusing validators. On

Advanced Struts 2 Validation Question...

2008-11-13 Thread Burton Rhodes
How do I use validation in an [Action]-validation.xml file to validate several fields? I need to implement the following logic for 3 fields on a form: Company, FirstName, LastName. Psedo Code: If Company empty, then FirstName and LastName must be filled If FirstName and LastName empty, then Comp

Re: Struts 2 Validation issue

2008-02-10 Thread dfaulcon
> Hope that helps, > Jeromy Evans > > [1] http://struts.apache.org/2.x/docs/prepare-interceptor.html > [2] http://struts.apache.org/2.x/docs/interceptors.html > > dfaulcon wrote: >> I have an interesting problem that I'm dealing with in regards to struts >> 2 >

Re: Struts 2 Validation issue

2008-02-09 Thread Jeromy Evans
nteresting problem that I'm dealing with in regards to struts 2 validation. I have XML validation setup throughout my application that appear to work fine. The validation returns the appropriate error messages when needed. However I have a user object that is created when a person logs into t

Struts 2 Validation issue

2008-02-08 Thread dfaulcon
I have an interesting problem that I'm dealing with in regards to struts 2 validation. I have XML validation setup throughout my application that appear to work fine. The validation returns the appropriate error messages when needed. However I have a user object that is created when a p

Re: Struts 2. Validation Issue

2008-02-03 Thread Martin Castellanos
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 inter

Re: Struts 2. Validation Issue

2008-02-03 Thread Dave Newton
--- 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 <

Re: Struts 2. Validation Issue

2008-02-03 Thread Martin Castellanos
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: > BookAction-save-

Re: Struts 2. Validation Issue

2008-02-03 Thread Dave Newton
--- 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 i

Re: Struts 2. Validation Issue

2008-02-03 Thread Martin Castellanos
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 Cas

Re: Struts 2. Validation Issue

2008-02-03 Thread Dave Newton
--- 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 thi

Struts 2. Validation Issue

2008-02-03 Thread Martin Castellanos
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 a

Re: Struts 2 Validation Error

2008-01-17 Thread Ted Husted
If you haven't solved this, here are the things I would try. * Check that the that the Validation files seem like valid XML. A quick way to do that is to open them in IE. * Deploy the MailReader example to the same environment, to be sure its validation works. * Deploy your application to anot

Struts 2 Validation Error

2008-01-15 Thread Liz . Johnston
Hi all, I'm new to this mailing list and still a bit confused on how to look things up, so apologies if this one is already up there! I'm using Tomcat to serve up JSPs using Struts 2 with java action classes and xml validation files. For example: signup.jsp SignUp.java SignUp-validation.xml A

Re: Struts 2 validation off at page load

2007-11-21 Thread Shoaib Gauhar
Thanks alot. This has solved my problem. I really appreciate it. Thanks once again. Regards, Shoaib Ahmad - Original Message From: Dave Newton <[EMAIL PROTECTED]> To: Struts Users Mailing List Sent: Thursday, November 22, 2007 10:42:10 AM Subject: Re: Struts 2 validation off a

Re: Struts 2 validation off at page load

2007-11-21 Thread Dave Newton
tion.xml The S2 documentation wiki covers these options (and probably a few more) and there are a few WebWork validation articles out there as well, I believe they're linked to on the wiki. d. --- Shoaib Gauhar <[EMAIL PROTECTED]> wrote: > Hello, > > I am new to struts 2 validati

Struts 2 validation off at page load

2007-11-21 Thread Shoaib Gauhar
Hello, I am new to struts 2 validation architecture. I am facing a problem which might be very simple. I am adding all of my validation rules in the actionclass-validation.xml. It works fine. But what happens is that when the JSP page opens for the first time, it validates the fields and shows

Re: Struts 2 Validation multiple validators on same field

2007-08-07 Thread Toni Lyytikäinen
only the appropriate message displayed > based > on the input. > note: Please ignore the extra spaces in the param tags, I had > intentionally > added the space to make sure the message preview'd properly. > -- > View this message in context: > http://ww

Struts 2 Validation multiple validators on same field

2007-08-07 Thread orshoe
splayed based on the input. note: Please ignore the extra spaces in the param tags, I had intentionally added the space to make sure the message preview'd properly. -- View this message in context: http://www.nabble.com/Struts-2-Validation-multiple-validators-on-same-field-tf4232748.htm

Re: Struts 2 validation error messages

2007-07-10 Thread Don Brown
Just use the getText() method to resolve the key of your choice. For example: addActionError(getText("my.message.key")); Don On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, I have written my customised java class to do the form validation within the action class. I want to render

Struts 2 validation error messages

2007-07-10 Thread Manoj . Gupta
Hi, I have written my customised java class to do the form validation within the action class. I want to render the validation error messages from a property file and not hard coding it into the code. What i understand is the struts ActionSupport class has addActionError(String msg) which takes

Struts 2 Validation

2007-07-03 Thread Manoj Gupta
Hi All, I am trying to use struts 2 validation for the first time. I have a action class called TestAction.java and two form bean attribute like Form01 f1; - with getter/setter Form 02 f2 ; with getter/setter as the form will be populated from two different pages i want

Re: Struts 2 validation and Redirect After Post

2007-05-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Perryn, Fowler, Perryn wrote: > If I have a form that I want to submit with a POST, I want the > response to this to always be a REDIRECT to a GET. > > I probably want this even in the case of validation failures that > cause the form to be re-displa

Re: Struts 2 validation and Redirect After Post

2007-05-22 Thread Ian Roughley
, I want to use the redirect after post pattern in order to have a web app that is well behaved when the user hits back, refresh etc etc I also want to use the Struts 2 validation framework. At first glance though, the two seem incompatible: If I have a form that I want to submit with a

Struts 2 validation and Redirect After Post

2007-05-22 Thread Fowler, Perryn
Hi, I want to use the redirect after post pattern in order to have a web app that is well behaved when the user hits back, refresh etc etc I also want to use the Struts 2 validation framework. At first glance though, the two seem incompatible: If I have a form that I want to

Struts 2 validation and Redirect After Post

2007-05-22 Thread Fowler, Perryn
Hi, I want to use the redirect after post pattern in order to have a web app that is well behaved when the user hits back, refresh etc etc I also want to use the Struts 2 validation framework. At first glance though, the two seem incompatible: If I have a form that I want to submit with a