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!

Refresh the Oracle JET Component (ojTable, ojRowExpander)

3300788Oct 5 2017 — edited Oct 11 2017

Hi,

I have the ojTable and ojRowexpander, now I want to refresh it when the data changes.

The ojTable data binding is like this:

self.tableData = ko.observable();

var options = [];

self.tableData(new oj.FlattenedTreeTableDataSource(

       new oj.FlattenedTreeDataSource(

       new oj.JsonTreeDataSource(data), options)

));

When I want to refresh the table data, I can use

self.tableData(new oj.FlattenedTreeTableDataSource(

       new oj.FlattenedTreeDataSource(

       new oj.JsonTreeDataSource(newData), options)

));

which works fine. Now the problem is, it actually re-draw the whole table and rowexpander, for example, if I expand some rows in the table, and I use this method to refresh it, the data refreshed but these rows collapse again. I want the row expanded as before, just the data changes refresh.

I also tried to use refresh method:

$( ".selector" ).ojRowExpander( "refresh" );

$(".ojRowExpander").trigger("refresh");

$( ".selector" ).ojTable( "refresh" );

$(".ojTable").trigger("refresh");

None of these works,

What should I do now?

Thank you!

Comments
Post Details
Added on Oct 5 2017
3 comments
864 views