Lior Vernia has posted comments on this change. Change subject: webadmin: Network dialog- field validation indication for tabs ......................................................................
Patch Set 2: (2 comments) Maybe there's a more generic way to achieve this? Perhaps in the AbstractValidatedWidget.markAs[In]Valid() also traverse up to the containing widgets, and also mark those that implement HasValidation? Then containing widgets such as panels will have to remember which contained widgets of theirs had been marked as invalid, so that only when all previously invalid widgets are marked as valid, the panel itself will be marked as valid. This probably merits a new interface, HasCompositeValidation, that will extend HasValidation and will currently only be implemented by DialogTab. What do you think? It's a little complicated conceptually, but practically I don't think it'd take a lot of code and will save all this boiler plate code (with the property changed events) here and elsewhere. http://gerrit.ovirt.org/#/c/30664/2/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/NetworkModel.java: Line 76: private UICommand addQosCommand; Line 77: private final Network network; Line 78: private final ListModel sourceListModel; Line 79: private boolean isGeneralTabValid; Line 80: private boolean isVnicProfileTabValid; You're missing the subnets tab, available when the network is marked to be exported. Line 81: Line 82: public NetworkModel(ListModel sourceListModel) Line 83: { Line 84: this(new Network(), sourceListModel); Line 497: getNetworkLabel().validateSelectedItem(new IValidation[] { new AsciiNameValidation() }); Line 498: Line 499: setIsGeneralTabValid(getName().getIsValid() && getVLanTag().getIsValid() && getDescription().getIsValid() Line 500: && getMtu().getIsValid() && getExternalProviders().getIsValid() && getComment().getIsValid() Line 501: && subnetValid && getNetworkLabel().getIsValid()); subnetValid should be the input for the subnets tab's validation. Line 502: setIsVnicProfileTabValid(profilesValid); Line 503: return getIsGeneralTabValid() && getIsVnicProfileTabValid(); Line 504: } Line 505: -- To view, visit http://gerrit.ovirt.org/30664 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8b9cfd6d4c8fcb4768c99c42393dd0d0c72f7cbd Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <[email protected]> Gerrit-Reviewer: Alona Kaplan <[email protected]> Gerrit-Reviewer: Lior Vernia <[email protected]> Gerrit-Reviewer: [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
