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