Alexander Wels has posted comments on this change. Change subject: webadmin : Fix ClassCastException in datetimebox widget ......................................................................
Patch Set 1: (2 comments) https://gerrit.ovirt.org/#/c/40783/1//COMMIT_MSG Commit Message: Line 6: Line 7: webadmin : Fix ClassCastException in datetimebox widget Line 8: Line 9: This patch fixes the ClassCastException obtained from Line 10: recently introduced AssetProvider#addStateUpdateHandler(). You mean AbstractValidatedWidgetWithLabel.addStateUpdateHandler()? Line 11: The issue is with this patch it tries to cast the Line 12: GwtBootstrapDateTimePicker to widget and hence fails Line 13: this was fixed by making it extend from Composite Line 14: which in turn extends from Widget class and casting https://gerrit.ovirt.org/#/c/40783/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/GwtBootstrapDateTimePicker.java File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/widget/editor/GwtBootstrapDateTimePicker.java: Line 20: import com.google.gwt.user.client.TakesValue; Line 21: import com.google.gwt.user.client.ui.Composite; Line 22: import com.google.gwt.user.client.ui.Widget; Line 23: Line 24: public class GwtBootstrapDateTimePicker extends Composite implements TakesValue<Date> { I would simply have this implement 'IsWidget' and fix addStateUpdateHandler() to read this: ((IsWidget) this.getContentWidget()).asWidget().addHandler(new EditorStateUpdateEvent.EditorStateUpdateHandler() { This really doesn't need to extend composite. Line 25: public static final String DEFAULT_DATE_TIME_FORMAT = "mm/dd/yyyy hh:ii";//$NON-NLS-1$ Line 26: public static final String DEFAULT_TIME_FORMAT = "hh:ii P";//$NON-NLS-1$ Line 27: public static final String DEFAULT_DATE_FORMAT = "mm/dd/yyyy";//$NON-NLS-1$ Line 28: private final DateTimePicker dateTimePicker = new DateTimePicker(); -- To view, visit https://gerrit.ovirt.org/40783 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib23eaab6160c814c26cd6a0566263cabed752e3e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: anmolbabu <[email protected]> Gerrit-Reviewer: Alexander Wels <[email protected]> Gerrit-Reviewer: Greg Sheremeta <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Shubhendu Tripathi <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
