The contacts variable is an ArrayList in the action class. All selected 
contacts are correctly getting set in the action class contacts variable.

Do you think depending on how the variable is defined in jsp we have to set the 
parameter on get/set?

Thanks,
Prasanth

On 10/9/25 9:41 AM, Lukasz Lenart wrote:
śr., 8 paź 2025 o 17:08 Prasanth<[email protected]> napisał(a):
Below is a fragment of the jsp.

              <c:forEach items="${currentAccessLevels}" var="access" 
varStatus="loopStatus">
                  <tr class="${loopStatus.index % 2 == 0? 'row1':'row2' }">
                      <td><s:checkbox name="contacts" fieldValue="%{#attr.access.contactID}" 
value="%{contacts!=null && contacts.contains(#attr.access.contactID)}"
submitUnchecked="true"/>${access.getContactName()}</td>
                  </tr>
              </c:forEach>
This is probably due to how the CheckboxInterceptor works - it
collects all the values and sets them at once, that's why the setter
is used - you have one "contacts" value instead of multiple values eg.
"contacts[0]=...,contacts[1]=..."


Cheers
Łukasz

---------------------------------------------------------------------
To unsubscribe, e-mail:[email protected]
For additional commands, e-mail:[email protected]


Reply via email to