如何在 ICEfaces 中的另一个数据表中添加数据表
我有两个数据表,第二个数据表依赖于一个数据表。到目前为止我所做的是,当我单击第一个表的一行时,第二个表显示所选行的相应值。
我想要做的是首先将第二个数据表放入其中,当我单击一行(第一个表)时,第二个数据表应该从下一行出现,并且在第二个数据表的末尾,第一个数据表应该继续。
我不知道该怎么做,请帮忙
<ice:dataTable id="fdf001" border="3" value="#{showDetails.showArr}" var="item">
<ice:column id="column1">
<ice:rowSelector id="IdRowSelector"
selectionListener="#{showDetails.rowSelectionEvent}"
value="#{item.selected}" selectedClass="tableRowSelected" mouseOverClass="tableRowMouseOver">
</ice:rowSelector>
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Machine Name"></ice:outputText>
</f:facet>
<ice:outputText value="#{item.machineName}"></ice:outputText>
</ice:column>
<ice:column id="column2">
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Status"></ice:outputText>
</f:facet>
<ice:outputText value="#{item.status}"></ice:outputText>
</ice:column>
<ice:column id="column3">
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Environment Client Database Instance"></ice:outputText>
</f:facet>
<ice:outputText value="#{item.envClientDbInstance}"></ice:outputText>
</ice:column>
</ice:dataTable>
<ice:dataTable id="subTable" border="2" value="#{showDetails.modArr}" var="sub">
<ice:column id="sub1">
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Artifact Id"/>
</f:facet>
<ice:outputText value="#{sub.artifactId}"/>
</ice:column>
<ice:column id="sub2">
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Group Id"/>
</f:facet>
<ice:outputText value="#{sub.groupId}"/>
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Version"/>
</f:facet>
<ice:outputText value="#{sub.version}"/>
</ice:column>
</ice:dataTable>
I have two datatable the second one is depending one one. What I have done up to now is, when I clicked on a row of first table second table shows the corresponding value to the selected row.
What I want to do is make this second data table inside first and when I click on a row (first table) the second data table should appear from next row and also at the end of the second datatable the first datatable should continue.
I do not know how to do this, please help
<ice:dataTable id="fdf001" border="3" value="#{showDetails.showArr}" var="item">
<ice:column id="column1">
<ice:rowSelector id="IdRowSelector"
selectionListener="#{showDetails.rowSelectionEvent}"
value="#{item.selected}" selectedClass="tableRowSelected" mouseOverClass="tableRowMouseOver">
</ice:rowSelector>
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Machine Name"></ice:outputText>
</f:facet>
<ice:outputText value="#{item.machineName}"></ice:outputText>
</ice:column>
<ice:column id="column2">
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Status"></ice:outputText>
</f:facet>
<ice:outputText value="#{item.status}"></ice:outputText>
</ice:column>
<ice:column id="column3">
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Environment Client Database Instance"></ice:outputText>
</f:facet>
<ice:outputText value="#{item.envClientDbInstance}"></ice:outputText>
</ice:column>
</ice:dataTable>
<ice:dataTable id="subTable" border="2" value="#{showDetails.modArr}" var="sub">
<ice:column id="sub1">
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Artifact Id"/>
</f:facet>
<ice:outputText value="#{sub.artifactId}"/>
</ice:column>
<ice:column id="sub2">
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Group Id"/>
</f:facet>
<ice:outputText value="#{sub.groupId}"/>
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText style="font-size: 13px; color: blue" value="Version"/>
</f:facet>
<ice:outputText value="#{sub.version}"/>
</ice:column>
</ice:dataTable>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在寻找的功能在icefaces 的标准数据表中不可用。它可与企业组件一起使用 - 丰富的数据网格。
也许您可以为此切换到数据网格。
否则,您当然可以使用可扩展的表格来代替。您可以在此处找到“原因和方式”
The feature you are looking for is not available in the standard data-table in icefaces. It is available with the enterprise component - a rich datagrid.
Probably you can switch to the datagrid for this.
Otherwise you surely can have an expandable table instead. You will find the 'why and how' here
好吧,你可以做到。这是可能的。
您只需要具有如下类的结构:
现在您需要做的就是在父数据表的列中创建数据表
并将 currentRow.showSub 传递给子 DataTable。
Well You can do. It is possible.
You Just need to have structure of class like :
Now what u need to do is just Create Data Table inside Column of Parent dataTable
and pass currentRow.showSub to sub DataTable.