gatein SVN: r1152 - portal/trunk/component/web/src/main/java/org/exoplatform/web/resource/config/xml.
by do-not-reply@jboss.org
Author: tan_pham_dinh
Date: 2009-12-31 08:16:36 -0500 (Thu, 31 Dec 2009)
New Revision: 1152
Added:
portal/trunk/component/web/src/main/java/org/exoplatform/web/resource/config/xml/FCKConfigListener.java
Log:
FCK is useless in Gatein. Remove it
Added: portal/trunk/component/web/src/main/java/org/exoplatform/web/resource/config/xml/FCKConfigListener.java
===================================================================
--- portal/trunk/component/web/src/main/java/org/exoplatform/web/resource/config/xml/FCKConfigListener.java (rev 0)
+++ portal/trunk/component/web/src/main/java/org/exoplatform/web/resource/config/xml/FCKConfigListener.java 2009-12-31 13:16:36 UTC (rev 1152)
@@ -0,0 +1,20 @@
+package org.exoplatform.web.resource.config.xml;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+public class FCKConfigListener implements ServletContextListener
+{
+ public static String FCK_CONTEXT_PATH;
+
+ public void contextDestroyed(ServletContextEvent event)
+ {
+
+ }
+
+ public void contextInitialized(ServletContextEvent event)
+ {
+ FCK_CONTEXT_PATH = event.getServletContext().getContextPath();
+ }
+
+}
14 years, 12 months
gatein SVN: r1151 - in portal/trunk: web/portal/src/main/webapp and 2 other directories.
by do-not-reply@jboss.org
Author: tan_pham_dinh
Date: 2009-12-30 06:45:39 -0500 (Wed, 30 Dec 2009)
New Revision: 1151
Removed:
portal/trunk/web/portal/src/main/webapp/fckeditor/
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/GateinSkinConfigDeployer.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein-resources.xml
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/wysiwyg/FCKEditor.java
Log:
FCK is useless in Gatein. Remove it
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/GateinSkinConfigDeployer.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/GateinSkinConfigDeployer.java 2009-12-30 06:45:52 UTC (rev 1150)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/GateinSkinConfigDeployer.java 2009-12-30 11:45:39 UTC (rev 1151)
@@ -89,6 +89,7 @@
public void execute(ServletContext scontext, PortalContainer portalContainer)
{
register(scontext, portalContainer);
+ skinService.registerContext(scontext);
}
};
PortalContainer.addInitTask(scontext, task, portalContainerName);
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java 2009-12-30 06:45:52 UTC (rev 1150)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java 2009-12-30 11:45:39 UTC (rev 1151)
@@ -171,8 +171,8 @@
public void addPortalSkin(String module, String skinName, String cssPath, ServletContext scontext, boolean overwrite)
{
- // Triggers a put if absent
- mainResolver.registerContext(scontext);
+ // // Triggers a put if absent
+ // mainResolver.registerContext(scontext);
availableSkins_.add(skinName);
SkinKey key = new SkinKey(module, skinName);
@@ -226,8 +226,8 @@
public void addSkin(String module, String skinName, String cssPath, ServletContext scontext, boolean overwrite)
{
- // Triggers a put if absent
- mainResolver.registerContext(scontext);
+ // // Triggers a put if absent
+ // mainResolver.registerContext(scontext);
availableSkins_.add(skinName);
SkinKey key = new SkinKey(module, skinName);
@@ -556,6 +556,11 @@
return availableSkin.toArray(new String[availableSkin.size()]);
}
+ public void registerContext(ServletContext sContext)
+ {
+ mainResolver.registerContext(sContext);
+ }
+
@Managed
@ManagedDescription("Reload all skins")
public void reloadSkins()
@@ -567,9 +572,7 @@
@Managed
@ManagedDescription("Reload a specified skin")
- public void reloadSkin(@ManagedDescription("The skin id")
- @ManagedName("skinId")
- String skinId)
+ public void reloadSkin(@ManagedDescription("The skin id") @ManagedName("skinId") String skinId)
{
ltCache.remove(skinId);
rtCache.remove(skinId);
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein-resources.xml 2009-12-30 06:45:52 UTC (rev 1150)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/gatein-resources.xml 2009-12-30 11:45:39 UTC (rev 1151)
@@ -31,12 +31,5 @@
<skin-name>Default</skin-name>
<css-path>/templates/skin/webui/component/UIHomePagePortlet/DefaultStylesheet.css</css-path>
</portlet-skin>
- <!-- External libraries -->
- <javascript>
- <param>
- <js-module>FCKEditor</js-module>
- <js-path>/fckeditor/fckeditor.js</js-path>
- </param>
- </javascript>
</gatein-resources>
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/wysiwyg/FCKEditor.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/wysiwyg/FCKEditor.java 2009-12-30 06:45:52 UTC (rev 1150)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/wysiwyg/FCKEditor.java 2009-12-30 11:45:39 UTC (rev 1151)
@@ -21,7 +21,7 @@
import com.sun.syndication.io.impl.PropertiesLoader;
-import org.exoplatform.container.PortalContainer;
+import org.exoplatform.web.resource.config.xml.FCKConfigListener;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -42,7 +42,6 @@
*/
public class FCKEditor
{
-
private final static String DEFAULT_HEIGHT = "300".intern();
private final static String DEFAULT_WIDTH = "100%".intern();
@@ -106,8 +105,8 @@
public FCKEditor(final HttpServletRequest request, final String instanceName)
{
- this(request, instanceName, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_TOOLBAR, null, "/"
- + PortalContainer.getCurrentPortalContainerName() + "/fckeditor");
+ this(request, instanceName, DEFAULT_WIDTH, DEFAULT_HEIGHT, DEFAULT_TOOLBAR, null,
+ FCKConfigListener.FCK_CONTEXT_PATH + "/fckeditor");
}
/**
14 years, 12 months
gatein SVN: r1150 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page.
by do-not-reply@jboss.org
Author: truong.le
Date: 2009-12-30 01:45:52 -0500 (Wed, 30 Dec 2009)
New Revision: 1150
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
Log:
GTNPORTAL-412: Don't show content of page (node) after edit node's page in special case
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2009-12-29 12:14:07 UTC (rev 1149)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2009-12-30 06:45:52 UTC (rev 1150)
@@ -280,6 +280,7 @@
UIPage uiPage = uiPageForm.getUIPage();
if (uiPage == null)
return;
+ String storageId = uiPage.getStorageId();
Page page = new Page();
page.setPageId(uiPage.getPageId());
uiPageForm.invokeSetBindingBean(page);
@@ -355,6 +356,7 @@
page.setModifier(pcontext.getRemoteUser());
PortalDataMapper.toUIPage(uiPage, page);
+ uiPage.setStorageId(storageId);
// if(page.getTemplate() == null) page.setTemplate(uiPage.getTemplate()) ;
if (page.getChildren() == null)
page.setChildren(new ArrayList<ModelObject>());
14 years, 12 months
gatein SVN: r1149 - in portal/trunk: web/portal/src/main/webapp/WEB-INF/conf and 1 other directory.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2009-12-29 07:14:07 -0500 (Tue, 29 Dec 2009)
New Revision: 1149
Modified:
portal/trunk/examples/extension/config/src/main/java/conf/configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml
Log:
GTNPORTAL-438 Disable configurations of WSRP when deploying with Tomcat
Modified: portal/trunk/examples/extension/config/src/main/java/conf/configuration.xml
===================================================================
--- portal/trunk/examples/extension/config/src/main/java/conf/configuration.xml 2009-12-29 02:50:05 UTC (rev 1148)
+++ portal/trunk/examples/extension/config/src/main/java/conf/configuration.xml 2009-12-29 12:14:07 UTC (rev 1149)
@@ -69,7 +69,7 @@
<value>
<string>web</string>
</value>
- <value>
+ <value profiles="jboss">
<string>wsrp-producer</string>
</value>
<value>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml 2009-12-29 02:50:05 UTC (rev 1148)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml 2009-12-29 12:14:07 UTC (rev 1149)
@@ -26,7 +26,7 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<import>war:/conf/common/common-configuration.xml</import>
<import>war:/conf/common/portlet-container-configuration.xml</import>
- <import>war:/conf/wsrp/wsrp-configuration.xml</import>
+ <import profiles="jboss">war:/conf/wsrp/wsrp-configuration.xml</import>
<import>war:/conf/common/logs-configuration.xml</import>
<import>war:/conf/common/autologin-configuration.xml</import>
<import>war:/conf/database/database-configuration.xml</import>
14 years, 12 months
gatein SVN: r1148 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application.
by do-not-reply@jboss.org
Author: liem_nguyen
Date: 2009-12-28 21:50:05 -0500 (Mon, 28 Dec 2009)
New Revision: 1148
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIApplicationList.java
Log:
GTNPORTAL-414 Page editor does not show all the portlets after import applications
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIApplicationList.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIApplicationList.java 2009-12-29 02:12:57 UTC (rev 1147)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIApplicationList.java 2009-12-29 02:50:05 UTC (rev 1148)
@@ -78,9 +78,11 @@
boolean hasPermission = false;
List<String> accessPermission = cate.getAccessPermissions();
if (accessPermission == null) {
- accessPermission = new ArrayList<String>();
+ accessPermission = new ArrayList<String>();
+ }
+ if (accessPermission.size() == 0) {
accessPermission.add(null);
- }
+ }
for (String permssion : accessPermission)
{
hasPermission = userACL.hasPermission(identity, permssion);
14 years, 12 months
gatein SVN: r1147 - in portal/trunk: component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks and 3 other directories.
by do-not-reply@jboss.org
Author: liem_nguyen
Date: 2009-12-28 21:12:57 -0500 (Mon, 28 Dec 2009)
New Revision: 1147
Modified:
portal/trunk/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PreferencesTask.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
Log:
Modified: portal/trunk/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java
===================================================================
--- portal/trunk/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2009-12-28 07:53:00 UTC (rev 1146)
+++ portal/trunk/component/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIDashboard.java 2009-12-29 02:12:57 UTC (rev 1147)
@@ -20,6 +20,9 @@
package org.exoplatform.dashboard.webui.component;
import org.exoplatform.portal.webui.application.UIGadget;
+import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
@@ -133,9 +136,20 @@
String objectId = context.getRequestParameter(OBJECTID);
String minimized = context.getRequestParameter("minimized");
+ UIDashboardContainer uiDashboardCont = uiDashboard.getChild(UIDashboardContainer.class);
UIGadget uiGadget = uiDashboard.getChild(UIDashboardContainer.class).getUIGadget(objectId);
- uiGadget.getProperties().setProperty("minimized", minimized);
- uiDashboard.getChild(UIDashboardContainer.class).save();
+ if (uiGadget.isLossData())
+ {
+ UIPortalApplication uiApp = Util.getUIPortalApplication();
+ uiApp.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
+ uiDashboardCont.removeUIGadget(uiGadget.getId());
+ context.addUIComponentToUpdateByAjax(uiDashboard);
+ }
+ else
+ {
+ uiGadget.getProperties().setProperty("minimized", minimized);
+ }
+ uiDashboardCont.save();
context.addUIComponentToUpdateByAjax(uiGadget);
}
}
@@ -150,6 +164,16 @@
String maximize = context.getRequestParameter("maximize");
UIDashboardContainer uiDashboardCont = uiDashboard.getChild(UIDashboardContainer.class);
UIGadget uiGadget = uiDashboardCont.getUIGadget(objectId);
+ if (uiGadget == null || uiGadget.isLossData())
+ {
+ UIPortalApplication uiApp = Util.getUIPortalApplication();
+ uiApp.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
+ if (uiGadget != null)
+ uiDashboardCont.removeUIGadget(uiGadget.getId());
+ uiDashboardCont.save();
+ context.addUIComponentToUpdateByAjax(uiDashboard);
+ return;
+ }
if (maximize.equals("maximize"))
{
uiGadget.setView(UIGadget.CANVAS_VIEW);
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PreferencesTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PreferencesTask.java 2009-12-28 07:53:00 UTC (rev 1146)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/PreferencesTask.java 2009-12-29 02:12:57 UTC (rev 1147)
@@ -33,8 +33,7 @@
{
/** . */
-// private static final Object NULL_PREFS = new Object();
-
+ // private static final Object NULL_PREFS = new Object();
public static class GetContentId<S> extends PreferencesTask<S> implements POMTask<String>
{
@@ -86,6 +85,8 @@
public S run(POMSession session) throws Exception
{
Customization<S> customization = (Customization<S>)session.findCustomizationById(storageId);
+ if (customization == null)
+ return null;
return customization.getVirtualState();
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2009-12-28 07:53:00 UTC (rev 1146)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2009-12-29 02:12:57 UTC (rev 1147)
@@ -29,7 +29,6 @@
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.web.WebAppController;
import org.exoplatform.web.application.gadget.GadgetApplication;
-import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIComponent;
@@ -212,26 +211,44 @@
return null;
}
}
-
+
@Override
public boolean isRendered()
{
- DataStorage service = getApplicationComponent(DataStorage.class);
try
{
+ DataStorage service = getApplicationComponent(DataStorage.class);
service.load(state, ApplicationType.GADGET);
if (getApplication() == null)
{
- throw new Exception("ApplicationNotExisted");
+ throw new Exception();
}
}
catch (Exception e)
- {
+ {
return false;
}
return super.isRendered();
}
-
+
+ public boolean isLossData()
+ {
+ try
+ {
+ DataStorage service = getApplicationComponent(DataStorage.class);
+ service.load(state, ApplicationType.GADGET);
+ if (getApplication() == null)
+ {
+ throw new Exception();
+ }
+ }
+ catch (Exception e)
+ {
+ return true;
+ }
+ return false;
+ }
+
/**
* Gets GadgetApplication by GadgedRegistryService
*
@@ -381,11 +398,18 @@
org.exoplatform.portal.pom.spi.gadget.Gadget gadget = new org.exoplatform.portal.pom.spi.gadget.Gadget();
gadget.setUserPref(userPref);
- //
UIGadget uiGadget = event.getSource();
+ if (uiGadget.isLossData())
+ {
+ /*
+ UIPortalApplication uiApp = Util.getUIPortalApplication();
+ uiApp.addMessage(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null));
+ PortalRequestContext pcontext = Util.getPortalRequestContext();
+ pcontext.addUIComponentToUpdateByAjax(uiApp.getUIPopupMessages());
+ */
+ return;
+ }
DataStorage service = uiGadget.getApplicationComponent(DataStorage.class);
-
- //
uiGadget.state = service.save(uiGadget.state, gadget);
event.getRequestContext().setResponseComplete(true);
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-12-28 07:53:00 UTC (rev 1146)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-12-29 02:12:57 UTC (rev 1147)
@@ -74,11 +74,6 @@
import org.gatein.pc.portlet.impl.spi.AbstractSecurityContext;
import org.gatein.pc.portlet.impl.spi.AbstractServerContext;
-import javax.portlet.PortletMode;
-import javax.portlet.WindowState;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.namespace.QName;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
@@ -89,10 +84,16 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import java.util.UUID;
+import java.util.Map.Entry;
+import javax.portlet.PortletMode;
+import javax.portlet.WindowState;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.xml.namespace.QName;
+
/** May 19, 2006 */
@ComponentConfig(lifecycle = UIPortletLifecycle.class, template = "system:/groovy/portal/webui/application/UIPortlet.gtmpl", events = {
@EventConfig(listeners = RenderActionListener.class),
@@ -711,6 +712,10 @@
invocation.setWindowState(org.gatein.pc.api.WindowState.create(getCurrentWindowState().toString()));
StatefulPortletContext<C> preferencesPortletContext = getPortletContext();
+ if (preferencesPortletContext == null)
+ {
+ return null;
+ }
// get the user profile cached in the prc during the start of the request
UserProfile userProfile = (UserProfile)prc.getAttribute(UserProfileLifecycle.USER_PROFILE_ATTRIBUTE_NAME);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-12-28 07:53:00 UTC (rev 1146)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-12-29 02:12:57 UTC (rev 1147)
@@ -79,8 +79,7 @@
* modes (if they have to change) as well as a list of Events to be broadcasted to the other portlets located in the
* same portal page
*/
- static public class ProcessActionActionListener<S, C extends Serializable, I> extends
- EventListener<UIPortlet<S, C>>
+ static public class ProcessActionActionListener<S, C extends Serializable, I> extends EventListener<UIPortlet<S, C>>
{
public void execute(Event<UIPortlet<S, C>> event) throws Exception
{
@@ -90,10 +89,11 @@
// set the public render parameters from the request before creating the invocation
HttpServletRequest request = prcontext.getRequest();
setupPublicRenderParams(uiPortlet, request.getParameterMap());
-
+
//
ActionInvocation actionInvocation = uiPortlet.create(ActionInvocation.class, prcontext);
-
+ if (actionInvocation == null)
+ return;
//
PortletInvocationResponse portletResponse = uiPortlet.invoke(actionInvocation);
@@ -169,7 +169,7 @@
// update the public render parameters with the changes from the invocation
setupPublicRenderParams(uiPortlet, navStateResponse.getPublicNavigationalStateUpdates());
-
+
/*
* Handle the events returned by the action output and broadcast a new UI
* event to the ProcessEventsActionListener that will then target the
@@ -298,8 +298,7 @@
* Finally the content is set in the portal response writer or outputstream depending on the type; the
* processRender() method of the portal is not called as we set the response as complete
*/
- static public class ServeResourceActionListener<S, C extends Serializable, I> extends
- EventListener<UIPortlet<S, C>>
+ static public class ServeResourceActionListener<S, C extends Serializable, I> extends EventListener<UIPortlet<S, C>>
{
public void execute(Event<UIPortlet<S, C>> event) throws Exception
{
@@ -410,7 +409,7 @@
* page (usual layout or webos) which instance can be targeted by the
* event and then process the event on the associated UIPortlet component
*/
- while(events.size() > 0)
+ while (events.size() > 0)
{
javax.portlet.Event nativeEvent = events.remove(0);
QName eventName = nativeEvent.getQName();
@@ -454,7 +453,7 @@
* ProcessEventsActionListener once again
*/
public static <S, C extends Serializable, I> List<javax.portlet.Event> processEvent(UIPortlet<S, C> uiPortlet,
- javax.portlet.Event event)
+ javax.portlet.Event event)
{
log.info("Process Event: " + event.getName() + " for portlet: " + uiPortlet.getState());
try
@@ -599,7 +598,9 @@
setupPublicRenderParams(uiPortlet, request.getParameterMap());
//set render params
- String navState = ((PortalRequestContext)event.getRequestContext()).getRequestParameter(ExoPortletInvocationContext.NAVIGATIONAL_STATE_PARAM_NAME);
+ String navState =
+ ((PortalRequestContext)event.getRequestContext())
+ .getRequestParameter(ExoPortletInvocationContext.NAVIGATIONAL_STATE_PARAM_NAME);
uiPortlet.setNavigationalState(ParametersStateString.create(navState));
}
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2009-12-28 07:53:00 UTC (rev 1146)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2009-12-29 02:12:57 UTC (rev 1147)
@@ -111,6 +111,7 @@
UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ prContext.setFullRender(true);
return;
}
@@ -128,6 +129,7 @@
UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ prContext.setFullRender(true);
return;
}
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-12-28 07:53:00 UTC (rev 1146)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-12-29 02:12:57 UTC (rev 1147)
@@ -25,7 +25,6 @@
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.PortalProperties;
-import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.resource.SkinService;
import org.exoplatform.portal.webui.application.UIApplicationList;
import org.exoplatform.portal.webui.application.UIPortlet;
@@ -87,7 +86,7 @@
private boolean isCollapse = false;
private boolean isShowControl = true;
-
+
public UIPortalComposer() throws Exception
{
UITabPane uiTabPane = addChild(UITabPane.class, "UIPortalComposerTab", null);
@@ -169,19 +168,21 @@
portalOwner = editPortal.getOwner();
}
else
- {
+ {
portalOwner = Util.getPortalRequestContext().getPortalOwner();
}
-
+
PortalConfig portalConfig = (PortalConfig)PortalDataMapper.buildModelObject(editPortal);
UserPortalConfigService configService = getApplicationComponent(UserPortalConfigService.class);
if (configService.getUserPortalConfig(portalOwner, remoteUser) != null)
{
configService.update(portalConfig);
- } else {
+ }
+ else
+ {
UIApplication uiApp = prContext.getUIApplication();
- uiApp.addMessage(new ApplicationMessage("UIPortalForm.msg.notExistAnymore", null));
+ uiApp.addMessage(new ApplicationMessage("UIPortalForm.msg.notExistAnymore", null));
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
return;
}
@@ -302,10 +303,10 @@
String portalOwner = null;
UIEditInlineWorkspace uiEditWS = event.getSource().getAncestorOfType(UIEditInlineWorkspace.class);
temp = uiEditWS.getUIComponent();
- if(temp != null && (temp instanceof UIPortal))
+ if (temp != null && (temp instanceof UIPortal))
{
uiPortal = (UIPortal)temp;
- if(uiPortal.getOwnerType().equals(PortalConfig.PORTAL_TYPE))
+ if (uiPortal.getOwnerType().equals(PortalConfig.PORTAL_TYPE))
{
portalOwner = uiPortal.getOwner();
}
@@ -317,13 +318,14 @@
uiPortal = Util.getUIPortal();
portalOwner = Util.getPortalRequestContext().getPortalOwner();
}
-
+
UIPortalApplication uiApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
- UIPortalForm portalForm = uiMaskWS.createUIComponent(UIPortalForm.class, null, "UIPortalForm");
- portalForm.setPortalOwner(portalOwner);
+ UIPortalForm portalForm = uiMaskWS.createUIComponent(UIPortalForm.class, null, "UIPortalForm");
+ portalForm.setPortalOwner(portalOwner);
portalForm.setBindingBean();
- if(PortalConfig.USER_TYPE.equals(uiPortal.getOwnerType())){
+ if (PortalConfig.USER_TYPE.equals(uiPortal.getOwnerType()))
+ {
portalForm.removeChildById("PermissionSetting");
}
uiMaskWS.setWindowSize(700, -1);
@@ -343,12 +345,12 @@
uiEditWS.getComposer().setEditted(false);
uiEditWS.setRendered(false);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
- UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
-
+ UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
+
UIPortal uiPortal = uiWorkingWS.getBackupUIPortal();
- siteBody.setUIComponent(uiPortal);
-
- String uri = uiPortal.getSelectedNode() != null ? uiPortal.getSelectedNode().getUri() : null;
+ siteBody.setUIComponent(uiPortal);
+
+ String uri = uiPortal.getSelectedNode() != null ? uiPortal.getSelectedNode().getUri() : null;
PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
@@ -553,9 +555,28 @@
{
public void execute(Event<UIPortalComposer> event) throws Exception
{
+ UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
+ UIPortal uiPortal = Util.getUIPortal();
UIEditInlineWorkspace editInlineWS = event.getSource().getParent();
UIWorkingWorkspace uiWorkingWS = editInlineWS.getParent();
UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
+ UIPage uiPage = uiToolPanel.findFirstComponentOfType(UIPage.class);
+ Page page = (Page)PortalDataMapper.buildModelObject(uiPage);
+ UserPortalConfigService portalConfigService =
+ uiWorkingWS.getApplicationComponent(UserPortalConfigService.class);
+ if (page.getStorageId() != null && portalConfigService.getPage(page.getPageId()) == null)
+ {
+ uiPortalApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.PageNotExist", new String[]{page
+ .getPageId()}, 1));
+ uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
+ PageNodeEvent<UIPortal> pnevent =
+ new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE,
+ (uiPortal.getSelectedNode() != null ? uiPortal.getSelectedNode().getUri() : null));
+ uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
+ JavascriptManager jsManager = event.getRequestContext().getJavascriptManager();
+ jsManager.addJavascript("eXo.portal.portalMode=" + UIPortalApplication.NORMAL_MODE + ";");
+ return;
+ }
UIPortalComposer composer = uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class).setRendered(false);
composer.setEditted(false);
if (composer.isUsedInWizard())
@@ -568,19 +589,10 @@
uiEvent.broadcast();
return;
}
- UIPage uiPage = uiToolPanel.findFirstComponentOfType(UIPage.class);
- //
- Page page = (Page)PortalDataMapper.buildModelObject(uiPage);
- UserPortalConfigService portalConfigService =
- uiWorkingWS.getApplicationComponent(UserPortalConfigService.class);
-
// Perform mop update
- List<ModelChange> changes = portalConfigService.update(page);
-
+ portalConfigService.update(page);
uiToolPanel.setUIComponent(null);
- UIPortal uiPortal = Util.getUIPortal();
- UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
if (PortalProperties.SESSION_ALWAYS.equals(uiPortal.getSessionAlive()))
{
uiPortalApp.setSessionOpen(true);
14 years, 12 months
gatein SVN: r1146 - portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component.
by do-not-reply@jboss.org
Author: truong.le
Date: 2009-12-28 02:53:00 -0500 (Mon, 28 Dec 2009)
New Revision: 1146
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
Log:
GTNPORTAL-403: Don't update application into category after choose in add application form in Application registry
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2009-12-28 03:39:47 UTC (rev 1145)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2009-12-28 07:53:00 UTC (rev 1146)
@@ -279,10 +279,10 @@
appRegService.save(selectedCate, app);
uiOrganizer.reload();
- uiOrganizer.setSelectedCategory(selectedCate);
+ uiOrganizer.setSelectedCategory(selectedCate.getName());
uiOrganizer.selectApplication(app.getApplicationName());
ctx.addUIComponentToUpdateByAjax(uiOrganizer);
- }
+ }
private Application cloneApplication(Application app)
{
14 years, 12 months
gatein SVN: r1145 - portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page.
by do-not-reply@jboss.org
Author: truong.le
Date: 2009-12-27 22:39:47 -0500 (Sun, 27 Dec 2009)
New Revision: 1145
Modified:
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageBrowser.gtmpl
Log:
GTNPORTAL-53: Problem when searching with all portal ( user, first/last name...)
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageBrowser.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageBrowser.gtmpl 2009-12-25 08:09:27 UTC (rev 1144)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/page/UIPageBrowser.gtmpl 2009-12-28 03:39:47 UTC (rev 1145)
@@ -1,4 +1,4 @@
-<% uicomponent.defaultValue(null); %>
+<% uicomponent.defaultValue(uicomponent.getLastQuery()); %>
<div class="UIPageBrowser" id="<%=uicomponent.getId();%>">
<%/*Begin UIPageBrowser Content*/%>
@@ -23,7 +23,6 @@
</td>
</tr>
</table>
- </div>
-
+ </div>
<%}%>
</div>
\ No newline at end of file
14 years, 12 months
gatein SVN: r1144 - in portal/trunk: web/portal/src/main/webapp/WEB-INF/classes/locale/portal and 2 other directories.
by do-not-reply@jboss.org
Author: liem_nguyen
Date: 2009-12-25 03:09:27 -0500 (Fri, 25 Dec 2009)
New Revision: 1144
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
GTNPORTAL-416 Fix for Site Management, Group Navigation Management
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2009-12-24 11:41:15 UTC (rev 1143)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2009-12-25 08:09:27 UTC (rev 1144)
@@ -21,6 +21,7 @@
import org.exoplatform.portal.pom.config.Utils;
import org.exoplatform.services.organization.OrganizationService;
+import org.exoplatform.services.organization.Query;
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
@@ -35,6 +36,7 @@
import org.exoplatform.webui.form.validator.PasswordStringLengthValidator;
import org.exoplatform.webui.form.validator.ResourceValidator;
import org.exoplatform.webui.form.validator.StringLengthValidator;
+import org.exoplatform.webui.organization.UIUserProfileInputSet;
/**
* Created by The eXo Platform SARL
@@ -106,8 +108,22 @@
UIApplication uiApp = context.getUIApplication();
String username = getUIStringInput(USERNAME).getValue();
User user = service.getUserHandler().findUserByName(username);
- if (user==null) {
+ if (user == null)
+ {
uiApp.addMessage(new ApplicationMessage("UIAccountInputSet.msg.user-is-deleted", null));
+ UIUserInfo userInfo = getParent();
+ if (userInfo != null)
+ {
+ UIUserManagement userManagement = userInfo.getParent();
+ UIListUsers listUser = userManagement.getChild(UIListUsers.class);
+ UIAccountEditInputSet accountInput = userInfo.getChild(UIAccountEditInputSet.class);
+ UIUserProfileInputSet userProfile = userInfo.getChild(UIUserProfileInputSet.class);
+ userInfo.setRenderSibbling(UIListUsers.class);
+ listUser.search(new Query());
+ accountInput.reset();
+ userProfile.reset();
+ context.setProcessRender(true);
+ }
return false;
}
invokeSetBindingField(user);
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2009-12-24 11:41:15 UTC (rev 1143)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2009-12-25 08:09:27 UTC (rev 1144)
@@ -337,6 +337,7 @@
UIPortalForm.action.Save=#{word.save}
UIPortalForm.action.Close=Cancel
UIPortalForm.msg.sameName=This portal name already exists.
+UIPortalForm.msg.notExistAnymore=This portal is not existed or may be deleted.
UIPortalForm.label.name=Portal Name :
UIPortalForm.label.locale=#{word.locale} :
UIPortalForm.label.date=#{word.date} :
@@ -1369,6 +1370,7 @@
############################################################################
UINavigationManagement.action.addNode=Add Node
+UINavigationManagement.msg.NavigationNotExistAnymore=The navigation could be deleted.
############################################################################
# org.exoplatform.navigation.webui.component.UIAddGroupNavigation #
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2009-12-24 11:41:15 UTC (rev 1143)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationManagement.java 2009-12-25 08:09:27 UTC (rev 1144)
@@ -29,8 +29,10 @@
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
+import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.UIContainer;
import org.exoplatform.webui.core.UIPopupWindow;
@@ -93,20 +95,41 @@
public void execute(Event<UINavigationManagement> event) throws Exception
{
+ PortalRequestContext prContext = Util.getPortalRequestContext();
UINavigationManagement uiManagement = event.getSource();
UINavigationNodeSelector uiNodeSelector = uiManagement.getChild(UINavigationNodeSelector.class);
UserPortalConfigService portalConfigService =
uiManagement.getApplicationComponent(UserPortalConfigService.class);
PageNavigation navigation = uiNodeSelector.getSelectedNavigation();
- PortalRequestContext prContext = Util.getPortalRequestContext();
+ // Check existed
+ PageNavigation persistNavigation = portalConfigService.getPageNavigation(navigation.getOwnerType(), navigation.getOwnerId());
+ if (persistNavigation == null) {
+ UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
+ uiApp.addMessage(new ApplicationMessage("UINavigationManagement.msg.NavigationNotExistAnymore", null));
+ UIPopupWindow uiPopup = uiManagement.getParent();
+ uiPopup.setShow(false);
+ UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
+ UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ return;
+ }
+
if(navigation.getOwnerType() == PortalConfig.PORTAL_TYPE)
{
UserPortalConfig portalConfig = portalConfigService.getUserPortalConfig(navigation.getOwnerId(), prContext.getRemoteUser());
if(portalConfig != null)
{
portalConfigService.update(navigation);
- }
-
+ } else {
+ UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
+ uiApp.addMessage(new ApplicationMessage("UIPortalForm.msg.notExistAnymore", null));
+ UIPopupWindow uiPopup = uiManagement.getParent();
+ uiPopup.setShow(false);
+ UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
+ UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ return;
+ }
}
else
{
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java 2009-12-24 11:41:15 UTC (rev 1143)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPageNavigationForm.java 2009-12-25 08:09:27 UTC (rev 1144)
@@ -19,6 +19,7 @@
package org.exoplatform.portal.webui.navigation;
+import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.PageNavigation;
@@ -29,6 +30,7 @@
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.UIPopupWindow;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
@@ -156,7 +158,24 @@
{
UIPageNavigationForm uiForm = event.getSource();
PageNavigation pageNav = uiForm.getPageNav();
- //PortalRequestContext pcontext = Util.getPortalRequestContext();
+
+ // Check existed
+ PortalRequestContext prContext = Util.getPortalRequestContext();
+ UserPortalConfigService portalConfigService = uiForm.getApplicationComponent(UserPortalConfigService.class);
+ PageNavigation persistNavigation =
+ portalConfigService.getPageNavigation(pageNav.getOwnerType(), pageNav.getOwnerId());
+ if (persistNavigation == null)
+ {
+ UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
+ uiApp.addMessage(new ApplicationMessage("UINavigationManagement.msg.NavigationNotExistAnymore", null));
+ UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
+ UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ UIPopupWindow uiPopup = uiForm.getParent();
+ uiPopup.setShow(false);
+ prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ return;
+ }
+
WebuiRequestContext pcontext = event.getRequestContext();
UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-12-24 11:41:15 UTC (rev 1143)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-12-25 08:09:27 UTC (rev 1144)
@@ -44,11 +44,13 @@
import org.exoplatform.services.organization.UserProfile;
import org.exoplatform.services.resources.LocaleConfig;
import org.exoplatform.services.resources.LocaleConfigService;
+import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.UIContainer;
import org.exoplatform.webui.core.UITabPane;
@@ -177,6 +179,11 @@
if (configService.getUserPortalConfig(portalOwner, remoteUser) != null)
{
configService.update(portalConfig);
+ } else {
+ UIApplication uiApp = prContext.getUIApplication();
+ uiApp.addMessage(new ApplicationMessage("UIPortalForm.msg.notExistAnymore", null));
+ prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ return;
}
uiPortalApp.getUserPortalConfig().setPortal(portalConfig);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2009-12-24 11:41:15 UTC (rev 1143)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2009-12-25 08:09:27 UTC (rev 1144)
@@ -143,12 +143,12 @@
PortalRequestContext prContext = Util.getPortalRequestContext();
UIPortal editPortal = null;
- UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
- UIEditInlineWorkspace uiEditWS = uiPortalApp.<UIWorkingWorkspace>getChildById(UIPortalApplication.UI_WORKING_WS_ID).
- getChild(UIEditInlineWorkspace.class);
- if(uiPortalApp.getModeState() != UIPortalApplication.NORMAL_MODE &&
- uiEditWS != null && uiEditWS.getUIComponent() != null &&
- (uiEditWS.getUIComponent() instanceof UIPortal))
+ UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
+ UIEditInlineWorkspace uiEditWS =
+ uiPortalApp.<UIWorkingWorkspace> getChildById(UIPortalApplication.UI_WORKING_WS_ID).getChild(
+ UIEditInlineWorkspace.class);
+ if (uiPortalApp.getModeState() != UIPortalApplication.NORMAL_MODE && uiEditWS != null
+ && uiEditWS.getUIComponent() != null && (uiEditWS.getUIComponent() instanceof UIPortal))
{
editPortal = (UIPortal)uiEditWS.getUIComponent();
}
@@ -160,8 +160,7 @@
}
invokeGetBindingBean(editPortal);
- ((UIFormStringInput)getChild(UIFormInputSet.class).getChildById(FIELD_NAME))
- .setValue(getPortalOwner());
+ ((UIFormStringInput)getChild(UIFormInputSet.class).getChildById(FIELD_NAME)).setValue(getPortalOwner());
setActions(new String[]{"Save", "Close"});
}
@@ -265,31 +264,42 @@
public void execute(Event<UIPortalForm> event) throws Exception
{
UIPortalForm uiForm = event.getSource();
-
+
UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
PortalRequestContext prContext = Util.getPortalRequestContext();
UserPortalConfig userConfig = service.getUserPortalConfig(uiForm.getPortalOwner(), prContext.getRemoteUser());
- UIPortal uiPortal = uiForm.createUIComponent(UIPortal.class, null, null);
- PortalDataMapper.toUIPortal(uiPortal, userConfig);
-
- UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
- uiForm.invokeSetBindingBean(uiPortal);
- //uiPortal.refreshNavigation(localeConfigService.getLocaleConfig(uiPortal.getLocale()).getLocale()) ;
- if (uiPortalApp.getModeState() == UIPortalApplication.NORMAL_MODE)
+ if (userConfig != null)
{
- PortalConfig portalConfig = (PortalConfig)PortalDataMapper.buildModelObject(uiPortal);
- UserPortalConfigService configService = uiForm.getApplicationComponent(UserPortalConfigService.class);
- configService.update(portalConfig);
+ UIPortal uiPortal = uiForm.createUIComponent(UIPortal.class, null, null);
+ PortalDataMapper.toUIPortal(uiPortal, userConfig);
+
+ UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
+ uiForm.invokeSetBindingBean(uiPortal);
+ //uiPortal.refreshNavigation(localeConfigService.getLocaleConfig(uiPortal.getLocale()).getLocale()) ;
+ if (uiPortalApp.getModeState() == UIPortalApplication.NORMAL_MODE)
+ {
+ PortalConfig portalConfig = (PortalConfig)PortalDataMapper.buildModelObject(uiPortal);
+ UserPortalConfigService configService = uiForm.getApplicationComponent(UserPortalConfigService.class);
+ configService.update(portalConfig);
+ }
+ else
+ {
+ UIWorkingWorkspace uiWorkingWS = uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
+ UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
+ UIPortal editPortal = (UIPortal)uiEditWS.getUIComponent();
+ uiForm.invokeSetBindingBean(editPortal);
+ }
}
else
{
- UIWorkingWorkspace uiWorkingWS = uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
- UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
- UIPortal editPortal = (UIPortal)uiEditWS.getUIComponent();
- uiForm.invokeSetBindingBean(editPortal);
+ UIApplication uiApp = Util.getPortalRequestContext().getUIApplication();
+ uiApp.addMessage(new ApplicationMessage("UIPortalForm.msg.notExistAnymore", null));
+ UIPortalApplication uiPortalApp = (UIPortalApplication)prContext.getUIApplication();
+ UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
}
-
+
UIMaskWorkspace uiMaskWorkspace = uiForm.getParent();
uiMaskWorkspace.setUIComponent(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
15 years
gatein SVN: r1143 - portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core.
by do-not-reply@jboss.org
Author: tan_pham_dinh
Date: 2009-12-24 06:41:15 -0500 (Thu, 24 Dec 2009)
New Revision: 1143
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js
Log:
GTNPORTAL-415: Should show MaskLayer when showing MaskWorkspace
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js 2009-12-24 11:30:23 UTC (rev 1142)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/core/UIMaskLayer.js 2009-12-24 11:41:15 UTC (rev 1143)
@@ -76,8 +76,8 @@
UIMaskLayer.prototype.removeTransparentMask = function() {
var mask = document.getElementById("TransparentMaskLayer");
if (mask) {
- mask.style.height = "0" ;
- mask.style.width = "0" ;
+ mask.style.height = "0px" ;
+ mask.style.width = "0px" ;
}
};
/**
@@ -126,8 +126,8 @@
maskLayer.className = "MaskLayer" ;
maskLayer.id = "MaskLayer" ;
maskLayer.maxZIndex = 4; //3 ;
- maskLayer.style.width = eXo.core.Browser.getBrowserWidth();
- maskLayer.style.height = eXo.core.Browser.getBrowserHeight();
+ maskLayer.style.width = eXo.core.Browser.getBrowserWidth() + "px";
+ maskLayer.style.height = eXo.core.Browser.getBrowserHeight() + "px";
maskLayer.style.top = "0px" ;
maskLayer.style.left = "0px" ;
maskLayer.style.zIndex = maskLayer.maxZIndex ;
15 years