p:primefaces中的dataTable

时间:2014-03-05 09:06:58

标签: primefaces

第一个名字和姓氏是超出20个字符的表格。 我正在使用filterstyle如何克服这个问题 请帮帮我....

<p:dataTable var="societymember" id="updateMember"  selectionMode="single"
        value="#{addPresidentform.tableDataList}" rowIndexVar="row" widgetVar="searchMember"
        rowKey="#{societymember.firstName}" paginator="true" rows="20" rowsPerPageTemplate="20,50,100"
        paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks}
        {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" style="width:920">
        <!-- selection="#{addPresidentform.tableData}"  -->
        <f:facet name="header" >
        <p:spacer width="20" />
        <div style="float: right;margin-top: -22px">
        <h:outputText value="#{societyLabels.searchAllFields}" />
        <p:inputText id="globalFilter" onkeyup="searchMember.filter();"/>
        </div>

        </f:facet>

        <p:column headerText="#{societyLabels.SerialNo}" width="5">
        <h:outputText value="#{(row + 1)}" />
        </p:column>
        <p:column id="firstName" headerText="#{societyLabels.Firstname}" filterBy="firstName" filterMatchMode="contains" filterStyle="width: 40px">
        <h:outputText value="#{societymember.firstName}" />
        </p:column>
        <p:column headerText="#{societyLabels.Lastname}" filterBy="lastName" filterMatchMode="contains" filterStyle="width: 40px">
        <h:outputText value="#{societymember.lastName}" style=""/>
        </p:column>
        <p:column id="mobileNo" headerText="#{societyLabels.mobileNo}" filterBy="mobileNo" filterStyle="width: 50px" filterMatchMode="contains" >
        <h:outputText value="#{societymember.mobileNo}" />
        </p:column>
        <p:column headerText="#{societyLabels.unitblock}" filterBy="block" filterMatchMode="contains" filterStyle="width: 20px">
        <h:outputText value="#{societymember.block}" />
        </p:column>
        <p:column headerText="#{societyLabels.floorNumber}" filterBy="floor" filterMatchMode="contains" filterStyle="width:20px">
        <h:outputText value="#{societymember.floor}" />
        </p:column>
        <p:column headerText="#{societyLabels.unitname}" filterBy="units" filterMatchMode="contains" filterStyle="width: 20px">
        <h:outputText value="#{societymember.units}" />
        </p:column>


            </p:dataTable>

see the below attachment

1 个答案:

答案 0 :(得分:0)

<h:outputText>
  <b:truncate length="10"/>
</h:outputText>