Browser: FF 3.6.13
SmartGWT: 2.2 and 2.4 (development snapshot Wed. Dec. 22)
I'm using FilterBuilder to submit AdvancedCriteria to my rest data service. The data source for the filter builder uses DataSourceDateTimeFields but the time is not being included in the criteria submitted to the server.
I've created a simple example that shows that the criteria generated does not included the time with the date (I was wondering if setting the editor was the problem so I tried with and without):
The console shows the following in the RPCRequest:
Having the time is critical for our use case. Is there something I missed or a workaround to get the time submitted?
SmartGWT: 2.2 and 2.4 (development snapshot Wed. Dec. 22)
I'm using FilterBuilder to submit AdvancedCriteria to my rest data service. The data source for the filter builder uses DataSourceDateTimeFields but the time is not being included in the criteria submitted to the server.
I've created a simple example that shows that the criteria generated does not included the time with the date (I was wondering if setting the editor was the problem so I tried with and without):
Code:
public class DateTest implements EntryPoint { class MyDataSource extends DataSource { public MyDataSource() { DataSourceDateTimeField dtf = new DataSourceDateTimeField("dtf", "DTF with editor"); DateTimeItem editor = new DateTimeItem(); editor.setUseTextField(true); editor.setTextAlign(Alignment.LEFT); dtf.setEditorType(editor); DataSourceDateTimeField dtf2 = new DataSourceDateTimeField("datef", "DTF no editor"); setFields(dtf,dtf2); } } public void onModuleLoad() { final MyDataSource ds = new MyDataSource(); VLayout vl = new VLayout(); final FilterBuilder fb = new FilterBuilder(); fb.setDataSource(ds); IButton button = new IButton("Submit"); button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { ds.fetchData(fb.getCriteria()); } }); vl.addMember(fb); vl.addMember(button); vl.draw(); } }
Code:
"params":{ "_constructor":"AdvancedCriteria", "operator":"and", "criteria":[ { "fieldName":"dtf", "operator":"equals", "value":"2010-12-01" }, { "fieldName":"datef", "operator":"equals", "value":"2010-12-23" } ] },
Comment