Details

    • Type: Bug Fix
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 2.6
    • Security Level: Public (Public: Anyone can view)
    • Labels:
    • Rice Team:
      Framework
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      UIF Component
    • Application Requirement:
      Rice
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      8

      Description

      Table collections with richtable (Datatables plugin) that has more than one page does not bind the hidden page's altered data on page submit.

      To simulate :

      • open table collection with more than one page
      • change data on first page
      • navigate to second page on collection
      • do page submit
      • debug in controller to see the collection data
      • the changed data on the first page is missing

      This seems like a known issue with the Datatables plugin.
      http://www.datatables.net/forums/discussion/185/submitting-forms-with-fields-on-hidden-pages/p1

        Attachments

          Activity

          Hide
          samuel Samuel Holtzkampf (Inactive) added a comment -

          I have had some success by calling the getNodes on Datatables objects and adding it to the request. I have split it for ajax and page submits.

          Outstanding issues :
          1. The .find('input') selector might not pick up all editable fields in the table. We will need to refine this selector.

          2. When testing on the kitchensink collections the script stops responding when opening the page. It looks like the added script the krad.request.js is causing this :
          "A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue.
          Script: http://localhost:8080/kr-dev/krad/plugins/jquery/jquery-1.8.3.js:5001"

          3. There is a fnGetHiddenNodes plugin for DataTables that can be used to only add the hidden pages

          The Code :

          In krad.request.js

          // called to make the request and handle the response
          send: function () {
          var data = {};

          // KULRICE-9633 start
          var oTables = getAllDataTableHandles();
          jQuery.each(oTables, function (index, value) {
          if (this.ajaxSubmit == true)

          { jQuery.extend(data, jQuery(value.fnGetNodes()).find('input')); }

          else

          { jQuery(value.fnGetNodes()).find('input').appendTo(jQuery('form')); }

          });
          // KULRICE-9633 end

          And in krad.utility.js

          /**

          • Returns a list of all DataTable handles
            *
          • @param parent (optional) the parent object to search from
          • @returns {Array}

            */
            function getAllDataTableHandles(parent) {
            var oTables = [];
            if (parent)

            Unknown macro: { jQuery("table.dataTable", parent).each(function (index, value) { oTables.push(getDataTableHandle(jQuery(value).attr('id'))); });
            }else{
            jQuery("table.dataTable").each(function (index, value) { oTables.push(getDataTableHandle(jQuery(value).attr('id'))); }); }

            return oTables;
            }

          Show
          samuel Samuel Holtzkampf (Inactive) added a comment - I have had some success by calling the getNodes on Datatables objects and adding it to the request. I have split it for ajax and page submits. Outstanding issues : 1. The .find('input') selector might not pick up all editable fields in the table. We will need to refine this selector. 2. When testing on the kitchensink collections the script stops responding when opening the page. It looks like the added script the krad.request.js is causing this : "A script on this page may be busy, or it may have stopped responding. You can stop the script now, open the script in the debugger, or let the script continue. Script: http://localhost:8080/kr-dev/krad/plugins/jquery/jquery-1.8.3.js:5001 " 3. There is a fnGetHiddenNodes plugin for DataTables that can be used to only add the hidden pages The Code : In krad.request.js // called to make the request and handle the response send: function () { var data = {}; // KULRICE-9633 start var oTables = getAllDataTableHandles(); jQuery.each(oTables, function (index, value) { if (this.ajaxSubmit == true) { jQuery.extend(data, jQuery(value.fnGetNodes()).find('input')); } else { jQuery(value.fnGetNodes()).find('input').appendTo(jQuery('form')); } }); // KULRICE-9633 end And in krad.utility.js /** Returns a list of all DataTable handles * @param parent (optional) the parent object to search from @returns {Array} */ function getAllDataTableHandles(parent) { var oTables = []; if (parent) Unknown macro: { jQuery("table.dataTable", parent).each(function (index, value) { oTables.push(getDataTableHandle(jQuery(value).attr('id'))); }); }else{ jQuery("table.dataTable").each(function (index, value) { oTables.push(getDataTableHandle(jQuery(value).attr('id'))); }); } return oTables; }
          Hide
          cniesen Claus Niesen added a comment -

          Confirmed that this is still an issue in 2.5.

          Show
          cniesen Claus Niesen added a comment - Confirmed that this is still an issue in 2.5. KRAD Demo select Travel Authorization Document enter Description and Primary Destination Id enter enough actual expenses records to create second page save document Reopen document via doc search http://env14.rice.kuali.org/kew/DocumentSearch.do http://localhost:8080/krad-dev/kew/DocumentSearch.do change first record in table page to second page of table save document verify change persisted by paging back on confirmation screen (or opening the document via doc search again)

            People

            • Assignee:
              Unassigned
              Reporter:
              samuel Samuel Holtzkampf (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: