Author: mwringe
Date: 2009-11-12 13:46:35 -0500 (Thu, 12 Nov 2009)
New Revision: 580
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/UIPortletActionListener.java
Log:
Update issues with public render parameters. Should be now be properly set before and
after the invocation (GTNPORTAL-206)
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-11-12
12:42:15 UTC (rev 579)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2009-11-12
18:46:35 UTC (rev 580)
@@ -152,7 +152,6 @@
private List<String> supportedPublicParams_;
private boolean portletInPortal_ = true;
private StateString navigationalState;
- private Map<String, String[]> publicNavigationalStateChanges;
public UIPortlet()
{
@@ -659,8 +658,8 @@
// Navigational state
invocation.setNavigationalState(navigationalState);
- // Public navigational state
- invocation.setPublicNavigationalState(publicNavigationalStateChanges);
+ // Public navigational state
+ invocation.setPublicNavigationalState(this.getPublicParameters());
// Mode
invocation.setMode(Mode.create(getCurrentPortletMode().toString()));
@@ -668,9 +667,6 @@
// Window state
invocation.setWindowState(org.gatein.pc.api.WindowState.create(getCurrentWindowState().toString()));
- // Public navigational state
- invocation.setPublicNavigationalState(this.getPublicParameters());
- //
StatefulPortletContext<C> preferencesPortletContext = getPortletContext();
// get the user profile cached in the prc during the start of the request
@@ -850,9 +846,4 @@
{
this.navigationalState = navigationalState;
}
-
- void setPublicNavigationalStateUpdates(Map<String, String[]>
publicNavigationalStateUpdates)
- {
- this.publicNavigationalStateChanges = publicNavigationalStateUpdates;
- }
}
\ No newline at end of file
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-11-12
12:42:15 UTC (rev 579)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2009-11-12
18:46:35 UTC (rev 580)
@@ -87,6 +87,10 @@
UIPortlet<S, C> uiPortlet = event.getSource();
PortalRequestContext prcontext =
(PortalRequestContext)event.getRequestContext();
+ // set the public render parameters from the request before creating the
invocation
+ HttpServletRequest request = prcontext.getRequest();
+ setupPublicRenderParams(uiPortlet, request.getParameterMap());
+
//
ActionInvocation actionInvocation = uiPortlet.create(ActionInvocation.class,
prcontext);
@@ -152,10 +156,6 @@
PortletMode mode = new PortletMode(getPortletModeOrDefault(navStateResponse));
setNextMode(uiPortlet, mode);
- // set the public params
- HttpServletRequest request = prcontext.getRequest();
- setupPublicRenderParams(uiPortlet,
navStateResponse.getPublicNavigationalStateUpdates());
-
/*
* Cache the render parameters in the UI portlet component to handle the
* navigational state. Each time a portlet is rendered (except using
@@ -166,8 +166,10 @@
//
StateString navigationalState = navStateResponse.getNavigationalState();
uiPortlet.setNavigationalState(navigationalState);
-
uiPortlet.setPublicNavigationalStateUpdates(navStateResponse.getPublicNavigationalStateUpdates());
+ // update the public render parameters with the changes from the invocation
+ setupPublicRenderParams(uiPortlet,
navStateResponse.getPublicNavigationalStateUpdates());
+
/*
* Handle the events returned by the action output and broadcast a new UI
* event to the ProcessEventsActionListener that will then target the
Show replies by date