gatein SVN: r5108 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-11-16 12:20:26 -0500 (Tue, 16 Nov 2010)
New Revision: 5108
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.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
Log:
GTNPORTAL-736, GTNWSRP-160: Move some of the state handling code to the ModelAdapter. The model adapters will now be able to extract the state from the modified or cloned PortletContext themselves. This allows for the WSRP adapter to handle its state better. Note that there are still some issue with the wsrp state being handled in conditionals, this needs to be cleaned up and abstracted out to other classes.
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java 2010-11-16 12:49:08 UTC (rev 5107)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ModelAdapter.java 2010-11-16 17:20:26 UTC (rev 5108)
@@ -152,6 +152,36 @@
return pref;
}
}
+
+ @Override
+ public ExoPortletState getStateFromModifiedContext(PortletContext originalPortletContext,
+ PortletContext modifiedPortletContext)
+ {
+ if (modifiedPortletContext != null && modifiedPortletContext instanceof StatefulPortletContext)
+ {
+ StatefulPortletContext statefulContext = (StatefulPortletContext) modifiedPortletContext;
+ if (statefulContext.getState() instanceof ExoPortletState)
+ {
+ return (ExoPortletState)statefulContext.getState();
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public ExoPortletState getstateFromClonedContext(PortletContext originalPortletContext,
+ PortletContext clonedPortletContext)
+ {
+ if (clonedPortletContext != null && clonedPortletContext instanceof StatefulPortletContext)
+ {
+ StatefulPortletContext statefulContext = (StatefulPortletContext) clonedPortletContext;
+ if (statefulContext.getState() instanceof ExoPortletState)
+ {
+ return (ExoPortletState)statefulContext.getState();
+ }
+ }
+ return null;
+ }
};
private static final ModelAdapter<Gadget, ExoPortletState> GADGET = new ModelAdapter<Gadget, ExoPortletState>()
@@ -195,6 +225,36 @@
// For now we return null as it does not make sense to edit the gadget preferences
return null;
}
+
+ @Override
+ public ExoPortletState getStateFromModifiedContext(PortletContext originalPortletContext,
+ PortletContext modifiedPortletContext)
+ {
+ if (modifiedPortletContext != null && modifiedPortletContext instanceof StatefulPortletContext)
+ {
+ StatefulPortletContext statefulContext = (StatefulPortletContext) modifiedPortletContext;
+ if (statefulContext.getState() instanceof ExoPortletState)
+ {
+ return (ExoPortletState)statefulContext.getState();
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public ExoPortletState getstateFromClonedContext(PortletContext originalPortletContext,
+ PortletContext clonedPortletContext)
+ {
+ if (clonedPortletContext != null && clonedPortletContext instanceof StatefulPortletContext)
+ {
+ StatefulPortletContext statefulContext = (StatefulPortletContext) clonedPortletContext;
+ if (statefulContext.getState() instanceof ExoPortletState)
+ {
+ return (ExoPortletState)statefulContext.getState();
+ }
+ }
+ return null;
+ }
};
/**
@@ -256,6 +316,52 @@
return dataStorage.save(state, updateState);
}
}
+
+ @Override
+ public WSRP getStateFromModifiedContext(PortletContext originalPortletContext,
+ PortletContext modifiedPortletContext)
+ {
+ WSRP wsrp = new WSRP();
+ wsrp.setPortletId(modifiedPortletContext.getId());
+
+ // from the originalPortletContext see if we are dealing with a cloned context or not.
+ if (originalPortletContext instanceof StatefulPortletContext)
+ {
+ Object originalState = ((StatefulPortletContext)originalPortletContext).getState();
+ if (originalState instanceof WSRP)
+ {
+ wsrp.setCloned(((WSRP)originalState).isCloned());
+ }
+ }
+
+ if (modifiedPortletContext instanceof StatefulPortletContext)
+ {
+ Object modifiedState = ((StatefulPortletContext)modifiedPortletContext).getState();
+ if (modifiedState instanceof byte[])
+ {
+ wsrp.setState((byte[])modifiedState);
+ }
+ }
+
+ return wsrp;
+ }
+
+ @Override
+ public WSRP getstateFromClonedContext(PortletContext originalPortletContext, PortletContext clonedPortletContext)
+ {
+ WSRP wsrp = new WSRP();
+ wsrp.setPortletId(clonedPortletContext.getId());
+ wsrp.setCloned(true);
+
+ // if we have an associated state, record it as well...
+ if (clonedPortletContext instanceof StatefulPortletContext)
+ {
+ StatefulPortletContext statefulPortletContext = (StatefulPortletContext)clonedPortletContext;
+ wsrp.setState((byte[])statefulPortletContext.getState());
+ }
+
+ return wsrp;
+ }
};
public abstract PortletContext getProducerOfferedPortletContext(String applicationId);
@@ -275,5 +381,23 @@
* @throws Exception any exception
*/
public abstract Portlet getState(ExoContainer container, ApplicationState<S> applicationState) throws Exception;
+
+ /**
+ * Extracts the state based on what the current PortletContext is and the new modified PortletContext.
+ *
+ * @param originalPortletContext The current PortletContext for the Portlet
+ * @param modifiedPortletContext The new modified PortletContext
+ * @return
+ */
+ public abstract C getStateFromModifiedContext(PortletContext originalPortletContext, PortletContext modifiedPortletContext);
+
+ /**
+ * Extracts the state based on what the current PortletContext is and the new cloned PortletContext
+ *
+ * @param originalPortletContext The current PortletContext for the Portlet
+ * @param clonedPortletContext The new cloned PortletContext
+ * @return
+ */
+ public abstract C getstateFromClonedContext(PortletContext originalPortletContext, PortletContext clonedPortletContext);
}
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 2010-11-16 12:49:08 UTC (rev 5107)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-11-16 17:20:26 UTC (rev 5108)
@@ -56,6 +56,7 @@
import org.gatein.pc.api.PortletContext;
import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.pc.api.PortletStateType;
import org.gatein.pc.api.StateString;
import org.gatein.pc.api.StatefulPortletContext;
import org.gatein.pc.api.cache.CacheLevel;
@@ -472,7 +473,14 @@
if (portlet == null)
{
- log.info("Could not find portlet with ID : " + producerOfferedPortletContext.getId());
+ if (producerOfferedPortletContext != null)
+ {
+ log.info("Could not find portlet with ID : " + producerOfferedPortletContext.getId());
+ }
+ else
+ {
+ log.info("Could not find portlet. The producerOfferedPortletContext is null");
+ }
return false;
}
@@ -843,10 +851,25 @@
// instance context
ExoPortletInstanceContext instanceContext;
+ // TODO: we should not be having these wsrp specific conditions through the code like
+ // this, it should either work the same was as normal portlets or abstracted out to another class.
if (ApplicationType.WSRP_PORTLET.equals(state.getApplicationType()))
{
WSRP wsrp = (WSRP)preferencesPortletContext.getState();
AccessMode accessMode = AccessMode.CLONE_BEFORE_WRITE;
+
+ if (wsrp.getState() != null)
+ {
+ StatefulPortletContext statefulPortletContext = StatefulPortletContext.create(preferencesPortletContext.getId(),
+ PortletStateType.OPAQUE, wsrp.getState());
+
+ invocation.setTarget(statefulPortletContext);
+ }
+ else
+ {
+ PortletContext portletContext = PortletContext.createPortletContext(preferencesPortletContext.getId());
+ invocation.setTarget(portletContext);
+ }
// if the portlet is a cloned one already, we can modify it directly instead of requesting a clone
if (wsrp.isCloned())
@@ -858,6 +881,7 @@
else
{
instanceContext = new ExoPortletInstanceContext(preferencesPortletContext.getId());
+ invocation.setTarget(preferencesPortletContext);
}
invocation.setInstanceContext(instanceContext);
@@ -869,9 +893,6 @@
invocation.setSecurityContext(new AbstractSecurityContext(servletRequest));
//
- invocation.setTarget(preferencesPortletContext);
-
- //
return invocation;
}
@@ -980,10 +1001,19 @@
public void update(C updateState) throws Exception
{
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
- ExoContainer container = context.getApplication().getApplicationServiceContainer();
- state.setApplicationState(adapter.update(container, updateState, state.getApplicationState()));
+ ExoContainer container = context.getApplication().getApplicationServiceContainer(); state.setApplicationState(adapter.update(container, updateState, state.getApplicationState()));
setState(state);
}
+
+ public C getModifiedState(PortletContext modifiedContext) throws Exception
+ {
+ return adapter.getStateFromModifiedContext(this.getPortletContext(), modifiedContext);
+ }
+
+ public C getClonedState(PortletContext clonedContext) throws Exception
+ {
+ return adapter.getstateFromClonedContext(this.getPortletContext(), clonedContext);
+ }
/** This is used by the dashboard portlet and should not be used else where. It will be removed some day. */
private static final ThreadLocal<UIPortlet> currentPortlet = new ThreadLocal<UIPortlet>();
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 2010-11-16 12:49:08 UTC (rev 5107)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2010-11-16 17:20:26 UTC (rev 5108)
@@ -25,7 +25,6 @@
import org.exoplatform.portal.Constants;
import org.exoplatform.portal.application.PortalRequestContext;
-import org.exoplatform.portal.pom.spi.wsrp.WSRP;
import org.exoplatform.portal.webui.page.UIPage;
import org.exoplatform.portal.webui.page.UIPageBody;
import org.exoplatform.portal.webui.portal.UIPortal;
@@ -121,7 +120,7 @@
if (instanceCtx.getModifiedContext() != null)
{
StatefulPortletContext<C> updatedCtx = (StatefulPortletContext<C>)instanceCtx.getModifiedContext();
- C portletState = updatedCtx.getState();
+ C portletState = uiPortlet.getModifiedState(updatedCtx);
uiPortlet.update(portletState);
}
else
@@ -130,17 +129,8 @@
PortletContext clonedContext = instanceCtx.getClonedContext();
if (clonedContext != null)
{
- WSRP wsrp = new WSRP();
- wsrp.setPortletId(clonedContext.getId());
- wsrp.setCloned(true); // mark the state as cloned
-
- // if we have an associated state, record it as well...
- if (clonedContext instanceof StatefulPortletContext)
- {
- StatefulPortletContext statefulPortletContext = (StatefulPortletContext)clonedContext;
- wsrp.setState((byte[])statefulPortletContext.getState());
- }
- uiPortlet.update((C)wsrp);
+ C state = uiPortlet.getClonedState(clonedContext);
+ uiPortlet.update(state);
}
}
14 years, 2 months
gatein SVN: r5107 - in portal/branches/branch-GTNPORTAL-1643: examples/extension/war/src/main/webapp/login/jsp and 4 other directories.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-11-16 07:49:08 -0500 (Tue, 16 Nov 2010)
New Revision: 5107
Modified:
portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java
portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/PortalLoginController.java
portal/branches/branch-GTNPORTAL-1643/examples/extension/war/src/main/webapp/login/jsp/login.jsp
portal/branches/branch-GTNPORTAL-1643/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
portal/branches/branch-GTNPORTAL-1643/examples/portal/war/src/main/webapp/login/jsp/login.jsp
portal/branches/branch-GTNPORTAL-1643/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
portal/branches/branch-GTNPORTAL-1643/web/portal/src/main/webapp/login/jsp/login.jsp
Log:
GTNPORTAL-1594 Problem with session in difference war file, need to change way way to control the initialURI (now, not use HttpSession anymore)
Modified: portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java 2010-11-16 12:23:34 UTC (rev 5106)
+++ portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java 2010-11-16 12:49:08 UTC (rev 5107)
@@ -71,9 +71,33 @@
resp.setContentType("text/html; charset=UTF-8");
// This allows the customer to define another login page without changing the portal
- context.getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
+ showLoginForm(req, resp);
}
+ private void showLoginForm(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
+ {
+ String initialURI = (String)req.getAttribute("javax.servlet.forward.request_uri");
+ if (initialURI == null)
+ {
+ throw new IllegalStateException("request attribute javax.servlet.forward.request_uri should not be null here");
+ }
+ int jsecurityIndex = initialURI.lastIndexOf("/j_security_check");
+ if (jsecurityIndex != -1)
+ {
+ initialURI = initialURI.substring(0, jsecurityIndex);
+ }
+
+ try
+ {
+ req.setAttribute("org.gatein.portal.login.initial_uri", initialURI);
+ getServletContext().getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
+ }
+ finally
+ {
+ req.removeAttribute("org.gatein.portal.login.initial_uri");
+ }
+ }
+
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
doGet(req, resp);
Modified: portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-11-16 12:23:34 UTC (rev 5106)
+++ portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-11-16 12:49:08 UTC (rev 5107)
@@ -96,7 +96,7 @@
// Send authentication request
log.debug("Login initiated with no credentials in session but found token " + token + " with existing credentials, " +
"performing authentication");
- sendAuth(resp, credentials.getUsername(), token);
+ sendAuth(req, resp, credentials.getUsername(), token);
}
}
else
@@ -116,36 +116,47 @@
// Send authentication request
log.debug("Login initiated with credentials in session, performing authentication");
- sendAuth(resp, credentials.getUsername(), token);
+ sendAuth(req, resp, credentials.getUsername(), token);
}
}
private void showLoginForm(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
- String initialURI = (String)req.getAttribute("javax.servlet.forward.request_uri");
- if (initialURI == null)
- {
- throw new IllegalStateException("request attribute javax.servlet.forward.request_uri should not be null here");
- }
+ String initialURI = getInitialURI(req);
try
{
- req.getSession(true).setAttribute("org.gatein.portal.login.initial_uri", initialURI);
+ req.setAttribute("org.gatein.portal.login.initial_uri", initialURI);
getServletContext().getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
}
finally
{
- req.getSession(true).removeAttribute("org.gatein.portal.login.initial_uri");
+ req.removeAttribute("org.gatein.portal.login.initial_uri");
}
}
+ private String getInitialURI(HttpServletRequest req)
+ {
+ String initialURI = (String)req.getAttribute("javax.servlet.forward.request_uri");
+ if (initialURI == null)
+ {
+ throw new IllegalStateException("request attribute javax.servlet.forward.request_uri should not be null here");
+ }
+ return initialURI;
+ }
+
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
doGet(req, resp);
}
- private void sendAuth(HttpServletResponse resp, String jUsername, String jPassword) throws IOException
+ private void sendAuth(HttpServletRequest req, HttpServletResponse resp, String jUsername, String jPassword) throws IOException
{
- String url = "j_security_check?j_username=" + jUsername + "&j_password=" + jPassword;
+ String initialURI = getInitialURI(req);
+ if (!initialURI.endsWith("/"))
+ {
+ initialURI += "/";
+ }
+ String url = initialURI + "j_security_check?j_username=" + jUsername + "&j_password=" + jPassword;
url = resp.encodeRedirectURL(url);
resp.sendRedirect(url);
}
Modified: portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/PortalLoginController.java
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/PortalLoginController.java 2010-11-16 12:23:34 UTC (rev 5106)
+++ portal/branches/branch-GTNPORTAL-1643/component/web/security/src/main/java/org/exoplatform/web/login/PortalLoginController.java 2010-11-16 12:49:08 UTC (rev 5107)
@@ -79,7 +79,6 @@
else
{
log.debug("Found initial URI " + uri);
- req.getSession(true).setAttribute("org.gatein.portal.login.initial_uri", uri);
}
// if we do have a remember me
Modified: portal/branches/branch-GTNPORTAL-1643/examples/extension/war/src/main/webapp/login/jsp/login.jsp
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/examples/extension/war/src/main/webapp/login/jsp/login.jsp 2010-11-16 12:23:34 UTC (rev 5106)
+++ portal/branches/branch-GTNPORTAL-1643/examples/extension/war/src/main/webapp/login/jsp/login.jsp 2010-11-16 12:49:08 UTC (rev 5107)
@@ -26,7 +26,6 @@
<%@ page import="java.util.ResourceBundle"%>
<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
<%@ page import="org.gatein.common.text.EntityEncoder"%>
-<%@ page import="javax.servlet.http.HttpSession"%>
<%@ page language="java" %>
<%@ page contentType="text/html; charset=utf-8" %>
<%
@@ -41,9 +40,7 @@
ResourceBundleService service = (ResourceBundleService) portalContainer.getComponentInstanceOfType(ResourceBundleService.class);
ResourceBundle res = service.getResourceBundle(service.getSharedResourceBundleNames(), request.getLocale()) ;
- HttpSession httpSession = request.getSession(true);
- String uri = (String)httpSession.getAttribute("org.gatein.portal.login.initial_uri");
- httpSession.removeAttribute("org.gatein.portal.login.initial_uri");
+ String uri = (String)request.getAttribute("org.gatein.portal.login.initial_uri");
Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, "");
cookie.setPath(request.getContextPath());
Modified: portal/branches/branch-GTNPORTAL-1643/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-11-16 12:23:34 UTC (rev 5106)
+++ portal/branches/branch-GTNPORTAL-1643/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-11-16 12:49:08 UTC (rev 5107)
@@ -1,3 +1,6 @@
+<%
+ String initialURI = _ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() + "/private/" + _ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
+%>
<div class="UIHomePagePortlet" id="$uicomponent.id">
<div class="TRContainer">
<div class="PortletDecoration">
@@ -28,7 +31,7 @@
<div class="AccountsContainerDeco">
<div class="AccountBlock AdministratorUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
<div class="ClearBoth"><span></span></div>
@@ -42,7 +45,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock ManagerUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
<div class="ClearBoth"><span></span></div>
@@ -56,7 +59,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock NormalUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
<div class="ClearBoth"><span></span></div>
@@ -70,7 +73,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock DemoUser" style="margin-right: 0px;">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
<div class="ClearBoth"><span></span></div>
Modified: portal/branches/branch-GTNPORTAL-1643/examples/portal/war/src/main/webapp/login/jsp/login.jsp
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/examples/portal/war/src/main/webapp/login/jsp/login.jsp 2010-11-16 12:23:34 UTC (rev 5106)
+++ portal/branches/branch-GTNPORTAL-1643/examples/portal/war/src/main/webapp/login/jsp/login.jsp 2010-11-16 12:49:08 UTC (rev 5107)
@@ -26,7 +26,6 @@
<%@ page import="java.util.ResourceBundle"%>
<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
<%@ page import="org.gatein.common.text.EntityEncoder"%>
-<%@ page import="javax.servlet.http.HttpSession"%>
<%@ page language="java" %>
<%@ page contentType="text/html; charset=utf-8" %>
<%
@@ -41,9 +40,7 @@
ResourceBundleService service = (ResourceBundleService) portalContainer.getComponentInstanceOfType(ResourceBundleService.class);
ResourceBundle res = service.getResourceBundle(service.getSharedResourceBundleNames(), request.getLocale()) ;
- HttpSession httpSession = request.getSession(true);
- String uri = (String)httpSession.getAttribute("org.gatein.portal.login.initial_uri");
- httpSession.removeAttribute("org.gatein.portal.login.initial_uri");
+ String uri = (String)request.getAttribute("org.gatein.portal.login.initial_uri");
Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, "");
cookie.setPath(request.getContextPath());
Modified: portal/branches/branch-GTNPORTAL-1643/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-11-16 12:23:34 UTC (rev 5106)
+++ portal/branches/branch-GTNPORTAL-1643/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-11-16 12:49:08 UTC (rev 5107)
@@ -1,3 +1,6 @@
+<%
+ String initialURI = _ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() + "/private/" + _ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
+%>
<div class="UIHomePagePortlet" id="$uicomponent.id">
<div class="TRContainer">
<div class="PortletDecoration">
@@ -33,7 +36,7 @@
<div class="AccountsContainerDeco">
<div class="AccountBlock AdministratorUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
<div class="ClearBoth"><span></span></div>
@@ -47,7 +50,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock ManagerUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
<div class="ClearBoth"><span></span></div>
@@ -61,7 +64,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock NormalUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
<div class="ClearBoth"><span></span></div>
@@ -75,7 +78,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock DemoUser" style="margin-right: 0px;">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
<div class="ClearBoth"><span></span></div>
Modified: portal/branches/branch-GTNPORTAL-1643/web/portal/src/main/webapp/login/jsp/login.jsp
===================================================================
--- portal/branches/branch-GTNPORTAL-1643/web/portal/src/main/webapp/login/jsp/login.jsp 2010-11-16 12:23:34 UTC (rev 5106)
+++ portal/branches/branch-GTNPORTAL-1643/web/portal/src/main/webapp/login/jsp/login.jsp 2010-11-16 12:49:08 UTC (rev 5107)
@@ -26,7 +26,6 @@
<%@ page import="java.util.ResourceBundle"%>
<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
<%@ page import="org.gatein.common.text.EntityEncoder"%>
-<%@ page import="javax.servlet.http.HttpSession"%>
<%@ page language="java" %>
<%
String contextPath = request.getContextPath() ;
@@ -45,9 +44,7 @@
cookie.setMaxAge(0);
response.addCookie(cookie);
- HttpSession httpSession = request.getSession(true);
- String uri = (String)httpSession.getAttribute("org.gatein.portal.login.initial_uri");
- httpSession.removeAttribute("org.gatein.portal.login.initial_uri");
+ String uri = (String)request.getAttribute("org.gatein.portal.login.initial_uri");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");
14 years, 2 months
gatein SVN: r5106 - in exo/portal/branches/3.1.x/component/portal/src: test/java/org/exoplatform/portal/config and 1 other directory.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-11-16 07:23:34 -0500 (Tue, 16 Nov 2010)
New Revision: 5106
Modified:
exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/config/GroupPortalConfigListener.java
exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java
Log:
Allways show 'the page navigation for group already exists' although it was deleted
Modified: exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/config/GroupPortalConfigListener.java
===================================================================
--- exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/config/GroupPortalConfigListener.java 2010-11-16 11:53:34 UTC (rev 5105)
+++ exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/config/GroupPortalConfigListener.java 2010-11-16 12:23:34 UTC (rev 5106)
@@ -154,8 +154,11 @@
{
GroupHandler groupHandler = orgService.getGroupHandler();
Collection<String> descendantGroups = getDescendantGroups(group, groupHandler);
+ Collection<String> deletedNavigationGroups = new ArrayList<String>();
+ deletedNavigationGroups.addAll(descendantGroups);
+ deletedNavigationGroups.add(group.getId());
PageNavigation navigation = null;
- for (String childGroup : descendantGroups)
+ for (String childGroup : deletedNavigationGroups)
{
navigation = dataService.getPageNavigation(PortalConfig.GROUP_TYPE, childGroup);
if (navigation != null)
Modified: exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java
===================================================================
--- exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java 2010-11-16 11:53:34 UTC (rev 5105)
+++ exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java 2010-11-16 12:23:34 UTC (rev 5106)
@@ -127,6 +127,31 @@
group = groupHandler.findGroupById("/groupTest");
assertNull(group);
}
+
+ public void testGroupNavigation() throws Exception
+ {
+ GroupHandler groupHandler = org.getGroupHandler();
+ Group group = groupHandler.createGroupInstance();
+ group.setGroupName("testGroupNavigation");
+ group.setLabel("testGroupNavigation");
+
+ groupHandler.addChild(null, group, true);
+
+ PageNavigation pageNavigation = new PageNavigation();
+ pageNavigation.setOwnerId(group.getId());
+ pageNavigation.setOwnerType(PortalConfig.GROUP_TYPE);
+ storage.create(pageNavigation);
+
+ pageNavigation = storage.getPageNavigation(PortalConfig.GROUP_TYPE, group.getId());
+ assertNotNull(pageNavigation);
+
+ // Remove group
+ groupHandler.removeGroup(group, true);
+
+ // Group navigations is removed after remove group
+ pageNavigation = storage.getPageNavigation(PortalConfig.GROUP_TYPE, group.getId());
+ assertNull(pageNavigation);
+ }
public void testUserLayout() throws Exception
{
14 years, 2 months
gatein SVN: r5105 - exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/webui.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-11-16 06:53:34 -0500 (Tue, 16 Nov 2010)
New Revision: 5105
Modified:
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js
Log:
EXOGTN-155 Edit dashboard page name in Chrome doesn't work
Modified: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js 2010-11-16 11:29:42 UTC (rev 5104)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/webui/UITabbedDashboard.js 2010-11-16 11:53:34 UTC (rev 5105)
@@ -39,11 +39,6 @@
var compId = portletFrag.parentNode.id;
var nodeIndex = inputElement.id;
- //Change the tab label
- var spanElement = document.createElement("span");
- spanElement.innerHTML = newTabLabel;
- inputElement.parentNode.replaceChild(spanElement, inputElement);
-
//Send request to server to change node name
var href = eXo.env.server.portalBaseURL + "?portal:componentId=" + compId;
href += "&portal:type=action";
14 years, 2 months
gatein SVN: r5104 - in exo/portal/branches/3.1.x: examples/extension/war/src/main/webapp/login/jsp and 4 other directories.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-11-16 06:29:42 -0500 (Tue, 16 Nov 2010)
New Revision: 5104
Modified:
exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java
exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/PortalLoginController.java
exo/portal/branches/3.1.x/examples/extension/war/src/main/webapp/login/jsp/login.jsp
exo/portal/branches/3.1.x/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
exo/portal/branches/3.1.x/examples/portal/war/src/main/webapp/login/jsp/login.jsp
exo/portal/branches/3.1.x/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
exo/portal/branches/3.1.x/web/portal/src/main/webapp/login/jsp/login.jsp
Log:
EXOGTN-86 Problem with session in difference war file, need to change way way to redirect to initialURI (now, not use HttpSession anymore)
Modified: exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java
===================================================================
--- exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java 2010-11-16 10:27:49 UTC (rev 5103)
+++ exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/ErrorLoginServlet.java 2010-11-16 11:29:42 UTC (rev 5104)
@@ -69,8 +69,32 @@
resp.setContentType("text/html; charset=UTF-8");
// This allows the customer to define another login page without changing the portal
- context.getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
+ showLoginForm(req, resp);
}
+
+ private void showLoginForm(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
+ {
+ String initialURI = (String)req.getAttribute("javax.servlet.forward.request_uri");
+ if (initialURI == null)
+ {
+ throw new IllegalStateException("request attribute javax.servlet.forward.request_uri should not be null here");
+ }
+ int jsecurityIndex = initialURI.lastIndexOf("/j_security_check");
+ if (jsecurityIndex != -1)
+ {
+ initialURI = initialURI.substring(0, jsecurityIndex);
+ }
+
+ try
+ {
+ req.setAttribute("org.gatein.portal.login.initial_uri", initialURI);
+ getServletContext().getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
+ }
+ finally
+ {
+ req.removeAttribute("org.gatein.portal.login.initial_uri");
+ }
+ }
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
Modified: exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
===================================================================
--- exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-11-16 10:27:49 UTC (rev 5103)
+++ exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-11-16 11:29:42 UTC (rev 5104)
@@ -96,7 +96,7 @@
// Send authentication request
log.debug("Login initiated with no credentials in session but found token " + token + " with existing credentials, " +
"performing authentication");
- sendAuth(resp, credentials.getUsername(), token);
+ sendAuth(req, resp, credentials.getUsername(), token);
}
}
else
@@ -116,36 +116,47 @@
// Send authentication request
log.debug("Login initiated with credentials in session, performing authentication");
- sendAuth(resp, credentials.getUsername(), token);
+ sendAuth(req, resp, credentials.getUsername(), token);
}
}
private void showLoginForm(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
- String initialURI = (String)req.getAttribute("javax.servlet.forward.request_uri");
- if (initialURI == null)
- {
- throw new IllegalStateException("request attribute javax.servlet.forward.request_uri should not be null here");
- }
+ String initialURI = getInitialURI(req);
try
{
- req.getSession(true).setAttribute("org.gatein.portal.login.initial_uri", initialURI);
+ req.setAttribute("org.gatein.portal.login.initial_uri", initialURI);
getServletContext().getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
}
finally
{
- req.getSession(true).removeAttribute("org.gatein.portal.login.initial_uri");
+ req.removeAttribute("org.gatein.portal.login.initial_uri");
}
}
+ private String getInitialURI(HttpServletRequest req)
+ {
+ String initialURI = (String)req.getAttribute("javax.servlet.forward.request_uri");
+ if (initialURI == null)
+ {
+ throw new IllegalStateException("request attribute javax.servlet.forward.request_uri should not be null here");
+ }
+ return initialURI;
+ }
+
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
doGet(req, resp);
}
- private void sendAuth(HttpServletResponse resp, String jUsername, String jPassword) throws IOException
+ private void sendAuth(HttpServletRequest req, HttpServletResponse resp, String jUsername, String jPassword) throws IOException
{
- String url = "j_security_check?j_username=" + jUsername + "&j_password=" + jPassword;
+ String initialURI = getInitialURI(req);
+ if (!initialURI.endsWith("/"))
+ {
+ initialURI += "/";
+ }
+ String url = initialURI + "j_security_check?j_username=" + jUsername + "&j_password=" + jPassword;
url = resp.encodeRedirectURL(url);
resp.sendRedirect(url);
}
Modified: exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/PortalLoginController.java
===================================================================
--- exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/PortalLoginController.java 2010-11-16 10:27:49 UTC (rev 5103)
+++ exo/portal/branches/3.1.x/component/web/src/main/java/org/exoplatform/web/login/PortalLoginController.java 2010-11-16 11:29:42 UTC (rev 5104)
@@ -19,13 +19,6 @@
package org.exoplatform.web.login;
-import org.exoplatform.container.web.AbstractHttpServlet;
-import org.exoplatform.web.security.Credentials;
-import org.exoplatform.web.security.security.AbstractTokenService;
-import org.exoplatform.web.security.security.CookieTokenService;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-
import java.io.IOException;
import javax.servlet.ServletException;
@@ -33,6 +26,13 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.exoplatform.container.web.AbstractHttpServlet;
+import org.exoplatform.web.security.Credentials;
+import org.exoplatform.web.security.security.AbstractTokenService;
+import org.exoplatform.web.security.security.CookieTokenService;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+
/**
* @author <a href="mailto:trong.tran@exoplatform.com">Tran The Trong</a>
* @version $Revision$
@@ -79,7 +79,6 @@
else
{
log.debug("Found initial URI " + uri);
- req.getSession(true).setAttribute("org.gatein.portal.login.initial_uri", uri);
}
// if we do have a remember me
Modified: exo/portal/branches/3.1.x/examples/extension/war/src/main/webapp/login/jsp/login.jsp
===================================================================
--- exo/portal/branches/3.1.x/examples/extension/war/src/main/webapp/login/jsp/login.jsp 2010-11-16 10:27:49 UTC (rev 5103)
+++ exo/portal/branches/3.1.x/examples/extension/war/src/main/webapp/login/jsp/login.jsp 2010-11-16 11:29:42 UTC (rev 5104)
@@ -26,7 +26,6 @@
<%@ page import="java.util.ResourceBundle"%>
<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
<%@ page import="org.gatein.common.text.EntityEncoder"%>
-<%@ page import="javax.servlet.http.HttpSession"%>
<%@ page language="java" %>
<%@ page contentType="text/html; charset=utf-8" %>
<%
@@ -41,9 +40,7 @@
ResourceBundleService service = (ResourceBundleService) portalContainer.getComponentInstanceOfType(ResourceBundleService.class);
ResourceBundle res = service.getResourceBundle(service.getSharedResourceBundleNames(), request.getLocale()) ;
- HttpSession httpSession = request.getSession(true);
- String uri = (String)httpSession.getAttribute("org.gatein.portal.login.initial_uri");
- httpSession.removeAttribute("org.gatein.portal.login.initial_uri");
+ String uri = (String)request.getAttribute("org.gatein.portal.login.initial_uri");
Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, "");
cookie.setPath(request.getContextPath());
Modified: exo/portal/branches/3.1.x/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
--- exo/portal/branches/3.1.x/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-11-16 10:27:49 UTC (rev 5103)
+++ exo/portal/branches/3.1.x/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-11-16 11:29:42 UTC (rev 5104)
@@ -1,3 +1,6 @@
+<%
+ String initialURI = _ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() + "/private/" + _ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
+%>
<div class="UIHomePagePortlet" id="$uicomponent.id">
<div class="TRContainer">
<div class="PortletDecoration">
@@ -28,7 +31,7 @@
<div class="AccountsContainerDeco">
<div class="AccountBlock AdministratorUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
<div class="ClearBoth"><span></span></div>
@@ -42,7 +45,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock ManagerUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
<div class="ClearBoth"><span></span></div>
@@ -56,7 +59,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock NormalUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
<div class="ClearBoth"><span></span></div>
@@ -70,7 +73,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock DemoUser" style="margin-right: 0px;">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
<div class="ClearBoth"><span></span></div>
Modified: exo/portal/branches/3.1.x/examples/portal/war/src/main/webapp/login/jsp/login.jsp
===================================================================
--- exo/portal/branches/3.1.x/examples/portal/war/src/main/webapp/login/jsp/login.jsp 2010-11-16 10:27:49 UTC (rev 5103)
+++ exo/portal/branches/3.1.x/examples/portal/war/src/main/webapp/login/jsp/login.jsp 2010-11-16 11:29:42 UTC (rev 5104)
@@ -26,7 +26,6 @@
<%@ page import="java.util.ResourceBundle"%>
<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
<%@ page import="org.gatein.common.text.EntityEncoder"%>
-<%@ page import="javax.servlet.http.HttpSession"%>
<%@ page language="java" %>
<%@ page contentType="text/html; charset=utf-8" %>
<%
@@ -41,9 +40,7 @@
ResourceBundleService service = (ResourceBundleService) portalContainer.getComponentInstanceOfType(ResourceBundleService.class);
ResourceBundle res = service.getResourceBundle(service.getSharedResourceBundleNames(), request.getLocale()) ;
- HttpSession httpSession = request.getSession(true);
- String uri = (String)httpSession.getAttribute("org.gatein.portal.login.initial_uri");
- httpSession.removeAttribute("org.gatein.portal.login.initial_uri");
+ String uri = (String)request.getAttribute("org.gatein.portal.login.initial_uri");
Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, "");
cookie.setPath(request.getContextPath());
Modified: exo/portal/branches/3.1.x/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
--- exo/portal/branches/3.1.x/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-11-16 10:27:49 UTC (rev 5103)
+++ exo/portal/branches/3.1.x/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2010-11-16 11:29:42 UTC (rev 5104)
@@ -1,3 +1,6 @@
+<%
+ String initialURI = _ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() + "/private/" + _ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
+%>
<div class="UIHomePagePortlet" id="$uicomponent.id">
<div class="TRContainer">
<div class="PortletDecoration">
@@ -33,7 +36,7 @@
<div class="AccountsContainerDeco">
<div class="AccountBlock AdministratorUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
<div class="ClearBoth"><span></span></div>
@@ -47,7 +50,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock ManagerUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
<div class="ClearBoth"><span></span></div>
@@ -61,7 +64,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock NormalUser">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
<div class="ClearBoth"><span></span></div>
@@ -75,7 +78,7 @@
<div class="SeparatorLine"><span></span></div>
<div class="AccountBlock DemoUser" style="margin-right: 0px;">
<div class="AccountInfos">
- <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
+ <div class="AccountTitle"><a href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
<div class="Username">
<div class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
<div class="ClearBoth"><span></span></div>
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/login/jsp/login.jsp
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/login/jsp/login.jsp 2010-11-16 10:27:49 UTC (rev 5103)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/login/jsp/login.jsp 2010-11-16 11:29:42 UTC (rev 5104)
@@ -26,7 +26,6 @@
<%@ page import="java.util.ResourceBundle"%>
<%@ page import="org.exoplatform.web.login.InitiateLoginServlet"%>
<%@ page import="org.gatein.common.text.EntityEncoder"%>
-<%@ page import="javax.servlet.http.HttpSession"%>
<%@ page language="java" %>
<%
String contextPath = request.getContextPath() ;
@@ -45,9 +44,8 @@
cookie.setMaxAge(0);
response.addCookie(cookie);
- HttpSession httpSession = request.getSession(true);
- String uri = (String)httpSession.getAttribute("org.gatein.portal.login.initial_uri");
- httpSession.removeAttribute("org.gatein.portal.login.initial_uri");
+ String uri = (String)request.getAttribute("org.gatein.portal.login.initial_uri");
+
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");
%>
14 years, 2 months
gatein SVN: r5103 - exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-11-16 05:27:49 -0500 (Tue, 16 Nov 2010)
New Revision: 5103
Modified:
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java
Log:
EXOGTN-103 Allow modifies label of the system node
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java 2010-11-16 10:09:34 UTC (rev 5102)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageNodeForm.java 2010-11-16 10:27:49 UTC (rev 5103)
@@ -186,13 +186,16 @@
public void invokeSetBindingBean(Object bean) throws Exception
{
super.invokeSetBindingBean(bean);
- PageNode node = (PageNode)bean;
- Calendar cal = getUIFormDateTimeInput(START_PUBLICATION_DATE).getCalendar();
- Date date = (cal != null) ? cal.getTime() : null;
- node.setStartPublicationDate(date);
- cal = getUIFormDateTimeInput(END_PUBLICATION_DATE).getCalendar();
- date = (cal != null) ? cal.getTime() : null;
- node.setEndPublicationDate(date);
+ PageNode node = (PageNode) bean;
+ if (node.getVisibility() != Visibility.SYSTEM)
+ {
+ Calendar cal = getUIFormDateTimeInput(START_PUBLICATION_DATE).getCalendar();
+ Date date = (cal != null) ? cal.getTime() : null;
+ node.setStartPublicationDate(date);
+ cal = getUIFormDateTimeInput(END_PUBLICATION_DATE).getCalendar();
+ date = (cal != null) ? cal.getTime() : null;
+ node.setEndPublicationDate(date);
+ }
}
public void setShowCheckPublicationDate(boolean show)
@@ -269,7 +272,11 @@
WebuiRequestContext ctx = event.getRequestContext();
UIPageNodeForm uiPageNodeForm = event.getSource();
UIApplication uiPortalApp = ctx.getUIApplication();
- if (uiPageNodeForm.getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).isChecked())
+ PageNode pageNode = uiPageNodeForm.getPageNode();
+ if (pageNode == null)
+ pageNode = new PageNode();
+
+ if (pageNode.getVisibility() != Visibility.SYSTEM && uiPageNodeForm.getUIFormCheckBoxInput(SHOW_PUBLICATION_DATE).isChecked())
{
Calendar currentCalendar = Calendar.getInstance();
currentCalendar.set(currentCalendar.get(Calendar.YEAR), currentCalendar.get(Calendar.MONTH), currentCalendar.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
@@ -305,10 +312,7 @@
}
}
-
- PageNode pageNode = uiPageNodeForm.getPageNode();
- if (pageNode == null)
- pageNode = new PageNode();
+
uiPageNodeForm.invokeSetBindingBean(pageNode);
UIPageSelector2 pageSelector = uiPageNodeForm.getChild(UIPageSelector2.class);
if (pageSelector.getPage() == null)
14 years, 2 months
gatein SVN: r5102 - exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-11-16 05:09:34 -0500 (Tue, 16 Nov 2010)
New Revision: 5102
Modified:
exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
Log:
EXOGTN-142 [PLF] RSS gadget displays wrong publish date (update)
Modified: exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
===================================================================
--- exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2010-11-16 09:19:20 UTC (rev 5101)
+++ exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2010-11-16 10:09:34 UTC (rev 5102)
@@ -43,7 +43,7 @@
if (isNaN(B)) {
return "an indeterminate amount of time ago"
}
- time = (new Date().getTime() 1000 - B) / 1000;
+ time = (new Date().getTime()*1000 - B) / 1000;
if (time < 60) {
return "less than a minute ago"
} else {
14 years, 2 months
gatein SVN: r5101 - in portal/branches/wci/packaging/tomcat/pkg: tc6 and 1 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-11-16 04:19:20 -0500 (Tue, 16 Nov 2010)
New Revision: 5101
Modified:
portal/branches/wci/packaging/tomcat/pkg/pom.xml
portal/branches/wci/packaging/tomcat/pkg/tc6/pom.xml
portal/branches/wci/packaging/tomcat/pkg/tc7/pom.xml
Log:
Some details about tomcat packaging
Modified: portal/branches/wci/packaging/tomcat/pkg/pom.xml
===================================================================
--- portal/branches/wci/packaging/tomcat/pkg/pom.xml 2010-11-16 07:22:57 UTC (rev 5100)
+++ portal/branches/wci/packaging/tomcat/pkg/pom.xml 2010-11-16 09:19:20 UTC (rev 5101)
@@ -863,12 +863,6 @@
<property>exo.projects.app.tomcat.version</property>
<message>"You must define the property exo.projects.app.tomcat.version to give the name of the directory where is stored tomcat"</message>
</requireProperty>
- <!--<requireFilesExist>
- <files>
- <file>${tomcat.dir}/</file>
- </files>
- <message>"The following Tomcat directory doesn't exist : ${tomcat.dir}"</message>
- </requireFilesExist>-->
</rules>
<fail>true</fail>
</configuration>
@@ -880,6 +874,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
+ <inherited>false</inherited>
<executions>
<execution>
<id>prepare-package</id>
@@ -926,33 +921,6 @@
<profiles>
<profile>
- <id>bundle</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.6</version>
- <executions>
- <execution>
- <id>package</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <zip destfile="${project.build.directory}/tomcat.zip" basedir="${project.build.directory}/tomcat"/>
- <attachartifact file="${project.build.directory}/tomcat.zip" classifier="bundle" type="zip"/>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
<id>pkg-tomcat</id>
<modules>
<module>tc6</module>
Modified: portal/branches/wci/packaging/tomcat/pkg/tc6/pom.xml
===================================================================
--- portal/branches/wci/packaging/tomcat/pkg/tc6/pom.xml 2010-11-16 07:22:57 UTC (rev 5100)
+++ portal/branches/wci/packaging/tomcat/pkg/tc6/pom.xml 2010-11-16 09:19:20 UTC (rev 5101)
@@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.parent</artifactId>
+ <artifactId>exo.portal.packaging.tomcat.pkg</artifactId>
<version>3.2.0-Beta01-SNAPSHOT</version>
</parent>
<artifactId>exo.portal.packaging.tomcat.pkg.tc6</artifactId>
@@ -27,8 +27,34 @@
<build>
<plugins>
+
+ <!-- Ensure your environment is correctly setup -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireFilesExist>
+ <files>
+ <file>${tomcat.dir}/</file>
+ </files>
+ <message>"The following Tomcat directory doesn't exist : ${tomcat.dir}"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
@@ -59,7 +85,7 @@
<!-- Tomcat 6 specific configuration -->
<copy
file="${project.basedir}/src/main/resources/conf/integration/web.xml"
- tofile="${project.build.directory}/tomcat6/webapps/integration/WEB-INF/web.xml"/>
+ todir="${project.build.directory}/tomcat6/webapps/integration/WEB-INF"/>
<!-- File permissions -->
<chmod perm="0644" type="file" dir="${project.build.directory}/tomcat6" excludes="**/*.sh"/>
@@ -72,5 +98,35 @@
</plugin>
</plugins>
</build>
+
+ <profiles>
+ <profile>
+ <id>bundle</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <zip destfile="${project.build.directory}/tomcat6.zip" basedir="${project.build.directory}/tomcat6"/>
+ <attachartifact file="${project.build.directory}/tomcat6.zip" classifier="bundle" type="zip"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
Modified: portal/branches/wci/packaging/tomcat/pkg/tc7/pom.xml
===================================================================
--- portal/branches/wci/packaging/tomcat/pkg/tc7/pom.xml 2010-11-16 07:22:57 UTC (rev 5100)
+++ portal/branches/wci/packaging/tomcat/pkg/tc7/pom.xml 2010-11-16 09:19:20 UTC (rev 5101)
@@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.parent</artifactId>
+ <artifactId>exo.portal.packaging.tomcat.pkg</artifactId>
<version>3.2.0-Beta01-SNAPSHOT</version>
</parent>
<artifactId>exo.portal.packaging.tomcat.pkg.tc7</artifactId>
@@ -27,8 +27,34 @@
<build>
<plugins>
+
+ <!-- Ensure your environment is correctly setup -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireFilesExist>
+ <files>
+ <file>${tomcat.dir}/</file>
+ </files>
+ <message>"The following Tomcat directory doesn't exist : ${tomcat.dir}"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
@@ -73,4 +99,34 @@
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>bundle</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <zip destfile="${project.build.directory}/tomcat7.zip" basedir="${project.build.directory}/tomcat7"/>
+ <attachartifact file="${project.build.directory}/tomcat7.zip" classifier="bundle" type="zip"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
\ No newline at end of file
14 years, 2 months
gatein SVN: r5100 - exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-11-16 02:22:57 -0500 (Tue, 16 Nov 2010)
New Revision: 5100
Modified:
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
Log:
EXOGTN-169 [PLF] Gadgets : UserPrefs bool type doesnt render a checkbox
Modified: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-11-16 07:04:38 UTC (rev 5099)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-11-16 07:22:57 UTC (rev 5100)
@@ -669,6 +669,17 @@
}
attEl.appendChild(el);
}
+ else if (type == "bool") {
+ var el = document.createElement("input");
+ el.type = "checkbox";
+ el.name = prefix + att;
+ el.id = elID;
+ if ((userPrefs[att] && userPrefs[att] == "true") ||
+ prefs[att]["default"] == "true") {
+ el.checked = true;
+ }
+ attEl.appendChild(el);
+ }
formEl.appendChild(attEl);
j++;
}
@@ -745,6 +756,8 @@
var userPrefNamePrefix = 'm_' + this.id + '_up_';
var userPrefName = input.name.substring(userPrefNamePrefix.length);
var userPrefValue = input.value;
+ if(input.type == 'checkbox')
+ userPrefValue = input.checked ? "true" : "false";
prefs[userPrefName] = userPrefValue;
}
}
14 years, 2 months
gatein SVN: r5099 - exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-11-16 02:04:38 -0500 (Tue, 16 Nov 2010)
New Revision: 5099
Modified:
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java
Log:
EXOGTN-140 [PLF] Check null to catch exception of WebuiBindingContext.appRe
Modified: exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java
===================================================================
--- exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java 2010-11-16 06:54:20 UTC (rev 5098)
+++ exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/core/lifecycle/WebuiBindingContext.java 2010-11-16 07:04:38 UTC (rev 5099)
@@ -89,7 +89,7 @@
public String appRes(String mesgKey) throws Exception
{
- String value;
+ String value = "";
try
{
ResourceBundle res = rcontext_.getApplicationResourceBundle();
@@ -99,7 +99,8 @@
{
if (PropertyManager.isDevelopping())
log.warn("Can not find resource bundle for key : " + mesgKey);
- value = mesgKey.substring(mesgKey.lastIndexOf('.') + 1);
+ if(mesgKey != null)
+ value = mesgKey.substring(mesgKey.lastIndexOf('.') + 1);
}
return value;
}
14 years, 2 months