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!
Hi, How can I use InferInstanceFor(<entity>, <relationship>) function in a excel ? Regards
The only thing I can think of to look at first would be if the keyAttributes value that you have set in your DataProvider is truly a uniqueId and you do not have duplicates in your dataset.
I have faced similar issue and the suggestion solved. I was using a column 'code' as id Attribute where in reality it is not unique between rows. So changed the idAttribute to 'id' instead of 'code'.(Note: 'id' is not a column. It just took its own ref). Then the data got auto refreshed as soon as the observable is changed.
----------------------------------------------------------------------------------------- JS code -----------------------------------------
self.testArr = ko.observableArray();
//self.testDS = new PagingDataProviderView(new ArrayDataProvider(self.testArr, { idAttribute: 'code' })); ===> REFRESH NOT WORKING
self.testDS = new PagingDataProviderView(new ArrayDataProvider(self.testArr, { idAttribute: 'id' })); //// REFRESH WORKING
self.testCols = ko.observable();
self.testCols([{
"headerText": "code",
"field": "code",
"id": "test_code"
},
{
"headerText": "amount",
"field": "amnt",
"id": "test_amnt"
}
]);
var dir1 ={ "code":"c1","amnt":100 };
self.testArr.push(dir1);
var dir2 ={ "code":"c1","amnt":20 };
self.testArr.push(dir2);
-----------table------------------------------------------------------------------------------------------------------------------
<oj-table aria-label="Test Table" id="test-details-table" data='[[testDS]]'
selection-mode='{"row": "single", "column": "multiple"}' columns='[[testCols]]'
columns-default='{"sortable": "disabled" }' row-renderer="[[testTableRowRenderer]]"
scroll-policy='loadMoreOnScroll' class="width100">
<oj-paging-control class="lastTab" id="test_paging" data='[[testDS]]'
page-options='{"type":"Number"}' page-size='5' slot='bottom'>
</oj-paging-control>
</oj-table>
------------------------------------------------------------------------------------------------------------------------------------
Check by changing keyAttributes --> from 'departmentId' ti 'id'
For completeness sake, let me make the following remarks:
Source: https://www.oracle.com/webfolder/technetwork/jet/jsdocs/ArrayDataProvider.html#constructor-section