Hi All,
 
   Say I'm declaring <s:checkbox> in <s:iterator>
 
<s:iterator value="employeeList">
<tr align="left">
   <td align="center">
         <s:checkbox name="selected_rows" fieldValue="%{emp_id}"/>
    </td>
    <td>
         <s:property value="emp_id"/>
    </td>
    <td>
         <s:property value="emp_name"/>
    </td>
    <td>
         <s:property value="dept_name"/>
    </td>
</tr>
</s:iterator>
 
<tr>
   <td  align="left">
            <b>Select Division:&nbsp;</b>
                   <s:select headerKey="" headerValue="-- Select --" 
key="staff_division" list="division_list" 
onchange="javascript:getDivisionUserValues('userList');" />
 
<b>&nbsp;Select User:&nbsp;</b>
 
              <s:select headerKey="" headerValue="-- Select --" 
key="staff_name" list="staff_list" />
 
      </td>
</tr>
 
in action class "selected_rows" is selected as String[]
 
When user selects 'Division" then I'm calling my action and populating 
"staff_list" and re-displaying same page.
 
    The problem is that I selected checkbox for emp_id 100,102,105, when it is 
re-displaying page because of division selection, it is not showing selected 
checkbox as pre-selected.
 
In action the array is populated with these values but when it is re-displaying 
page it is showing unchecked. 
 
   Can anyone please let me know, how to display page with selected checkboxs 
using "selected_rows" array.
 
   Thanks in advance.
 
Regards,
Sharath.


      

Reply via email to