Using 292 build. Trying to bind a Calendar to a datasource. Using the following code for the Calendar:
RestDataSource dataSource = new RestDataSource() {
};
dataSource.setDataFormat(DSDataFormat.JSON);
dataSource.setFetchDataURL("List.js");
DataSourceIntegerField id = new DataSourceIntegerField("eventId");
id.setPrimaryKey(true);
dataSource.addField(id);
dataSource.addField(new DataSourceTextField("name"));
dataSource.addField(new DataSourceTextField("description"));
dataSource.addField(new DataSourceDateField("startDate"));
dataSource.addField(new DataSourceDateField("endDate"));
calendar.setDataSource(dataSource);
calendar.setAutoFetchData(true);
calendar.draw();
List.js content:
[{“startDate”:“2009-02-16 15:30:00”,“name”:“app”,“eventId”:1,“description”:“app”,“endDate”:“2009-02-16 16:30:00”}]
Tried with “status”:0,data:… with same results.
In the console I see the following:
04:27:10.380:XRP8:INFO:RPCManager:rpcResponse(unstructured) results –>"[{“startDate”:“2009-02-16 15:30:00”,“name”:“app”,“eventId”:1,“description”:“app”,“endDate”:“2009-02-16 16:30:00”}]
"<–
04:27:10.676:XRP8:INFO:ResultSet:isc_ResultSet_22 (created by: isc_OID_0):Received 0 records from server
04:27:11.004:XRP8:DEBUG:ResultSet:isc_ResultSet_22 (created by: isc_OID_0):full length set to: 0
04:27:11.332:XRP8:DEBUG:ResultSet:isc_ResultSet_22 (created by: isc_OID_0):integrating 0 rows into cache at position 0
04:27:11.690:XRP8:INFO:ResultSet:isc_ResultSet_22 (created by: isc_OID_0):cached 0 rows, from 0 to 0 (0 total rows, 0 cached)
04:27:12.065:XRP8:INFO:ResultSet:isc_ResultSet_22 (created by: isc_OID_0):Cache for entire DataSource complete
Thanks in advance.
BTW does the status:0,data:… part is mandatory for responses or plain data would be fine when handling the request on the server?