You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by ta...@apache.org on 2006/02/16 05:07:16 UTC

svn commit: r378156 - /portals/jetspeed-2/branches/JETSPEED-BRANCH-2.0.1/components/portal/src/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java

Author: taylor
Date: Wed Feb 15 20:07:15 2006
New Revision: 378156

URL: http://svn.apache.org/viewcvs?rev=378156&view=rev
Log:
support portlet bookmark feature as requested by Garry
first time hits were failing to matchup the request parameters
check for null, coming back, and go get the portlet window

Modified:
    portals/jetspeed-2/branches/JETSPEED-BRANCH-2.0.1/components/portal/src/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java

Modified: portals/jetspeed-2/branches/JETSPEED-BRANCH-2.0.1/components/portal/src/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/branches/JETSPEED-BRANCH-2.0.1/components/portal/src/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java?rev=378156&r1=378155&r2=378156&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-BRANCH-2.0.1/components/portal/src/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java (original)
+++ portals/jetspeed-2/branches/JETSPEED-BRANCH-2.0.1/components/portal/src/java/org/apache/jetspeed/container/state/impl/JetspeedNavigationalStateCodec.java Wed Feb 15 20:07:15 2006
@@ -414,14 +414,15 @@
             if ( currentState == null )
             {
                 PortletWindow window = accessor.getPortletWindow(windowId);
-                if ( window != null )
+                if ( window == null )
                 {
-                    currentState = new PortletWindowRequestNavigationalState(windowId);
-                    states.addPortletWindowNavigationalState(windowId, currentState);
-                    if ( parameterType == ACTION_WINDOW_ID_KEY )
-                    {
-                        states.setActionWindow(window);
-                    }
+                    window = accessor.createPortletWindow(windowId);
+                }
+                currentState = new PortletWindowRequestNavigationalState(windowId);
+                states.addPortletWindowNavigationalState(windowId, currentState);
+                if ( parameterType == ACTION_WINDOW_ID_KEY )
+                {
+                    states.setActionWindow(window);
                 }
             }
         }
@@ -448,7 +449,12 @@
                         currentState.setWindowState(windowState);
                         if (windowState.equals(WindowState.MAXIMIZED))
                         {
-                            states.setMaximizedWindow(accessor.getPortletWindow(currentState.getWindowId()));
+                            PortletWindow window = accessor.getPortletWindow(currentState.getWindowId());
+                            if ( window == null )
+                            {
+                                window = accessor.createPortletWindow(currentState.getWindowId());
+                            }                                    
+                            states.setMaximizedWindow(window);
                         }
                     }
                     break;



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org