Martin Mucha has posted comments on this change. Change subject: userportal,webadmin: moved duplicate UICommand creation to Factory ......................................................................
Patch Set 9: (1 comment) http://gerrit.ovirt.org/#/c/33317/9/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/scheduling/NewClusterPolicyModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/configure/scheduling/NewClusterPolicyModel.java: Line 222: if (!clusterPolicy.isLocked() || commandType == CommandType.Clone) { Line 223: UICommand onSaveCommand = new UICommandFactory(this).createDefaultOkUiCommand("OnSave"); //$NON-NLS-1$ Line 224: getCommands().add(onSaveCommand); Line 225: UICommand onResetCommand = new UICommand("OnReset", this); //$NON-NLS-1$ Line 226: onResetCommand.setTitle(ConstantsManager.getInstance().getConstants().resetTitle()); > Please see my comment in UICommandFactory, it could provide method to speci yes, but this not what I'm trying to achieve. On top of this, this way I just "save" like, how much, 10 chars? What I want to do, is to have method, which returns resetButton, not a nicer syntax for crafting one myself. Having that method will create situation, that ideally *all* reset buttons are created in one method; they are uniform. Ideally I'd like to wipe all literal out of this ~ i.e. remove "OnReset". Usually UICommand are compared by their identity, so their name serves nothing ~ at least each command with "onWhatever" I saw so far is from this category. Then, in this case, we'd can just create nameless reset UICommand. No "OnSave", no NavigateThroughRidiculouslyLongPathFor.resetTitle(). Line 227: getCommands().add(onResetCommand); Line 228: } Line 229: Line 230: UICommand cancelCommand = new UICommand("Cancel", this); //$NON-NLS-1$ -- To view, visit http://gerrit.ovirt.org/33317 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0b3b1344b1a3819e58de4db5093106bedf5291e6 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@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