cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl TabContentAspect.java
Date Mon, 19 May 2003 13:06:06 GMT
cziegeler    2003/05/19 06:06:06

  Modified:    src/blocks/portal/java/org/apache/cocoon/portal/layout
                        CompositeLayout.java
               src/blocks/portal/samples/profiles/mapping layout.xml
               src/blocks/portal/java/org/apache/cocoon/portal/event/subscriber/impl
                        DefaultLayoutEventSubscriber.java
               src/blocks/portal/samples/profiles/layout portal.xml
               src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl
                        TabContentAspect.java
  Removed:     src/blocks/portal/java/org/apache/cocoon/portal/layout/impl
                        RowLayout.java TabLayout.java ColumnLayout.java
  Log:
  Using layout factory for columns, rows and tabs
  
  Revision  Changes    Path
  1.2       +7 -2      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/CompositeLayout.java
  
  Index: CompositeLayout.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/CompositeLayout.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CompositeLayout.java	19 May 2003 12:50:59 -0000	1.1
  +++ CompositeLayout.java	19 May 2003 13:06:06 -0000	1.2
  @@ -62,10 +62,15 @@
    * 
    * @version CVS $Id$
    */
  -public abstract class CompositeLayout extends AbstractLayout {
  +public class CompositeLayout extends AbstractLayout {
   
   	protected List items = new ArrayList();
   
  +    /**
  +     * Constructor
  +     */
  +    public CompositeLayout() {}
  +    
   	/**
   	 * Add indexed item to the itemList.
   	 * @param index, index for the position inside the list
  
  
  
  1.4       +0 -15     cocoon-2.1/src/blocks/portal/samples/profiles/mapping/layout.xml
  
  Index: layout.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/samples/profiles/mapping/layout.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- layout.xml	19 May 2003 12:50:59 -0000	1.3
  +++ layout.xml	19 May 2003 13:06:06 -0000	1.4
  @@ -37,11 +37,6 @@
           </field>
       </class>
   
  -    <class name="org.apache.cocoon.portal.layout.impl.ColumnLayout"
  -           extends="org.apache.cocoon.portal.layout.CompositeLayout">
  -        <map-to xml="column-layout" />
  -    </class>
  -
      <class name="org.apache.cocoon.portal.layout.impl.FrameLayout"
              extends="org.apache.cocoon.portal.layout.AbstractLayout">
           <map-to xml="frame-layout" />
  @@ -73,21 +68,11 @@
           </field>
       </class>
   
  -    <class name="org.apache.cocoon.portal.layout.impl.RowLayout"
  -           extends="org.apache.cocoon.portal.layout.CompositeLayout">
  -        <map-to xml="row-layout" />
  -    </class>
  -
       <class name="org.apache.cocoon.portal.layout.impl.CopletLayout" auto-complete="false"
              extends="org.apache.cocoon.portal.layout.AbstractLayout">
           <map-to xml="coplet-layout" />
   
   		<field name="copletInstanceData" type="java.lang.String" handler="org.apache.cocoon.portal.profile.impl.CopletInstanceDataReferenceFieldHandler"/>
  -    </class>
  -
  -    <class name="org.apache.cocoon.portal.layout.impl.TabLayout"
  -           extends="org.apache.cocoon.portal.layout.CompositeLayout">
  -        <map-to xml="tab-layout" />
       </class>
   
   </mapping>
  
  
  
  1.3       +3 -3      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/subscriber/impl/DefaultLayoutEventSubscriber.java
  
  Index: DefaultLayoutEventSubscriber.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/event/subscriber/impl/DefaultLayoutEventSubscriber.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultLayoutEventSubscriber.java	8 May 2003 13:38:11 -0000	1.2
  +++ DefaultLayoutEventSubscriber.java	19 May 2003 13:06:06 -0000	1.3
  @@ -57,9 +57,9 @@
   import org.apache.cocoon.portal.event.LayoutEvent;
   import org.apache.cocoon.portal.event.Subscriber;
   import org.apache.cocoon.portal.event.impl.LayoutRemoveEvent;
  +import org.apache.cocoon.portal.layout.CompositeLayout;
   import org.apache.cocoon.portal.layout.Layout;
   import org.apache.cocoon.portal.layout.aspect.TabLayoutStatus;
  -import org.apache.cocoon.portal.layout.impl.TabLayout;
   import org.apache.cocoon.portal.profile.ProfileManager;
   
   /**
  @@ -104,7 +104,7 @@
               LayoutEvent statusEvent = (LayoutEvent)event;
               Layout layout = (Layout)statusEvent.getTarget();
               // TODO should not depend on special Layout 
  -            if (layout instanceof TabLayout) {
  +            if (layout instanceof CompositeLayout) {
                   ProfileManager profileManager = null;
                   try {
                       profileManager = (ProfileManager) this.componentManager.lookup(ProfileManager.ROLE);
  
  
  
  1.4       +24 -24    cocoon-2.1/src/blocks/portal/samples/profiles/layout/portal.xml
  
  Index: portal.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/samples/profiles/layout/portal.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- portal.xml	19 May 2003 12:51:00 -0000	1.3
  +++ portal.xml	19 May 2003 13:06:06 -0000	1.4
  @@ -1,10 +1,10 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<tab-layout renderer-name="tab" static="true" name="tab">
  +<composite-layout renderer-name="tab" static="true" name="tab">
       <named-item name="News">
  -        <column-layout renderer-name="column" name="column">
  +        <composite-layout renderer-name="column" name="column">
               <item>
                   <parameter name="width" value="350" />
  -                <row-layout renderer-name="row" static="true" name="row">
  +                <composite-layout renderer-name="row" static="true" name="row">
                       <item>
   		                <coplet-layout renderer-name="window" static="true" name="coplet">
   		                    <id>1</id>
  @@ -19,10 +19,10 @@
   		                    <coplet-instance-data>NYTBusiness-1</coplet-instance-data>
   		                </coplet-layout>
                       </item>
  -                </row-layout>
  +                </composite-layout>
               </item>
               <item>
  -                <row-layout renderer-name="row" static="false" name="row">
  +                <composite-layout renderer-name="row" static="false" name="row">
                       <item>
   		                <coplet-layout renderer-name="window" name="coplet">
   		                    <id>3</id>
  @@ -31,7 +31,7 @@
   		                </coplet-layout>
                       </item>
                       <item>
  -                        <column-layout renderer-name="column" name="column">
  +                        <composite-layout renderer-name="column" name="column">
                               <item>
                                   <frame-layout renderer-name="frame" name="frame">
                                       <id>a</id>
  @@ -45,10 +45,10 @@
   				                    <coplet-instance-data>CNET News-1</coplet-instance-data>
                                   </coplet-layout>
                               </item>
  -                        </column-layout>
  +                        </composite-layout>
   		            </item>
                       <item>
  -                        <column-layout renderer-name="column" name="column">
  +                        <composite-layout renderer-name="column" name="column">
                               <item>
                                   <coplet-layout renderer-name="window" name="coplet">
   				                    <id>5</id>
  @@ -63,12 +63,12 @@
                                       <source>cocoon://samples/portal/news/CNNEurope.rss</source>
                                   </frame-layout>
                               </item>
  -                        </column-layout>
  +                        </composite-layout>
                       </item>
  -                </row-layout>
  +                </composite-layout>
               </item>
               <item>
  -                <row-layout renderer-name="row" static="false" name="row">
  +                <composite-layout renderer-name="row" static="false" name="row">
                       <item>
   		                <coplet-layout renderer-name="window" name="coplet">
   		                    <id>6</id>
  @@ -83,14 +83,14 @@
   		                    <coplet-instance-data>CNNEurope-1</coplet-instance-data>
   		                </coplet-layout>
                       </item>
  -                </row-layout>
  +                </composite-layout>
               </item>
  -        </column-layout>
  +        </composite-layout>
       </named-item>
       <named-item name="Weblogs">
  -        <column-layout renderer-name="column" name="column">
  +        <composite-layout renderer-name="column" name="column">
               <item>
  -                <row-layout renderer-name="row" name="row">
  +                <composite-layout renderer-name="row" name="row">
                       <item>
   		                <coplet-layout renderer-name="window" name="coplet">
   		                    <id>8</id>
  @@ -107,10 +107,10 @@
   		                    <coplet-instance-data>CZ Weblog-1</coplet-instance-data>
   		                </coplet-layout>
                       </item>
  -                </row-layout>
  +                </composite-layout>
               </item>
               <item>
  -                <row-layout renderer-name="row" name="row">
  +                <composite-layout renderer-name="row" name="row">
                       <item>
   		                <coplet-layout renderer-name="window" name="coplet">
   		                    <id>10</id>
  @@ -119,14 +119,14 @@
   		                    <coplet-instance-data>Weblog-1</coplet-instance-data>
   		                </coplet-layout>
                       </item>
  -                </row-layout>
  +                </composite-layout>
               </item>
  -        </column-layout>
  +        </composite-layout>
       </named-item>
       <named-item name="Cocoon">
  -        <row-layout renderer-name="row" name="row">
  +        <composite-layout renderer-name="row" name="row">
               <item>
  -                <column-layout renderer-name="column" name="column">
  +                <composite-layout renderer-name="column" name="column">
                       <item>
   		                <coplet-layout renderer-name="window" name="coplet">
   		                    <id>11</id>
  @@ -141,8 +141,8 @@
   		                    <coplet-instance-data>Overview-1</coplet-instance-data>
   		                </coplet-layout>
                       </item>
  -	            </column-layout>
  +	            </composite-layout>
               </item>
  -        </row-layout>
  +        </composite-layout>
       </named-item>
  -</tab-layout>
  \ No newline at end of file
  +</composite-layout>
  \ No newline at end of file
  
  
  
  1.3       +4 -4      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java
  
  Index: TabContentAspect.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TabContentAspect.java	8 May 2003 13:38:11 -0000	1.2
  +++ TabContentAspect.java	19 May 2003 13:06:06 -0000	1.3
  @@ -56,11 +56,11 @@
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.cocoon.portal.PortalService;
   import org.apache.cocoon.portal.event.impl.LayoutEventImpl;
  +import org.apache.cocoon.portal.layout.CompositeLayout;
   import org.apache.cocoon.portal.layout.Layout;
   import org.apache.cocoon.portal.layout.NamedItem;
   import org.apache.cocoon.portal.layout.aspect.TabLayoutStatus;
   import org.apache.cocoon.portal.layout.impl.Parameter;
  -import org.apache.cocoon.portal.layout.impl.TabLayout;
   import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext;
   import org.apache.cocoon.portal.profile.ProfileManager;
   import org.apache.cocoon.xml.AttributesImpl;
  @@ -85,7 +85,7 @@
                           PortalService service,
                           ContentHandler handler)
       throws SAXException {
  -        if (layout instanceof TabLayout) {
  +        if (layout instanceof CompositeLayout) {
               AttributesImpl attributes = new AttributesImpl();
               Map parameter = layout.getParameters();
               for (Iterator iter = parameter.values().iterator(); iter.hasNext();) {
  @@ -98,7 +98,7 @@
               try {
                   portalService = (PortalService) this.manager.lookup(PortalService.ROLE);
                   attributes = new AttributesImpl();
  -                TabLayout tabLayout = (TabLayout) layout;
  +                CompositeLayout tabLayout = (CompositeLayout) layout;
   
                   // selected tab
                   TabLayoutStatus status = (TabLayoutStatus) this.getStatus( TabLayoutStatus.class,
ProfileManager.SESSION_STATUS, tabLayout.getId() ); 
  
  
  

Mime
View raw message