cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r321224 - in /cocoon/branches/BRANCH_2_1_X: ./ src/blocks/portal/conf/ src/blocks/portal/java/org/apache/cocoon/portal/impl/ src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/
Date Fri, 14 Oct 2005 21:49:47 GMT
Author: rgoers
Date: Fri Oct 14 14:49:44 2005
New Revision: 321224

URL: http://svn.apache.org/viewcvs?rev=321224&view=rev
Log:
<action dev="RG" type="fix" fixes-bug="32784">Portal Block: Allow Full screen mode to
show navigation.</action>

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/portal.xconf
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
    cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java
    cocoon/branches/BRANCH_2_1_X/status.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/portal.xconf
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/portal.xconf?rev=321224&r1=321223&r2=321224&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/portal.xconf (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/conf/portal.xconf Fri Oct 14 14:49:44 2005
@@ -106,6 +106,7 @@
       <!-- wsrp support: -->
       <aspect adapter="wsrp"/>
     </aspects>
+    <fullScreenNav>true</fullScreenNav>
   </component>
 
   <!-- This is the portal service -->

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java?rev=321224&r1=321223&r2=321224&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/impl/PortalManagerImpl.java
Fri Oct 14 14:49:44 2005
@@ -68,6 +68,10 @@
     /** The component context. */
     protected Context context;
 
+    /** Indicates whether navigation appears on full screen portlets */
+    private boolean fullScreenNav;
+    public static final String FULLSCREEN = "fullScreenNav";
+
     /**
      * @see org.apache.avalon.framework.service.Serviceable#service(ServiceManager)
      */
@@ -134,6 +138,7 @@
                              conf.getChild("aspects"), 
                              this, 
                              new Parameters());
+        this.fullScreenNav = conf.getChild(FULLSCREEN, true).getValueAsBoolean(false);
     }
 
     /**
@@ -156,7 +161,12 @@
      */
     public void render(PortalManagerAspectRenderContext context, PortalService service, ContentHandler
ch, Parameters parameters) throws SAXException {
         // first check for a full screen layout
-        Layout portalLayout = this.portalService.getEntryLayout(null);
+
+        Layout portalLayout = null;
+        if (!this.fullScreenNav) {
+            // If fullscreen mode - otherwise TabContentAspect will deal with the layout
+            portalLayout = this.portalService.getEntryLayout(null);
+        }
         if ( portalLayout == null ) {
             portalLayout = this.portalService.getComponentManager().getProfileManager().getPortalLayout(null,
null);
         }

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java?rev=321224&r1=321223&r2=321224&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java
Fri Oct 14 14:49:44 2005
@@ -160,7 +160,7 @@
                 
                 XMLUtils.startElement(handler, "named-item", attributes);
                 if (j == selected) {
-                    this.processLayout(tab.getLayout(), service, handler);
+                    this.processLayout(getNextLayout(service, tab), service, handler);
                     if (config.includeSelected) {
                         List events = new ArrayList();
                         events.add(event);
@@ -198,6 +198,31 @@
         desc.setAutoCreate(true);
         
         return Collections.singletonList(desc).iterator();
+    }
+
+    /**
+     *
+     * @param service
+     * @param tab
+     * @return
+     */
+    private Layout getNextLayout(PortalService service, Item tab) {
+        Layout tabLayout = tab.getLayout();
+        if (tabLayout instanceof CompositeLayout) {
+            CompositeLayout layout = (CompositeLayout)tabLayout;
+            List list = layout.getItems();
+            int size = list.size();
+            for (int i = 0; i < size; i++) {
+                if (list.get(i) instanceof NamedItem) {
+                    return tabLayout;
+                }
+            }
+        }
+        Layout nextLayout = service.getEntryLayout(null);
+        if (nextLayout == null) {
+            nextLayout = tab.getLayout();
+        }
+        return nextLayout;
     }
 
     /*

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=321224&r1=321223&r2=321224&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Fri Oct 14 14:49:44 2005
@@ -174,6 +174,9 @@
 
   <changes>
   <release version="@version@" date="@date@">
+    <action dev="RG" type="fix" fixes-bug="32784">
+      Portal Block: Allow Full screen mode to show navigation.
+    </action>
     <action dev="VG" type="fix" fixes-bug="30894">
       Databases block: Support stored procedures returning result set in SQLTransformer.
     </action>



Mime
View raw message