Einav Cohen has posted comments on this change.
Change subject: webadmin: Use ConfigCommon version in AsyncDataProvider
......................................................................
Patch Set 1: (1 inline comment)
....................................................
File
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/dataprovider/AsyncDataProvider.java
Line 154: Frontend.RunQuery(VdcQueryType.GetDefaultConfigurationVersion,
Line 155: new VdcQueryParametersBase(),
Line 156: callback);
Line 157: }
Line 158:
indeed - I guess that those side-effects has something to do with the two lines
that have remained in the OnSuccess method:
LoginModel loginModel = (LoginModel) model;
loginModel.getLoggedInEvent().raise(loginModel, EventArgs.Empty);
I assume that if the call to getDefaultConfigurationVersion() will be replaced
with these two lines in the initCache() method (below), everything will work
appropriately and there will be no need to keep the
getDefaultConfigurationVersion() method anymore.
In any case - there is no justification for keeping the Frontend.RunQuery call
to the GetDefaultConfigurationVersion query - this is an unnecessary round-trip
to the server which we want to avoid; there is no problem keeping the
"getDefaultConfigurationVersion()" method if it will contain only the two lines
that I mentioned above, however in that case it will probably make sense to
rename this method to something like "raiseLoggedInEvent".
Line 159: public static void initCache(LoginModel loginModel) {
Line 160: AsyncDataProvider.CacheConfigValues(new
AsyncQuery(loginModel, new INewAsyncCallback() {
Line 161: @Override
Line 162: public void OnSuccess(Object target, Object returnValue) {
--
To view, visit http://gerrit.ovirt.org/11174
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4c9213aee9182d3bb27fbba04f7163b502438a3e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Einav Cohen <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches