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!

Cookbook Checkbox Tree Error

lilaxparkMay 13 2020 — edited May 19 2020

I am using this example from the cookbook:

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

The json that I am using follows the same structure and I have done the usual ajustements to make the example work on my viewmodel, but ultimately I am getting this error:

Message: row.data.selected is not a function

Similar examples work without problem but the checkbox one that i need doesn't.

That call to data.selected() seems to be the problem in both the html and js code.

I am using OJET 8.1.0.

Full error from Chrome:

VM24035:3 Uncaught (in promise) TypeError: Unable to process binding "attr: function () {

      var evaluatedExprs = {};

      var attrs = Object.keys(attrEvaluators);

      for (var i = 0; i < attrs.length; i++) {

        var attr = attrs[i];

        evaluatedExprs[attr] = attrEvaluators[attr]();

      }

      return evaluatedExprs;

    }"

Message: row.data.selected is not a function

    at eval (eval at _createReplacementEvaluatorForExtend (ojkoshared.js:384), <anonymous>:3:57)

    at ojknockout.js:2734

    at update (knockout-3.5.0.debug.js:4407)

    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout-3.5.0.debug.js:3728)

    at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout-3.5.0.debug.js:2331)

    at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout-3.5.0.debug.js:2288)

    at Function.evaluateImmediate (knockout-3.5.0.debug.js:2253)

    at Object.ko.computed.ko.dependentObservable (knockout-3.5.0.debug.js:2085)

    at knockout-3.5.0.debug.js:3726

    at Object.arrayForEach (knockout-3.5.0.debug.js:168)

Thanks in advance

This post has been answered by lilaxpark on May 19 2020
Jump to Answer
Comments
Post Details
Added on May 13 2020
4 comments
279 views