0

I have an issue with the visibility of columns after applying sorting over any of columns.

I am attaching the screen-shots of GUI:

before hiding the colmnns : before hiding the columns

After hiding first two columns : after hiding first two columns

After applying the sort on the first column after hiding :

After applying the sort on the first column after hiding

As you can see in the images that sorting the datatable by first column is producing inconsistent results.Below is the code of my datatable:

   <composite:implementation>
    <p:dataTable id="tbl" var="item"
                 value="#{cc.attrs.searchAndConsultSecuritiesEntriesResultsPanel.results}"
                 selectionMode="single"
                 selection="#{cc.attrs.searchAndConsultSecuritiesEntriesResultsPanel.selectedItem}"
                 rowKey="#{item.referenceInstruction}"
                 paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                 currentPageReportTemplate="{startRecord}-{endRecord}"
                 paginator="true"
                 rows="50"
                 rowsPerPageTemplate="10,20,50"
                 draggableColumns="true"
                 resizableColumns="true"
                 tableStyle="width: auto"
            emptyMessage="#{applicationMsg['emptylist.label']}">
        <f:facet name="header">
            <h:outputFormat value="#{applicationMsg['tabview.searchresult.label']}">
                <f:param value="#{cc.attrs.searchAndConsultSecuritiesEntriesResultsPanel.results.size()}"/>
            </h:outputFormat>
            <p:commandButton id="toggler" type="button" value="#{applicationMsg['button.columns.label']}"
                             icon="ui-icon-calculator"/>
            <p:columnToggler datasource="tbl" trigger="toggler">
            </p:columnToggler>
        </f:facet>

I am completely clueless about this issue.It looks like a bug with Primefaces api.I am using Primefaces vesrion 5.3

Could somebody please help me regarding this

Ankit Tripathi
  • 405
  • 4
  • 13
  • If you think it is a bug, always, always, always try a newer version (latest) first – Kukeltje Nov 10 '16 at 12:17
  • @Kukeltje Right now we can't go for upgrade.Over that I just think it's a bug.I haven't found anything significant about this over internet – Ankit Tripathi Nov 10 '16 at 12:29
  • I never said to upgrade. I said to *TRY* a newer version. Just to know if the same thing happens in the latest version too. Only then we know it either still is a bug or was a 'bug' and got fixed – Kukeltje Nov 10 '16 at 12:32
  • Oh and btw: http://stackoverflow.com/questions/39717800/primefaces-datatable-with-column-toggler-conflicts-with-sort-function-on-column and http://stackoverflow.com/questions/29817830/primefaces-columntoggler-doesnt-work-with-pagination and – Kukeltje Nov 10 '16 at 12:44
  • @Kukeltje..thank you for direction..:-) – Ankit Tripathi Nov 10 '16 at 14:33
  • It seems like the latest version still have bug – AI. Nov 11 '16 at 03:47
  • http://stackoverflow.com/questions/40540523/visible-false-unhide-a-column-again-when-sortby-is-clicked – AI. Nov 11 '16 at 03:47

0 Answers0