Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: DYNAMIC CHECK BOXES

Uday Karrothi

2006-12-13

Replies:

You should try using Mulitbox.

http://www.jguru.com/faq/view.jsp?EID=925277

Example is

  <logic:iterate id="apprEnEntry" name="listApprvGrpDetail"
indexId="apprIndex">
   <tr bgcolor="#E7FFFF">
  <td align="center" nowrap>&nbsp;&nbsp;<b><bean:write name="apprEnEntry"
property="appvr_grp_desc"/>&nbsp;&nbsp;</b></td>
   <td> <html:multibox property="selectedAssets">
     <bean:write name="apprEnEntry" property="appvr_grp_id"/>
   </html:multibox>
   </td>
  </tr>
  </logic:iterate>

Uday Chandra Karrothi

On 12/12/06, Kranti Parisa <kranti.parisa@(protected):
>
> Hi,
>
> Please suggest me some idea to achive the following
>
> from DB getting empid,empname,salary..etc into a arraylist of beans. that
> means each employee record is stored in a bean which is added to
> arraylist.
>
> now i want to display the arraylist in jsp
> the empid should be assigned to check box
> so each row should contain checkboxes which are going to populate
> dynamically and carry empid
>
> so that when i select the checkbox and click on delete it should capture
> the
> empid of that checkbox and delete.
>
> thanks in advance!
>
>
©2008 junlu.com - Jax Systems, LLC, U.S.A.