hello i tried to view the value of <s:property value="getUserId()"/> and its value is just one id for each row.. but it seems the checkbox are not accepting this value..
<input name="chkUserId" type="checkbox" value="<s:property value="getUserId()"/>"/> i dont know what wrong with this? thanks again. Ray Chen wrote: > > 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:[EMAIL PROTECTED] > Blog: http://clraychen.blogcn.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-S2-Checkbox-value-tp14291211p14311050.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]