Re: Custom validation interceptor

2009-06-20 Thread Peter Bliznak
Preciously!..what you said about changing form is exactly what I was thinking. From: Dave Newton To: Struts Users Mailing List Sent: Saturday, June 20, 2009 8:35:50 PM Subject: Re: Custom validation interceptor Peter Bliznak wrote: > It is across entire

Re: Custom validation interceptor

2009-06-20 Thread Dave Newton
Peter Bliznak wrote: It is across entire app (there are many dozen of actions) - every single action has to have same behavior - 3 crosses go and try again. It's app for changing personal info on government issued documents - sorta wizard like thing. I can see how I can do it by keeping eye of p

Re: Custom validation interceptor

2009-06-20 Thread Peter Bliznak
t: Re: Custom validation interceptor Peter Bliznak wrote: > I have following requirement: If validation of the page fails 3 times > in row - invalidate session and redirect to index page. Should I > replace default validation interceptor in default stack with my own > to achieve what I am a

Re: Custom validation interceptor

2009-06-20 Thread Dave Newton
Peter Bliznak wrote: I have following requirement: If validation of the page fails 3 times in row - invalidate session and redirect to index page. Should I replace default validation interceptor in default stack with my own to achieve what I am after? I there any other way? Is this across the e

Re: Custom validation interceptor

2009-06-20 Thread Wes Wannemacher
I don't think a custom interceptor is required. You could probably get this done through hidden parameters or by storing attempts in the session or something. Do you have this req for one action or all actions in the app? On 6/20/09, Peter Bliznak wrote: > Hi, > I have following requirement: > If

Re: Custom validation with Struts2

2008-09-10 Thread Dave Newton
The OP isn't really using the built-in intrange validator, but doing it manually (for some reason). The problem, however, lies in the OP's configuration fragment: WTT_CARDS_EDITOR def_page_employee_card def_page_employee_card As soon as you start defining an action's inter

Re: Custom validation with Struts2

2008-09-10 Thread Priyanka.dandekar
If Integer Range Validator does not work for you then you shoud consider regular expression validation for same, its can be done by restricting number of digits and allowing only numeric characters. Here is an example of similar problem http://struts-2-developers.blogspot.com/2008/08/struts-2-in

Re: Custom validation with Struts2

2008-03-18 Thread Laurie Harper
Lukasz Lenart wrote: I'm not sure were is the problem but I've just checked such simple example below and everything is ok. Maybe you should consider to use Long instead of Integer, because when you enter more then 2147483647 to the field you will get some strange value back to the input (because

Re: Custom validation with Struts2

2008-03-18 Thread Lukasz Lenart
I'm not sure were is the problem but I've just checked such simple example below and everything is ok. Maybe you should consider to use Long instead of Integer, because when you enter more then 2147483647 to the field you will get some strange value back to the input (because you loose precision ;-

RE: Custom validation with Struts2

2008-03-18 Thread Filippov, Andrey
return response; } public void setResponse(HttpServletResponse response) { this.response = response; } public int getFieldName() { return fieldName; } public void setFieldName(int fieldName) {

Re: Custom validation with Struts2

2008-03-18 Thread Lukasz Lenart
> request = ServletActionContext.getRequest(); > String tmp = ""; > try { >tmp = request.getParameter("cardNo"); >Integer i = this.getCardNo(); >if (tmp != null && tmp.length() > 0) { >

RE: Custom Validation

2006-10-11 Thread Dave Newton
From: Puneet Lakhina [mailto:[EMAIL PROTECTED] > I said: > > There are any number of ways around this; creating another action > > mapping (perhaps just a forward) is one way. > Forward wont do I need to get things from a DB before displaying the page. Obviously that won't work then. > > Turning

Re: Custom Validation

2006-10-11 Thread Puneet Lakhina
On 10/10/06, Dave Newton <[EMAIL PROTECTED]> wrote: > From: Puneet Lakhina [mailto:[EMAIL PROTECTED] > Is this the wrong way of doing things?? "Wrong" seems a bit strong. There are any number of ways around this; creating another action mapping (perhaps just a forward) is one way. Forward w

RE: Custom Validation

2006-10-10 Thread Dave Newton
> From: Puneet Lakhina [mailto:[EMAIL PROTECTED] > Is this the wrong way of doing things?? "Wrong" seems a bit strong. There are any number of ways around this; creating another action mapping (perhaps just a forward) is one way. Turning off automatic validation and running it manually (for inst