Daniel Erez has posted comments on this change.

Change subject: webadmin: 'remove' confirmation dialog message cleanup
......................................................................


Patch Set 1:

(3 comments)

....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/AbstractConfirmationPopupView.java
Line 11: public abstract class AbstractConfirmationPopupView extends 
AbstractModelBoundPopupView<ConfirmationModel> {
Line 12: 
Line 13:     @UiField
Line 14:     @Ignore
Line 15:     public HTML messageHTML = new HTML();
It probably happens since you access 'meesageHTML' before initWidget (which is 
responsible on initialization according to the ui.xml); i.e. just remember to 
access/modify UiBinder widgets after the initWidget statement.
Line 16: 
Line 17:     public AbstractConfirmationPopupView(EventBus eventBus, 
CommonApplicationResources resources) {
Line 18:         super(eventBus, resources);
Line 19:     }


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/view/popup/RemoveConfirmationPopupView.java
Line 75:         force = new EntityModelCheckBoxEditor(Align.RIGHT);
Line 76:         force.setLabel(constants.forceRemove());
Line 77:         this.constants= constants;
Line 78:         this.messages = messages;
Line 79:         setMessageToDefault();
1. should be invoked after 'initWidget'...
2. why is it needed? it's being initialized anyway when calling setMassage. 
3. I'd prefer a simple ternary if: 'super.setMessage(message == null ? 
constants.removeConfirmationPopupMessage() : super.setMessage(message));' [just 
a matter of taste]
Line 80:         initWidget(ViewUiBinder.uiBinder.createAndBindUi(this));
Line 81:         ViewIdHandler.idHandler.generateAndSetIds(this);
Line 82:         localize(constants);
Line 83:         driver.initialize(this);


Line 88:     }
Line 89: 
Line 90:     @Override
Line 91:     public void setMessage(String message) {
Line 92:         if (message == null) {
see above
Line 93:             setMessageToDefault();
Line 94:         }
Line 95:         else {
Line 96:             super.setMessage(message);


-- 
To view, visit http://gerrit.ovirt.org/20471
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7411dec0eaf8d60cefff563988618f7c548eecce
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to