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 : > 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 t

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 rob...@msn.com

[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?

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: 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 http://www.gnu.o

Re: simple vs xhtml theme, validation question

2008-10-08 Thread Gabriel Belingueres
You can do it by hand though: In addition, if you are using S2.1, then you have a basic error handling. Each tag has an cssErrorClass and cssErrorStyle attributes that are set when there is a validation error. 2008/10/8 Sébastien Domergue <[EMAIL PROTECTED]>: > Hi, > you're right, s

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 struts.pr

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?

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 me

Struts Custom Validation Question

2008-07-22 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.

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 < should return a validation failure message. How do I do that?. I believe that if I give a pattern to r

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 < should return a validation failure message. How do I do that?. I believe that if I give a pattern to regex, it shows e

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

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 à 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

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() i

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

[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). > > wha

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 : error ${myList.size} Then in console I hav

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 vali

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 fie

RE: Struts validation question

2006-07-04 Thread hermod.opstvedt
4, 2006 9:38 AM 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 wan

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: When I run t

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

2005-11-08 Thread Niall Pemberton
Not from the request - from the form bean (or indexed Bean) - in this example lineNumber needs to be a property of the indexed bean. Niall - Original Message - From: "Michael Jouravlev" <[EMAIL PROTECTED]> Sent: Wednesday, November 09, 2005 12:47 AM On 11/8/05, Niall Pemberton <[EMAIL

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

2005-11-08 Thread Michael Jouravlev
On 11/8/05, Niall Pemberton <[EMAIL PROTECTED]> wrote: > The short answer is that there isn't a way to echo back user input in the > error message. ... > There are two places that I know of, where this kind of functionality has > been provided. The first is in the "extends validator" I wrote (see t

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 had

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: where registrationForm is action form definition in struts-config.xml, nestedUser is a nested BO. Ori

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 t

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 http://www.reuman

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 us

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 passwo

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 beside the text field, I get the WHOLE STRING for the 'required' validation, instead, I would like to display only a *

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 f

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 prope

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): * L. Aleksandar Matijaca wrote: Hi there, I am current

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:    As I said, it loks fairly simple and it works. HOWEVER, I would like to automatically place a little red * right beside the input field. For my password c

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: > > > > > test >

Automatic validation question...

2005-05-31 Thread N G
If I have set up validation as follows: test (radioButton = "firstNameSearch")var-value> If "validwhen" failts, will it try to validate the "required"? In other words, when using automatic validation, the validator goes through the list in "depends"

RE: Request Processor validation Question

2005-03-14 Thread Antony Joseph
Correction. Default implementation uses any configured roles. Your implementation can override this and implement whatever logic you want. - Original Message - From: "Antony Joseph" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Subject: RE: Request Pro

RE: Request Processor validation Question

2005-03-14 Thread Antony Joseph
ailing List" 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 declarat

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

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 application

Re: Validation question

2005-02-10 Thread Niall Pemberton
Not yet. - Original Message - From: "kjc" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, February 10, 2005 8:04 PM Subject: Validation question > Is it possible to pass the incorrect field value that was entered by the > user

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 Eddie Bush
CTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Monday, December 20, 2004 12:12 AM > Subject: Re: Struts Form Validation Question > > > ^([a-zA-Z]+['-\s])*$ > > > > That's top of my head ... and my head is tired :-( but

Re: Struts Form Validation Question

2004-12-22 Thread send2rajesh
2: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 Eddie Bush
** > > Original Message Follows > From: <[EMAIL PROTECTED]> > Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Subject: Struts Form Validation Question > Date: Sun, 19 Dec 2

RE: Struts Form Validation Question

2004-12-20 Thread Ruben Cepeda
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 Name can contain only letters, dashes (-), apsotrophes(') and

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 tho

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 use

Re: validation question

2004-10-18 Thread Justy Wong
ber 19, 2004 1:48 PM Subject: Re: validation question > Thanks!!! I tried your last suggestion and it works fine!!! > > public ActionErrors validate(ActionMapping actionMapping, HttpServletRequest > httpServletRequest) { > if (getCheck()==null) { > re

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

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 valida

Re: validation question

2004-10-18 Thread Justy Wong
for your answer!! that means I've no other choices apart from changing my program - Original Message - From: "Eddie Bush" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Tuesday, October 19, 2004 10:53 AM Subject: Re:

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

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 tu

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 rar

Re: validation question

2004-10-18 Thread Justy Wong
uot;Durham David R Jr Contr 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://l

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 sim

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" w

validation question

2004-10-18 Thread Justy Wong
Hi, I have a http://localhost:8080/login.do action and I want to do validation for the form when user submit their username & password. here is my setting in validation.xml: m

RE: Validation question. Disallow < > characters using regex mask

2004-08-02 Thread Kris Barnhoorn
Correction: ... ... -Oorspronkelijk bericht- Van: Kris Barnhoorn [mailto:[EMAIL PROTECTED] Verzonden: maandag 2 augustus 2004 22:42 Aan: 'Struts Users Mailing List' Onderwerp: RE: Validation question. Disallow < > characters using regex mask Had the same p

RE: Validation question. Disallow < > characters using regex mask

2004-08-02 Thread Kris Barnhoorn
Had the same problem Solution: ... ... 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 Hello List, Validation

validation question (message resources)

2004-06-01 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 the

Validation question. Disallow < > characters using regex mask

2004-05-18 Thread Eric Dahnke
Hello List, Validation works great! However, we don't want to allow people to enter Style data into our forms. I'm happy to just make < > illegal characters using a regex mask, but the SAX parser won't parse my validation.xml file. Does anyone know how to escape < > characters in the validati

Validation question. Disallow < > characters using regex mask

2004-05-18 Thread Eric Dahnke
Hello List, Validation works great! However, we don't want to allow people to enter Style data into our forms. I'm happy to just make < > illegal characters using a regex mask, but the SAX parser won't parse my validation.xml file. Does anyone know how to escape < > characters in the validati