datatable sorting icon display problem

UI Components for JSF
Post Reply
arvindpal05
Posts: 25
Joined: 30 Aug 2010, 07:56

14 Sep 2010, 14:55

Hi I am using datatable with sorting feature then its icon is working fine for less number of columns but when I am activating overflow auto for horizontal scrolling then sorting icon is coming on top of column header name

Code: Select all

<p:dataTable var="patient" value="#{recentpatlist.patientList}" paginator="false" lazy="false" scrollable="" style="height: 300px;overflow: auto;width: 970px" styleClass="COLUMNHEADERCENTER"> <p:column > <f:facet name="header" > <h:outputText value=""/> </f:facet> <h:outputText value=""/> </p:column> <p:column> <f:facet name="header"> <h:outputText value="" /> </f:facet> <h:outputText value="" styleClass="#{patient.val1}"/> </p:column> <p:column sortBy="#{patient.access_date_time1}"> <f:facet name="header"> <h:outputText value="Accessed At" style="width: 150px;"/> </f:facet> <h:outputText value="#{patient.access_date_time1}" styleClass="gridData" style="width: 150px"/> </p:column> <p:column sortBy="#{patient.episode_type_desc}"> <f:facet name="header"> <h:outputText value="Patient Class" style="width: 150px"/> </f:facet> <h:outputText value="#{patient.episode_type_desc}" styleClass="gridData" style="width: 150px"/> </p:column> <p:column sortBy="#{patient.locn_name}"> <f:facet name="header"> <h:outputText value="Location" style="width: 150px"/> </f:facet> <h:outputText value="#{patient.locn_name}" styleClass="gridData" style="width: 150px" /> </p:column> </p:dataTable>
please guide me(i am using jsf 2.0 PM 2.2 m1 with oc4j)

Thanks
Arvind

arvindpal05
Posts: 25
Joined: 30 Aug 2010, 07:56

19 Sep 2010, 10:02

Hi,
i got the solution i change my code

old code

Code: Select all

<p:column sortBy="#{patient.episode_type}" > 
            <f:facet name="header" > 
                  <h:outputText value="Patient Class"/>
             </f:facet>
         <h:outputText value="#{patient.episode_type}" styleClass="gridData"/>
        </p:column> 
solution code

Code: Select all

<p:column headerText="Patient Class" sortBy="#{patient.episode_type}">                    
                    <h:outputText value="#{patient.episode_type}" styleClass="gridData"/>
                </p:column>
               

Thanks
Arvind

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests