Re: validation for s:select tag

2008-02-11 Thread Raghuveer Rawat
Thanks Jeromy, Sorry, I did not provide enough detail. Only Header Key value is numeric '-1' so first option can be ruled out for me. For rest of the values Key is ISO Code e.g. USA and Value is Country Name e.g. 'United States' Below expression is not working for me. param

Re: validation for s:select tag

2008-02-11 Thread Jeromy Evans
I'd look closer at your expression as it doesn't seem valid: param name=expression![CDATA[user.country == '-1']]/param If it's always returning true, that implies the expression inside the CDATA section is always false. First I'd put the ! operand inside the CDATA section and use string

Re: validation for s:select tag

2008-02-10 Thread Jeromy Evans
If your keys are just numbers, perhaps you could use the Int Validator field-validator type=int param name=min0/param message key=required.country/message /field-validator http://struts.apache.org/2.x/docs/int-validator.html Otherwise I'd try some variations of the expression. It's

validation for s:select tag

2008-02-09 Thread Raghuveer Rawat
Hi, I need help for mandatory field validation for s:select. I am trying to do client side xml validation. jsp code for country list: s:select name=user.country headerKey=-1 headerValue=Select Country list=countryList listKey=code listValue=name required=true / I