[rhq] Branch 'release/jon3.1.x' - 3 commits - modules/enterprise
mike thompson
mithomps at fedoraproject.org
Mon Aug 20 21:11:57 UTC 2012
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java | 50 ++++++++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java | 23 ++++
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java | 1
modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml | 6 +
4 files changed, 77 insertions(+), 3 deletions(-)
New commits:
commit 22971e4a703cf3b2d75142eb5d3926ab902a6b52
Author: Mike Thompson <mithomps at redhat.com>
Date: Mon Aug 20 09:31:13 2012 -0700
[BZ 848529 - Creating a domain deployment spins and never uploads the WAR on IE8]. IE8 had issues registering the listener when the upload was complete. This was a regression caused by smartgwt3.0 upgrade.
(cherry picked from commit 155c66f5fa5ac816de6ce8693875cc746f80096d)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java
new file mode 100644
index 0000000..89c1615
--- /dev/null
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/components/upload/DynamicCallbackFormImplIE8.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.rhq.enterprise.gui.coregui.client.components.upload;
+
+import com.google.gwt.dom.client.Element;
+
+/**
+ * Implementation class used by {@link com.google.gwt.user.client.ui.FormPanel}.
+ */
+public class DynamicCallbackFormImplIE8 extends DynamicCallbackFormImpl {
+
+ @Override
+ public native void hookEvents(Element iframe,
+ DynamicCallbackFormImplHost listener) /*-{
+ if (iframe) {
+ iframe.onreadystatechange = function() {
+ // If there is no __formAction yet, this is a spurious onreadystatechange
+ // generated when the iframe is first added to the DOM.
+ if (!iframe.__formAction)
+ return;
+
+ if (iframe.readyState == 'complete') {
+ // If the iframe's contentWindow has not navigated to the expected action
+ // url, then it must be an error, so we ignore it.
+ listener. at org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImplHost::onFrameLoad()();
+ }
+ };
+ }
+ }-*/;
+
+ @Override
+ public native void unhookEvents(Element iframe) /*-{
+ if (iframe)
+ iframe.onreadystatechange = null;
+ }-*/;
+
+}
\ No newline at end of file
diff --git a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
index 644c893..f79924b 100644
--- a/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
+++ b/modules/enterprise/gui/coregui/src/main/resources/org/rhq/enterprise/gui/coregui/CoreGUI.gwt.xml
@@ -50,6 +50,12 @@
<when-type-is class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImpl"/>
</replace-with>
+ <!-- Special case for IE8 where upload onsubmit handlers need special registration code from other browsers -->
+ <replace-with class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImplIE8">
+ <when-type-is class="org.rhq.enterprise.gui.coregui.client.components.upload.DynamicCallbackFormImpl"/>
+ <when-property-is name="user.agent" value="ie8"/>
+ </replace-with>
+
<generate-with class="org.rhq.enterprise.gui.coregui.user.rebind.rpc.TrackingServiceInterfaceProxyGenerator">
<when-type-assignable class="com.google.gwt.user.client.rpc.RemoteService"/>
commit 30359bc2f6254ab3ecaa0595a0fee3cfaf8c6bec
Author: mtho11 <mikecthompson at gmail.com>
Date: Wed Aug 8 11:45:51 2012 -0700
[BZ 845389 - Group without members with unknown status appears in every availability search result] Get rid of superfluous empty groups that show up as unknown availability.
(cherry picked from commit 15552573391da403073ea1c27a8a9a5ffc969e65)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java
index 2abefa1..45c5103 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/ResourceGroupCompositeDataSource.java
@@ -26,6 +26,7 @@ import static org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGro
import static org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGroupDataSourceField.PLUGIN;
import static org.rhq.enterprise.gui.coregui.client.inventory.groups.ResourceGroupDataSourceField.TYPE;
+import java.util.ArrayList;
import java.util.List;
import com.google.gwt.user.client.rpc.AsyncCallback;
@@ -49,6 +50,7 @@ import org.rhq.enterprise.gui.coregui.client.CoreGUI;
import org.rhq.enterprise.gui.coregui.client.ImageManager;
import org.rhq.enterprise.gui.coregui.client.gwt.GWTServiceLookup;
import org.rhq.enterprise.gui.coregui.client.gwt.ResourceGroupGWTServiceAsync;
+import org.rhq.enterprise.gui.coregui.client.util.Log;
import org.rhq.enterprise.gui.coregui.client.util.RPCDataSource;
import org.rhq.enterprise.gui.coregui.client.util.message.Message;
@@ -107,7 +109,7 @@ public class ResourceGroupCompositeDataSource extends RPCDataSource<ResourceGrou
}
@Override
- public void executeFetch(final DSRequest request, final DSResponse response, ResourceGroupCriteria criteria) {
+ public void executeFetch(final DSRequest request, final DSResponse response, final ResourceGroupCriteria criteria ) {
groupService.findResourceGroupCompositesByCriteria(criteria,
new AsyncCallback<PageList<ResourceGroupComposite>>() {
public void onFailure(Throwable caught) {
@@ -120,10 +122,25 @@ public class ResourceGroupCompositeDataSource extends RPCDataSource<ResourceGrou
response.setStatus(RPCResponse.STATUS_FAILURE);
processResponse(request.getRequestId(), response);
}
+
+ private PageList<ResourceGroupComposite> filterEmptyMemberGroups(ResourceGroupCriteria groupCriteria,
+ PageList<ResourceGroupComposite> result){
+
+ PageList<ResourceGroupComposite> pageList = new PageList<ResourceGroupComposite>(result.getPageControl());
+
+ for (ResourceGroupComposite rgc : result) {
+ if (rgc.getExplicitCount() > 0 ){
+ pageList.add(rgc);
+ }
+ }
+
+ return pageList;
+ }
public void onSuccess(PageList<ResourceGroupComposite> result) {
- response.setData(buildRecords(result));
- response.setTotalRows(result.getTotalSize()); // for paging to work we have to specify size of full result set
+ PageList<ResourceGroupComposite> filteredResult = filterEmptyMemberGroups(criteria,result);
+ response.setData(buildRecords(filteredResult));
+ response.setTotalRows(filteredResult.getTotalSize()); // for paging to work we have to specify size of full result set
processResponse(request.getRequestId(), response);
}
});
commit ce91771299eeccaf599bae77559e633ad68987f8
Author: mtho11 <mikecthompson at gmail.com>
Date: Fri Aug 3 15:02:56 2012 -0700
[BZ 826224 Creation of Compatible Group fails with value too long for type character when a description is entered which is longer then 100 characters] Group names limited now to 100 chars to match DB.
(cherry picked from commit 0aeaf8e9f71ea154e2421e67e29269eea33b762c)
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java
index c4969bd..0fb1785 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/inventory/groups/wizard/GroupCreateStep.java
@@ -75,6 +75,7 @@ public class GroupCreateStep extends AbstractWizardStep {
TextItem name = new TextItem("name", MSG.common_title_name());
name.setRequired(true);
name.setWidth(300);
+ name.setLength(100);
name.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent changedEvent) {
More information about the rhq-commits
mailing list