SmartClient v12.0p_2019-06-20/Pro Deployment 2019-06-20
FireFox
I am trying to populate a ListGrid datasource datetime field from custom executeFetch java code and having trouble with it.
My datasource looks like this:
My java source to fill the List<Map> looks like this:
The above code takes a ResultSet from an appserver call and converts it to Isomorphic's List<Map> ListGrid data via an executeFetch() override. My ListGrid "Date" column is blank; all the other fields are populated. There is no stacktrace or error to speak of. I tried putting the Timestamp object and it doesn't work either. What type of Object do I need to send in the request data to correctly populate the ListGrid datetime column?
Thanks in advance.
FireFox
I am trying to populate a ListGrid datasource datetime field from custom executeFetch java code and having trouble with it.
My datasource looks like this:
Code:
<fields> <field name="rpt_inst" title="ID" type="integer" primaryKey="true" /> <field name="rpt_date" title="Date" type="datetime" /> <field name="rpt_user" title="UserID" type="text" length="50" /> <field name="rpt_no" title="ReportNumber" type="text" length="10" /> <field name="rpt_status" title="Status" type="text" length="10" /> </fields>
Code:
@Override public List<Map> convertResultSet(ResultSet rs) { List<Map> ret = new ArrayList<Map>(); try { while(rs.next()) { Map<String, Object> rec = new HashMap<String, Object>(); rec.put("rpt_inst",rs.getInt("rpt_inst")); Timestamp ts = rs.getTimestamp("rpt_datetime"); Date dt = new Date(ts.getTime()); rec.put("rpt_datetime",dt); rec.put("rpt_user",rs.getString("rpt_user")); rec.put("rpt_no",rs.getString("rpt_no")); rec.put("rpt_status",rs.getString("rpt_status")); ret.add(rec); } } catch (Exception e) { logger.severe("Failed to parse ResultSet"); e.printStackTrace(); } return ret; }
Thanks in advance.
Comment