<rich:dataTable>简单应用
<rich:dataTable var="" value="" rendered="">
<h:column>
<f:facet name="header">
列标头
</f:facet>
<h:outputText value=""/>
</h:column>
...
</h:column>
<h:column>
<f:facet name="header">
列标头
</f:facet>
<h:commandButton value="删除" action="" />
</h:column>
</rich:dataTable>
主要是看它的数据是如何绑定的~里面还可以添加按钮等元素~
常用的显示查询数据:
<a:outputPanel id="searchResults">
<div class="section">
<h:dataTable id="users" value="#{users}" var="hot" styleClass="tableControl" rendered="#{users.rowCount>0}">
<h:column id="column1">
<f:facet id="UsernameFacet" name="header">Username</f:facet>
#{hot.username}
</h:column>
<h:column id="column2">
<f:facet id="RealnameFacet" name="header">Realname</f:facet>
#{hot.realname}
</h:column>
<h:column id="column3">
<f:facet id="PassworsFacet" name="header">Password</f:facet>
#{hot.password}
</h:column>
<h:column id="column4">
<f:facet id="ActionFacet" name="header">Action</f:facet>
<s:link id="viewUsers" value="查看" action="#{chakan.chakan(hot)}"/>
</h:column>
</h:dataTable>
</div>
</a:outputPanel>
阅读全文
类别:seam学习 查看评论
<h:column>
<f:facet name="header">
列标头
</f:facet>
<h:outputText value=""/>
</h:column>
...
</h:column>
<h:column>
<f:facet name="header">
列标头
</f:facet>
<h:commandButton value="删除" action="" />
</h:column>
</rich:dataTable>
主要是看它的数据是如何绑定的~里面还可以添加按钮等元素~
常用的显示查询数据:
<a:outputPanel id="searchResults">
<div class="section">
<h:dataTable id="users" value="#{users}" var="hot" styleClass="tableControl" rendered="#{users.rowCount>0}">
<h:column id="column1">
<f:facet id="UsernameFacet" name="header">Username</f:facet>
#{hot.username}
</h:column>
<h:column id="column2">
<f:facet id="RealnameFacet" name="header">Realname</f:facet>
#{hot.realname}
</h:column>
<h:column id="column3">
<f:facet id="PassworsFacet" name="header">Password</f:facet>
#{hot.password}
</h:column>
<h:column id="column4">
<f:facet id="ActionFacet" name="header">Action</f:facet>
<s:link id="viewUsers" value="查看" action="#{chakan.chakan(hot)}"/>
</h:column>
</h:dataTable>
</div>
</a:outputPanel>
阅读全文
类别:seam学习 查看评论