Hello
Seems it's not anymore possible to customise request's data field...
07:19:44.196:MUP6:WARN:Log:Error during addDefaultsRecursively: source property 'data' is a sub-object, but the target object has an existing property of the same name that is not an object. Skipping
isc.B.push.isc.A.addToMasterLog | @ | ISC_Core.js:1292 | |
isc_c_Log_addLogMessage | @ | ISC_Core.js:1290 | |
isc_c_Log_log | @ | ISC_Core.js:1283 | |
logMessage | @ | ISC_Core.js:1272 | |
logWarn | @ | ISC_Core.js:1272 | |
isc_logWarn | @ | ISC_Core.js:67 | |
isc_addDefaultsRecursively | @ | ISC_Core.js:107 | |
isc_DataSource_sendDSRequest | @ | ISC_DataBinding.js:649 | |
isc_DataSource_performDSOperation | @ | ISC_DataBinding.js:642 | |
isc_DataSource_fetchData | @ | ISC_DataBinding.js:593 | |
isc_ResultSet_fetchRemoteData | @ | ISC_DataBinding.js:1689 | |
isc_ResultSet__fetchRemoteData | @ | ISC_DataBinding.js:1684 | |
isc_ResultSet_getRangePaged | @ | ISC_DataBinding.js:1846 | |
isc_ResultSet__getRangePaged | @ | ISC_DataBinding.js:1834 | |
isc_ResultSet_getRange | @ | ISC_DataBinding.js:1666 | |
isc_ListGrid_requestVisibleRows | @ | ISC_Grids.js:1738 | |
isc_Canvas_filterWithCriteria | @ | ISC_Core.js:4822 | |
isc_c_Class_invokeSuper | @ | ISC_Core.js:287 | |
isc_c_Class_Super | @ | ISC_Core.js:279 | |
isc_ListGrid_filterWithCriteria | @ | ISC_DataBinding.js:2277 | |
isc_Canvas__filter | @ | ISC_Core.js:4819 | |
isc_c_Class_invokeSuper | @ | ISC_Core.js:287 | |
isc_c_Class_Super | @ | ISC_Core.js:279 | |
isc_ListGrid__filter | @ | ISC_Grids.js:2406 | |
isc_Canvas_fetchData | @ | ISC_Core.js:4768 | |
isc_Canvas__doInitialFetch | @ | ISC_Core.js:4797 | |
isc_Canvas_doInitialFetch | @ | ISC_Core.js:4796 | |
isc_c_Class_invokeSuper | @ | ISC_Core.js:287 | |
isc_c_Class_Super | @ | ISC_Core.js:279 | |
isc_ListGrid_doInitialFetch | @ | ISC_Grids.js:2058 |
Code:
public class DSRemoteRootChooser extends RestDataSource { private static final String BASENAME = "remoteRootChooser"; protected DSRemoteRootChooser(String context) { setID(BASENAME + "_" + context); setDataURL("/datasources/" + BASENAME); DSRequest requestProperties = new DSRequest(); requestProperties.setData(Collections.singletonMap("context", context)); setRequestProperties(requestProperties); setDataFormat(DSDataFormat.XML); OperationBinding operationBinding = new OperationBinding(); operationBinding.setOperationType(DSOperationType.FETCH); operationBinding.setDataProtocol(DSProtocol.POSTXML); setOperationBindings(operationBinding); DataSourceTextField nameField = new DataSourceTextField("Name"); DataSourceTextField pathField = new DataSourceTextField("Path"); pathField.setHidden(true); pathField.setPrimaryKey(true); setFields(nameField, pathField); } public static DataSource getInstance(String context) { if(null == get(BASENAME + "_" + context)) return new DSRemoteRootChooser(context); return get(BASENAME + "_" + context); } }
Comment