Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get row data from gnatt

spicMar 5 2019 — edited Mar 6 2019

I am building a sample app based on the example given in gnatt chartt as per the jet cookbook:

https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=gantt&demo=selection

Whenever a task is clicked, the task number is updated in the UI right above the chart. I associated a selectionListener to the gnatt as below. Now How to get the label or row object associated with it. I want the entire row data associated with that task.

<oj-gantt id="gantt" aria-label="Project Gantt"

              start="[[projectStartDate]]"

              end="[[projectEndDate]]"

              gridlines.vertic@al="visible"

              selection="{{selectedNodesValue}}"

              selection-mode="[[selectionValue]]"

              major-axis='{

                "scale": "months",

                "zoomOrder": ["quarters", "months", "weeks", "days"]

              }'

              minor-axis='{

                "scale": "weeks",

                "zoomOrder": ["quarters", "months", "weeks", "days"]

              }'

              on-selection-changed="[[selectionListener]]"

              rows="[[data]]"

              style="width:100%;height:300px">

          </oj-gantt>

self.selectionListener = function(event) {

        var items = "";

        var value = event['detail']['value'];

        if(value && value.length > 0) {

          items = value.join(", ");

        }

        if (items === "")

          items = "none";

        self.selectedObjects(items);

      };

Thank for your help.

Comments
Post Details
Added on Mar 5 2019
3 comments
190 views