struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ray <clrayc...@gmail.com>
Subject Re: [S2]Checkbox value
Date Wed, 12 Dec 2007 09:05:06 GMT
carmi_cd 写道:
> hello
> i have a checkbox which supposed to have the value of UserId property of the
> action class
> I try to do it this way but its having an exception..
>
> here is how i've done it..
> <input name="chkUserId"  type="checkbox"  value="<s:property
> value="%{getUserId()}"/> />   
>
> and here is the exception..
>
> Unexpected Exception catched: Error setting expression 'chkUserId' with
> value '[Ljava.lang.String;@104496b'
>
> please help me..thanks in advance..
>   
hi,
The [Ljava.lang.String;@104496 means that the parameter is a String array
Once when I tried to get the parameter from JSP, I found that it returns 
a String []
And I solve it by getting the first element of this array ( String[0])
I think you should do some to get the element value before set it to the 
checkbox
You can have a try.

-- 
Ray Chen
Email:clraychen@gmail.com
Blog: http://clraychen.blogcn.com


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message