portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggol...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controllers VelocityPanedPortletController.java
Date Tue, 30 Jul 2002 02:07:59 GMT
ggolden     2002/07/29 19:07:59

  Modified:    webapp/WEB-INF/psml/group/apache/html default.psml
               webapp/WEB-INF/psml/role/admin/html default.psml
               webapp/WEB-INF/psml/role/user/html default.psml
               webapp/WEB-INF/psml/user/anon/html default.psml
               webapp/WEB-INF/psml/user/anon/html/en default.psml news.psml
               webapp/WEB-INF/psml/user/anon/html/es default.psml news.psml
               webapp/WEB-INF/psml info.psml
               webapp/WEB-INF/psml/group/Jetspeed/html news.psml
                        security_example.psml
               src/java/org/apache/jetspeed/portal/controllers
                        VelocityPanedPortletController.java
  Log:
  The current pane id is stored in a session state associated with the
  portlet set / portal page / user session, using the JetspeedStateManager
  via the access in the JetspeedRunData getPortletSessionState(), using
  the portlet set id as the "portlet" id in the call.
  
  This replaces storing them in the user.getTemp(), using our new State
  Management Service; it also adds distinction between portal pages.
  
  Now, the selected pane for each portlet set of each different portal page is
  independent - a user can switch between portal pages, and each will keep its
  own set of "current" panes.
  
  The distributed psml files were updated to include id attributes for all <portlets>
  and <entry> tags, to assure that the portlet id works.  If these ids are missing,
  they will be assigned at runtime, but a different value will be assigned each time
  the portal page is loaded, so the element id will change over time in a session.
  Making sure all ids are set in the psml files avoids this problem.
  
  Revision  Changes    Path
  1.2       +4 -4      jakarta-jetspeed/webapp/WEB-INF/psml/group/apache/html/default.psml
  
  Index: default.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/group/apache/html/default.psml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- default.psml	23 Jul 2002 00:03:55 -0000	1.1
  +++ default.psml	30 Jul 2002 02:07:57 -0000	1.2
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<portlets user="default" >
  +<portlets id="100" user="default" >
       <metainfo>
         <title>Default Apache Group page</title>
       </metainfo>
  @@ -11,11 +11,11 @@
         <property name="background-color" value="#eeeeee"/>
       </skin>
   
  -    <entry type="ref" parent="Apacheweek"/>
  -    <entry type="ref" parent="Mozilla">
  +    <entry id="101" type="ref" parent="Apacheweek"/>
  +    <entry id="102" type="ref" parent="Mozilla">
         <parameter name="itemDisplayed" value="5"/>
       </entry>
   
  -    <entry type="ref" parent="XMLHack"/>
  +    <entry id="103" type="ref" parent="XMLHack"/>
   
   </portlets>
  
  
  
  1.3       +4 -4      jakarta-jetspeed/webapp/WEB-INF/psml/role/admin/html/default.psml
  
  Index: default.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/role/admin/html/default.psml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- default.psml	23 Jul 2002 05:30:04 -0000	1.2
  +++ default.psml	30 Jul 2002 02:07:58 -0000	1.3
  @@ -1,19 +1,19 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
  -<portlets user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
  +<portlets id="100" user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
   
     <security-ref parent="admin-only"/>
   
     <controller name="TwoColumns" />
     <skin name="orange-red" />
   
  -  <entry type="ref" parent="Apacheweek">
  +  <entry id="101" type="ref" parent="Apacheweek">
       <layout>
         <property name="row" value="0"/>
         <property name="column" value="0"/>
       </layout>
     </entry>
   
  -  <entry type="ref" parent="Mozilla">
  +  <entry id="102" type="ref" parent="Mozilla">
       <parameter name="itemDisplayed" value="5"/>
       <layout>
         <property name="row" value="1"/>
  @@ -21,7 +21,7 @@
       </layout>
     </entry>
   
  -  <entry type="ref" parent="XMLHack">
  +  <entry id="103" type="ref" parent="XMLHack">
       <layout>
         <property name="row" value="0"/>
         <property name="column" value="1"/>
  
  
  
  1.2       +4 -4      jakarta-jetspeed/webapp/WEB-INF/psml/role/user/html/default.psml
  
  Index: default.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/role/user/html/default.psml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- default.psml	23 Jul 2002 00:03:56 -0000	1.1
  +++ default.psml	30 Jul 2002 02:07:58 -0000	1.2
  @@ -1,17 +1,17 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
  -<portlets user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
  +<portlets id="100" user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
   
     <controller name="TwoColumns" />
     <skin name="orange-red" />
   
  -  <entry type="ref" parent="Apacheweek">
  +  <entry id="101" type="ref" parent="Apacheweek">
       <layout>
         <property name="row" value="0"/>
         <property name="column" value="0"/>
       </layout>
     </entry>
   
  -  <entry type="ref" parent="Mozilla">
  +  <entry id="102" type="ref" parent="Mozilla">
       <parameter name="itemDisplayed" value="5"/>
       <layout>
         <property name="row" value="1"/>
  @@ -19,7 +19,7 @@
       </layout>
     </entry>
   
  -  <entry type="ref" parent="XMLHack">
  +  <entry id="103" type="ref" parent="XMLHack">
       <layout>
         <property name="row" value="0"/>
         <property name="column" value="1"/>
  
  
  
  1.4       +23 -23    jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/default.psml
  
  Index: default.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/default.psml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- default.psml	1 Jul 2002 05:54:10 -0000	1.3
  +++ default.psml	30 Jul 2002 02:07:58 -0000	1.4
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
  -<portlets xmlns="http://xml.apache.org/jetspeed/2000/psml">
  +<portlets id="100" xmlns="http://xml.apache.org/jetspeed/2000/psml">
       <metainfo>
         <title>Default Jetspeed Page</title>
       </metainfo>
  @@ -12,7 +12,7 @@
   
     <skin name="orange-grey"/>
   
  -  <portlets>
  +  <portlets id="101">
       <controller name="RowController">
         <parameter name="sizes" value="66%,34%"/>
       </controller>
  @@ -21,29 +21,29 @@
         <title>Home Page</title>
       </metainfo>
   
  -    <portlets>
  -      <entry parent="JetspeedContent"/>
  +    <portlets id="102">
  +      <entry id="103" parent="JetspeedContent"/>
       </portlets>
   
  -    <portlets>
  +    <portlets id="104">
         <entry id="808" parent="InstanceExample">
             <parameter name="country" value="Brazil"/>
         </entry>
         <entry id="809" parent="InstanceExample">
             <parameter name="country" value="Germany"/>
         </entry>
  -      <entry parent="Jetspeed"/>
  -      <entry parent="Welcome"/>
  +      <entry id="105" parent="Jetspeed"/>
  +      <entry id="106" parent="Welcome"/>
       </portlets>
   
     </portlets>
   
  -  <portlets>
  +  <portlets id="107">
       <metainfo>
         <title>RSS</title>
       </metainfo>
   
  -    <portlets>
  +    <portlets id="108">
         <control name="TabControl"/>
         <controller name="CardPortletController">
           <parameter name="defaultcard" value="0"/>
  @@ -51,65 +51,65 @@
           <parameter name="ruler-size" value="0"/>
         </controller>      
   
  -      <entry parent="http://jakarta.apache.org/jetspeed/channels/jetspeed.rss">
  +      <entry id="109" parent="http://jakarta.apache.org/jetspeed/channels/jetspeed.rss">
           <control name="ClearPortletControl"/>
         </entry>
   
  -      <entry parent="http://jakarta.apache.org/jetspeed/channels/turbine.rss">
  +      <entry id="110" parent="http://jakarta.apache.org/jetspeed/channels/turbine.rss">
           <control name="ClearPortletControl"/>
         </entry>
   
  -      <entry parent="http://www.mozilla.org/news.rdf">
  +      <entry id="111" parent="http://www.mozilla.org/news.rdf">
           <control name="ClearPortletControl"/>
           <parameter name="itemdisplayed" value="5"/>
         </entry>
   
  -      <entry parent="http://www.apacheweek.com/issues/apacheweek-headlines.xml">
  +      <entry id="112" parent="http://www.apacheweek.com/issues/apacheweek-headlines.xml">
           <control name="ClearPortletControl"/>
           <parameter name="showtitle" value="false"/>
           <parameter name="showdescription" value="false"/>
         </entry>
   
  -      <entry parent="http://www.xmlhack.com/rsscat.php">
  +      <entry id="113" parent="http://www.xmlhack.com/rsscat.php">
           <control name="ClearPortletControl"/>
         </entry>
   
       </portlets>
     </portlets>
   
  -  <portlets>
  +  <portlets id="114">
       <controller name="TwoColumns"/>
   
       <metainfo>
         <title>Dynamic</title>
       </metainfo>
   
  -    <portlets>
  -      <entry parent="JetspeedContent"/>
  +    <portlets id="115">
  +      <entry id="116" parent="JetspeedContent"/>
         <layout>
         	<property name="row" value="0"/>
         	<property name="column" value="0"/>
         </layout>
       </portlets>
   
  -    <portlets>
  -      <entry parent="HelloVelocity"/>
  +    <portlets id="117">
  +      <entry id="118" parent="HelloVelocity"/>
         <layout>
         	<property name="row" value="0"/>
         	<property name="column" value="1"/>
         </layout>
       </portlets>
   
  -    <portlets>
  -      <entry parent="HelloVelocityCached"/>
  +    <portlets id="119">
  +      <entry id="120" parent="HelloVelocityCached"/>
         <layout>
         	<property name="row" value="1"/>
         	<property name="column" value="1"/>
         </layout>
       </portlets>
   
  -    <portlets>
  -      <entry parent="HelloJSP"/>
  +    <portlets id="121">
  +      <entry id="122" parent="HelloJSP"/>
         <layout>
         	<property name="row" value="1"/>
         	<property name="column" value="0"/>
  
  
  
  1.5       +23 -23    jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/en/default.psml
  
  Index: default.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/en/default.psml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- default.psml	16 Jul 2002 19:10:40 -0000	1.4
  +++ default.psml	30 Jul 2002 02:07:58 -0000	1.5
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
  -<portlets xmlns="http://xml.apache.org/jetspeed/2000/psml">
  +<portlets id="100" xmlns="http://xml.apache.org/jetspeed/2000/psml">
       <metainfo>
         <title>Default Jetspeed Page</title>
       </metainfo>
  @@ -12,7 +12,7 @@
   
     <skin name="orange-grey"/>
   
  -  <portlets>
  +  <portlets id="101">
       <controller name="RowController">
         <parameter name="sizes" value="66%,34%"/>
       </controller>
  @@ -21,23 +21,23 @@
         <title>Home Page</title>
       </metainfo>
   
  -    <portlets>
  -      <entry parent="JetspeedContent"/>
  +    <portlets id="102">
  +      <entry id="103" parent="JetspeedContent"/>
       </portlets>
   
  -    <portlets>
  -      <entry parent="Jetspeed"/>
  -      <entry parent="Welcome"/>
  +    <portlets id="104">
  +      <entry id="105" parent="Jetspeed"/>
  +      <entry id="106" parent="Welcome"/>
       </portlets>
   
     </portlets>
   
  -  <portlets>
  +  <portlets id="107">
       <metainfo>
         <title>RSS</title>
       </metainfo>
   
  -    <portlets>
  +    <portlets id="108">
         <control name="TabControl"/>
         <controller name="CardPortletController">
           <parameter name="defaultcard" value="0"/>
  @@ -45,57 +45,57 @@
           <parameter name="ruler-size" value="0"/>
         </controller>      
   
  -      <entry parent="http://jakarta.apache.org/jetspeed/channels/jetspeed.rss">
  +      <entry id="109" parent="http://jakarta.apache.org/jetspeed/channels/jetspeed.rss">
           <control name="ClearPortletControl"/>
         </entry>
   
  -      <entry parent="http://jakarta.apache.org/jetspeed/channels/turbine.rss">
  +      <entry id="110" parent="http://jakarta.apache.org/jetspeed/channels/turbine.rss">
           <control name="ClearPortletControl"/>
         </entry>
   
  -      <entry parent="http://www.mozilla.org/news.rdf">
  +      <entry id="111" parent="http://www.mozilla.org/news.rdf">
           <control name="ClearPortletControl"/>
           <parameter name="itemdisplayed" value="5"/>
         </entry>
   
  -      <entry parent="http://www.apacheweek.com/issues/apacheweek-headlines.xml">
  +      <entry id="112" parent="http://www.apacheweek.com/issues/apacheweek-headlines.xml">
           <control name="ClearPortletControl"/>
           <parameter name="showtitle" value="false"/>
           <parameter name="showdescription" value="false"/>
         </entry>
   
  -      <entry parent="http://www.xmlhack.com/rsscat.php">
  +      <entry id="113" parent="http://www.xmlhack.com/rsscat.php">
           <control name="ClearPortletControl"/>
         </entry>
   
       </portlets>
     </portlets>
   
  -  <portlets>
  +  <portlets id="114">
       <controller name="TwoColumns"/>
   
       <metainfo>
         <title>Dynamic</title>
       </metainfo>
   
  -    <portlets>
  -      <entry parent="JetspeedContent"/>
  +    <portlets id="115">
  +      <entry id="116" parent="JetspeedContent"/>
         <layout>
         	<property name="row" value="0"/>
         	<property name="column" value="0"/>
         </layout>
       </portlets>
   
  -    <portlets>
  -      <entry parent="HelloVelocity"/>
  +    <portlets id="117">
  +      <entry id="118" parent="HelloVelocity"/>
         <layout>
         	<property name="row" value="0"/>
         	<property name="column" value="1"/>
         </layout>
       </portlets>
   
  -    <portlets>
  -      <entry parent="HelloVelocityCached"/>
  +    <portlets id="119">
  +      <entry id="120" parent="HelloVelocityCached"/>
         <entry id="808" parent="InstanceExample">
             <parameter name="country" value="Brazil"/>
         </entry>
  @@ -108,8 +108,8 @@
         </layout>
       </portlets>
   
  -    <portlets>
  -      <entry parent="HelloJSP"/>
  +    <portlets id="121">
  +      <entry id="122" parent="HelloJSP"/>
         <layout>
         	<property name="row" value="1"/>
         	<property name="column" value="0"/>
  
  
  
  1.3       +3 -3      jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/en/news.psml
  
  Index: news.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/en/news.psml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- news.psml	28 Jun 2002 05:37:38 -0000	1.2
  +++ news.psml	30 Jul 2002 02:07:58 -0000	1.3
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
  -<portlets user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
  +<portlets id="100" user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
       <metainfo>
         <title>News Page</title>
       </metainfo>
  @@ -7,7 +7,7 @@
     <controller name="ColumnController" />
     <skin name="orange-red" />
   
  -  <entry type="ref" parent="Apacheweek"/>
  -  <entry type="ref" parent="XMLHack"/>
  +  <entry id="101" type="ref" parent="Apacheweek"/>
  +  <entry id="102" type="ref" parent="XMLHack"/>
   
   </portlets>
  
  
  
  1.3       +22 -22    jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/es/default.psml
  
  Index: default.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/es/default.psml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- default.psml	28 Jun 2002 05:37:38 -0000	1.2
  +++ default.psml	30 Jul 2002 02:07:58 -0000	1.3
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
  -<portlets xmlns="http://xml.apache.org/jetspeed/2000/psml">
  +<portlets id="100" xmlns="http://xml.apache.org/jetspeed/2000/psml">
       <metainfo>
         <title>Pagina en español por defecto</title>
       </metainfo>
  @@ -12,7 +12,7 @@
   
     <skin name="orange-grey"/>
   
  -  <portlets>
  +  <portlets id="101">
       <controller name="RowController">
         <parameter name="sizes" value="66%,34%"/>
       </controller>
  @@ -21,23 +21,23 @@
         <title>Página de Inicio</title>
       </metainfo>
   
  -    <portlets>
  -      <entry parent="JetspeedContent"/>
  +    <portlets id="102">
  +      <entry id="103" parent="JetspeedContent"/>
       </portlets>
   
  -    <portlets>
  -      <entry parent="Jetspeed"/>
  -      <entry parent="Welcome"/>
  +    <portlets id="104">
  +      <entry id="105" parent="Jetspeed"/>
  +      <entry id="106" parent="Welcome"/>
       </portlets>
   
     </portlets>
   
  -  <portlets>
  +  <portlets id="107">
       <metainfo>
         <title>RSS</title>
       </metainfo>
   
  -    <portlets>
  +    <portlets id="108">
         <control name="TabControl"/>
         <controller name="CardPortletController">
           <parameter name="defaultcard" value="0"/>
  @@ -45,30 +45,30 @@
           <parameter name="ruler-size" value="0"/>
         </controller>      
   
  -      <entry parent="http://jakarta.apache.org/jetspeed/channels/jetspeed.rss">
  +      <entry id="109" parent="http://jakarta.apache.org/jetspeed/channels/jetspeed.rss">
           <control name="ClearPortletControl"/>
         </entry>
   
  -      <entry parent="http://jakarta.apache.org/jetspeed/channels/turbine.rss">
  +      <entry id="110" parent="http://jakarta.apache.org/jetspeed/channels/turbine.rss">
           <control name="ClearPortletControl"/>
         </entry>
   
  -      <entry parent="http://www.mozilla.org/news.rdf">
  +      <entry id="111" parent="http://www.mozilla.org/news.rdf">
           <control name="ClearPortletControl"/>
           <parameter name="itemdisplayed" value="5"/>
         </entry>
   
  -      <entry parent="http://www.apacheweek.com/issues/apacheweek-headlines.xml">
  +      <entry id="112" parent="http://www.apacheweek.com/issues/apacheweek-headlines.xml">
           <control name="ClearPortletControl"/>
           <parameter name="showtitle" value="false"/>
           <parameter name="showdescription" value="false"/>
         </entry>
   
  -      <entry parent="XMLHack">
  +      <entry id="113" parent="XMLHack">
           <control name="ClearPortletControl"/>
         </entry>
   
  -      <entry parent="http://barrapunto.com/barrapunto.rdf">
  +      <entry id="114" parent="http://barrapunto.com/barrapunto.rdf">
           <control name="ClearPortletControl"/>
           <parameter name="itemdisplayed" value="5"/>
         </entry>
  @@ -76,31 +76,31 @@
       </portlets>
     </portlets>
   
  -  <portlets>
  +  <portlets id="115">
       <controller name="TwoColumns"/>
   
       <metainfo>
         <title>Dinámicos</title>
       </metainfo>
   
  -    <portlets>
  -      <entry parent="JetspeedContent"/>
  +    <portlets id="116">
  +      <entry id="117" parent="JetspeedContent"/>
         <layout>
         	<property name="row" value="0"/>
         	<property name="column" value="0"/>
         </layout>
       </portlets>
   
  -    <portlets>
  -      <entry parent="HelloVelocity"/>
  +    <portlets id="118">
  +      <entry id="119" parent="HelloVelocity"/>
         <layout>
         	<property name="row" value="0"/>
         	<property name="column" value="1"/>
         </layout>
       </portlets>
   
  -    <portlets>
  -      <entry parent="HelloJSP"/>
  +    <portlets id="120">
  +      <entry id="121" parent="HelloJSP"/>
         <layout>
         	<property name="row" value="1"/>
         	<property name="column" value="1"/>
  
  
  
  1.3       +4 -4      jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/es/news.psml
  
  Index: news.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/user/anon/html/es/news.psml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- news.psml	28 Jun 2002 05:37:38 -0000	1.2
  +++ news.psml	30 Jul 2002 02:07:58 -0000	1.3
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
  -<portlets user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
  +<portlets id="100" user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
       <metainfo>
         <title>Página de Noticias</title>
       </metainfo>
  @@ -7,12 +7,12 @@
     <controller name="ColumnController" />
     <skin name="orange-red" />
   
  -  <entry parent="http://barrapunto.com/barrapunto.rdf">
  +  <entry id="101" parent="http://barrapunto.com/barrapunto.rdf">
       <parameter name="itemdisplayed" value="5"/>
     </entry>
   
  -  <entry type="ref" parent="Apacheweek"/>
  +  <entry id="102" type="ref" parent="Apacheweek"/>
   
  -  <entry type="ref" parent="XMLHack"/>
  +  <entry id="103" type="ref" parent="XMLHack"/>
   
   </portlets>
  
  
  
  1.5       +2 -2      jakarta-jetspeed/webapp/WEB-INF/psml/info.psml
  
  Index: info.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/info.psml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- info.psml	4 May 2002 18:03:19 -0000	1.4
  +++ info.psml	30 Jul 2002 02:07:59 -0000	1.5
  @@ -1,10 +1,10 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
  -<portlets user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
  +<portlets id="100" user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
   
     <controller name="ColumnController"/>
     <skin name="orange-grey"/>
   
  -  <entry type="ref" parent="PortletInfoPortlet">
  +  <entry id="101" type="ref" parent="PortletInfoPortlet">
       <control name="FullScreenControl"/>
     </entry>
   
  
  
  
  1.2       +1 -1      jakarta-jetspeed/webapp/WEB-INF/psml/group/Jetspeed/html/news.psml
  
  Index: news.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/group/Jetspeed/html/news.psml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- news.psml	23 Jul 2002 00:03:55 -0000	1.1
  +++ news.psml	30 Jul 2002 02:07:59 -0000	1.2
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="iso-8859-1"?>
  -<portlets user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
  +<portlets id="100" user="default" xmlns="http://xml.apache.org/jetspeed/2000/psml">
       <metainfo>
           <title>Default Jetspeed News page</title>
       </metainfo>
  
  
  
  1.3       +9 -9      jakarta-jetspeed/webapp/WEB-INF/psml/group/Jetspeed/html/security_example.psml
  
  Index: security_example.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/psml/group/Jetspeed/html/security_example.psml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- security_example.psml	24 Jul 2002 03:25:41 -0000	1.2
  +++ security_example.psml	30 Jul 2002 02:07:59 -0000	1.3
  @@ -1,5 +1,5 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<portlets>
  +<portlets id="100">
       <security-ref parent="admin-only"/>
       <skin name="orange-red"/>
       <metainfo>
  @@ -7,29 +7,29 @@
       </metainfo>
       <control name="TabControl"/>
       <controller name="TabController"/>
  -    <portlets >
  +    <portlets id="101">
           <security-ref parent="user-only"/>
           <metainfo>
               <title>User group can Customize</title>
           </metainfo>
           <controller name="TwoColumns"/>
  -        <entry parent="LoggedInWelcome"/>
  -        <entry parent="SecurityExample"/>
  -        <entry parent="Search"/>
  +        <entry id="102" parent="LoggedInWelcome"/>
  +        <entry id="103" parent="SecurityExample"/>
  +        <entry id="104" parent="Search"/>
       </portlets>
  -    <portlets>
  +    <portlets id="105">
           <security-ref parent="admin-only"/>
           <metainfo>
               <title>Admin group can Customize</title>
           </metainfo>
           <controller name="TwoColumns"/>
  -        <entry parent="LoggedInWelcome"/>
  -        <entry parent="SecurityExample">
  +        <entry id="106" parent="LoggedInWelcome"/>
  +        <entry id="107" parent="SecurityExample">
             <metainfo>
               <title>Security Example in Admin Tab</title>
             </metainfo>
           </entry>
  -        <entry parent="Search">
  +        <entry id="108" parent="Search">
             <metainfo>
               <title>Search in Admin Tab</title>
             </metainfo>
  
  
  
  1.6       +18 -11    jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controllers/VelocityPanedPortletController.java
  
  Index: VelocityPanedPortletController.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/portal/controllers/VelocityPanedPortletController.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- VelocityPanedPortletController.java	14 Apr 2002 16:49:09 -0000	1.5
  +++ VelocityPanedPortletController.java	30 Jul 2002 02:07:59 -0000	1.6
  @@ -65,6 +65,8 @@
   import org.apache.jetspeed.util.MetaData;
   import org.apache.jetspeed.util.template.JetspeedLink;
   import org.apache.jetspeed.util.template.JetspeedLinkFactory;
  +import org.apache.jetspeed.services.statemanager.SessionState;
  +import org.apache.jetspeed.services.rundata.JetspeedRunData;
   
   /**
    * A Velocity based portlet controller implementation that can be used
  @@ -103,8 +105,7 @@
       public boolean isSelected( Portlet p, RunData rundata )
       {
           String peid = rundata.getParameters().getString( getPaneParameter() );
  -        String myid = getPortlets().getID(); 
  -        String last = (String)rundata.getUser().getTemp( PANE_PARAMETER + myid );
  +        String last = retrievePaneIDFromSession(rundata);
           if (peid == null)
           {
               if (last == null)
  @@ -179,7 +180,7 @@
           {
               // the parameter is undefined, search for sticky value in session
               String id = getPortlets().getID(); 
  -            pane = (String)rundata.getUser().getTemp( PANE_PARAMETER + id );          

  +            pane = retrievePaneIDFromSession(rundata);
               if (pane == null)
               {
                   // use default
  @@ -192,7 +193,7 @@
       }
   
       /**
  -     * Returns the pane id from the session for pane selection
  +     * Returns the pane id from the session for pane selection of this portlet set / portal
page
        *
        *  @param rundata The request data.
        *  @return String The pane id for the selected pane.
  @@ -200,29 +201,35 @@
        */
       protected String retrievePaneIDFromSession(RunData rundata)
       {
  -        // the parameter is undefined, search for sticky value in session
  -        String id = getPortlets().getID(); 
  -        String pane = (String)rundata.getUser().getTemp( PANE_PARAMETER + id );
  +        // get the state for this portlet (portlet set) in this page in this session
  +        SessionState state = ((JetspeedRunData)rundata).getPortletSessionState(getPortlets().getID());
  +
  +        // get the PANE_PARAMETER attribute
  +        String pane = (String) state.getAttribute(PANE_PARAMETER);
           
  +        // if not yet defined, select the first portlet set
           if (pane == null)
           {
               // use default
               pane = getPortlets().getPortletAt(0).getID();
  -
           }
          
           return pane;
       }
   
       /**
  -     * Saves the pane id to the session to remember selection state of menu or tab.
  +     * Saves the pane id to the session to remember selection state of menu or tab for
this portlet set / portal page.
        *
        *  @param rundata The request data.
        *  @param id  The tab id to save for this controller
        */
       public void savePaneID( RunData data, String id )
       {
  -        data.getUser().setTemp( PANE_PARAMETER + getPortlets().getID(), id );
  +        // get the state for this portlet (portlet set) in this page in this session
  +        SessionState state = ((JetspeedRunData)data).getPortletSessionState(getPortlets().getID());
  +        
  +        // set the PANE_PARAMETER attribute
  +        state.setAttribute(PANE_PARAMETER, id);
       }
   
       /**
  
  
  

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


Mime
View raw message