struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weisfield, Russell \(HAC\)" <Russell.Weisfi...@va.gov>
Subject Re: <html:checkbox> problem
Date Thu, 01 Feb 2007 20:10:08 GMT
You might wish to try the html:multibox option.  Not sure if that is
what you want but might be worth a shot.  Alternatively you will
probably have to use java code within jsp tags of the value option (e.g.
<html:multibox property='checkList' value='<%= getMyCheckListValue() %>'
/>).  You might find an interesting tidbit on it at
http://husted.com/struts/FAQ/view-html.htm.


Russell Weisfeild

Hi All,

In my application, I need to generate check boxes for every row of data.
I set the data as a list of objects in my controller and I access the
same in JSP using <logic:iterate>
For each row of this data, I need to add a checkbox with 'value'
attribute as a field in the data row object... here it is user_id.(data
set is in request scope)
How can I achieve this? Or do I need to use traditional java code in JSP
:(

I have like this:
<logic:iterate id="userObj" name="userResults" type="com.UserDO">
   <html:checkbox name="testForm" property="checkList"
value=???????????????????? />
    and I have other data:
   <bean:write name="userObj" property="user_id"/>
   <bean:write name="userObj" property="first_name"/>...
</logic:iterate>

Any help is appreciated.

Thanks in Advance,
Shekar.


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


Mime
View raw message