Hi,
With ojet 5.1, on a new application I added a
<oj-data-grid
id="datagrid"
style="height:200px; max-width:477px"
data="[[dataSource]]"
selection-mode.row="single"
dnd.reorder.row="enable"
header.column.style="width:100px" >
</oj-data-grid>
With the following javascript:
self.collection = new oj.Collection(null, {
model: new oj.Model.extend({idAttribute: 'EMPLOYEE_ID'}),
url: 'http://localhost:3012/employees' # serviced by fake-rest-server (https://www.npmjs.com/package/fake-rest-server )
});
self.dataSource = new oj.CollectionDataGridDataSource(
self.collection, {
rowHeader: 'EMPLOYEE_ID',
columns: ['FIRST_NAME', 'LAST_NAME', 'HIRE_DATE', 'SALARY']
});
I served this using ojet serve.
But this delivers a CORS error in both FF and Chrome.
When I start Chrome with:
c:\Program Files (x86)\Google\Chrome\Application\chrome.exe --disable-web-security --user-data-dir
then it works.
Following https://docs.oracle.com/middleware/jet400/jet/developer/GUID-07537BBC-2EE0-4C82-B815-569D9F5A05E9.htm#JETDG-GUID-07537BB… it should work in Firefox by disabling security.fileuri.strict_origin_policy
But unfortunately that does not do anything.
I also found:
That suggest that using the node http listener it should work, but apparently it doesn't.
Does anyone have a recommendation and/or tip?
Regards,
Martien