struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carmi_cd <carmi_...@yahoo.com>
Subject Re: [S2]Checkbox value
Date Thu, 13 Dec 2007 07:07:47 GMT

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: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
> 
> 
> 

-- 
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message