smartgwt pro5.0, 2014-09-11
I'm trying, but getting an error here's what i do:
However, i get this error:
java.lang.IllegalStateException: Cannot access property applyButton before the widget has been created.
But i created it myself?
Am i missing something obvious?
EDIT: what i'm trying to accomplish is putting a clickhandler on the "apply" so that i can manually set the "intime" value as a starting-value for the "outtime" field, if it is empty. It will save time for the users.
I'm trying, but getting an error here's what i do:
Code:
final DateTimeItem inField = (DateTimeItem) editor.getForms().get(0).getField(Constants.FIELD_INTIME); DateChooser inPicker = new DateChooser(); inPicker.getApplyButton().addIconClickHandler(new com.smartgwt.client.widgets.events.IconClickHandler() { @Override public void onIconClick(com.smartgwt.client.widgets.events.IconClickEvent iconClickEvent) { SC.say("APPLY!! HAHAHAAAAA"); } }); inField.setPickerProperties(inPicker);
java.lang.IllegalStateException: Cannot access property applyButton before the widget has been created.
But i created it myself?
Am i missing something obvious?
EDIT: what i'm trying to accomplish is putting a clickhandler on the "apply" so that i can manually set the "intime" value as a starting-value for the "outtime" field, if it is empty. It will save time for the users.
Comment