Alexander Wels has posted comments on this change. Change subject: userportal,webadmin: Reload on logout ......................................................................
Patch Set 1: (8 comments) http://gerrit.ovirt.org/#/c/30914/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/auth/CurrentUser.java File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/auth/CurrentUser.java: Line 92 Line 93 Line 94 Line 95 Line 96 > onUserLogout() was removed, please remove this @see reference. Done http://gerrit.ovirt.org/#/c/30914/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/system/BaseApplicationInit.java File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/system/BaseApplicationInit.java: Line 116: @Override Line 117: public void onLogout() { Line 118: AsyncQuery query = new AsyncQuery(); Line 119: query.setHandleFailure(true); Line 120: query.setModel(this); > "this" is not a model, rather than a UI infra object (BaseApplicationInit). Done Line 121: query.asyncCallback = new INewAsyncCallback() { Line 122: @Override Line 123: public void onSuccess(Object model, Object ReturnValue) { Line 124: Window.Location.reload(); Line 120: query.setModel(this); Line 121: query.asyncCallback = new INewAsyncCallback() { Line 122: @Override Line 123: public void onSuccess(Object model, Object ReturnValue) { Line 124: Window.Location.reload(); > This is a very important line of code. Done Line 125: } Line 126: }; Line 127: Line 128: frontend.logoffAsync(frontend.getLoggedInUser(), query); Line 144: } Line 145: Line 146: /** Line 147: * <p> Line 148: * Any remaining UiCommon initialization logic should be performed here. > Please update this comment to reflect the purpose of this method, for examp Done Line 149: */ Line 150: protected abstract void beforeLogin(T loginModel); Line 151: Line 152: protected void initUiCommon() { http://gerrit.ovirt.org/#/c/30914/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/CommonModelManager.java File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/CommonModelManager.java: Line 31: MainModelSelectionChangeEvent.fire(eventBus, commonModel.getSelectedItem()); Line 32: } Line 33: }); Line 34: Line 35: commonModel.getSignedOutEvent().addListener(new IEventListener() { > IIRC, since CommonModel#signOut was removed, this listener will never be ca Done Line 36: @Override Line 37: public void eventRaised(Event ev, Object sender, EventArgs args) { Line 38: Line 39: // Clear CommonModel reference after the user signs out, http://gerrit.ovirt.org/#/c/30914/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/ModelInitialized.java File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/ModelInitialized.java: Line 2: Line 3: import com.gwtplatform.dispatch.annotation.GenEvent; Line 4: Line 5: /** Line 6: * Event triggered to tell models to clean themselves up. > Please update this Javadoc to reflect the purpose of this event, for exampl Done Line 7: */ Line 8: @GenEvent Line 9: public class ModelInitialized { Line 10: http://gerrit.ovirt.org/#/c/30914/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/TabModelProvider.java File frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/uicommon/model/TabModelProvider.java: Line 37: // Configure UiCommon dialog handler Line 38: this.popupHandler = new ModelBoundPopupHandler<M>(this, eventBus); Line 39: this.popupHandler.setDefaultConfirmPopupProvider(defaultConfirmPopupProvider); Line 40: Line 41: // Add handler to clean up model > ... bad Javadoc is worse than no Javadoc :-) Done Line 42: eventBus.addHandler(ModelInitializedEvent.getType(), new ModelInitializedEvent.ModelInitializedHandler() { Line 43: @Override Line 44: public void onModelInitialized(ModelInitializedEvent event) { Line 45: initializeModelHandlers(); http://gerrit.ovirt.org/#/c/30914/1/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/system/ApplicationInit.java File frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/system/ApplicationInit.java: Line 80: } Line 81: Line 82: @Override Line 83: protected void beforeLogin(LoginModel loginModel) { Line 84: CommonModelManager.init(eventBus); > To stay consistent with UserPortal ApplicationInit, I'd rather put: Done Line 85: } Line 86: Line 87: @Override Line 88: protected boolean filterFrontendQueries() { -- To view, visit http://gerrit.ovirt.org/30914 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id5c665ed85495b7c4baf4f0984b006ee2a7730f9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Einav Cohen <eco...@redhat.com> Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches