GWT: 2.8.1
SmartGWT: 6.0p-2017-05-04
Chrome: 58.0.3029.96 (64-bit)
Java: 1.8.0_111-b14
Reference: http://www.smartclient.com/smartgwt/...ntrols_various
Trying to add a DateRangeItem to a DynamicForm, I get this:
Trace
Test case: attached
I copied it from the showcase.
Any advice?
SmartGWT: 6.0p-2017-05-04
Chrome: 58.0.3029.96 (64-bit)
Java: 1.8.0_111-b14
Reference: http://www.smartclient.com/smartgwt/...ntrols_various
Trying to add a DateRangeItem to a DynamicForm, I get this:
Code:
14:08:00.361:MUP9:WARN:DynamicForm:isc_DynamicForm_0:Problem initializing item: {__ref: {GWT Java Obj}, __module: {GWT Module Obj}, AUTOIDClass: "DateRangeItem", name: "isc_DateRangeItem_0", _autoAssignedName: true, editorType: "DateRangeItem", __sgwtRelink: anonymous(), createCanvas: anonymous(), fromTitle: "From", toTitle: "To", fieldLayout: "horizontal", allowRelativeDates: true, defaultValue: Obj, } - derived FormItem class is: DateRangeItem. If this is not a typo, please make sure the relevant module is loaded. A SpacerItem will be created for this FormItem.
Code:
isc.B.push.isc.A.addToMasterLog @ ISC_Core.js:1138 isc_c_Log_addLogMessage @ ISC_Core.js:1137 isc_c_Log_log @ ISC_Core.js:1130 logMessage @ ISC_Core.js:1119 logWarn @ ISC_Core.js:1119 isc_DynamicForm_createItem @ ISC_Forms.js:243 isc_DynamicForm__addItems @ ISC_Forms.js:231 isc_DynamicForm__setItems @ ISC_Forms.js:226 isc_DynamicForm_initWidget @ ISC_Forms.js:212 isc_Canvas_init @ ISC_Core.js:2142 isc_Class_completeCreation @ ISC_Core.js:325 isc_c_Class_create @ ISC_Core.js:213 FJi_g$ @ DynamicForm.java:204 t1e_g$ @ BaseWidget.java:729 gMi_g$ @ BaseWidget.java:705 qif_g$ @ Layout.java:1736 WEo_g$ @ VerticalLayout.java:150 _Vp_g$ @ TestDateRangeItem.java:135 RVp_g$ @ TestDateRangeItem.java:103 $Vp_g$ @ TestDateRangeItem.java:124 OLp_g$ @ MainLayout.java:119 NLp_g$ @ MainLayout.java:116 JLp_g$ @ MainLayout.java:86 Qdk_g$ @ RecordClickEvent.java:112 Pdk_g$ @ RecordClickEvent.java:111 Jac_g$ @ GwtEvent.java:76 Lkc_g$ @ EventBus.java:40 Wkc_g$ @ SimpleEventBus.java:193 alc_g$ @ SimpleEventBus.java:88 Dkc_g$ @ HandlerManager.java:127 Tw_g$ @ Widget.java:129 (anonymous) @ ListGrid.java:18534 FM_g$ @ Impl.java:239 IM_g$ @ Impl.java:291 (anonymous) @ Impl.java:77 obj_0_g$.onRecordClick @ ListGrid.java:18558 isc_ListGrid_rowClick @ ISC_Grids.js:1673 (anonymous) @ VM630:4 isc_GridRenderer__rowClick @ ISC_Grids.js:701 isc_c_Class_invokeSuper @ ISC_Core.js:275 isc_c_Class_Super @ ISC_Core.js:267 isc_GridBody__rowClick @ ISC_Grids.js:770 isc_GridRenderer_click @ ISC_Grids.js:699 isc_Canvas_handleClick @ ISC_Core.js:3038 isc_c_EventHandler_bubbleEvent @ ISC_Core.js:1711 isc_c_EventHandler_handleClick @ ISC_Core.js:1569 isc_c_EventHandler__handleMouseUp @ ISC_Core.js:1554 isc_c_EventHandler_handleMouseUp @ ISC_Core.js:1545 isc_c_EventHandler_dispatch @ ISC_Core.js:1797 (anonymous) @ VM559:3
Code:
import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.TextItem; import com.smartgwt.client.widgets.form.fields.DateRangeItem; import com.smartgwt.client.widgets.form.fields.ColorPickerItem; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.types.DateFieldLayout; import com.smartgwt.client.data.DateRange; import com.smartgwt.client.data.RelativeDate; public class TestDateRangeItem implements EntryPoint { public void onModuleLoad () { // items final TextItem nameItem = new TextItem ("name", "Name"); final ColorPickerItem colorPickerItem = new ColorPickerItem (); colorPickerItem.setTitle ("Color Picker"); final DateRangeItem dateRangeItem = new DateRangeItem (); // "dates", "Date Range"); dateRangeItem.setFromTitle ("From"); dateRangeItem.setToTitle ("To"); dateRangeItem.setFieldLayout (DateFieldLayout.HORIZONTAL); dateRangeItem.setAllowRelativeDates(true); DateRange dateRange = new DateRange(); dateRange.setRelativeStartDate(RelativeDate.TODAY); dateRange.setRelativeEndDate(new RelativeDate("-1m")); dateRangeItem.setValue(dateRange); /*final DateRange dateRange = new DateRange (); dateRange.setStartDate (new Date ()); dateRange.setEndDate (new Date ()); dateRangeItem.setValue (dateRange);*/ // form final DynamicForm form = new DynamicForm (); form.setFields (nameItem, colorPickerItem, dateRangeItem); // layout form.draw(); }
I copied it from the showcase.
Any advice?
Comment