Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-8450

Issues with overriding datatables options for columns

    Details

    • Type: Bug Fix
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.1
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KRAD
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      With the recent changes for sorting in tables (for grouping support) applications are unable to partially override the column options through datatables now.

      To add back support we can:

      Add the options to the end of the list and these override the ones previously in the list (as opposed to merge) we could add the support back in they are used to by adding a flag (and default it to true)

        Attachments

          Issue Links

            Activity

            Hide
            jkneal Jerry Neal (Inactive) added a comment -

            Message from User Group:

            I'm 98% positive - as positive as I get - that the config below working in M3. You can see the working example here at:
            http://env2.ks.kuali.org/portal.do?channelTitle=Collection%20column%20sorting&channelUrl=http://env2.ks.kuali.org/kr-krad/kitchensink?viewId=KS-KitchenSink-CollectionColumnSorting-View&methodToCall=collection

            The column "Name" has the sort-icon showing which indicates it was sorted by Name, but in fact it is not; it's just sorted by the first column which is the default. And clicking on the Name column does not change the sorting. You can sort by clicking the ID and Date columns.

            Should I file a jira?

            <bean id="KS-KitchenSink-CollectionColumnSorting"
            parent="KS-KitchenSink-Collection-Base">
            <!-- KS-KitchenSink-Collection-Base is in KitchenSinkView.xml;
            parent="Uif-TableCollectionSection" -->

            <!-- simple way to define column sorting:
            <property name="layoutManager.sortableColumns">
            <set>
            <value>id</value>
            <value>name</value>
            <value>date</value>
            </set>
            </property>
            -->

            <!-- define column sorting using the richTable options: -->
            <property name="layoutManager.richTable">
            <!-- see http://datatables.net/ref for all options -->
            <bean parent="Uif-PagedRichTable">
            <property name="templateOptions">
            <map merge="true">
            <!--
            aaSorting defines which column(s) the collection is
            initially sorted by. The default is "[[0,'asc']]" and
            if no sorting is desired the value should just be "[]".
            -->
            <entry key="aaSorting" value="[[1,'asc']]"/>

            <!--
            aoColumnDefs allows customization of individual columns.
            (trial-n-error shows that using 'aoColumns' breaks sorting)
            Here, the 3rd column (description) is marked as unsortable.
            -->
            <entry key="aoColumnDefs"
            value="[

            {'aTargets':[2], 'bSortable':false}

            ]"/>
            </map>
            </property>
            </bean>
            </property>
            </bean>

            Show
            jkneal Jerry Neal (Inactive) added a comment - Message from User Group: I'm 98% positive - as positive as I get - that the config below working in M3. You can see the working example here at: http://env2.ks.kuali.org/portal.do?channelTitle=Collection%20column%20sorting&channelUrl=http://env2.ks.kuali.org/kr-krad/kitchensink?viewId=KS-KitchenSink-CollectionColumnSorting-View&methodToCall=collection The column "Name" has the sort-icon showing which indicates it was sorted by Name, but in fact it is not; it's just sorted by the first column which is the default. And clicking on the Name column does not change the sorting. You can sort by clicking the ID and Date columns. Should I file a jira? <bean id="KS-KitchenSink-CollectionColumnSorting" parent="KS-KitchenSink-Collection-Base"> <!-- KS-KitchenSink-Collection-Base is in KitchenSinkView.xml; parent="Uif-TableCollectionSection" --> <!-- simple way to define column sorting: <property name="layoutManager.sortableColumns"> <set> <value>id</value> <value>name</value> <value>date</value> </set> </property> --> <!-- define column sorting using the richTable options: --> <property name="layoutManager.richTable"> <!-- see http://datatables.net/ref for all options --> <bean parent="Uif-PagedRichTable"> <property name="templateOptions"> <map merge="true"> <!-- aaSorting defines which column(s) the collection is initially sorted by. The default is "[ [0,'asc'] ]" and if no sorting is desired the value should just be "[]". --> <entry key="aaSorting" value="[ [1,'asc'] ]"/> <!-- aoColumnDefs allows customization of individual columns. (trial-n-error shows that using 'aoColumns' breaks sorting) Here, the 3rd column (description) is marked as unsortable. --> <entry key="aoColumnDefs" value="[ {'aTargets':[2], 'bSortable':false} ]"/> </map> </property> </bean> </property> </bean>
            Hide
            jkneal Jerry Neal (Inactive) added a comment -

            Brian,

            Seems like you already took care of this?

            Jerry

            Show
            jkneal Jerry Neal (Inactive) added a comment - Brian, Seems like you already took care of this? Jerry
            Hide
            jcoltrin Jessica Coltrin (Inactive) added a comment -

            Since these were fixed on the trunk, they are 2.3.

            Show
            jcoltrin Jessica Coltrin (Inactive) added a comment - Since these were fixed on the trunk, they are 2.3.

              People

              • Assignee:
                bsmith Brian Smith (Inactive)
                Reporter:
                jkneal Jerry Neal (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: