如何自定义显示标签库x项找到的默认消息,显示1到4 ...

时间:2017-05-16 15:49:44

标签: java jsp displaytag

我正在使用Display Tag库进行一些分页和排序。到目前为止它工作得很好,但我需要将默认消息x items found, displaying 1 to 4..更改为下面的屏幕截图。我已根据我的需要更改了一些表属性,但屏幕截图中的那个似乎有些奇怪。如何在显示标签中实现此目的。

enter image description here

代码:

<display:table id="data" name="intgList" requestURI="/integration/viewIntegration" class="fieldLabelCell" pagesize="4">
    <!-- Setting table properties -->
    <display:setProperty name="basic.empty.showtable" value="true" />
    <display:setProperty name="paging.banner.placement" value="bottom" />
    <display:setProperty name="paging.banner.no_items_found" value=""></display:setProperty>
    <display:setProperty name="basic.msg.empty_list_row" value=""></display:setProperty>
    <!-- Displaying columns data -->
    <display:column property="lob" title="Line of<br>Business" sortable="true" class="displayColumns" />
    <display:column property="insuredName" title="Insured" sortable="true"  class="displayColumns"/>
    <display:column property="custPhone" title="Customer<br>Phone" sortable="true"  class="displayColumns" />
    <display:column property="policyNumber" title="Policy #" sortable="true" class="displayColumns" />
    <display:column property="createdDate" title="E-Sign<br>Created Date" sortable="true" class="displayColumns" />
    <display:column property="custEmail" title="Customer<br>Email" sortable="true" class="displayColumns" />
    <display:column property="esignNumDocs" title="# of E-Sign Documents" sortable="true" class="displayColumns"  />
</display:table>

1 个答案:

答案 0 :(得分:0)

我得到了它的工作。这是解决方案。唯一的事情是添加图像而不是硬编码小于和大于标志。基本上我不得不重写表属性。以下是完整的代码段。

<display:table id="data" name="intgList" requestURI="/integration/viewIntegration" class="fieldLabelCell" pagesize="2" sort="list">
        <!-- Setting table properties -->
        <display:setProperty name="basic.empty.showtable" value="true" />
        <display:setProperty name="paging.banner.placement" value="top" />
        <display:setProperty name="basic.msg.empty_list_row" value=""></display:setProperty>
        <display:setProperty name="paging.banner.group_size" value="2"></display:setProperty>
        <display:setProperty name="paging.banner.no_items_found" value=""></display:setProperty>
        <display:setProperty name="paging.banner.page.separator" value=" of "></display:setProperty>
        <display:setProperty name="paging.banner.first" value='<span class="pagelinks"> |< << | Page {0}<a href="{3}"> | >> </a><a href="{4}">>|</a></span>'></display:setProperty>
        <display:setProperty name="paging.banner.last" value='<span class="pagelinks"> <a href="{1}">|< </a> <a href="{2}"> << | Page </a> {0} | >> >| </span>'></display:setProperty>
        <display:setProperty name="paging.banner.full" value='<span class="pagelinks"> <a href="{1}">|< </a> <a href="{2}"><<</a> {0}<a href="{3}"> | >> </a><a href="{4}">>| </a></span>'></display:setProperty>
        <!-- Displaying columns data -->
        <display:column property="lob" title="Line of<br>Business" sortable="true" class="displayColumns" />
        <display:column property="insuredName" title="Insured" sortable="true"  class="displayColumns"/>
        <display:column property="custPhone" title="Customer<br>Phone" sortable="true"  class="displayColumns" />
        <display:column property="policyNumber" title="Policy #" sortable="true" class="displayColumns" />
        <display:column property="createdDate" title="E-Sign<br>Created Date" sortable="true" class="displayColumns" />
        <display:column property="custEmail" title="Customer<br>Email" sortable="true" class="displayColumns" />
        <display:column property="esignNumDocs" title="# of E-Sign Documents" class="displayColumns"  />
    </display:table>
相关问题