[Tapestry5] tapestry5 中的grid组建只显示表头

sidang1hao 2007-09-07
   各位朋友,辛苦!
    哪位朋友在grid组件的基础上(新建组件)有如下功能:
    1:原 grid 组建的功能不变
    2:当数据库表中没有数据时 中页面上能显示表的表头(table 中的thead 能显示),而不是There is no date to display .
    请开发过的朋友把原码共享一下,或发我邮箱 :liqianxuec@126.com在线待啊。

急急

    谢谢,有兴趣的朋友也可以写下哦!!
sidang1hao 2007-09-20
用这玩意顶一阵子:
xgrid.java

@SupportsInformalParameters
public class XGrid extends Grid
{

    @Component(parameters =
    { "sortColumnId=sortColumnId", "sortAscending=sortAscending" })
    private GridColumns _emptyColumns;

}

xgrid.html
<div class="t-data-grid" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">

<div t:id="pagerTop"/>

<table class="t-data-grid">
<thead t:id="columns"/>
<tbody>
<tr t:id="rows"/>
</tbody>
</table>

<div t:id="pagerBottom"/>

<t:block>
<div t:id="pager"/>
</t:block>

<t:block id="empty">
<table class="t-data-grid">
<thead t:id="emptyColumns"/>
<tbody>
<tr><td class="empty" colspan="${beanModel.propertyNames.size()}">${message:no_grid_data}</td></tr>
</tbody>
</table>
</t:block>

</div>
Global site tag (gtag.js) - Google Analytics