Author: julien(a)jboss.com
Date: 2007-03-06 06:22:32 -0500 (Tue, 06 Mar 2007)
New Revision: 6549
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/content/ContentEditors.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/portlet/
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/portlet/PortletContentEditorPortlet.java
Modified:
trunk/bridge/src/main/org/jboss/portal/bridge/BridgeInterceptor.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/BeanDecorators.java
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
trunk/core-admin/src/main/org/jboss/portal/core/faces/JSFInvocation.java
trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletActionEvent.java
trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletEvent.java
trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletRenderEvent.java
trunk/core-admin/src/main/org/jboss/portal/core/faces/UIPortlet.java
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss_portal.tld
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageLayout.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindow.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java
trunk/portlet/src/main/org/jboss/portal/portlet/PortletParameters.java
trunk/portlet/src/main/org/jboss/portal/portlet/PortletParametersStateString.java
trunk/portlet/src/main/org/jboss/portal/portlet/impl/PortletRequestDecoder.java
trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java
trunk/portlet/src/main/org/jboss/portal/test/portlet/PortletRequestDecoderTestCase.java
Log:
portlet content editor portlet
Modified: trunk/bridge/src/main/org/jboss/portal/bridge/BridgeInterceptor.java
===================================================================
--- trunk/bridge/src/main/org/jboss/portal/bridge/BridgeInterceptor.java 2007-03-06
11:10:50 UTC (rev 6548)
+++ trunk/bridge/src/main/org/jboss/portal/bridge/BridgeInterceptor.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -36,6 +36,7 @@
protected Object invoke(PortletInvocation invocation) throws Exception
{
+ JBossServletContextProvider.BridgeInfo previousInfo =
JBossServletContextProvider.get();
try
{
// Set bridge
@@ -48,7 +49,7 @@
finally
{
// Remove bridge
- JBossServletContextProvider.set(null);
+ JBossServletContextProvider.set(previousInfo);
}
}
}
Modified:
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/core/src/main/org/jboss/portal/core/model/instance/InstanceCommandFactory.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -80,7 +80,7 @@
{
return new InvokePortletInstanceActionCommand(
instanceId,
- decoder.getNavigationalstate(),
+ decoder.getNavigationalState(),
decoder.getInteractionState(),
decoder.getForm());
}
@@ -90,7 +90,7 @@
*/
protected ControllerCommand createPortletRenderCommand(PortletRequestDecoder decoder)
{
- return new InvokePortletInstanceRenderCommand(instanceId,
decoder.getNavigationalstate());
+ return new InvokePortletInstanceRenderCommand(instanceId,
decoder.getNavigationalState());
}
/**
@@ -98,6 +98,6 @@
*/
protected ControllerCommand createPortletNavCommand(PortletRequestDecoder decoder)
{
- return new InvokePortletInstanceRenderCommand(instanceId,
decoder.getNavigationalstate());
+ return new InvokePortletInstanceRenderCommand(instanceId,
decoder.getNavigationalState());
}
}
Modified:
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectCommandFactory.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -146,10 +146,10 @@
cmd = new InvokePortletWindowRenderCommand(window.getId(), mode,
windowState);
break;
case PortletRequestDecoder.ACTION_TYPE:
- cmd = new InvokePortletWindowActionCommand(window.getId(), mode,
windowState, decoder.getNavigationalstate(), decoder.getInteractionState(),
decoder.getForm());
+ cmd = new InvokePortletWindowActionCommand(window.getId(), mode,
windowState, decoder.getNavigationalState(), decoder.getInteractionState(),
decoder.getForm());
break;
case PortletRequestDecoder.RENDER_TYPE:
- cmd = new InvokePortletWindowRenderCommand(window.getId(), mode,
windowState, decoder.getNavigationalstate());
+ cmd = new InvokePortletWindowRenderCommand(window.getId(), mode,
windowState, decoder.getNavigationalState());
break;
}
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/BeanDecorators.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/BeanDecorators.java 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/BeanDecorators.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -24,6 +24,8 @@
import org.jboss.portal.faces.el.decorator.SimpleBeanDecorator;
import org.jboss.portal.faces.el.decorator.AbstractPropertyDecorator;
+import org.jboss.portal.faces.el.decorator.AbstractBeanDecorator;
+import org.jboss.portal.faces.el.decorator.PropertyDecorator;
import org.jboss.portal.faces.el.DelegatingPropertyResolver;
import org.jboss.portal.identity.RoleModule;
import org.jboss.portal.identity.IdentityException;
@@ -35,6 +37,8 @@
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.content.ContentType;
+import org.jboss.portal.core.admin.ui.content.ContentEditors;
import javax.faces.context.FacesContext;
import java.util.Set;
@@ -217,6 +221,24 @@
}
});
DelegatingPropertyResolver.registerDecorator(PortalObject.class,
portalObjectDecorator);
+
+ //
+ DelegatingPropertyResolver.registerDecorator(ContentEditors.class, new
AbstractBeanDecorator()
+ {
+ protected PropertyDecorator getProperty(Object propertyName)
+ {
+ ContentType contentType = ContentType.create((String)propertyName);
+ final String instanceName =
ContentEditors.getInstance().getEditor(contentType);
+ return instanceName == null ? null : new
AbstractPropertyDecorator(String.class)
+ {
+ public Object getValue(Object bean) throws IllegalArgumentException
+ {
+ return instanceName;
+ }
+ };
+ }
+ });
+
}
}
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -51,6 +51,8 @@
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.content.Content;
import org.jboss.portal.core.admin.ui.actions.WindowComparator;
+import org.jboss.portal.core.admin.ui.content.ContentEditors;
+import org.jboss.portal.core.faces.PortletActionEvent;
import org.jboss.portal.identity.RoleModule;
import org.jboss.portal.security.AuthorizationDomainRegistry;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
@@ -111,6 +113,9 @@
/** The uri value for content. */
private String selectedContentURI;
+ /** . */
+ private Map renderParameters;
+
// Runtime state
/** . */
@@ -136,6 +141,20 @@
// Wired services
+ public ContentEditors getContentEditors()
+ {
+ return ContentEditors.getInstance();
+ }
+
+ public String getSelectedContentEditorInstance()
+ {
+ if (selectedContentType != null)
+ {
+ return ContentEditors.getInstance().getEditor(selectedContentType);
+ }
+ return null;
+ }
+
public PortalAuthorizationManagerFactory getPortalAuthorizationManagerFactory()
{
return portalAuthorizationManagerFactory;
@@ -236,6 +255,16 @@
this.selectedPlugin = selectedPlugin;
}
+ public Map getRenderParameters()
+ {
+ return renderParameters;
+ }
+
+ public void setRenderParameters(Map renderParameters)
+ {
+ this.renderParameters = renderParameters;
+ }
+
// Runtime state
public AbstractAuthorizationBean getAuth()
@@ -407,7 +436,8 @@
Content content = window.getContent();
if (content != null)
{
- selectedContentURI = content.getURI();
+ renderParameters = new HashMap();
+ renderParameters.put("uri", new
String[]{content.getURI()});
}
break;
}
@@ -567,6 +597,20 @@
selectedProperties = null;
}
+ public void processEvent(ActionEvent event)
+ {
+ if (event instanceof PortletActionEvent)
+ {
+ PortletActionEvent actionEvent = (PortletActionEvent)event;
+ Map actionParams = actionEvent.getParameterMap();
+ if (actionParams.get("meta_action") != null)
+ {
+ String[] uris = (String[])actionParams.get("uri");
+ selectedContentURI = uris[0];
+ }
+ }
+ }
+
public class PortalObjectAuthorizationBean extends AbstractAuthorizationBean
{
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/content/ContentEditors.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/content/ContentEditors.java
(rev 0)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/content/ContentEditors.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.core.admin.ui.content;
+
+import org.jboss.portal.common.util.CopyOnWriteRegistry;
+import org.jboss.portal.core.model.content.ContentType;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class ContentEditors
+{
+
+ /** . */
+ private static final ContentEditors instance = new ContentEditors();
+
+ /** . */
+ private final CopyOnWriteRegistry editors = new CopyOnWriteRegistry();
+
+ public static ContentEditors getInstance()
+ {
+ return instance;
+ }
+
+ public void registerEditor(ContentType contentType, String instanceName)
+ {
+ editors.register(contentType, instanceName);
+ }
+
+ public void unregisterEditor(ContentType contentType)
+ {
+ editors.unregister(contentType);
+ }
+
+ public String getEditor(ContentType contentType)
+ {
+ return (String)editors.getRegistration(contentType);
+ }
+}
Added:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/portlet/PortletContentEditorPortlet.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/portlet/PortletContentEditorPortlet.java
(rev 0)
+++
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/portlet/PortletContentEditorPortlet.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -0,0 +1,140 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.core.admin.ui.portlet;
+
+import org.jboss.portal.core.model.instance.InstanceContainer;
+import org.jboss.portal.core.model.instance.Instance;
+import org.jboss.portal.core.model.content.ContentType;
+import org.jboss.portal.core.admin.ui.content.ContentEditors;
+import org.jboss.portal.portlet.Portlet;
+import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.info.PortletInfo;
+import org.jboss.portal.portlet.info.MetaInfo;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletURL;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class PortletContentEditorPortlet extends GenericPortlet
+{
+
+ /** . */
+ private InstanceContainer instanceContainer;
+
+ public void init() throws PortletException
+ {
+ instanceContainer =
(InstanceContainer)getPortletContext().getAttribute("InstanceContainer");
+ ContentEditors.getInstance().registerEditor(ContentType.PORTLET,
"PortletContentEditorInstance");
+ }
+
+ public void processAction(ActionRequest req, ActionResponse resp) throws
PortletException, PortletSecurityException, IOException
+ {
+ String uri = req.getParameter("uri");
+ if (uri != null)
+ {
+ resp.setRenderParameter("uri", uri);
+ }
+ }
+
+ public void render(RenderRequest req, RenderResponse resp) throws PortletException,
PortletSecurityException, IOException
+ {
+ String selectedURI = req.getParameter("uri");
+
+ //
+ PortletURL actionURL = resp.createActionURL();
+
+ //
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ // load insances this user has access to.
+ List available_instances = (List)instanceContainer.getDefinitions();
+ Instance selectedInstance = null;
+ writer.print("<form action=\"");
+ writer.print(actionURL);
+ writer.print("\" method=\"post\">\n");
+ writer.println("<select
name=\"uri\"size=\"20\">\n");
+ for (int i = 0; i < available_instances.size(); i++)
+ {
+ Instance instance = (Instance)available_instances.get(i);
+
+ //
+ writer.print("<option value=\"");
+ writer.print(instance.getId());
+ writer.print("\"");
+
+ //
+ if (instance.getId().equals(selectedURI))
+ {
+ selectedInstance = instance;
+ writer.print(" selected=\"selected\"");
+ }
+
+ //
+ writer.print(">");
+ writer.print(instance.getId());
+ writer.println("</option>\n");
+ }
+ writer.println("</select>");
+ writer.println("<input name=\"select\" value=\"Select\"
type=\"submit\"/>");
+ writer.print("</form>");
+
+ //
+ if (selectedInstance != null)
+ {
+ writer.print("<div class=\"portlet-font\"
style=\"float:left\">");
+ writer.print("<div><span
class=\"portlet-form-field-label\">Portlet instance:</span>" +
selectedURI + "</div>");
+ try
+ {
+ Portlet portlet = selectedInstance.getPortlet();
+ if (portlet != null)
+ {
+ MetaInfo metaInfo = portlet.getInfo().getMeta();
+ writer.print("<div><span
class=\"portlet-form-field-label\">Portlet name:</span>" +
metaInfo.getMetaValue(MetaInfo.DISPLAY_NAME).getDefaultString() +
"</div>");
+ writer.print("<div><span
class=\"portlet-form-field-label\">Portlet description:</span>" +
metaInfo.getMetaValue(MetaInfo.DESCRIPTION).getDefaultString() +
"</div>");
+ writer.print("<div><span
class=\"portlet-form-field-label\">Portlet title:</span>" +
metaInfo.getMetaValue(MetaInfo.TITLE).getDefaultString() + "</div>");
+ writer.print("<div><span
class=\"portlet-form-field-label\">Portlet keywords:</span>" +
metaInfo.getMetaValue(MetaInfo.KEYWORDS).getDefaultString() + "</div>");
+ }
+ }
+ catch (PortletInvokerException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ //
+ writer.close();
+ }
+}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/faces/JSFInvocation.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/faces/JSFInvocation.java 2007-03-06
11:10:50 UTC (rev 6548)
+++ trunk/core-admin/src/main/org/jboss/portal/core/faces/JSFInvocation.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -25,6 +25,8 @@
import org.jboss.portal.portlet.PortletURL;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.PortletParameters;
+import org.jboss.portal.portlet.PortletParametersStateString;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.portlet.invocation.ActionInvocation;
@@ -91,8 +93,9 @@
{
// Get request and response
JBossServletContextProvider.BridgeInfo info = JBossServletContextProvider.get();
- this.clientRequest = info.getInvocation().getDispatchedRequest();
- this.clientResponse = info.getInvocation().getDispatchedResponse();
+ PortletInvocation portletInvocation = info.getInvocation();
+ this.clientRequest = portletInvocation.getDispatchedRequest();
+ this.clientResponse = portletInvocation.getDispatchedResponse();
this.faces = faces;
this.uiportlet = uiportlet;
@@ -159,7 +162,7 @@
Instance instance,
Mode mode,
WindowState windowState,
- StateString navigationalState) throws PortletInvokerException
+ PortletParametersStateString navigationalState) throws PortletInvokerException
{
//
RenderContext renderContext = new JSFRenderContext(
Modified: trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletActionEvent.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletActionEvent.java 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletActionEvent.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -27,8 +27,8 @@
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.invocation.response.RenderResponse;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.PortletParametersStateString;
+import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
@@ -44,9 +44,9 @@
{
/** . */
- private final StateString interactionState;
+ private final PortletParameters interactionState;
- public PortletActionEvent(UIComponent uiComponent, StateString interactionState)
+ public PortletActionEvent(UIComponent uiComponent, PortletParameters
interactionState)
{
super(uiComponent);
@@ -56,14 +56,7 @@
public Map getParameterMap()
{
- if (interactionState instanceof PortletParametersStateString)
- {
- PortletParametersStateString ppss =
(PortletParametersStateString)interactionState;
- return ppss.getMap();
- }
-
- //
- return null;
+ return interactionState;
}
void execute(FacesContext faces)
@@ -81,11 +74,11 @@
//
try
{
- PortletInvocationResponse pir = invocation.action(instance, Mode.VIEW,
WindowState.NORMAL, interactionState);
+ PortletInvocationResponse pir = invocation.action(instance, Mode.VIEW,
WindowState.NORMAL, new PortletParametersStateString(interactionState));
if (pir instanceof RenderResponse)
{
RenderResponse render = (RenderResponse)pir;
- uiportlet.navState = render.getNavigationalState();
+
uiportlet.setNavState(((PortletParametersStateString)render.getNavigationalState()).getParameters());
}
}
catch (PortletInvokerException e)
Modified: trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletEvent.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletEvent.java 2007-03-06
11:10:50 UTC (rev 6548)
+++ trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletEvent.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -24,6 +24,7 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.FacesListener;
+import javax.faces.event.ActionEvent;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -31,7 +32,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class PortletEvent extends FacesEvent
+public class PortletEvent extends ActionEvent
{
public PortletEvent(UIComponent uiComponent)
Modified: trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletRenderEvent.java
===================================================================
---
trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletRenderEvent.java 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/core-admin/src/main/org/jboss/portal/core/faces/PortletRenderEvent.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -22,15 +22,7 @@
******************************************************************************/
package org.jboss.portal.core.faces;
-import org.jboss.portal.portlet.StateString;
-import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.PortletParametersStateString;
-import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.RenderResponse;
-import org.jboss.portal.core.model.instance.InstanceContainer;
-import org.jboss.portal.core.model.instance.Instance;
-import org.jboss.portal.Mode;
-import org.jboss.portal.WindowState;
+import org.jboss.portal.portlet.PortletParameters;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
@@ -44,31 +36,24 @@
{
/** . */
- private final StateString navigationalState;
+ private final PortletParameters navState;
- public PortletRenderEvent(UIComponent uiComponent, StateString navigationalState)
+ public PortletRenderEvent(UIComponent uiComponent, PortletParameters navState)
{
super(uiComponent);
//
- this.navigationalState = navigationalState;
+ this.navState = navState;
}
public Map getParameterMap()
{
- if (navigationalState instanceof PortletParametersStateString)
- {
- PortletParametersStateString ppss =
(PortletParametersStateString)navigationalState;
- return ppss.getMap();
- }
-
- //
- return null;
+ return navState;
}
void execute(FacesContext faces)
{
UIPortlet uiportlet = (UIPortlet)getComponent();
- uiportlet.navState = navigationalState;
+ uiportlet.setNavState(navState);
}
}
Modified: trunk/core-admin/src/main/org/jboss/portal/core/faces/UIPortlet.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/faces/UIPortlet.java 2007-03-06
11:10:50 UTC (rev 6548)
+++ trunk/core-admin/src/main/org/jboss/portal/core/faces/UIPortlet.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -27,13 +27,13 @@
import org.jboss.portal.portlet.impl.PortletRequestDecoder;
import org.jboss.portal.portlet.PortletParametersStateString;
import org.jboss.portal.portlet.PortletInvokerException;
-import org.jboss.portal.portlet.StateString;
+import org.jboss.portal.portlet.PortletParameters;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
-import javax.faces.component.UIComponentBase;
+import javax.faces.component.UICommand;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.el.ValueBinding;
@@ -51,18 +51,18 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class UIPortlet extends UIComponentBase
+public class UIPortlet extends UICommand
{
- /** The portlet navigational state. */
- StateString navState;
-
/** The portlet instance id. */
private String instanceId;
/** . */
private MethodBinding portletListener = null;
+ /** . */
+ private Map renderParameters;
+
public String getInstanceId()
{
if (instanceId != null)
@@ -86,16 +86,51 @@
this.instanceId = instanceId;
}
- public void setportletListenerListener(MethodBinding portletListener)
+ public Map getRenderParameters()
{
- this.portletListener = portletListener;
+ if (renderParameters != null)
+ {
+ return renderParameters;
+ }
+
+ //
+ ValueBinding vb = getValueBinding("renderParameters");
+ if (vb != null)
+ {
+ return (Map)vb.getValue(getFacesContext());
+ }
+
+ //
+ return null;
}
- public MethodBinding getPortletListener()
+ public void setRenderParameters(Map renderParameters)
{
- return portletListener;
+ this.renderParameters = renderParameters;
}
+ void setNavState(PortletParameters navState)
+ {
+ Map renderParameters = getRenderParameters();
+
+ //
+ if (renderParameters != null)
+ {
+ renderParameters.clear();
+ renderParameters.putAll(navState);
+ }
+ else
+ {
+ setRenderParameters(navState);
+ }
+ }
+
+ PortletParameters getNavState()
+ {
+ Map renderParameters = getRenderParameters();
+ return renderParameters == null ? null : PortletParameters.wrap(renderParameters);
+ }
+
public String getFamily()
{
return "org.jboss.portal.core.Portlet";
@@ -103,18 +138,17 @@
public void broadcast(FacesEvent event) throws AbortProcessingException
{
- super.broadcast(event);
-
- //
if (event instanceof PortletEvent)
{
FacesContext faces = getFacesContext();
- if (portletListener != null)
+ //
+ MethodBinding listener = getActionListener();
+ if (listener != null)
{
try
{
- portletListener.invoke(faces, new Object[] {event});
+ listener.invoke(faces, new Object[] {event});
}
catch (EvaluationException e)
{
@@ -134,17 +168,26 @@
PortletEvent pevent = (PortletEvent)event;
pevent.execute(faces);
}
+ else
+ {
+ super.broadcast(event);
+ }
}
public Object saveState(FacesContext faces)
{
- String opaqueValue = navState == null ? null : navState.getStringValue();
+ String opaqueValue = null;
+ if (renderParameters != null)
+ {
+ opaqueValue =
PortletParametersStateString.create(renderParameters).getStringValue();
+ }
//
- Object values[] = new Object[3];
+ Object values[] = new Object[4];
values[0] = super.saveState(faces);
values[1] = instanceId;
values[2] = opaqueValue;
+ values[3] = saveAttachedState(faces, portletListener);
return values;
}
@@ -156,7 +199,8 @@
//
instanceId = (String)values[1];
- navState = serializedNavState != null ?
PortletParametersStateString.create(serializedNavState) : null;
+ renderParameters = serializedNavState != null ? new
PortletParametersStateString(serializedNavState).getParameters() : null;
+ portletListener = (MethodBinding)restoreAttachedState(faces, values[3]);
}
public void decode(FacesContext faces)
@@ -192,12 +236,12 @@
switch (decoder.getType())
{
case PortletRequestDecoder.RENDER_TYPE:
- PortletRenderEvent prevent = new PortletRenderEvent(this,
decoder.getNavigationalstate());
+ PortletRenderEvent prevent = new PortletRenderEvent(this,
((PortletParametersStateString)decoder.getNavigationalState()).getParameters());
prevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
queueEvent(prevent);
break;
case PortletRequestDecoder.ACTION_TYPE:
- PortletActionEvent paevent = new PortletActionEvent(this,
decoder.getInteractionState());
+ PortletActionEvent paevent = new PortletActionEvent(this,
((PortletParametersStateString)decoder.getInteractionState()).getParameters());
paevent.setPhaseId(PhaseId.INVOKE_APPLICATION);
queueEvent(paevent);
break;
@@ -207,36 +251,57 @@
public void encodeBegin(FacesContext faces) throws IOException
{
+ Instance instance = null;
+
+
+ // Resolve instance id
+ String instanceId = getInstanceId();
+
// Get instance
- InstanceContainer instanceContainer =
(InstanceContainer)faces.getApplication().getVariableResolver().resolveVariable(faces,
"InstanceContainer");
- Instance instance = instanceContainer.getDefinition(instanceId);
+ if (instanceId != null)
+ {
+ InstanceContainer instanceContainer =
(InstanceContainer)faces.getApplication().getVariableResolver().resolveVariable(faces,
"InstanceContainer");
+ instance = instanceContainer.getDefinition(instanceId);
+ }
//
- JSFInvocation invocation = new JSFInvocation(faces, this);
-
- //
- try
+ if (instance != null)
{
- PortletInvocationResponse pir = invocation.render(
- instance,
- Mode.VIEW,
- WindowState.NORMAL,
- navState);
+ //
+ JSFInvocation invocation = new JSFInvocation(faces, this);
//
- if (pir instanceof FragmentResponse)
+ try
{
- FragmentResponse fragment = (FragmentResponse)pir;
- ResponseWriter writer = faces.getResponseWriter();
- writer.startElement("div", this);
- writer.write(fragment.getContent());
- writer.endElement("div");
- writer.flush();
+ Map renderParameters = getRenderParameters();
+ PortletParametersStateString navState = renderParameters != null ?
PortletParametersStateString.create(renderParameters) : null;
+
+ //
+ PortletInvocationResponse pir = invocation.render(
+ instance,
+ Mode.VIEW,
+ WindowState.NORMAL,
+ navState);
+
+ //
+ if (pir instanceof FragmentResponse)
+ {
+ FragmentResponse fragment = (FragmentResponse)pir;
+ ResponseWriter writer = faces.getResponseWriter();
+ writer.startElement("div", this);
+ writer.write(fragment.getContent());
+ writer.endElement("div");
+ writer.flush();
+ }
}
+ catch (PortletInvokerException e)
+ {
+ e.printStackTrace();
+ }
}
- catch (PortletInvokerException e)
+ else
{
- e.printStackTrace();
+ System.out.println("Instance not found: " + instanceId);
}
}
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss_portal.tld
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss_portal.tld 2007-03-06
11:10:50 UTC (rev 6548)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jboss_portal.tld 2007-03-06
11:22:32 UTC (rev 6549)
@@ -4,8 +4,8 @@
<taglib>
<tlib-version>0.01</tlib-version>
<jsp-version>1.2</jsp-version>
-<short-name>scroller</short-name>
-<uri>http://www.jboss.com/portal</uri>
+<short-name>jbp</short-name>
+<uri>http://www.jboss.org/portal</uri>
<description>This tag library contains the scroller tag.</description>
<tag>
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageLayout.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageLayout.xhtml 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageLayout.xhtml 2007-03-06
11:22:32 UTC (rev 6549)
@@ -90,13 +90,9 @@
</tr>
<tr>
<td class="label">
- <span class="portlet-form-field-label label">Portlet
instance:</span>
+ <span class="portlet-form-field-label label">Portlet
content:</span>
</td>
<td class="widget">
- <ct:content
- contentType="#{portalobjectmgr.selectedContentType}"
- contentURI="#{portalobjectmgr.selectedContentURI}"
- submitFunction="document.layoutForm.submit()"/>
</td>
</tr>
</table>
@@ -104,7 +100,9 @@
</h:form>
<div>
- <jbp:portlet instanceId="URLPortletInstance"/>
+ <jbp:portlet
+ instanceId="#{portalobjectmgr.selectedContentEditorInstance}"
+ actionListener="#{portalobjectmgr.processEvent}"/>
</div>
</ui:define>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindow.xhtml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindow.xhtml 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindow.xhtml 2007-03-06
11:22:32 UTC (rev 6549)
@@ -2,6 +2,7 @@
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:ct="http://www.julien.com"
+
xmlns:jbp="http://www.jboss.org/portal"
xmlns:h="http://java.sun.com/jsf/html">
<ui:composition template="objectTemplate.xhtml">
@@ -9,6 +10,13 @@
<ui:define name="content">
<!-- -->
+ <div>
+ <jbp:portlet
+ instanceId="#{portalobjectmgr.selectedContentEditorInstance}"
+ renderParameters="#{portalobjectmgr.renderParameters}"/>
+ </div>
+
+ <!-- -->
<h:form id="window_form">
<ct:content
contentType="#{portalobjectmgr.selectedContentType}"
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml
===================================================================
---
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet-instances.xml 2007-03-06
11:22:32 UTC (rev 6549)
@@ -39,4 +39,16 @@
</security-constraint>
</instance>
</deployment>
+ <deployment>
+ <instance>
+ <instance-id>PortletContentEditorInstance</instance-id>
+ <portlet-ref>PortletContentEditorPortlet</portlet-ref>
+ <security-constraint>
+ <policy-permission>
+ <role-name>Admin</role-name>
+ <action-name>view</action-name>
+ </policy-permission>
+ </security-constraint>
+ </instance>
+ </deployment>
</deployments>
\ No newline at end of file
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-03-06
11:10:50 UTC (rev 6548)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-03-06
11:22:32 UTC (rev 6549)
@@ -46,4 +46,18 @@
<keywords>management,admin</keywords>
</portlet-info>
</portlet>
+ <portlet>
+ <description>Portlet Content Editor</description>
+ <portlet-name>PortletContentEditorPortlet</portlet-name>
+ <display-name>Portlet Content Editor</display-name>
+
<portlet-class>org.jboss.portal.core.admin.ui.portlet.PortletContentEditorPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Portlet Content Portlet</title>
+ <keywords>management,admin</keywords>
+ </portlet-info>
+ </portlet>
</portlet-app>
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/PortletParameters.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/PortletParameters.java 2007-03-06
11:10:50 UTC (rev 6548)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/PortletParameters.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -168,4 +168,20 @@
buffer.append(']');
return buffer.toString();
}
+
+ /**
+ * Safely wrap the map as a portlet parameters object. If the map is already a portlet
parameter object,
+ * just return that object otherwise return a wrapper around the map.
+ */
+ public static PortletParameters wrap(Map map)
+ {
+ if (map instanceof PortletParameters)
+ {
+ return (PortletParameters)map;
+ }
+ else
+ {
+ return new PortletParameters(map);
+ }
+ }
}
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/PortletParametersStateString.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/PortletParametersStateString.java 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/PortletParametersStateString.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -73,6 +73,12 @@
}
}
+ public static PortletParametersStateString create(Map parameterMap)
+ {
+ PortletParameters params = PortletParameters.wrap(parameterMap);
+ return new PortletParametersStateString(params);
+ }
+
public PortletParametersStateString(String opaqueValue)
{
if (opaqueValue == null)
@@ -171,12 +177,6 @@
return parameters.getValues(name);
}
- /** Return the a map containing the values. */
- public Map getMap()
- {
- return parameters;
- }
-
/** Clear all the parameters. */
public void clear()
{
@@ -288,7 +288,7 @@
public int hashCode()
{
- return getMap().hashCode();
+ return getParameters().hashCode();
}
public boolean equals(Object o)
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/impl/PortletRequestDecoder.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/impl/PortletRequestDecoder.java 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/impl/PortletRequestDecoder.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -302,7 +302,7 @@
return windowState;
}
- public StateString getNavigationalstate()
+ public StateString getNavigationalState()
{
return navigationalstate;
}
Modified: trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java
===================================================================
--- trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-03-06
11:10:50 UTC (rev 6548)
+++ trunk/portlet/src/main/org/jboss/portal/portlet/test/PortletController.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -227,7 +227,7 @@
else
{
//
- invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId(), decoder.getNavigationalstate());
+ invocation.setAttribute(ServerInvocation.NAVIGATIONAL_STATE_SCOPE,
portlet.getContext().getId(), decoder.getNavigationalState());
//
Mode mode = decoder.getMode();
Modified:
trunk/portlet/src/main/org/jboss/portal/test/portlet/PortletRequestDecoderTestCase.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/test/portlet/PortletRequestDecoderTestCase.java 2007-03-06
11:10:50 UTC (rev 6548)
+++
trunk/portlet/src/main/org/jboss/portal/test/portlet/PortletRequestDecoderTestCase.java 2007-03-06
11:22:32 UTC (rev 6549)
@@ -175,7 +175,7 @@
o.decode(queryParams, null);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.NAV_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -186,7 +186,7 @@
o.decode(queryParams, null);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.NAV_TYPE, o.getType());
assertEquals(Mode.VIEW, o.getMode());
assertNull(o.getWindowState());
@@ -197,7 +197,7 @@
o.decode(queryParams, null);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.NAV_TYPE, o.getType());
assertEquals(Mode.VIEW, o.getMode());
assertNull(o.getWindowState());
@@ -208,7 +208,7 @@
o.decode(queryParams, bodyParams);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.NAV_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -220,7 +220,7 @@
o.decode(queryParams, bodyParams);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.NAV_TYPE, o.getType());
assertEquals(Mode.VIEW, o.getMode());
assertNull(o.getWindowState());
@@ -232,7 +232,7 @@
o.decode(queryParams, null);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.NAV_TYPE, o.getType());
assertNull(o.getMode());
assertEquals(WindowState.NORMAL, o.getWindowState());
@@ -243,7 +243,7 @@
o.decode(queryParams, bodyParams);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.NAV_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -260,7 +260,7 @@
o.decode(queryParams, null);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertEquals(new PortletParametersStateString(), o.getNavigationalstate());
+ assertEquals(new PortletParametersStateString(), o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -272,7 +272,7 @@
o.decode(queryParams, null);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertEquals(new PortletParametersStateString(), o.getNavigationalstate());
+ assertEquals(new PortletParametersStateString(), o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertEquals(Mode.VIEW, o.getMode());
assertNull(o.getWindowState());
@@ -284,7 +284,7 @@
o.decode(queryParams, null);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertEquals(new PortletParametersStateString(), o.getNavigationalstate());
+ assertEquals(new PortletParametersStateString(), o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertEquals(WindowState.NORMAL, o.getWindowState());
@@ -305,7 +305,7 @@
assertNull(o.getForm());
assertNull(o.getInteractionState());
navState.setValue("foo", "bar");
- assertEquals(navState, o.getNavigationalstate());
+ assertEquals(navState, o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -318,7 +318,7 @@
assertNull(o.getForm());
assertNull(o.getInteractionState());
navState.setValue(PortletRequestDecoder.META_PARAMETER, "bar");
- assertEquals(navState, o.getNavigationalstate());
+ assertEquals(navState, o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -332,7 +332,7 @@
assertNull(o.getForm());
assertNull(o.getInteractionState());
navState.setValue(PortletRequestDecoder.WINDOW_STATE_PARAMETER, "bar");
- assertEquals(navState, o.getNavigationalstate());
+ assertEquals(navState, o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertEquals(WindowState.NORMAL, o.getWindowState());
@@ -346,7 +346,7 @@
assertNull(o.getForm());
assertNull(o.getInteractionState());
navState.setValue(PortletRequestDecoder.WINDOW_STATE_PARAMETER, "bar");
- assertEquals(navState, o.getNavigationalstate());
+ assertEquals(navState, o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -360,7 +360,7 @@
assertNull(o.getForm());
assertNull(o.getInteractionState());
navState.setValue(PortletRequestDecoder.MODE_PARAMETER, "bar");
- assertEquals(navState, o.getNavigationalstate());
+ assertEquals(navState, o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertEquals(Mode.VIEW, o.getMode());
assertNull(o.getWindowState());
@@ -374,7 +374,7 @@
assertNull(o.getForm());
assertNull(o.getInteractionState());
navState.setValue(PortletRequestDecoder.MODE_PARAMETER, "bar");
- assertEquals(navState, o.getNavigationalstate());
+ assertEquals(navState, o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -387,7 +387,7 @@
o.decode(queryParams, bodyParams);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertEquals(navState, o.getNavigationalstate());
+ assertEquals(navState, o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -402,7 +402,7 @@
assertNull(o.getForm());
assertNull(o.getInteractionState());
navState.setValues("foo", new String[]{"bar1",
"bar2"});
- assertEquals(navState, o.getNavigationalstate());
+ assertEquals(navState, o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -417,7 +417,7 @@
assertNull(o.getForm());
assertNull(o.getInteractionState());
navState.setValue("foo", "bar1");
- assertEquals(navState, o.getNavigationalstate());
+ assertEquals(navState, o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -437,7 +437,7 @@
o.decode(queryParams, null);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -449,7 +449,7 @@
o.decode(queryParams, bodyParams);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertEquals(new OpaqueStateString("navstatevalue"),
o.getNavigationalstate());
+ assertEquals(new OpaqueStateString("navstatevalue"),
o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -461,7 +461,7 @@
o.decode(queryParams, bodyParams);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -474,7 +474,7 @@
o.decode(queryParams, null);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -486,7 +486,7 @@
o.decode(queryParams, bodyParams);
assertNull(o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.RENDER_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -504,7 +504,7 @@
o.decode(queryParams, null);
assertEquals(new PortletParameters(), o.getForm());
assertEquals(new PortletParametersStateString(), o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -516,7 +516,7 @@
o.decode(queryParams, null);
assertEquals(new PortletParameters(), o.getForm());
assertEquals(new PortletParametersStateString(), o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertEquals(Mode.VIEW, o.getMode());
assertNull(o.getWindowState());
@@ -528,7 +528,7 @@
o.decode(queryParams, null);
assertEquals(new PortletParameters(), o.getForm());
assertEquals(new PortletParametersStateString(), o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertEquals(WindowState.NORMAL, o.getWindowState());
@@ -550,7 +550,7 @@
assertEquals(form, o.getForm());
intState.setValue("foo", "bar");
assertEquals(intState, o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -565,7 +565,7 @@
assertEquals(form, o.getForm());
intState.setValues("foo", new String[]{"bar1",
"bar2"});
assertEquals(intState, o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -580,7 +580,7 @@
form.setValue("foo", "bar");
assertEquals(form, o.getForm());
assertEquals(intState, o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -596,7 +596,7 @@
form.setValues("foo", new String[]{"bar1", "bar2"});
assertEquals(form, o.getForm());
assertEquals(intState, o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -617,7 +617,7 @@
o.decode(queryParams, null);
assertEquals(new PortletParameters(), o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -629,7 +629,7 @@
o.decode(queryParams, null);
assertEquals(new PortletParameters(), o.getForm());
assertNull(o.getInteractionState());
- assertEquals(new OpaqueStateString("navstatevalue"),
o.getNavigationalstate());
+ assertEquals(new OpaqueStateString("navstatevalue"),
o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -641,7 +641,7 @@
o.decode(queryParams, null);
assertEquals(new PortletParameters(), o.getForm());
assertEquals(new OpaqueStateString("intstatevalue"),
o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());
@@ -660,7 +660,7 @@
form.setValues("foo3", new String[]{"bar5"});
assertEquals(form, o.getForm());
assertNull(o.getInteractionState());
- assertNull(o.getNavigationalstate());
+ assertNull(o.getNavigationalState());
assertEquals(PortletRequestDecoder.ACTION_TYPE, o.getType());
assertNull(o.getMode());
assertNull(o.getWindowState());