portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/state/impl AbstractNavigationalState.java
Date Tue, 09 Nov 2004 00:44:43 GMT
taylor      2004/11/08 16:44:43

  Modified:    portal/src/java/org/apache/jetspeed/container/state/impl
                        AbstractNavigationalState.java
  Log:
  create nav state if it doesn't already exist (from Ate)
  
  Revision  Changes    Path
  1.2       +17 -3     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java
  
  Index: AbstractNavigationalState.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/state/impl/AbstractNavigationalState.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractNavigationalState.java	15 Oct 2004 21:44:31 -0000	1.1
  +++ AbstractNavigationalState.java	9 Nov 2004 00:44:43 -0000	1.2
  @@ -60,11 +60,18 @@
       {
           if ( windowState != null )
           {
  -            PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(window.getId().toString());
  +            String windowId = window.getId().toString();
  +            PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(windowId);
               if (state != null && (state.getWindowState() == null || !state.getWindowState().equals(windowState)))
               {
                   state.setWindowState(windowState);
               }
  +            else
  +            {
  +                state = new PortletWindowRequestNavigationalState(windowId);
  +                requestStates.addPortletWindowNavigationalState(windowId, state);
  +                state.setWindowState(windowState);
  +            }
           }
       }
   
  @@ -72,9 +79,16 @@
       {
           if ( portletMode != null )
           {
  -            PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(window.getId().toString());
  +            String windowId = window.getId().toString();
  +            PortletWindowRequestNavigationalState state = requestStates.getPortletWindowNavigationalState(windowId);
               if (state != null && (state.getPortletMode() == null || !state.getPortletMode().equals(portletMode)))
               {
  +                state.setPortletMode(portletMode);
  +            }
  +            else
  +            {
  +                state = new PortletWindowRequestNavigationalState(windowId);
  +                requestStates.addPortletWindowNavigationalState(windowId, state);
                   state.setPortletMode(portletMode);
               }
           }
  
  
  

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


Mime
View raw message