Re: Custom validation with Struts2

2008-09-10 Thread Dave Newton
; > >   > > label="%{getText('card_add_edit_field')}"> > > > >   value="%{EmpNo}"> > > > >   value="%{true}"> > > > >       value="%{true}"> > > > >   value="%{getText('button_submit

Re: Custom validation with Struts2

2008-09-10 Thread Priyanka.dandekar
mp.length() > 0) { > >     int tmpInt = Integer.parseInt(tmp); > >     this.setCardNo(tmpInt); > >         System.out.println("Card no (validation) = " + > cardNo); > >     if

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

Custom validation with Struts2

2008-03-18 Thread Filippov, Andrey
Hello everybody, I need to validate only 1 field on the jsp. It value should be between 1 and 99. Initially I started to implement through int validation but it seemed to go wrong - it works with some limitation - maximum value should not exceed 1000 or something like that. I am trying t