Author: thomas.heute(a)jboss.com
Date: 2010-10-22 10:44:39 -0400 (Fri, 22 Oct 2010)
New Revision: 4769
Modified:
epp/portal/branches/EPP_5_1_Branch/.classpath
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
JBEPP-554: Can't add a gadget when using Google Chrome 6 on Windows
Modified: epp/portal/branches/EPP_5_1_Branch/.classpath
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/.classpath 2010-10-22 11:50:10 UTC (rev 4768)
+++ epp/portal/branches/EPP_5_1_Branch/.classpath 2010-10-22 14:44:39 UTC (rev 4769)
@@ -10,6 +10,7 @@
<classpathentry excluding="**" kind="src"
output="component/test/jcr/target/test-classes"
path="component/test/jcr/src/test/resources"/>
<classpathentry kind="src"
output="component/identity/target/classes"
path="component/identity/src/main/java"/>
<classpathentry kind="src"
output="component/identity/target/test-classes"
path="component/identity/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="component/identity/target/test-classes"
path="component/identity/src/test/resources"/>
<classpathentry kind="src"
output="component/test/organization/target/classes"
path="component/test/organization/src/main/java"/>
<classpathentry excluding="**" kind="src"
output="component/test/organization/target/classes"
path="component/test/organization/src/main/resources"/>
<classpathentry kind="src"
output="component/test/organization/target/test-classes"
path="component/test/organization/src/test/java"/>
@@ -18,44 +19,57 @@
<classpathentry excluding="**" kind="src"
output="component/common/target/test-classes"
path="component/common/src/test/resources"/>
<classpathentry kind="src"
output="component/resources/target/classes"
path="component/resources/src/main/java"/>
<classpathentry kind="src"
output="component/resources/target/test-classes"
path="component/resources/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="component/resources/target/test-classes"
path="component/resources/src/test/resources"/>
<classpathentry kind="src" output="component/pc/target/classes"
path="component/pc/src/main/java"/>
<classpathentry kind="src"
output="component/pc/target/test-classes"
path="component/pc/src/test/java"/>
<classpathentry excluding="**" kind="src"
output="component/pc/target/test-classes"
path="component/pc/src/test/resources"/>
- <classpathentry kind="src"
output="component/xml-parser/target/classes"
path="component/xml-parser/src/main/java"/>
- <classpathentry kind="src"
output="component/xml-parser/target/test-classes"
path="component/xml-parser/src/test/java"/>
- <classpathentry excluding="**" kind="src"
output="component/xml-parser/target/test-classes"
path="component/xml-parser/src/test/resources"/>
+ <classpathentry kind="src"
output="component/portal/target/classes"
path="component/portal/src/main/java"/>
+ <classpathentry kind="src"
output="component/portal/target/test-classes"
path="component/portal/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="component/portal/target/test-classes"
path="component/portal/src/test/resources"/>
<classpathentry kind="src" output="component/wsrp/target/classes"
path="component/wsrp/src/main/java"/>
<classpathentry kind="src"
output="component/wsrp/target/test-classes"
path="component/wsrp/src/test/java"/>
<classpathentry excluding="**" kind="src"
output="component/wsrp/target/test-classes"
path="component/wsrp/src/test/resources"/>
+ <classpathentry kind="src"
output="component/application-registry/target/classes"
path="component/application-registry/src/main/java"/>
+ <classpathentry kind="src"
output="component/application-registry/target/test-classes"
path="component/application-registry/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="component/application-registry/target/test-classes"
path="component/application-registry/src/test/resources"/>
+ <classpathentry kind="src" output="component/web/target/classes"
path="component/web/src/main/java"/>
+ <classpathentry kind="src"
output="component/web/target/test-classes"
path="component/web/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="component/web/target/test-classes"
path="component/web/src/test/resources"/>
+ <classpathentry kind="src"
output="component/web/resources/target/classes"
path="component/web/resources/src/main/java"/>
+ <classpathentry kind="src"
output="component/web/resources/target/test-classes"
path="component/web/resources/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="component/web/resources/target/test-classes"
path="component/web/resources/src/test/resources"/>
+ <classpathentry kind="src"
output="component/web/controller/target/classes"
path="component/web/controller/src/main/java"/>
+ <classpathentry kind="src"
output="component/web/security/target/classes"
path="component/web/security/src/main/java"/>
+ <classpathentry kind="src"
output="component/web/server/target/classes"
path="component/web/server/src/main/java"/>
+ <classpathentry kind="src"
output="component/web/api/target/classes"
path="component/web/api/src/main/java"/>
+ <classpathentry kind="src"
output="component/web/api/target/test-classes"
path="component/web/api/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="component/web/api/target/test-classes"
path="component/web/api/src/test/resources"/>
<classpathentry kind="src"
output="component/scripting/target/classes"
path="component/scripting/src/main/java"/>
<classpathentry kind="src"
output="component/scripting/target/test-classes"
path="component/scripting/src/test/java"/>
<classpathentry excluding="**" kind="src"
output="component/scripting/target/test-classes"
path="component/scripting/src/test/resources"/>
- <classpathentry kind="src" output="component/web/target/classes"
path="component/web/src/main/java"/>
- <classpathentry kind="src"
output="component/web/target/test-classes"
path="component/web/src/test/java"/>
- <classpathentry excluding="**" kind="src"
output="component/web/target/test-classes"
path="component/web/src/test/resources"/>
- <classpathentry kind="src"
output="component/portal/target/classes"
path="component/portal/src/main/java"/>
- <classpathentry kind="src"
output="component/portal/target/test-classes"
path="component/portal/src/test/java"/>
- <classpathentry excluding="**" kind="src"
output="component/portal/target/test-classes"
path="component/portal/src/test/resources"/>
- <classpathentry kind="src"
output="component/application-registry/target/classes"
path="component/application-registry/src/main/java"/>
- <classpathentry kind="src"
output="component/application-registry/target/test-classes"
path="component/application-registry/src/test/java"/>
+ <classpathentry kind="src"
output="component/management/target/classes"
path="component/management/src/main/java"/>
+ <classpathentry kind="src"
output="component/management/target/test-classes"
path="component/management/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="component/management/target/test-classes"
path="component/management/src/test/resources"/>
+ <classpathentry kind="src" output="gadgets/core/target/classes"
path="gadgets/core/src/main/java"/>
+ <classpathentry kind="src"
output="webui/framework/target/classes"
path="webui/framework/src/main/java"/>
+ <classpathentry kind="src" output="webui/portlet/target/classes"
path="webui/portlet/src/main/java"/>
<classpathentry kind="src" output="webui/core/target/classes"
path="webui/core/src/main/java"/>
<classpathentry kind="src"
output="webui/core/target/test-classes"
path="webui/core/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="webui/core/target/test-classes"
path="webui/core/src/test/resources"/>
<classpathentry kind="src" output="webui/eXo/target/classes"
path="webui/eXo/src/main/java"/>
- <classpathentry kind="src" output="gadgets/core/target/classes"
path="gadgets/core/src/main/java"/>
<classpathentry kind="src" output="webui/portal/target/classes"
path="webui/portal/src/main/java"/>
- <classpathentry kind="src"
output="component/dashboard/target/classes"
path="component/dashboard/src/main/java"/>
- <classpathentry excluding="**" kind="src"
output="component/dashboard/target/classes"
path="component/dashboard/src/main/resources"/>
<classpathentry kind="src"
output="gadgets/eXoGadgets/target/classes"
path="gadgets/eXoGadgets/src/main/java"/>
+ <classpathentry kind="src"
output="webui/dashboard/target/classes"
path="webui/dashboard/src/main/java"/>
+ <classpathentry excluding="**" kind="src"
output="webui/dashboard/target/classes"
path="webui/dashboard/src/main/resources"/>
<classpathentry kind="src"
output="portlet/dashboard/target/classes"
path="portlet/dashboard/src/main/java"/>
<classpathentry kind="src"
output="portlet/exoadmin/target/classes"
path="portlet/exoadmin/src/main/java"/>
<classpathentry kind="src" output="portlet/web/target/classes"
path="portlet/web/src/main/java"/>
- <classpathentry excluding="**" kind="src"
output="server/tomcat/patch/target/classes"
path="server/tomcat/patch/src/main/tomcat"/>
- <classpathentry kind="src"
output="server/tomcat/plugin/target/classes"
path="server/tomcat/plugin/src/main/java"/>
<classpathentry kind="src"
output="server/jboss/plugin/target/classes"
path="server/jboss/plugin/src/main/java"/>
<classpathentry kind="src"
output="examples/extension/config/target/classes"
path="examples/extension/config/src/main/java"/>
<classpathentry kind="src"
output="examples/extension/jar/target/classes"
path="examples/extension/jar/src/main/java"/>
<classpathentry kind="src"
output="examples/portal/config/target/classes"
path="examples/portal/config/src/main/java"/>
<classpathentry kind="src"
output="examples/portal/jar/target/classes"
path="examples/portal/jar/src/main/java"/>
+ <classpathentry kind="src"
output="examples/portlets/api/target/classes"
path="examples/portlets/api/src/main/java"/>
<classpathentry kind="src"
output="examples/portlets/jsfhellouser/target/classes"
path="examples/portlets/jsfhellouser/src/main/java"/>
<classpathentry kind="src"
output="examples/portlets/jsfhellouser/target/test-classes"
path="examples/portlets/jsfhellouser/src/test/java"/>
<classpathentry excluding="**" kind="src"
output="examples/portlets/jsfhellouser/target/test-classes"
path="examples/portlets/jsfhellouser/src/test/resources"/>
@@ -65,6 +79,12 @@
<classpathentry kind="src"
output="examples/portlets/simplesthelloworld/target/classes"
path="examples/portlets/simplesthelloworld/src/main/java"/>
<classpathentry kind="src"
output="examples/portlets/simplesthelloworld/target/test-classes"
path="examples/portlets/simplesthelloworld/src/test/java"/>
<classpathentry excluding="**" kind="src"
output="examples/portlets/simplesthelloworld/target/test-classes"
path="examples/portlets/simplesthelloworld/src/test/resources"/>
+ <classpathentry kind="src"
output="examples/portlets/struts-jpetstore/target/classes"
path="examples/portlets/struts-jpetstore/src/main/java"/>
+ <classpathentry excluding="**" kind="src"
output="examples/portlets/struts-jpetstore/target/classes"
path="examples/portlets/struts-jpetstore/src/main/resources"/>
+ <classpathentry kind="src"
output="examples/portlets/struts-jpetstore/target/test-classes"
path="examples/portlets/struts-jpetstore/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="examples/portlets/struts-jpetstore/target/test-classes"
path="examples/portlets/struts-jpetstore/src/test/resources"/>
+ <classpathentry kind="src"
output="testsuite/selenium-snifftests/target/classes"
path="testsuite/selenium-snifftests/src/main/java"/>
+ <classpathentry kind="src"
output="testsuite/webuibasedsamples/target/classes"
path="testsuite/webuibasedsamples/src/main/java"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Modified:
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-10-22
11:50:10 UTC (rev 4768)
+++
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-10-22
14:44:39 UTC (rev 4769)
@@ -674,11 +674,9 @@
el.type = "checkbox";
el.name = prefix + att;
el.id = elID;
- if (userPrefs[att] && userPrefs[att] == "true") {
- el.checked = userPrefs[att];
- } else {
- if(prefs[att].default == "true")
- el.checked = true;
+ if ((userPrefs[att] && userPrefs[att] == "true") ||
+ prefs[att]["default"] == "true") {
+ el.checked = true;
}
attEl.appendChild(el);
}
Modified:
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2010-10-22
11:50:10 UTC (rev 4768)
+++
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2010-10-22
14:44:39 UTC (rev 4769)
@@ -244,7 +244,7 @@
href += "&op=MinimizeGadget";
href += "&minimized=" + minimized;
href += "&objectId=" + uiGadget.id +
"&ajaxRequest=true";
- ajaxAsyncGetRequest(href);
+ ajaxGet(href);
if (uiGadget.minimizeCallback)
uiGadget.minimizeCallback(portletFrag.parentNode.id);
},
/**
@@ -294,7 +294,7 @@
var uiDashboardCont = DOMUtil.findAncestorByClass(uiGadget,
"UIDashboardContainer");
if(uiDashboardCont) {
- ajaxAsyncGetRequest(href);
+ ajaxGet(href);
DOMUtil.removeElement(uiGadget);
if(!DOMUtil.findFirstDescendantByClass(uiDashboardCont, "div",
"UIGadget")) {
DOMUtil.findFirstDescendantByClass(uiDashboardCont, "div",
"NoGadget").style.display = "block";
Modified:
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2010-10-22
11:50:10 UTC (rev 4768)
+++
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2010-10-22
14:44:39 UTC (rev 4769)
@@ -515,7 +515,7 @@
}
}
}
- if(response.blocksToUpdate == undefined) {
+ if(response.blocksToUpdate == undefined && temp.innerHTML !== "") {
if(confirm(eXo.i18n.I18NMessage.getMessage("SessionTimeout")))
instance.ajaxTimeout(request) ;
}
//Handle the portal responses
Modified:
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-10-22
11:50:10 UTC (rev 4768)
+++
epp/portal/branches/EPP_5_1_Branch/web/eXoResources/src/main/webapp/javascript/eXo/webui/UIDashboard.js 2010-10-22
14:44:39 UTC (rev 4769)
@@ -233,7 +233,7 @@
{name: "objectId", value: dragObj.id}
];
var url = uiDashboardUtil.createRequest(compId, 'MoveGadget', params);
- ajaxAsyncGetRequest(url);
+ ajaxGet(url);
}
}
}
Modified:
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-10-22
11:50:10 UTC (rev 4768)
+++
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2010-10-22
14:44:39 UTC (rev 4769)
@@ -1249,6 +1249,7 @@
UIDashboard.msg.addGadget=Drag your gadgets here.
UIDashboard.msg.notUrl=The url is invalid. Please enter a correct url of a gadget xml or
of an RSS feed.
UIDashboard.msg.ApplicationNotExisted=This application is not exist or may be deleted.
+UIDashboard.msg.StaleData=Some stale data are on your dashboard, it will be refreshed
now
################################################################################
# org.exoplatform.webui.organization.account.UIUserSelector
Modified:
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2010-10-22
11:50:10 UTC (rev 4768)
+++
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2010-10-22
14:44:39 UTC (rev 4769)
@@ -31,7 +31,9 @@
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UIPopupMessages;
import org.exoplatform.webui.core.UIPopupWindow;
+import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -62,6 +64,26 @@
addChild(UIDashboardContainer.class, null, null);
}
+ @Override
+ public void processRender(WebuiRequestContext context) throws Exception
+ {
+ UIGadget uiGadget = this.getMaximizedGadget();
+ if (uiGadget != null)
+ {
+ UIPopupMessages uiPopupMessages =
getAncestorOfType(UIPortletApplication.class).getUIPopupMessages();
+ for (ApplicationMessage msg : uiPopupMessages.getErrors())
+ {
+ if
(msg.getMessageKey().equals("UIDashboard.msg.ApplicationNotExisted"))
+ {
+ this.setMaximizedGadget(null);
+ break;
+ }
+ }
+ }
+
+ super.processRender(context);
+ }
+
public void setColumns(int num) throws Exception
{
getChild(UIDashboardContainer.class).setColumns(num);
@@ -152,9 +174,13 @@
else
{
uiGadget.getProperties().setProperty("minimized", minimized);
+ uiDashboardCont.save();
+ if
(uiDashboard.getAncestorOfType(UIPortletApplication.class).getUIPopupMessages().hasMessage())
+ {
+ return;
+ }
+ Util.getPortalRequestContext().setResponseComplete(true);
}
- uiDashboardCont.save();
- context.addUIComponentToUpdateByAjax(uiGadget);
}
}
@@ -178,13 +204,16 @@
context.addUIComponentToUpdateByAjax(uiDashboard);
return;
}
-
- //TODO nguyenanhkien2a(a)gmail.com
- //We need to expand unminimized state of uiGadget to view all body of gadget,
not just a title with no content
+
+ // TODO nguyenanhkien2a(a)gmail.xn--com-gla
+ // We need to expand unminimized state of uiGadget to view all body of
+ // gadget, not just a title with no content
uiGadget.getProperties().setProperty("minimized", "false");
uiDashboardCont.save();
-
- if (maximize.equals("maximize"))
+
+ UIPortletApplication uiDashboarPortlet =
uiDashboard.getAncestorOfType(UIPortletApplication.class);
+ if (maximize.equals("maximize")
+ && !uiDashboarPortlet.getUIPopupMessages().hasMessage())
{
uiGadget.setView(UIGadget.CANVAS_VIEW);
uiDashboard.setMaximizedGadget(uiGadget);
Modified:
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java 2010-10-22
11:50:10 UTC (rev 4768)
+++
epp/portal/branches/EPP_5_1_Branch/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboardContainer.java 2010-10-22
14:44:39 UTC (rev 4769)
@@ -22,6 +22,7 @@
import org.exoplatform.application.registry.Application;
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.StaleModelException;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.Dashboard;
import org.exoplatform.portal.config.model.TransientApplicationState;
@@ -30,6 +31,7 @@
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainer;
import org.exoplatform.portal.webui.util.PortalDataMapper;
+import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.RequestContext;
import org.exoplatform.webui.application.WebuiRequestContext;
@@ -40,6 +42,8 @@
import org.exoplatform.webui.config.annotation.ParamConfig;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.UIPopupMessages;
+import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.model.SelectItemOption;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
@@ -47,6 +51,8 @@
import org.jibx.runtime.IBindingFactory;
import org.jibx.runtime.IUnmarshallingContext;
+import com.sun.mail.imap.protocol.UIDSet;
+
import java.io.ByteArrayInputStream;
import java.util.ArrayList;
import java.util.List;
@@ -148,7 +154,7 @@
uiRoot.getChildren().clear();
// Assemble the dashboard
- PortalDataMapper.toUIContainer(uiRoot, dashboard);
+ PortalDataMapper.toUIContainer(uiRoot, dashboard);
}
//
@@ -478,7 +484,15 @@
DataStorage service = getApplicationComponent(DataStorage.class);
// Save
- service.saveDashboard(dashboard);
+ try
+ {
+ service.saveDashboard(dashboard);
+ }
+ catch (StaleModelException e)
+ {
+ getAncestorOfType(UIPortletApplication.class).addMessage(
+ new ApplicationMessage("UIDashboard.msg.StaleData", null,
ApplicationMessage.ERROR));
+ }
}
}
@@ -532,7 +546,11 @@
uiDashboardContainer.moveUIGadget(objectId, col, row);
uiDashboardContainer.save();
- event.getRequestContext().setResponseComplete(true);
+ if
(uiDashboard.getAncestorOfType(UIPortletApplication.class).getUIPopupMessages().hasMessage())
+ {
+ return;
+ }
+ Util.getPortalRequestContext().setResponseComplete(true);
}
}
@@ -552,15 +570,18 @@
UIDashboardContainer uiDashboardContainer =
uiDashboard.getChild(UIDashboardContainer.class);
uiDashboardContainer.removeUIGadget(objectId);
boolean isMaximized = false;
- if (uiDashboard.getMaximizedGadget() != null &&
uiDashboard.getMaximizedGadget().getId().equals(objectId))
+ if (uiDashboard.getMaximizedGadget() != null &&
+ uiDashboard.getMaximizedGadget().getId().equals(objectId))
{
uiDashboard.setMaximizedGadget(null);
isMaximized = true;
}
uiDashboardContainer.save();
- if (!isMaximized)
+ UIPopupMessages uiPopupMessages =
+
uiDashboard.getAncestorOfType(UIPortletApplication.class).getUIPopupMessages();
+ if (!isMaximized && !uiPopupMessages.hasMessage())
{
- context.setResponseComplete(true);
+ Util.getPortalRequestContext().setResponseComplete(true);
}
}
}
Modified:
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
---
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-22
11:50:10 UTC (rev 4768)
+++
epp/portal/branches/EPP_5_1_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-10-22
14:44:39 UTC (rev 4769)
@@ -379,10 +379,13 @@
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
//
- try{
+ try
+ {
uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
- Util.getPortalRequestContext().setFullRender(true);
- } catch(Exception e){
+ Util.getPortalRequestContext().setResponseComplete(true);
+ }
+ catch(Exception e)
+ {
UIPortletApplication uiPortlet =
uiGadget.getAncestorOfType(UIPortletApplication.class);
context.addUIComponentToUpdateByAjax(uiPortlet);
throw new MessageException(new
ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null,
ApplicationMessage.ERROR));