显示标签和复选框
我需要在显示标签表中添加复选框,尽管我做到了,但仍然无法使其工作。
- 一旦我选中标题复选框,它就会对表中的所有行生效。
- 此外,对于选择单个行,
- 在单击删除按钮(包括从数据库中)时,所选内容应该被删除。
<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>
该页面按预期显示组件,但要弄清楚如何实现逻辑
I need to add checkbox in the display tag table although i did it but still am unable to make it work.
- Once i check the header checkbox then it should take effect to all the rows in the table
- Also for selecting individual rows
- The selected should get deleted while clicking the delete button including from 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 displays as expected with the components but figuring out how the logics can be achieved
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无论其显示标签 1.1 还是 1.2 如果是 1.2,您可以使用 checkboxdecorator 类来包含复选框
Whether its display-tag 1.1 or 1.2 if its 1.2 you can use the checkboxdecorator class to include checkbox