3 Replies Latest reply on Jul 10, 2018 4:29 PM by John Snyders-Oracle

    getDataElements() function missing in version 18.1

    Jaro Bak

      Hello,

      in version 18.1 there is no getDataElements() function e.g.:

       

      var grid = apex.region("IG01").widget().interactiveGrid("getViews", "grid");

      grid.setSelection( grid.getDataElements().first() );

       

      How to set selected row in this version please ?

       

      Regards.

        • 1. Re: getDataElements() function missing in version 18.1
          John Snyders-Oracle

          Hi,

          Looks like you are trying to select the first row. You don't say when you are trying to do this. It may not be necessary anymore because of the new InteractiveGrid widget option initialSelection that defaults to true. (Note there is a bug related to setting this to false where it doesn't work as expected.)

           

          It is correct that the view interface getDataElements method was removed. It is no longer needed. It had been used internally to select the first record of the grid view but it only worked for grid view and not consistently.

           

          If you do need to set the selection to the first record I recommend this:

          var model = apex.region("emp").call("getViews", "grid").model;

          apex.region("emp").call("setSelectedRecords", [model.recordAt(0)]);

           

          Regards,
          -John

          1 person found this helpful
          • 2. Re: getDataElements() function missing in version 18.1
            Jaro Bak

            Hello,

            I'd like to select the first row during initial page load, and after clearChanges() action.

             

            Your code works so thank you very much for your help.

             

            Just one quick question.

            Is there somewhere an oficial documentantion for IG methods and parameters with examples ?

             

            Regards.

            • 3. Re: getDataElements() function missing in version 18.1
              John Snyders-Oracle

              Is there somewhere an oficial documentantion for IG methods and parameters with examples ?

               

              In 18.1 we planned to have a number of JavaScript widgets and APIs documented that would include interactive grid. We did not meet that goal. A preview of the new JavaScript API Reference can be found here:

              https://docs.oracle.com/database/apex-18.1/AEXJS/index.html

              IG is made up of many widgets so parts of it (grid, iconList, recordView, tableModelView[Base], menu, actions) are included in the preview. Because it is a preview it is incomplete, has omissions, and likely some errors.

              We hope to have an update to this document with the next documentation refresh or next release of APEX.

              Regards,
              -John

              1 person found this helpful