I've been trying to add a checkbox to the display tag table, but I'm having trouble getting it to function properly.
- I want the header checkbox to select all rows in the table when checked
- Additionally, individual rows should be selectable
- When the delete button is clicked, the selected rows should be deleted from both the display and the database.
<display:table name="sessionScope.results" decorator="com.jobapp.TableDecorator" pagesize="10" requestURI="<%=\"JobServlet?_id=\"+Math.round(Math.random()*1000000)%>">
<display:column title="<input type='checkbox' name='selectall'/>">
<input type="checkbox" name="select" style="margin: 0 0 0 4px" />
</display:column>
<display:column property="applicationId" title="Ref. Id" style="width=40px" />
<display:column property="fullName" title="Full Name" style="width=120px"/>
<display:column property="dob" title="DOB" style="width=85px"/>
<display:column property="currentCountry" title="Current Location" style="width=85px"/>
<display:column property="nationality" title="Nationality" style="width=85px"/>
<display:column property="email" title="Email" autolink="true"/>
<display:column property="dateApplied" title="Date Applied" style="width=70px" />
<display:column property="applicationStatus" title="Status"/>
</display:table>
The page is displaying components as expected, but I'm still working on implementing the necessary logic for functionality.