1 Reply Latest reply on Apr 29, 2011 9:02 AM by Christy Christy

    rich:scrollableDataTable sorting not working properly

    Christy Christy Novice

      Hi to everyone!

      I have a problem with scrollableDataTable sorting. When I click to sort the structure of the table crashes.

      Html code:

       

      <a4j:outputPanel id="componentPanelAjax" ajaxRendered="true">

      <rich:panel id="processInstancesPanel" rendered="#{extendedNodesComponentsBean.taskselected}">

          <f:facet name="header">

              <f:loadBundle var="mess1" basename="messages_ru"></f:loadBundle>

              <h:outputText

                      value="#{mess1.instancesdetails} #{extendedNodesComponentsBean.taskID}  #{mess1.component} #{extendedNodesComponentsBean.compID}"/>

          </f:facet>

          <rich:scrollableDataTable id="t3" frozenColCount="1"

                                    sortMode="single"

                                    selection="#{scrollableTableInstancesBean.processSelection}"

                                    rowKey="#{instances.instanceID}"

                                    value="#{extendedNodesComponentsBean.processInstancesList}" var="instances"

                                    width="1190px" height="110px"

                  >

              <rich:column label="InstID" width="200px" id="instanceID" sortable="true" sortBy="#{instances.instanceID}"

                      >

                  <f:facet name="header">

                      <f:loadBundle var="mess1" basename="messages_ru"></f:loadBundle>

                      <h:outputText value="#{mess1.instID}"/>

                  </f:facet>

                  <h:outputText value="#{instances.instanceID}"/>

              </rich:column>

              <rich:column label="Date planned" width="200px" id="planned" sortable="true" sortBy=""

                      >

                  <f:facet name="header">

                      <f:loadBundle var="mess1" basename="messages_ru"></f:loadBundle>

                      <h:outputText value="#{mess1.instPlan}"/>

                  </f:facet>

                  <h:outputText value="#{instances.datePlanned}"/>

              </rich:column>

              <rich:column label="Date started" width="200px" sortable="true" sortBy=""

                      >

                  <f:facet name="header">

                      <f:loadBundle var="mess1" basename="messages_ru"></f:loadBundle>

                      <h:outputText value="#{mess1.instStarted}"/>

                  </f:facet>

                  <h:outputText value="#{instances.dateStarted}"/>

              </rich:column>

              <rich:column label="Date finished" width="150px" sortable="true" sortBy=""

                      >

                  <f:facet name="header">

                      <f:loadBundle var="mess1" basename="messages_ru"></f:loadBundle>

                      <h:outputText value="#{mess1.instFin}"/>

                  </f:facet>

                  <h:outputText value="#{instances.dateFinished}"/>

              </rich:column>

              <rich:column label="Data volume" width="210px" sortable="true" sortBy=""

                      >

                  <f:facet name="header">

                      <f:loadBundle var="mess1" basename="messages_ru"></f:loadBundle>

                      <h:outputText value="#{mess1.instVol}"/>

                  </f:facet>

                  <h:outputText value="#{instances.dataVolume}"/>

              </rich:column>

              <rich:column label="Log level" width="200px" sortable="true" sortBy=""

                      >

                  <f:facet name="header">

                      <f:loadBundle var="mess1" basename="messages_ru"></f:loadBundle>

                      <h:outputText value="#{mess1.instLog}"/>

                  </f:facet>

                  <h:outputText value="#{instances.logLevel}"/>

              </rich:column>

              <rich:column label="Err type" width="100px" sortable="true" sortBy=""

                      >

                  <f:facet name="header">

                      <f:loadBundle var="mess1" basename="messages_ru"></f:loadBundle>

                      <h:outputText value="#{mess1.instErr}"/>

                  </f:facet>

                  <h:outputText value="#{instances.errorType}"/>

              </rich:column>

              <rich:column label="Err mess" width="200px" sortable="true" sortBy=""

                      >

                  <f:facet name="header">

                      <f:loadBundle var="mess1" basename="messages_ru"></f:loadBundle>

                      <h:outputText value="#{mess1.instMess}"/>

                  </f:facet>

                  <a4j:commandLink value="#{instances.errorMessage}" event="onClick">

                  </a4j:commandLink>

              </rich:column>

          </rich:scrollableDataTable>

      </rich:panel>

      </a4j:outputPanel>

      The part of bean:

       

      @Name("scrollableTableInstancesBean")

      public class ScrollableTableInstancesBean {

          private String sortMode = "single";

          private SimpleSelection processSelection;

          private ScrollableTableDataModel tableDataModel;

          private UIScrollableDataTable table;

      Attached are two screenshorts. first one is before sorting and second - after.

      Many thanks,

      Kristina