G'day,
I am trying to set my data source to use a different date format in a date field.
DataSourceDateField documentDateField = new DataSourceDateField("documentDate", "Date", 10, false);
DateItem dateItem = new DateItem();
dateItem.setName("documentDate");
dateItem.setTitle("Date");
dateItem.setRequired(false);
dateItem.setDisplayFormat(DateDisplayFormat.TOEUROPEANSHORTDATE);
documentDateField.setEditorType(dateItem);
documentDateField.setValueXPath("domain.DataPkgRec/documentDate");
I get the following error if I call documentDateField.setEditorType(dateItem), but if I comment this out, all runs well.
[ERROR] Unable to load module entry point class awd.plm.gwt.document.client.DataPackage (see associated exception for details)
com.google.gwt.core.client.JavaScriptException: (TypeError): Object expected
number: -2146823281
description: Object expected
at com.smartgwt.client.util.JSOHelper.setAttribute(Native Method)
at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:280)
at com.smartgwt.client.widgets.Canvas.addChild(Native Method)
at awd.plm.gwt.document.client.DataPackage.createComponents(DataPackage.java:98)
at awd.plm.gwt.document.client.DataPackage.onModuleLoad(DataPackage.java:41)
How should I effect the rendering of widgets in a data source?
I am trying to set my data source to use a different date format in a date field.
DataSourceDateField documentDateField = new DataSourceDateField("documentDate", "Date", 10, false);
DateItem dateItem = new DateItem();
dateItem.setName("documentDate");
dateItem.setTitle("Date");
dateItem.setRequired(false);
dateItem.setDisplayFormat(DateDisplayFormat.TOEUROPEANSHORTDATE);
documentDateField.setEditorType(dateItem);
documentDateField.setValueXPath("domain.DataPkgRec/documentDate");
I get the following error if I call documentDateField.setEditorType(dateItem), but if I comment this out, all runs well.
[ERROR] Unable to load module entry point class awd.plm.gwt.document.client.DataPackage (see associated exception for details)
com.google.gwt.core.client.JavaScriptException: (TypeError): Object expected
number: -2146823281
description: Object expected
at com.smartgwt.client.util.JSOHelper.setAttribute(Native Method)
at com.smartgwt.client.widgets.BaseWidget.getOrCreateJsObj(BaseWidget.java:280)
at com.smartgwt.client.widgets.Canvas.addChild(Native Method)
at awd.plm.gwt.document.client.DataPackage.createComponents(DataPackage.java:98)
at awd.plm.gwt.document.client.DataPackage.onModuleLoad(DataPackage.java:41)
How should I effect the rendering of widgets in a data source?
Comment