Re: validation question

2010-01-08 Thread Gabriel Belingueres
As a starting point you may check the freemarker .ftl files from the XHTML template. 2010/1/8 Robby Atchison rob...@msn.com: Hello,  I would like to know how an actionname-validation.xml is tied to the client-side validation.  I figure somewhere the xml file is read and Javascript is output.  

validation question

2010-01-07 Thread Robby Atchison
Hello, I would like to know how an actionname-validation.xml is tied to the client-side validation. I figure somewhere the xml file is read and Javascript is output. I'm having trouble connecting the dots. Any information and help will be appreciated. Best regards! Robby

[Struts 1.3] Validation question

2009-01-14 Thread Lorenzo Carnevale
My application user has to insert a monetary value for an invoice. Can I use the v alidator to check the value to be greater than 0, but without specifying a max value?

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

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

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 Jishnu Viswanath
: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 to implement the following logic for 3 fields on a form: Company, FirstName, LastName. Psedo Code: If Company empty

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 LastName must

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 Shannon, 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 thinking

Re: simple vs xhtml theme, validation question

2008-10-09 Thread Torsten Krah
Am Mittwoch, 8. Oktober 2008 20:27:40 schrieb Gabriel Belingueres: You can do it by hand though: Thx for this hint, should habe seen that myself. Thats a good idea to do stuff with s:if and s:else myself. thx. -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe

simple vs xhtml theme, validation question

2008-10-08 Thread Torsten Krah
Hi. I don't want to use the xhtml theme because of the table layout it produces, the simple is enough. However, simple does not render the validation errors or messages. Wheres the glue to do so with the simple theme? Did not find any information about this yet which helps me, to render those

Re: simple vs xhtml theme, validation question

2008-10-08 Thread Lukasz Lenart
2008/10/8 Torsten Krah [EMAIL PROTECTED]: I don't want to use the xhtml theme because of the table layout it produces, the simple is enough. However, simple does not render the validation errors or messages. You can use css_xhtml theme [1] Wheres the glue to do so with the simple theme? Did

Re: simple vs xhtml theme, validation question

2008-10-08 Thread Sébastien Domergue
Hi, you're right, simple theme don't allow you to use validation. In order to use validation with the simple theme you have to extend it or to modify xhtml theme in order not to build the table layout. The templates sources are in struts jar and you can define others by adding them to

Re: simple vs xhtml theme, validation question

2008-10-08 Thread Gabriel Belingueres
You can do it by hand though: s:if test=getFieldErrors() != null getFieldErrors()['myfield'] != null s:fielderror s:param value=%{'myfield'}/ /s:fielderror /s:if In addition, if you are using S2.1, then you have a basic error handling. Each tag has an cssErrorClass and cssErrorStyle

Struts Custom Validation Question

2008-07-23 Thread Chandramouli P
Hi, I have the below scenario in our application. Consider we have two radio buttons for two types of bank accounts, say Savings and Current, and based on the selection of each radio button we are enabling/disabling some fields for user input, which in turn, the properties of an ActionForm.

Struts2 regex validation question

2008-05-02 Thread Pranav
Hi, I want to put a validation in struts2 using field-validator type=regex such that any string which contains any of the , or any of the alternative representation like lt; should return a validation failure message. How do I do that?. I believe that if I give a pattern to regex, it shows

Re: Struts2 regex validation question

2008-05-02 Thread Laurie Harper
Pranav wrote: Hi, I want to put a validation in struts2 using field-validator type=regex such that any string which contains any of the , or any of the alternative representation like lt; should return a validation failure message. How do I do that?. I believe that if I give a pattern to

Re: Validation question

2008-01-11 Thread Ted Husted
Rather than use the validation framework, I'd probably go with a Validate method (by implementing Validatable). Then, instead of using an OGNL expression, you can loop through the list using Java, and call addFieldError if there's a problem. Alternatively, a custom type converter that turned the

Re: Validation question

2008-01-11 Thread Ted Husted
On Jan 11, 2008 8:10 AM, Martin Braure de Calignon [EMAIL PROTECTED] wrote: Of course yes :-). But I need a validate() per method. I haven't used it myself, but the syntax validate-action is suppose to work, in the same way that it works for the validation framework. HTH, Ted *

Re: Validation question

2008-01-11 Thread Martin Braure de Calignon
Le vendredi 11 janvier 2008 à 07:36 -0500, Ted Husted a écrit : Rather than use the validation framework, I'd probably go with a Validate method (by implementing Validatable). Firstly, thank you very much for your answer :) Ok then... That what I though... But my problem is that Validate() is

Re: Validation question

2008-01-11 Thread Martin Braure de Calignon
Le vendredi 11 janvier 2008 à 09:15 -0500, Ted Husted a écrit : On Jan 11, 2008 8:10 AM, Martin Braure de Calignon [EMAIL PROTECTED] wrote: Of course yes :-). But I need a validate() per method. I haven't used it myself, but the syntax validate-action is suppose to work, in the same way

Re: Validation question

2008-01-11 Thread Dave Newton
The validation interceptor will look for, and call, validate${methodName} (and validateDo${methodName}). d. --- Martin Braure de Calignon [EMAIL PROTECTED] wrote: Le vendredi 11 janvier 2008 à 09:15 -0500, Ted Husted a écrit : On Jan 11, 2008 8:10 AM, Martin Braure de Calignon [EMAIL

Re: Validation question

2008-01-11 Thread Martin Braure de Calignon
Le vendredi 11 janvier 2008 à 15:46 -0800, Dave Newton a écrit : The validation interceptor will look for, and call, validate${methodName} (and validateDo${methodName}). d. Great ! thank you all :-) -- Martin Braure de Calignon signature.asc Description: Ceci est une partie de message

Validation question

2008-01-08 Thread Martin Braure de Calignon
Hello, I'm currently using struts2 for a project. I want to validate all elements of a list (each elements should have a non-empty value, or the list should be empty). what I have done in my validator is : !-- correct doctype above and some field-validator-- validator type=expression

[S2] validation on list of bean (was Validation question)

2008-01-08 Thread Martin Braure de Calignon
Le mardi 08 janvier 2008 à 14:08 +0100, Martin Braure de Calignon a écrit : Sorry I've forgot [S2] in subject Hello, I'm currently using struts2 for a project. I want to validate all elements of a list (each elements should have a non-empty value, or the list should be empty). what I

Struts2 Validation Question

2006-10-17 Thread Jim Reynolds
Downloaded and extracted the struts2-showcase-2.0.1.war file to my tomcat server. I am looking at the validation/quizBasic!input.action and I am confused on how the validtion on these fields is set. I am accustomzed to using 1.x. Could someone please explain how the validation for these three

Re: Struts2 Validation Question

2006-10-17 Thread Ted Husted
S2 Validation follows a config-behind-class model. You define a validation file for the Action class (or other JavaBean) that needs to be validated, and place it in the same package/folder. The validation follows the class hierarchy, so that if a class is extended, the subclass inherits the

Struts validation question

2006-07-04 Thread red phoenix
I want to use struts validation,when field is invalidate,my program can raise information,like follows: Username is required. Password is required. Phone Number is required. I know it's server-side validation,I want to use client-side validation,so I put some code in my JSP files: /html:form

RE: Struts validation question

2006-07-04 Thread hermod.opstvedt
To: user@struts.apache.org Subject: Struts validation question I want to use struts validation,when field is invalidate,my program can raise information,like follows: Username is required. Password is required. Phone Number is required. I know it's server-side validation,I want to use client-side

Re: Validation Question how to echo back users input in error message?

2005-11-08 Thread Niall Pemberton
The short answer is that there isn't a way to echo back user input in the error message. Most of the time I don't think its necessary to do so anyway - since if you're re-displaying/highlighting errors then what is the need. The one time I scenario I wanted to do something like that, was when I

Validation Question how to echo back users input in error message?

2005-11-04 Thread Troy Bull
I am using the struts validator and it works almost exactly the way I want. Say I have a field tf and the value is ABC I want to do a validation requiring it to be an integer and return the following error message: tf must be an integer. I can do all this pretty easily here is the code that

Re: Validation Question how to echo back users input in error message?

2005-11-04 Thread Michael Jouravlev
I would like to know the answer on this too. I searched the Net, all examples use properties from property file. Using resource=false does not help with either (neither?) of these variants: arg0 key=nestedUser.fromAddress resource=false/ arg0 key=${nestedUser.fromAddress} resource=false/ arg0

Beans in Request and Validation Question

2005-11-01 Thread Jim Reynolds
I have a question about using request scoped beans and validation with an ActionForm. Here is a example: In a certain action, I go and create a Collection of objects for a select list. I put the Collection into the request, and forward to a JSP page, and I show the list. From the JSP page, the

Re: Beans in Request and Validation Question

2005-11-01 Thread Hubert Rabago
The way I dealt with this was to point my input attribute to a setup Action which would put the needed collection into request scope for me. But that's just one approach. Another is to handle validation yourself (which really is very easy). This is the approach recommended by

Re: validation question...

2005-07-22 Thread Aleksandar Matijaca
I like the CSS 'trick' -- I will try it tonight ! Thanks again Wendy, Regards, Alex. On 7/22/05, Wendy Smoak [EMAIL PROTECTED] wrote: From: Aleksandar Matijaca [EMAIL PROTECTED] I would like to automatically place a little red * right beside the input field. For my password

validation question...

2005-07-21 Thread Aleksandar Matijaca
Hi there, I am currently using the struts validator, and it is working pretty good. My basic error block looks like this: logic:messagesPresent table tr td colspan=2font color=redbean:message key=errorTitle //font/td /tr html:messages id=error tr tdnbsp;nbsp;/td tdfont color=redbean:write

Re: validation question...

2005-07-21 Thread Laurie Harper
You could add errorClassId on the input element and use CSS to insert an image of a little red *... :-) I can't think of a clean way to find out if an error exists for a particular property though. This might work (haven't tried it): c:if test=${not empty messages.message['property']}*/c:if

Re: validation question...

2005-07-21 Thread Aleksandar Matijaca
Thanks Laurie, I will try it !! Cheers, Alex. On 7/21/05, Laurie Harper [EMAIL PROTECTED] wrote: You could add errorClassId on the input element and use CSS to insert an image of a little red *... :-) I can't think of a clean way to find out if an error exists for a particular property

Re: validation question...

2005-07-21 Thread Aleksandar Matijaca
It didn't work, but thanks for the effort Laurie... Regards, Alex. On 7/21/05, Laurie Harper [EMAIL PROTECTED] wrote: You could add errorClassId on the input element and use CSS to insert an image of a little red *... :-) I can't think of a clean way to find out if an error exists for a

Re: validation question...

2005-07-21 Thread Wendy Smoak
From: Aleksandar Matijaca [EMAIL PROTECTED] I would like to automatically place a little red * right beside the input field. For my password confirmation field, wnen I put html:errors property=confirm_password/ beside the text field, I get the WHOLE STRING for the 'required' validation,

RE: Automatic validation question...

2005-06-01 Thread Durham David R Jr Ctr 805 CSPTS/SCE
-Original Message- From: N G [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 31, 2005 3:37 PM To: Struts-user Subject: Automatic validation question... If I have set up validation as follows: field property=myField depends=validwhen, required arg0 key=myForm.FirstName

Automatic validation question...

2005-05-31 Thread N G
If I have set up validation as follows: field property=myField depends=validwhen, required arg0 key=myForm.FirstName/ var var-nametest/var-name var-value(radioButton = firstNameSearch)var-value /var /field If validwhen failts, will it try to validate the

Request Processor validation Question

2005-03-14 Thread Scott Purcell
Hello, I have extended the RequestProcessor and I am looking for a way to find out where the page is going to. The reason for this is as follows. I am giving each user a UserObject when they hit the site. Later on, after they log in, I set some flags to know they are valid inside the

Re: Request Processor validation Question

2005-03-14 Thread Antony Joseph
- From: Scott Purcell To: user@struts.apache.org Subject: Request Processor validation Question Date: Mon, 14 Mar 2005 09:31:35 -0600 Hello, I have extended the RequestProcessor and I am looking for a way to find out where the page is going to. The reason for this is as follows. I am

RE: Request Processor validation Question

2005-03-14 Thread Scott Purcell
List Subject: Re: Request Processor validation Question Hi Scott, Check the javadocs for the RequestProcessor. Any method which has an ActionMapping as an argument can be used to figure out the action (ex: mapping.getPath()). If you plan to do authorization the method processRoles() is a good

RE: Request Processor validation Question

2005-03-14 Thread Antony Joseph
@struts.apache.org Subject: RE: Request Processor validation Question Date: Mon, 14 Mar 2005 10:18:34 -0600 If I use the processRoles(), does that mean I have to use the J2EE authentication mechanism for web applications? Using the container and declare the applications declaratively? I am using

RE: Request Processor validation Question

2005-03-14 Thread Antony Joseph
validation Question Date: Mon, 14 Mar 2005 11:36:44 -0500 There is nothing special about processRoles(). It just returns true by default.You can overide it and implement whatever logic you want in it. It is not tied to any J2ee mechanism. - Original Message - From: Scott Purcell

Validation question

2005-02-10 Thread kjc
Is it possible to pass the incorrect field value that was entered by the user to the error message such that errors.email={0} is an invalid e-mail address. gets generated as someIncorrectEmailAddr is an invalid e-mail address Thanks in advance.

Date Validation question

2005-01-04 Thread Manisha Sathe
I am having From date - in the form of 3 separate lists for - Day, Month, Year. Similarly i have To date. Using struts validator framework, 1)Firstly i want to validate whether the combined entries (day, month, year) is a valid date or not 2)Secondly whether first date to date I tried to

Re: Struts Form Validation Question

2004-12-22 Thread send2rajesh
Thanks for your help Eddie! Regex worked perfect. I had given up hope on getting right regex. Thanks Again! - Original Message - From: Eddie Bush [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 20, 2004 12:12 AM Subject: Re: Struts Form Validation

Re: Struts Form Validation Question

2004-12-22 Thread Eddie Bush
:12 AM Subject: Re: Struts Form Validation Question ^([a-zA-Z]+['-\s])*$ That's top of my head ... and my head is tired :-( but maybe it's helpful. You need to separate the repeating things from the non-repeating things, and allow the two of them to be chained multiple times. Having

RE: Struts Form Validation Question

2004-12-20 Thread Ruben Cepeda
] Subject: Struts Form Validation Question Date: Sun, 19 Dec 2004 23:36:48 -0500 Hi, I am using struts validator plugin. I have form field which requires following validation: Full Name can contain only letters, dashes (-), apsotrophes(') and single spaces Here is the regex I am using

Re: Struts Form Validation Question

2004-12-20 Thread Eddie Bush
Follows From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Struts Form Validation Question Date: Sun, 19 Dec 2004 23:36:48 -0500 Hi, I am using struts validator plugin. I have form field which requires following validation: Full

Struts Form Validation Question

2004-12-19 Thread send2rajesh
Hi, I am using struts validator plugin. I have form field which requires following validation: Full Name can contain only letters, dashes (-), apsotrophes(') and single spaces Here is the regex I am using for this validation : ^[a-zA-Z'-\s]*$ The only problem with this regex is that it allows user

Re: Struts Form Validation Question

2004-12-19 Thread Eddie Bush
^([a-zA-Z]+['-\s])*$ That's top of my head ... and my head is tired :-( but maybe it's helpful. You need to separate the repeating things from the non-repeating things, and allow the two of them to be chained multiple times. Having such complete validation of a name seems error-prone at best

Re: validation question

2004-10-19 Thread Justy Wong
, httpServletRequest); } } - Original Message - From: Joe Hertz [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:43 AM Subject: RE: validation question Joe, do u mean checking the field with validwhen using

Re: validation question

2004-10-18 Thread Yves Sy
Hi, Struts doesn't have anything like that. IMHO, I also think that using validator on the login page is not good practice as it would give malicious users a good idea on how your app handles authentication. Usually, you'd just return a generic error message such as Username/password invalid

RE: validation question

2004-10-18 Thread Durham David R Jr Contr 805 CSPTS/SCE
The validation works fine however, when I just type the http://localhost:8080/login.do in my browser (no submit), the validation error will show up at once. I understand that it's just like I submit a form to login.do action without any parameter. My question is, do struts provide any simple

Re: validation question

2004-10-18 Thread Justy Wong
805 CSPTS/SCE [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 1:23 AM Subject: RE: validation question The validation works fine however, when I just type the http://localhost:8080/login.do in my browser (no submit), the validation error

Re: validation question

2004-10-18 Thread Joe Germuska
At 10:28 AM +0800 10/19/04, Justy Wong wrote: Thx for your suggestions. 1) 2 action mappings -- 1 with validation turned off (welcome.do) and 1 with it on (login.do). that means for every action, I've to create 1 more action. but it will almost double the maintainence affort. In practice, it's

Re: validation question

2004-10-18 Thread Eddie Bush
- Original Message - From: Justy Wong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 18, 2004 9:28 PM Subject: Re: validation question Thx for your suggestions. 1) 2 action mappings -- 1 with validation turned off (welcome.do) and 1

Re: validation question

2004-10-18 Thread Eddie Bush
Nice trick, Joe - hadn't thought of doing that :-) - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 18, 2004 9:40 PM Subject: Re: validation question At 10:28 AM +0800 10/19/04, Justy Wong wrote: Thx for your

Re: validation question

2004-10-18 Thread Justy Wong
: Eddie Bush [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 10:53 AM Subject: Re: validation question Nice trick, Joe - hadn't thought of doing that :-) - Original Message - From: Joe Germuska [EMAIL PROTECTED] To: Struts Users Mailing

RE: validation question

2004-10-18 Thread Joe Hertz
Joe, do u mean checking the field with validwhen using validation.xml or implement the actionForm.validate() ? I really want to use the basic struts validation framework instead of implementing validate() function to minimize the maintainence cost. You can do it both ways. Use

Re: validation question

2004-10-18 Thread Justy Wong
, httpServletRequest); } } - Original Message - From: Joe Hertz [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 11:43 AM Subject: RE: validation question Joe, do u mean checking the field with validwhen using validation.xml or implement

RE: Validation question. Disallow characters using regex mask

2004-08-02 Thread Kris Barnhoorn
Had the same problem Solution: ... var-value![CDATA[^]]/var-value ... kris -Oorspronkelijk bericht- Van: Eric Dahnke [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 18 mei 2004 20:24 Aan: Struts Users Mailing List Onderwerp: Validation question. Disallow characters using regex mask

validation question (message resources)

2004-06-02 Thread Hengge Joachim
Hi All, i'm trying to set up automatic validation (required validator), everything is working, except the key lookup in the message resources. Every time i submit my form i get a 'null is required' instead of the textfield label. I double-checked the settings about a thousand times, searched