父表中是否可以有子表
是否可以创建带有嵌入式子表的显示标签表?下面的示例是创建一个员工报告,并将他/她的联系方式作为子表。
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<display:table id="employees" name="employees" uid="1">
<display:column title="Id" property="employeeId" />
<display:column title="Department" property="department" />
<display:column title="Contact Points" property="contacts">
<display:table id="contacts" name="contacts" uid="2">
<display:column title="Postal Address" property="postalAddress" />
<display:column title="Email" property="emailAddress" />
<display:column title="Cell Phone" property="cellPhoneNumber" />
</display:table>
</display:column>
</display:table>
Is it possible to create a displaytag table with embedded child table ? Example below is to create an Employee report with his/her contact means as child table.
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<display:table id="employees" name="employees" uid="1">
<display:column title="Id" property="employeeId" />
<display:column title="Department" property="department" />
<display:column title="Contact Points" property="contacts">
<display:table id="contacts" name="contacts" uid="2">
<display:column title="Postal Address" property="postalAddress" />
<display:column title="Email" property="emailAddress" />
<display:column title="Cell Phone" property="cellPhoneNumber" />
</display:table>
</display:column>
</display:table>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以创建 displaytag 嵌套表:
只需按照这个示例进行操作即可
It's possible to create displaytag nested tables:
just follow this example