ICEfaces
  1. ICEfaces
  2. ICE-11374

ace:dataTable, preserve column pinning order after reloading the page

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.2
    • Fix Version/s: 4.3
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Any

      Description

      There exists already some code that aims at preserving the current pinning state of the columns in a table. However, it doesn't seem to be working, since the pinning state of all columns is reset when reloading the page, even if the 'pinningOrder' attributes of the ace:column components are associated to a session-scoped bean. This JIRA is to fix this functionality.

        Issue Links

          Activity

          Arturo Zambrano created issue -
          Arturo Zambrano made changes -
          Field Original Value New Value
          Assignee Arturo Zambrano [ artzambrano ]
          Arturo Zambrano made changes -
          Fix Version/s 4.3 [ 13096 ]
          Hide
          Arturo Zambrano added a comment - - edited

          r52109: fixed JSON parsing issue that was preventing the columns to be pinned again when reloading the page and in other cases as well

          Notes:
          This is what is meant when talking about preserving the column pinning order after reloading the page: if the columns of a table have a value in their 'pinningOrder' property on the server side, these columns should be pinned in such order when first loading the page or when reloading the page. The pinning order is preserved only if the app developer added some code for this purpose. The pinning order doesn't have to preserve the pinning order across reloads, just as selected rows in a table become unselected after reloading the page, unless there's a row state map object with a window or session scope.

          When testing this feature, a simple session-scoped bean was created to store the 'pinningOrder' values of some columns in the columnPinning.jsf test page. The bean looks like the following code:

          package org.icefaces.datatable;
          
          import javax.faces.bean.ManagedBean;
          import javax.faces.bean.SessionScoped;
          
          @ManagedBean
          @SessionScoped
          public class OrderBean implements java.io.Serializable {
          
          	private static final long serialVersionUID = 1L;
          
          	private Integer po1;
          	public Integer getPo1() { return po1; }
          	public void setPo1(Integer po1) { this.po1 = po1; }
          
          	private Integer po2;
          	public Integer getPo2() { return po2; }
          	public void setPo2(Integer po2) { this.po2 = po2; }
          
          	private Integer po3;
          	public Integer getPo3() { return po3; }
          	public void setPo3(Integer po3) { this.po3 = po3; }
          }
          

          It was also necessary to add <ace:ajax event="pin" /> to the <ace:datatable> component in order to communicate to the server the pinned state of the client.

          Show
          Arturo Zambrano added a comment - - edited r52109: fixed JSON parsing issue that was preventing the columns to be pinned again when reloading the page and in other cases as well Notes: This is what is meant when talking about preserving the column pinning order after reloading the page: if the columns of a table have a value in their 'pinningOrder' property on the server side, these columns should be pinned in such order when first loading the page or when reloading the page. The pinning order is preserved only if the app developer added some code for this purpose. The pinning order doesn't have to preserve the pinning order across reloads, just as selected rows in a table become unselected after reloading the page, unless there's a row state map object with a window or session scope. When testing this feature, a simple session-scoped bean was created to store the 'pinningOrder' values of some columns in the columnPinning.jsf test page. The bean looks like the following code: package org.icefaces.datatable; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; @ManagedBean @SessionScoped public class OrderBean implements java.io.Serializable { private static final long serialVersionUID = 1L; private Integer po1; public Integer getPo1() { return po1; } public void setPo1( Integer po1) { this .po1 = po1; } private Integer po2; public Integer getPo2() { return po2; } public void setPo2( Integer po2) { this .po2 = po2; } private Integer po3; public Integer getPo3() { return po3; } public void setPo3( Integer po3) { this .po3 = po3; } } It was also necessary to add <ace:ajax event="pin" /> to the <ace:datatable> component in order to communicate to the server the pinned state of the client.
          Arturo Zambrano made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #52109 Tue Nov 28 15:23:00 MST 2017 art.zambrano ICE-11374 fixed JSON parsing issue that was preventing the columns to be pinned again when reloading the page and in other cases as well
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/ace/component/resources/icefaces.ace/datatable/datatable.js
          Hide
          Arturo Zambrano added a comment -

          r52118: added example for saving column pinning state in the server

          Show
          Arturo Zambrano added a comment - r52118: added example for saving column pinning state in the server
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #52118 Thu Nov 30 14:50:09 MST 2017 art.zambrano ICE-11374 added example for saving column pinning state in the server
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/resources/org/icefaces/samples/showcase/view/resources/messages.properties
          Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataTable/dataTablePinning.xhtml
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #52451 Tue May 15 10:19:15 MDT 2018 art.zambrano ICE-11374 added ajax event for the unpin event as well, for state-saving purposes
          Files Changed
          Commit graph MODIFY /icefaces4/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/ace/dataTable/dataTablePinning.xhtml
          Hide
          Arturo Zambrano added a comment -

          r52451: added ajax event for the unpin event as well, for state-saving purposes

          Show
          Arturo Zambrano added a comment - r52451: added ajax event for the unpin event as well, for state-saving purposes
          Arturo Zambrano made changes -
          Link This issue blocks ICE-11418 [ ICE-11418 ]
          Ken Fyten made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Arturo Zambrano
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: