portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raph...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages p001.psml
Date Mon, 08 Dec 2003 21:05:55 GMT
raphael     2003/12/08 13:05:55

  Modified:    portal/src/java/org/apache/jetspeed/aggregator Tag:
                        aggregation_1-branch PageAggregator.java
               portal/src/java/org/apache/jetspeed/aggregator/impl Tag:
                        aggregation_1-branch PortletRendererImpl.java
               portal/src/java/org/apache/jetspeed/layout Tag:
                        aggregation_1-branch MultiColumnPortlet.java
               portal/src/java/org/apache/jetspeed/services/entity Tag:
                        aggregation_1-branch PortletEntityServiceImpl.java
               portal/src/webapp/WEB-INF/conf/ojb Tag: aggregation_1-branch
                        repository_jetspeed.xml
               portal/src/webapp/WEB-INF/layout Tag: aggregation_1-branch
                        columns.jsp
               portal/src/webapp/WEB-INF/pages Tag: aggregation_1-branch
                        p001.psml
  Added:       portal/src/webapp/WEB-INF/layout Tag: aggregation_1-branch
                        clear-bottom.jsp clear-top.jsp
                        portletstd-bottom.jsp portletstd-top.jsp
  Log:
  - fix an issue with PortletEntity persistence (preference member name not recognized)
  - update layout portlet to use a decorator
  - define some simple decorators
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.5   +2 -1      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/PageAggregator.java
  
  Index: PageAggregator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Attic/PageAggregator.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- PageAggregator.java	6 Dec 2003 23:24:03 -0000	1.1.2.4
  +++ PageAggregator.java	8 Dec 2003 21:05:54 -0000	1.1.2.5
  @@ -151,6 +151,7 @@
   */
           //DEBUG CODE: use this to test a specific page
           Page page = org.apache.jetspeed.services.page.PageManager.getPage("p001");
  +        context.setPage(page);
   
           //Set default acl
           String acl = page.getAcl();
  
  
  
  No                   revision
  No                   revision
  1.1.2.6   +41 -69    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/PortletRendererImpl.java
  
  Index: PortletRendererImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/Attic/PortletRendererImpl.java,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- PortletRendererImpl.java	6 Dec 2003 23:24:03 -0000	1.1.2.5
  +++ PortletRendererImpl.java	8 Dec 2003 21:05:54 -0000	1.1.2.6
  @@ -136,33 +136,14 @@
           HttpServletRequest servletRequest = null;
           try
           {
  -            ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
  -            PortletEntity portletEntity = PortletEntityAccess.getEntity(oid);
  -            PortletWindow portletWindow = null;
  -
  -            if (portletEntity==null)
  -            {
  -                PortletDefinition portletDefinition = JetspeedPortletRegistry.getPortletDefinitionByUniqueName(fragment.getName());
  -                if (portletDefinition == null)
  -                {
  -                    log.error("Failed to load: " + fragment.getName() + " from registry");
  -                }
  -                portletWindow = PortletWindowFactory.getWindow(portletDefinition, fragment.getName());
  -
  -                // fix id
  -                fragment.setId(portletWindow.getId().toString());
  -                oid = portletWindow.getId();
  -            }
  -            else
  -            {
  -                portletWindow = PortletWindowFactory.getWindow(portletEntity, oid);
  -            }
  +            PortletWindow portletWindow = getPortletWindow(fragment);
   
               servletRequest = request.getRequestForWindow(portletWindow);
               HttpServletResponse servletResponse = request.getResponseForWindow(portletWindow);
   
               servletRequest.setAttribute("org.apache.jetspeed.ContentDispatcher",getDispatcher(request,true));
               servletRequest.setAttribute("org.apache.jetspeed.Fragment",fragment);
  +            servletRequest.setAttribute("org.apache.jetspeed.Page",request.getPage());
   
               // should we decorate here instead of rendering Portlet ?
               container.renderPortlet(portletWindow, servletRequest, servletResponse);
  @@ -178,6 +159,7 @@
               {
                   servletRequest.removeAttribute("org.apache.jetspeed.ContentDispatcher");
                   servletRequest.removeAttribute("org.apache.jetspeed.Fragment");
  +                servletRequest.removeAttribute("org.apache.jetspeed.Page");
               }
           }
       }
  @@ -193,28 +175,7 @@
           //
           try
           {
  -            ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
  -            PortletEntity portletEntity = PortletEntityAccess.getEntity(oid);
  -            PortletWindow portletWindow = null;
  -
  -            if (portletEntity==null)
  -            {
  -                PortletDefinition portletDefinition = JetspeedPortletRegistry.getPortletDefinitionByUniqueName(fragment.getName());
  -                if (portletDefinition == null)
  -                {
  -                    log.error("Failed to load: " + fragment.getName() + " from registry");
  -                }
  -                portletWindow = PortletWindowFactory.getWindow(portletDefinition, fragment.getName());
  -
  -                // fix id
  -                fragment.setId(portletWindow.getId().toString());
  -                oid = portletWindow.getId();
  -            }
  -            else
  -            {
  -                portletWindow = PortletWindowFactory.getWindow(portletEntity, oid);
  -            }
  -
  +            PortletWindow portletWindow = getPortletWindow(fragment);
               container.renderPortlet(portletWindow, request, response);
           }
           catch (Throwable t)
  @@ -232,36 +193,12 @@
       {
           RenderingJob rJob = new RenderingJob();
   
  -        ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
  -        PortletEntity portletEntity = PortletEntityAccess.getEntity(oid);
  -        PortletWindow portletWindow = null;
  -
  -        if (portletEntity==null)
  -        {
  -            PortletDefinition portletDefinition = JetspeedPortletRegistry.getPortletDefinitionByUniqueName(fragment.getName());
  -            if (portletDefinition == null)
  -            {
  -                log.error("Failed to load: " + fragment.getName() + " from registry");
  -            }
  -            portletWindow = PortletWindowFactory.getWindow(portletDefinition, fragment.getName());
  -
  -            // fix id
  -            fragment.setId(portletWindow.getId().toString());
  -            oid = portletWindow.getId();
  -        }
  -        else
  -        {
  -            portletWindow = PortletWindowFactory.getWindow(portletEntity, oid);
  -        }
  -
  +        PortletWindow portletWindow = getPortletWindow(fragment);
           ContentDispatcherCtrl dispatcher = getDispatcherCtrl(request,true);
   
           HttpServletRequest servletRequest = request.getRequestForWindow(portletWindow);
           HttpServletResponse servletResponse = dispatcher.getResponseForWindow(portletWindow, request);
   
  -        servletRequest.setAttribute("org.apache.jetspeed.ContentDispatcher",dispatcher);
  -        servletRequest.setAttribute("org.apache.jetspeed.Fragment",fragment);
  -
           rJob.setWindow(portletWindow);
           rJob.setContainer(this.container);
           rJob.setRequest(servletRequest);
  @@ -292,4 +229,39 @@
           return (ContentDispatcherCtrl)request.getContentDispatcher();
       }
   
  +    protected PortletWindow getPortletWindow(Fragment fragment)
  +    {
  +        ObjectID oid = JetspeedObjectID.createFromString(fragment.getId());
  +        PortletEntity portletEntity = PortletEntityAccess.getEntity(oid);
  +        PortletWindow portletWindow = null;
  +
  +        if (portletEntity==null)
  +        {
  +            PortletDefinition portletDefinition = JetspeedPortletRegistry.getPortletDefinitionByUniqueName(fragment.getName());
  +            if (portletDefinition == null)
  +            {
  +                log.error("Failed to load: " + fragment.getName() + " from registry");
  +            }
  +            portletWindow = PortletWindowFactory.getWindow(portletDefinition, fragment.getName());
  +
  +            // fix issues, persist entity and update fragment ID
  +            try
  +            {
  +                PortletEntityAccess.storePortletEntity(portletEntity);
  +            }
  +            catch (Exception e)
  +            {
  +                log.error("Error persisting new portletEntity", e);
  +            }
  +
  +            fragment.setId(portletWindow.getId().toString());
  +            oid = portletWindow.getId();
  +        }
  +        else
  +        {
  +            portletWindow = PortletWindowFactory.getWindow(portletEntity, oid);
  +        }
  +
  +        return portletWindow;
  +    }
   }
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +4 -1      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/layout/Attic/MultiColumnPortlet.java
  
  Index: MultiColumnPortlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/layout/Attic/MultiColumnPortlet.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- MultiColumnPortlet.java	6 Dec 2003 23:24:04 -0000	1.1.2.1
  +++ MultiColumnPortlet.java	8 Dec 2003 21:05:54 -0000	1.1.2.2
  @@ -68,6 +68,7 @@
   import javax.portlet.RenderResponse;
   import javax.servlet.ServletRequest;
   import javax.servlet.http.HttpServletRequestWrapper;
  +import org.apache.jetspeed.om.page.Page;
   import org.apache.jetspeed.om.page.Fragment;
   import org.apache.jetspeed.om.page.Property;
   import org.apache.jetspeed.aggregator.ContentDispatcher;
  @@ -109,13 +110,14 @@
           // Very ugly and Pluto dependant but I don't see anything better right now
           ServletRequest innerRequest = ((HttpServletRequestWrapper)request).getRequest();
   
  +        Page page = (Page)innerRequest.getAttribute("org.apache.jetspeed.Page");
           Fragment fragment = (Fragment)innerRequest.getAttribute("org.apache.jetspeed.Fragment");
           ContentDispatcher dispatcher = (ContentDispatcher)innerRequest.getAttribute("org.apache.jetspeed.ContentDispatcher");
   
           columns = buildColumns(fragment, this.numColumns);
   
  -        log.debug("Columns :"+columns);
           request.setAttribute("columns", columns);
  +        request.setAttribute("page", page);
           request.setAttribute("fragment", fragment);
           request.setAttribute("dispatcher", dispatcher);
   
  @@ -123,6 +125,7 @@
           super.doView(request,response);
   
           request.removeAttribute("columns");
  +        request.removeAttribute("page");
           request.removeAttribute("fragment");
           request.removeAttribute("dispatcher");
       }
  
  
  
  No                   revision
  No                   revision
  1.11.2.1  +2 -2      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/entity/PortletEntityServiceImpl.java
  
  Index: PortletEntityServiceImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/services/entity/PortletEntityServiceImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.11.2.1
  diff -u -r1.11 -r1.11.2.1
  --- PortletEntityServiceImpl.java	26 Nov 2003 20:55:34 -0000	1.11
  +++ PortletEntityServiceImpl.java	8 Dec 2003 21:05:54 -0000	1.11.2.1
  @@ -74,7 +74,7 @@
    * <p>
    * PortletEntityServiceImpl
    * </p>
  - * 
  + *
    * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
    * @version $Id$
    *
  
  
  
  No                   revision
  No                   revision
  1.12.2.1  +294 -295  jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/ojb/repository_jetspeed.xml
  
  Index: repository_jetspeed.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/ojb/repository_jetspeed.xml,v
  retrieving revision 1.12
  retrieving revision 1.12.2.1
  diff -u -r1.12 -r1.12.2.1
  --- repository_jetspeed.xml	18 Oct 2003 20:47:38 -0000	1.12
  +++ repository_jetspeed.xml	8 Dec 2003 21:05:54 -0000	1.12.2.1
  @@ -1,28 +1,28 @@
   <!--
      - P O R T L E T    A P P L I C A T I O N
  --->	
  +-->
   
   <!--
     <class-descriptor
  -   	  class="org.apache.jetspeed.om.common.portlet.PortletApplicationDefinitionImpl"
  +      class="org.apache.jetspeed.om.common.portlet.PortletApplicationDefinitionImpl"
      >
  -     <extent-class class-ref="org.apache.jetspeed.tools.castor.om.common.portlet.PortletDefinitionDescriptor" />  
  +     <extent-class class-ref="org.apache.jetspeed.tools.castor.om.common.portlet.PortletDefinitionDescriptor" />
     </class-descriptor>
   -->
   
  - 
  +
     <class-descriptor
  -   	  class="org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl"
  -   	  table="PORTLET_APPLICATION"
  +      class="org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl"
  +      table="PORTLET_APPLICATION"
      >
  -     
  +
         <field-descriptor
            name="id"
            column="APPLICATION_ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
  -         
  +
         />
         <!--conversion="org.apache.jetspeed.util.ojb.ObjectIDtoLongFieldConversion" -->
         <field-descriptor
  @@ -45,48 +45,48 @@
            name="description"
            column="DESCRIPTION"
            jdbc-type="VARCHAR"
  -      /> 
  -             
  +      />
  +
         <field-descriptor
            name="webApplicationId"
            column="WEB_APP_ID"
            jdbc-type="INTEGER"
   
  -       
  +
         />
  -     
  -      <reference-descriptor 
  -      	  name="webApplication" 
  -      	  class-ref="org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl" 
  -      	  auto-delete="true"
   
  -      	  >
  +      <reference-descriptor
  +          name="webApplication"
  +          class-ref="org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl"
  +          auto-delete="true"
  +
  +          >
            <foreignkey field-ref="webApplicationId"/>
         </reference-descriptor>
  -      
  +
         <collection-descriptor
            name="portlets"
            auto-delete="true"
  -    
  +
            element-class-ref="org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite"
            collection-class="org.apache.jetspeed.om.collection.ManageablePortletDefinitionListImpl"
         >
            <inverse-foreignkey field-ref="appId"/>
         </collection-descriptor>
  -       
  +
      </class-descriptor>
  -   
   
  -   
  +
  +
   <!--
  - 	- W E B    A P P L I C A T I O N 
  +  - W E B    A P P L I C A T I O N
   -->
   
      <class-descriptor
  -   	  class="org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl"
  -   	  table="WEB_APPLICATION"
  +      class="org.apache.jetspeed.om.servlet.impl.WebApplicationDefinitionImpl"
  +      table="WEB_APPLICATION"
      >
  -   
  +
         <field-descriptor
            name="id"
            column="ID"
  @@ -95,8 +95,8 @@
            autoincrement="true"
   
         />
  -     
  - 
  +
  +
         <field-descriptor
            name="contextRoot"
            column="CONTEXT_ROOT"
  @@ -107,7 +107,7 @@
            element-class-ref="org.apache.jetspeed.om.impl.DescriptionImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageableDescriptionSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="objectId"/>
            <query-customizer
                class="org.apache.jetspeed.util.ojb.TypeFilterQueryCustomizerImpl">
  @@ -117,13 +117,13 @@
             />
           </query-customizer>
         </collection-descriptor>
  -      
  +
         <collection-descriptor
            name="displayNames"
            element-class-ref="org.apache.jetspeed.om.impl.DisplayNameImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageableDisplayNameSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="objectId"/>
            <query-customizer
                class="org.apache.jetspeed.util.ojb.TypeFilterQueryCustomizerImpl">
  @@ -133,46 +133,46 @@
             />
           </query-customizer>
         </collection-descriptor>
  -      
  -     
  +
  +
      </class-descriptor>
   
   <!--
      -  P O R T L E T   D E F I N I T I O N
    -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite"
  +      class="org.apache.jetspeed.om.common.portlet.PortletDefinitionComposite"
   
      >
  -      <extent-class class-ref="org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl" />         
  -   
  +      <extent-class class-ref="org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl" />
  +
      </class-descriptor>
  - 
  - 
  - 
  +
  +
  +
      <class-descriptor
  -   	  class="org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl"
  -   	  table="PORTLET_DEFINITION"
  +      class="org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl"
  +      table="PORTLET_DEFINITION"
   
      >
  -   
  -   
  +
  +
         <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
  -       
  +
         />
   
         <field-descriptor
            name="portletIdentifier"
            column="PORTLET_IDENTIFIER"
  -         jdbc-type="VARCHAR"       
  +         jdbc-type="VARCHAR"
         />
  -      
  -    
  +
  +
         <field-descriptor
            name="name"
            column="NAME"
  @@ -183,34 +183,34 @@
            column="CLASS_NAME"
            jdbc-type="VARCHAR"
         />
  -      
  +
         <field-descriptor
            name="appId"
            column="APPLICATION_ID"
            jdbc-type="INTEGER"
  -         
  +
         />
         <!-- conversion="org.apache.jetspeed.util.ojb.ObjectIDtoLongFieldConversion" -->
  -      
  +
          <field-descriptor
            name="expirationCache"
            column="EXPIRATION_CACHE"
            jdbc-type="VARCHAR"
         />
  -      
  +
         <field-descriptor
            name="preferenceValidatorClassname"
            column="PREFERENCE_VALIDATOR"
            jdbc-type="VARCHAR"
         />
  -      
  -      
   
   
  -      <reference-descriptor 
  -      	name="app" 
  -      	class-ref="org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl" 
  -   	 >       	        
  +
  +
  +      <reference-descriptor
  +        name="app"
  +        class-ref="org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl"
  +     >
            <foreignkey field-ref="appId"/>
         </reference-descriptor>
   
  @@ -224,23 +224,23 @@
            <inverse-foreignkey field-ref="portletId"/>
   
         </collection-descriptor>
  -      
  +
         <collection-descriptor
            name="contentTypes"
            element-class-ref="org.apache.jetspeed.om.common.portlet.ContentTypeComposite"
            collection-class="org.apache.jetspeed.om.collection.ManageableContentTypeSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="portletId"/>
         </collection-descriptor>
  -      
   
  -      	<collection-descriptor
  +
  +        <collection-descriptor
            name="parameterSet"
            element-class-ref="org.apache.jetspeed.om.impl.PortletInitParameterImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageablePortletParameterSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="parentId"/>
         </collection-descriptor>
   
  @@ -249,25 +249,25 @@
            element-class-ref="org.apache.jetspeed.om.preference.impl.DefaultPreferenceImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageablePreferenceSetImpl"
            auto-delete="true"
  -       >         
  +       >
            <inverse-foreignkey field-ref="parentId"/>
         </collection-descriptor>
  -      
  +
          <collection-descriptor
            name="securityRoleRefSet"
            element-class-ref="org.apache.jetspeed.om.impl.SecurityRoleRefImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageableSecurityRoleRefSetImpl"
            auto-delete="true"
  -       >         
  +       >
            <inverse-foreignkey field-ref="portletId"/>
         </collection-descriptor>
  -      
  +
        <collection-descriptor
            name="descriptions"
            element-class-ref="org.apache.jetspeed.om.impl.DescriptionImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageableDescriptionSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="objectId"/>
            <query-customizer
                class="org.apache.jetspeed.util.ojb.TypeFilterQueryCustomizerImpl">
  @@ -277,13 +277,13 @@
             />
           </query-customizer>
         </collection-descriptor>
  -      
  +
         <collection-descriptor
            name="displayNames"
            element-class-ref="org.apache.jetspeed.om.impl.DisplayNameImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageableDisplayNameSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="objectId"/>
            <query-customizer
                class="org.apache.jetspeed.util.ojb.TypeFilterQueryCustomizerImpl">
  @@ -293,35 +293,35 @@
             />
           </query-customizer>
         </collection-descriptor>
  -       
  +
      </class-descriptor>
  -   
   
   
  -<!-- 
  -   - L A N G U A G E 
  +
  +<!--
  +   - L A N G U A G E
   -->
      <class-descriptor
  -   	  class="org.apache.jetspeed.om.impl.LanguageImpl"
  -   	  table="LANGUAGE"
  +      class="org.apache.jetspeed.om.impl.LanguageImpl"
  +      table="LANGUAGE"
      >
  -   
  +
         <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
  -         autoincrement="true"         
  +         autoincrement="true"
         />
  -      
  +
         <field-descriptor
            name="portletId"
            column="PORTLET_ID"
            jdbc-type="INTEGER"
  -          
  +
         />
  -      
  -      
  +
  +
         <field-descriptor
            name="title"
            column="TITLE"
  @@ -332,45 +332,45 @@
            column="SHORT_TITLE"
            jdbc-type="VARCHAR"
         />
  -      
  +
         <field-descriptor
            name="keywords"
            column="KEYWORDS"
            jdbc-type="VARCHAR"
            conversion="org.apache.jetspeed.util.ojb.CSVtoCollectionFieldConversion"
         />
  -      
  +
         <field-descriptor
            name="locale"
            column="LOCALE_STRING"
            jdbc-type="VARCHAR"
            conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
  -      />      
  +      />
   
      </class-descriptor>
   
   <!--
  -   - C O N T E N T    T Y P E 
  +   - C O N T E N T    T Y P E
    -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.om.common.portlet.ContentTypeComposite"
  +      class="org.apache.jetspeed.om.common.portlet.ContentTypeComposite"
   
      >
  -      <extent-class class-ref="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl" />              
  +      <extent-class class-ref="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl" />
      </class-descriptor>
  - 
  - 
  - 
  +
  +
  +
      <class-descriptor
  -   	  class="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl"
  -   	  table="PORTLET_CONTENT_TYPE"
  -   >   
  +      class="org.apache.jetspeed.om.portlet.impl.ContentTypeImpl"
  +      table="PORTLET_CONTENT_TYPE"
  +   >
        <field-descriptor
            name="contentTypeId"
            column="CONTENT_TYPE_ID"
            jdbc-type="INTEGER"
            primarykey="true"
  -         autoincrement="true"         
  +         autoincrement="true"
         />
         <field-descriptor
            name="portletId"
  @@ -388,9 +388,9 @@
            column="MODES"
            jdbc-type="VARCHAR"
            conversion="org.apache.jetspeed.util.ojb.CSVtoPortletModeFieldConversion"
  -      />  
  +      />
      </class-descriptor>
  -   
  +
   
   
   <!--
  @@ -398,72 +398,72 @@
    -->
    <!--
      <class-descriptor
  -   	  class="org.apache.jetspeed.om.common.ParameterImpl"
  -   	  table="PARAMETER"
  +      class="org.apache.jetspeed.om.common.ParameterImpl"
  +      table="PARAMETER"
      >
      <extent-class class-ref="org.apache.jetspeed.om.common.extended.PortletInitParameterImpl" />
      <extent-class class-ref="org.apache.jetspeed.om.common.extended.ServletInitParameterImpl" />
  -   
  -    
  +
  +
   
      </class-descriptor>
      -->
   
      <class-descriptor
  -   	  class="org.apache.jetspeed.om.impl.ServletInitParameterImpl"
  -   	  table="PARAMETER"
  +      class="org.apache.jetspeed.om.impl.ServletInitParameterImpl"
  +      table="PARAMETER"
      >
  -   
  +
      <field-descriptor
            name="parentId"
            column="PARENT_ID"
            jdbc-type="INTEGER"
   
         />
  -      
  +
           <field-descriptor
            name="parameterId"
            column="PARAMETER_ID"
            jdbc-type="INTEGER"
            primarykey="true"
  -         autoincrement="true"         
  +         autoincrement="true"
         />
  -      
  +
         <field-descriptor
            name="parentId"
            column="PARENT_ID"
            jdbc-type="INTEGER"
   
         />
  -      
  +
         <field-descriptor
            name="name"
            column="NAME"
            jdbc-type="VARCHAR"
         />
  -   
  +
         <field-descriptor
            name="value"
            column="VALUE"
  -         jdbc-type="VARCHAR"         
  -      />       
  -         
  +         jdbc-type="VARCHAR"
  +      />
  +
  +
   
  -   
      <field-descriptor
            name="ojbConcreteClass"
            column="CLASS_NAME"
            jdbc-type="VARCHAR"
         />
  -      
  -      
  -      
  -      
  +
  +
  +
  +
       </class-descriptor>
   
      <class-descriptor
  -   	  class="org.apache.jetspeed.om.impl.PortletInitParameterImpl"
  -   	  table="PARAMETER"
  +      class="org.apache.jetspeed.om.impl.PortletInitParameterImpl"
  +      table="PARAMETER"
      >
         <field-descriptor
            name="parentId"
  @@ -471,22 +471,22 @@
            jdbc-type="INTEGER"
   
         />
  -      
  +
           <field-descriptor
            name="parameterId"
            column="PARAMETER_ID"
            jdbc-type="INTEGER"
            primarykey="true"
  -         autoincrement="true"         
  +         autoincrement="true"
         />
  -      
  +
         <field-descriptor
            name="parentId"
            column="PARENT_ID"
            jdbc-type="INTEGER"
   
         />
  -      
  +
         <field-descriptor
            name="name"
            column="NAME"
  @@ -496,22 +496,22 @@
         <field-descriptor
            name="value"
            column="VALUE"
  -         jdbc-type="VARCHAR"         
  -      />       
  -         
  -   
  +         jdbc-type="VARCHAR"
  +      />
  +
  +
      <field-descriptor
            name="ojbConcreteClass"
            column="CLASS_NAME"
            jdbc-type="VARCHAR"
         />
  -      
  +
         <collection-descriptor
            name="descriptions"
            element-class-ref="org.apache.jetspeed.om.impl.DescriptionImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageableDescriptionSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="objectId"/>
            <query-customizer
                class="org.apache.jetspeed.util.ojb.TypeFilterQueryCustomizerImpl">
  @@ -520,21 +520,21 @@
               attribute-value="parameter"
             />
           </query-customizer>
  -      </collection-descriptor>      
  -   
  +      </collection-descriptor>
  +
       </class-descriptor>
   
   <!--
      - P R E F E R E N C E S
    -->
   
  - 
  +
       <!-- These preferences are the defaults for a PortletDefinition -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.om.preference.impl.DefaultPreferenceImpl"
  -   	  table="PORTLET_PREFERENCE"
  +      class="org.apache.jetspeed.om.preference.impl.DefaultPreferenceImpl"
  +      table="PORTLET_PREFERENCE"
      >
  -      
  +
           <field-descriptor
            name="id"
            column="ID"
  @@ -542,14 +542,14 @@
            primarykey="true"
            autoincrement="true"
   
  -         
  +
         />
         <field-descriptor
            name="ojbConcreteClass"
            column="CLASS_NAME"
            jdbc-type="VARCHAR"
         />
  -            
  +
         <field-descriptor
            name="parentId"
            column="PARENT_ID"
  @@ -557,34 +557,34 @@
            access="anonymous"
   
         />
  -      
  +
         <field-descriptor
            name="name"
            column="NAME"
            jdbc-type="VARCHAR"
         />
  -      
  +
          <field-descriptor
            name="readOnly"
            column="READ_ONLY"
            jdbc-type="BIT"
  -      />    
  -      
  +      />
  +
         <collection-descriptor
            name="values"
            element-class-ref="org.apache.jetspeed.om.preference.impl.PreferenceValueImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="preferenceId"/>
  -        
  +
         </collection-descriptor>
  -      
  +
         <collection-descriptor
            name="descriptions"
            element-class-ref="org.apache.jetspeed.om.impl.DescriptionImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageableDescriptionSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="objectId"/>
            <query-customizer
                class="org.apache.jetspeed.util.ojb.TypeFilterQueryCustomizerImpl">
  @@ -593,29 +593,29 @@
               attribute-value="preference"
             />
           </query-customizer>
  -      </collection-descriptor>  
  +      </collection-descriptor>
       </class-descriptor>
  -   
  -   <!-- These preference map directly to a Portlet Entity --> 
  +
  +   <!-- These preference map directly to a Portlet Entity -->
      <class-descriptor
  -   	  class="org.apache.jetspeed.om.preference.impl.PreferenceImpl"
  -   	  table="PORTLET_PREFERENCE"
  +      class="org.apache.jetspeed.om.preference.impl.PreferenceImpl"
  +      table="PORTLET_PREFERENCE"
      >
  -      
  +
           <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
  -         
  +
         />
         <field-descriptor
            name="ojbConcreteClass"
            column="CLASS_NAME"
            jdbc-type="VARCHAR"
         />
  -            
  +
         <field-descriptor
            name="parentId"
            column="PARENT_ID"
  @@ -623,7 +623,7 @@
            access="anonymous"
   
         />
  -      
  +
         <field-descriptor
            name="name"
            column="NAME"
  @@ -634,23 +634,23 @@
            name="readOnly"
            column="READ_ONLY"
            jdbc-type="BIT"
  -      />    
  -      
  +      />
  +
         <collection-descriptor
            name="values"
            element-class-ref="org.apache.jetspeed.om.preference.impl.PreferenceValueImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="preferenceId"/>
  -        
  +
         </collection-descriptor>
  -      
  +
         <collection-descriptor
            name="descriptions"
            element-class-ref="org.apache.jetspeed.om.impl.DescriptionImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageableDescriptionSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="objectId"/>
            <query-customizer
                class="org.apache.jetspeed.util.ojb.TypeFilterQueryCustomizerImpl">
  @@ -659,53 +659,53 @@
               attribute-value="preference"
             />
           </query-customizer>
  -      </collection-descriptor>  
  +      </collection-descriptor>
       </class-descriptor>
  -    
  - 
  -        
  +
  +
  +
      <class-descriptor
  -   	  class="org.apache.jetspeed.om.preference.impl.PreferenceValueImpl"
  -   	  table="PREFERENCE_VALUE"
  +      class="org.apache.jetspeed.om.preference.impl.PreferenceValueImpl"
  +      table="PREFERENCE_VALUE"
      >
  -      
  +
           <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
  -         autoincrement="true"  
  -         access="anonymous"       
  +         autoincrement="true"
  +         access="anonymous"
         />
  -      
  +
         <field-descriptor
            name="preferenceId"
            column="PREFERENCE_ID"
            jdbc-type="INTEGER"
  -         access="anonymous"         
  +         access="anonymous"
         />
  -      
  -    
  -      
  +
  +
  +
         <field-descriptor
            name="value"
            column="VALUE"
            jdbc-type="VARCHAR"
  -      />  
  -  
  +      />
  +
       </class-descriptor>
  -    
   
  -    
  -    
  +
  +
  +
   <!--
      - L O C A L I Z E D   D E S C R I P I T I O N
    -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.om.impl.DescriptionImpl"
  -   	  table="LOCALIZED_DESCRIPTION"
  +      class="org.apache.jetspeed.om.impl.DescriptionImpl"
  +      table="LOCALIZED_DESCRIPTION"
      >
  -      
  +
           <field-descriptor
            name="id"
            column="ID"
  @@ -713,275 +713,275 @@
            primarykey="true"
            autoincrement="true"
            access="anonymous"
  -             
  +
         />
  -      
  +
         <field-descriptor
            name="objectId"
            column="OBJECT_ID"
            jdbc-type="INTEGER"
            access="anonymous"
  -  
  +
             />
  -        
  -      
  +
  +
         <field-descriptor
            name="type"
            column="TYPE"
            jdbc-type="VARCHAR"
         />
  -      
  +
         <field-descriptor
            name="description"
            column="DESCRIPTION"
            jdbc-type="VARCHAR"
  -      />   
  -      
  +      />
  +
         <field-descriptor
            name="locale"
            column="LOCALE_STRING"
            jdbc-type="VARCHAR"
            conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
  -      />          
  -      
  -  
  +      />
  +
  +
       </class-descriptor>
  -    
  +
     <!--
      - L O C A L I Z E D   D I S P L A Y   N A M E
     -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.om.impl.DisplayNameImpl"
  -   	  table="LOCALIZED_DISPLAY_NAME"
  +      class="org.apache.jetspeed.om.impl.DisplayNameImpl"
  +      table="LOCALIZED_DISPLAY_NAME"
      >
  -      
  +
           <field-descriptor
            name="id"
            column="ID"
            jdbc-type="INTEGER"
            primarykey="true"
            autoincrement="true"
  -         access="anonymous"              
  +         access="anonymous"
         />
  -      
  +
         <field-descriptor
            name="objectId"
            column="OBJECT_ID"
            jdbc-type="INTEGER"
  -         access="anonymous"      
  +         access="anonymous"
         />
  -      
  +
         <field-descriptor
            name="type"
            column="TYPE"
            jdbc-type="VARCHAR"
         />
  -      
  +
         <field-descriptor
            name="displayName"
            column="DISPLAY_NAME"
            jdbc-type="VARCHAR"
  -      />   
  -      
  +      />
  +
         <field-descriptor
            name="locale"
            column="LOCALE_STRING"
            jdbc-type="VARCHAR"
            conversion="org.apache.jetspeed.util.ojb.LocaleFieldConversion"
  -      />          
  -      
  -  
  +      />
  +
  +
       </class-descriptor>
  -    
  -    
  +
  +
   <!--
      - C A P A B I L I T Y  M A P P I N G
  --->	
  +-->
   
   <!--
      - M E D I A T Y P E
     -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.om.registry.impl.MediaTypeEntryImpl"
  -   	  table="MEDIA_TYPE"
  +      class="org.apache.jetspeed.om.registry.impl.MediaTypeEntryImpl"
  +      table="MEDIA_TYPE"
      >
  -      
  +
           <field-descriptor
            name="MediatypeId"
            column="MEDIATYPE_ID"
            jdbc-type="INTEGER"
            primarykey="true"
  -         autoincrement="true"            
  +         autoincrement="true"
         />
  -      
  +
         <field-descriptor
            name="Name"
            column="NAME"
  -         jdbc-type="VARCHAR"     
  +         jdbc-type="VARCHAR"
         />
  -           
  +
         <field-descriptor
            name="CharacterSet"
            column="CHARACTER_SET"
            jdbc-type="VARCHAR"
  -      />   
  -      
  +      />
  +
         <field-descriptor
            name="Title"
            column="TITLE"
            jdbc-type="VARCHAR"
  -      />  
  -      
  +      />
  +
         <field-descriptor
            name="Description"
            column="DESCRIPTION"
            jdbc-type="VARCHAR"
  -      /> 
  -      
  +      />
  +
         <collection-descriptor
             name="Capabilities"
             element-class-ref="org.apache.jetspeed.om.registry.impl.CapabilityImpl"
  - 
  +
             indirection-table="MEDIATYPE_TO_CAPABILITY"
          >
             <fk-pointing-to-this-class column="MEDIATYPE_ID"/>
             <fk-pointing-to-element-class column="CAPABILITY_ID"/>
          </collection-descriptor>
  -       
  +
          <collection-descriptor
             name="Mimetypes"
             element-class-ref="org.apache.jetspeed.om.registry.impl.MimeTypeImpl"
  - 
  +
             indirection-table="MEDIATYPE_TO_MIMETYPE"
          >
             <fk-pointing-to-this-class column="MEDIATYPE_ID"/>
             <fk-pointing-to-element-class column="MIMETYPE_ID"/>
          </collection-descriptor>
  -      
  +
         </class-descriptor>
  -             
  +
     <!--
      - C L I E N T
     -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.om.registry.impl.ClientEntryImpl"
  -   	  table="CLIENT"
  +      class="org.apache.jetspeed.om.registry.impl.ClientEntryImpl"
  +      table="CLIENT"
      >
           <field-descriptor
            name="ClientId"
            column="CLIENT_ID"
            jdbc-type="INTEGER"
            primarykey="true"
  -         autoincrement="true"         
  +         autoincrement="true"
          />
  -      
  +
           <field-descriptor
            name="Name"
            column="NAME"
  -         jdbc-type="VARCHAR"     
  +         jdbc-type="VARCHAR"
         />
  -      
  +
         <field-descriptor
            name="Useragentpattern"
            column="USER_AGENT_PATTERN"
  -         jdbc-type="VARCHAR"     
  +         jdbc-type="VARCHAR"
         />
  -      
  +
         <field-descriptor
            name="Manufacturer"
            column="MANUFACTURER"
  -         jdbc-type="VARCHAR"     
  +         jdbc-type="VARCHAR"
         />
  -      
  +
         <field-descriptor
            name="Model"
            column="MODEL"
  -         jdbc-type="VARCHAR"     
  +         jdbc-type="VARCHAR"
         />
  -      
  +
         <field-descriptor
            name="Version"
            column="VERSION"
  -         jdbc-type="VARCHAR"     
  +         jdbc-type="VARCHAR"
         />
  -      
  +
         <collection-descriptor
             name="Capabilities"
             element-class-ref="org.apache.jetspeed.om.registry.impl.CapabilityImpl"
  - 
  +
             indirection-table="MEDIATYPE_TO_CAPABILITY"
          >
             <fk-pointing-to-this-class column="MEDIATYPE_ID"/>
             <fk-pointing-to-element-class column="CAPABILITY_ID"/>
          </collection-descriptor>
  -       
  +
          <collection-descriptor
             name="Mimetypes"
             element-class-ref="org.apache.jetspeed.om.registry.impl.MimeTypeImpl"
  - 
  +
             indirection-table="MEDIATYPE_TO_MIMETYPE"
          >
             <fk-pointing-to-this-class column="MEDIATYPE_ID"/>
             <fk-pointing-to-element-class column="MIMETYPE_ID"/>
          </collection-descriptor>
  -      
  +
       </class-descriptor>
   
   <!--
  -   - M I M E T Y P E 
  +   - M I M E T Y P E
     -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.om.registry.impl.MimeTypeImpl"
  -   	  table="MIMETYPE"
  +      class="org.apache.jetspeed.om.registry.impl.MimeTypeImpl"
  +      table="MIMETYPE"
      >
           <field-descriptor
            name="MimetypeId"
            column="MIMETYPE_ID"
            jdbc-type="INTEGER"
            primarykey="true"
  -         autoincrement="true"         
  +         autoincrement="true"
         />
  -      
  -      
  +
  +
         <field-descriptor
            name="name"
            column="NAME"
            jdbc-type="VARCHAR"
  -      />  
  +      />
       </class-descriptor>
  -    
  +
   <!--
      - C A P A B I L I T Y
     -->
       <class-descriptor
  -   	  class="org.apache.jetspeed.om.registry.impl.CapabilityImpl"
  -   	  table="CAPABILITY"
  +      class="org.apache.jetspeed.om.registry.impl.CapabilityImpl"
  +      table="CAPABILITY"
      >
           <field-descriptor
            name="CapabilityId"
            column="CAPABILITY_ID"
            jdbc-type="INTEGER"
            primarykey="true"
  -         autoincrement="true"         
  +         autoincrement="true"
         />
  -      
  +
          <field-descriptor
            name="Name"
            column="CAPABILITY"
  -         jdbc-type="VARCHAR"     
  +         jdbc-type="VARCHAR"
         />
  -      
  +
       </class-descriptor>
  -    
  -    
  - <!-- 
  +
  +
  + <!--
      - P O R T L E T  E N T I T Y
    -->
        <class-descriptor
  -   	  class="org.apache.jetspeed.om.entity.impl.PortletEntityImpl"
  -   	  table="PORTLET_ENTITY"
  +      class="org.apache.jetspeed.om.entity.impl.PortletEntityImpl"
  +      table="PORTLET_ENTITY"
      >
  -      
  +
           <field-descriptor
            name="id"
            column="ID"
  @@ -989,9 +989,9 @@
            primarykey="true"
            autoincrement="true"
            access="anonymous"
  -         
  +
         />
  -      
  +
         <field-descriptor
            name="portletId"
            column="PORTLET_DEFINITION_ID"
  @@ -999,41 +999,41 @@
            access="anonymous"
   
         />
  -      
  +
         <field-descriptor
            name="oid"
            column="GUID"
            jdbc-type="VARCHAR"
            conversion="org.apache.jetspeed.util.ojb.ObjectIDtoStringFieldConversion"
         />
  -      
  -     <reference-descriptor 
  -      	name="portletDefinition" 
  -      	class-ref="org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl" 
  -   	 >       	        
  +
  +     <reference-descriptor
  +        name="portletDefinition"
  +        class-ref="org.apache.jetspeed.om.portlet.impl.PortletDefinitionImpl"
  +     >
            <foreignkey field-ref="portletId"/>
         </reference-descriptor>
   
         <collection-descriptor
  -         name="prefSet"
  +         name="originalPreferences"
            element-class-ref="org.apache.jetspeed.om.preference.impl.PreferenceImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageablePreferenceSetImpl"
            auto-delete="true"
  -       >         
  +       >
            <inverse-foreignkey field-ref="parentId"/>
         </collection-descriptor>
   
  -  
  +
     </class-descriptor>
  -  
  -  <!-- 
  +
  +  <!--
      - S E C U R T I T Y   R O L E   R E F
    -->
        <class-descriptor
  -   	  class="org.apache.jetspeed.om.impl.SecurityRoleRefImpl"
  -   	  table="SECURITY_ROLE_REFERENCE"
  +      class="org.apache.jetspeed.om.impl.SecurityRoleRefImpl"
  +      table="SECURITY_ROLE_REFERENCE"
      >
  -      
  +
           <field-descriptor
            name="id"
            column="ID"
  @@ -1041,9 +1041,9 @@
            primarykey="true"
            autoincrement="true"
            access="anonymous"
  -         
  +
         />
  -      
  +
         <field-descriptor
            name="portletId"
            column="PORTLET_DEFINITION_ID"
  @@ -1051,25 +1051,25 @@
            access="anonymous"
   
         />
  -      
  +
         <field-descriptor
            name="name"
            column="ROLE_NAME"
  -         jdbc-type="VARCHAR"         
  -      />   
  -      
  +         jdbc-type="VARCHAR"
  +      />
  +
          <field-descriptor
            name="link"
            column="ROLE_LINK"
  -         jdbc-type="VARCHAR"         
  +         jdbc-type="VARCHAR"
         />
  -      
  +
         <collection-descriptor
            name="descriptions"
            element-class-ref="org.apache.jetspeed.om.impl.DescriptionImpl"
            collection-class="org.apache.jetspeed.om.collection.ManageableDescriptionSetImpl"
            auto-delete="true"
  -      >         
  +      >
            <inverse-foreignkey field-ref="objectId"/>
            <query-customizer
                class="org.apache.jetspeed.util.ojb.TypeFilterQueryCustomizerImpl">
  @@ -1078,11 +1078,10 @@
               attribute-value="security role ref"
             />
           </query-customizer>
  -      </collection-descriptor>     
  +      </collection-descriptor>
  +
  +
   
  -      
   
  -  
     </class-descriptor>
  -   
  -  
  \ No newline at end of file
  +
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +85 -3     jakarta-jetspeed-2/portal/src/webapp/WEB-INF/layout/Attic/columns.jsp
  
  Index: columns.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/layout/Attic/columns.jsp,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- columns.jsp	6 Dec 2003 23:22:18 -0000	1.1.2.1
  +++ columns.jsp	8 Dec 2003 21:05:55 -0000	1.1.2.2
  @@ -7,9 +7,41 @@
   
   <% 
   List[] table = (List[])renderRequest.getAttribute("columns");
  +Page myPage = (Page)renderRequest.getAttribute("page");
  +Fragment myFragment = (Fragment)renderRequest.getAttribute("fragment");
   ContentDispatcher dispatcher = (ContentDispatcher)renderRequest.getAttribute("dispatcher");  
  +org.apache.pluto.om.entity.PortletEntity portletEntity = 
  +          org.apache.jetspeed.services.entity.PortletEntityAccess.getEntity(
  +              org.apache.jetspeed.util.JetspeedObjectID.createFromString(myFragment.getId()));
  +
  +renderRequest.setAttribute("entity",portletEntity);
   %>
  -<table width="100%">
  +<%
  +  String decorator = myPage.getDefaultDecorator(myFragment.getType());
  +  String decoTop = null;
  +  String decoBottom = null;
  +  
  +  if (myFragment.getDecorator()!=null)
  +  {
  +        decorator = myFragment.getDecorator();
  +  }
  +
  +  if (decorator != null)
  +  {
  +        decoTop = decorator+"-top.jsp";
  +        decoBottom = decorator+"-bottom.jsp";
  +  }
  +%>
  +<!-- Decorator <%= decorator %>  <%=decoTop%>-<%=decoBottom%>-->
  +<%
  +  if ((decoTop != null) && (myFragment == myPage.getRootFragment()))
  +  {
  +%>
  +<jsp:include page="<%=decoTop%>" />
  +<%
  +  }
  +%>
  +<table width="100%" cellspacing="0" cellpadding="0">
     <tr>
     <%
        for(int i=0; i < table.length; i++)
  @@ -20,12 +52,51 @@
           for(Iterator it=table[i].iterator(); it.hasNext();)
           {
              Fragment f = (Fragment)it.next();
  +           org.apache.pluto.om.entity.PortletEntity fPE =
  +             org.apache.jetspeed.services.entity.PortletEntityAccess.getEntity(
  +               org.apache.jetspeed.util.JetspeedObjectID.createFromString(f.getId()));
  +           String fDeco = myPage.getDefaultDecorator(f.getType());
  +           String fDecoTop = null;
  +           String fDecoBottom = null;
  +           
  +           if (f.getDecorator()!=null)
  +           {
  +                fDeco = f.getDecorator();
  +           }
  +           
  +           if (fDeco != null)
  +           {
  +                fDecoTop = fDeco+"-top.jsp";
  +                fDecoBottom = fDeco+"-bottom.jsp";
  +           }
  +           
  +           renderRequest.setAttribute("fragment",f);
  +           renderRequest.setAttribute("entity",fPE);
        %>
        <tr><td width="100%">
        <%
  +           if (fDecoTop != null)
  +           {
  +     %>
  +     <jsp:include page="<%=fDecoTop%>" />
  +     <%
  +           }
  +     %>
  +     <%
              out.flush();
  -           dispatcher.include(f,(javax.portlet.RenderRequest)renderRequest,renderResponse);
  +           if (!"hidden".equals(f.getState()))
  +           {
  +                dispatcher.include(f,(javax.portlet.RenderRequest)renderRequest,renderResponse);
  +           }
         %>
  +     <%
  +           if (fDecoBottom != null)
  +           {
  +     %>
  +     <jsp:include page="<%=fDecoBottom%>" />
  +     <%
  +           }
  +     %>
        </td></tr>
        <%
           }
  @@ -35,4 +106,15 @@
        }
     %>
     </tr>
  -</table>
  \ No newline at end of file
  +</table>
  +<%
  +  renderRequest.setAttribute("fragment",myFragment);
  +  renderRequest.setAttribute("entity",portletEntity);
  +
  +  if ((decoBottom != null) && (myFragment == myPage.getRootFragment()))
  +  {
  +%>
  +<jsp:include page="<%=decoBottom%>" />
  +<%
  +  }
  +%>
  
  
  
  No                   revision
  
  Index: columns.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/layout/Attic/columns.jsp,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- columns.jsp	6 Dec 2003 23:22:18 -0000	1.1.2.1
  +++ columns.jsp	8 Dec 2003 21:05:55 -0000	1.1.2.2
  @@ -7,9 +7,41 @@
   
   <% 
   List[] table = (List[])renderRequest.getAttribute("columns");
  +Page myPage = (Page)renderRequest.getAttribute("page");
  +Fragment myFragment = (Fragment)renderRequest.getAttribute("fragment");
   ContentDispatcher dispatcher = (ContentDispatcher)renderRequest.getAttribute("dispatcher");  
  +org.apache.pluto.om.entity.PortletEntity portletEntity = 
  +          org.apache.jetspeed.services.entity.PortletEntityAccess.getEntity(
  +              org.apache.jetspeed.util.JetspeedObjectID.createFromString(myFragment.getId()));
  +
  +renderRequest.setAttribute("entity",portletEntity);
   %>
  -<table width="100%">
  +<%
  +  String decorator = myPage.getDefaultDecorator(myFragment.getType());
  +  String decoTop = null;
  +  String decoBottom = null;
  +  
  +  if (myFragment.getDecorator()!=null)
  +  {
  +        decorator = myFragment.getDecorator();
  +  }
  +
  +  if (decorator != null)
  +  {
  +        decoTop = decorator+"-top.jsp";
  +        decoBottom = decorator+"-bottom.jsp";
  +  }
  +%>
  +<!-- Decorator <%= decorator %>  <%=decoTop%>-<%=decoBottom%>-->
  +<%
  +  if ((decoTop != null) && (myFragment == myPage.getRootFragment()))
  +  {
  +%>
  +<jsp:include page="<%=decoTop%>" />
  +<%
  +  }
  +%>
  +<table width="100%" cellspacing="0" cellpadding="0">
     <tr>
     <%
        for(int i=0; i < table.length; i++)
  @@ -20,12 +52,51 @@
           for(Iterator it=table[i].iterator(); it.hasNext();)
           {
              Fragment f = (Fragment)it.next();
  +           org.apache.pluto.om.entity.PortletEntity fPE =
  +             org.apache.jetspeed.services.entity.PortletEntityAccess.getEntity(
  +               org.apache.jetspeed.util.JetspeedObjectID.createFromString(f.getId()));
  +           String fDeco = myPage.getDefaultDecorator(f.getType());
  +           String fDecoTop = null;
  +           String fDecoBottom = null;
  +           
  +           if (f.getDecorator()!=null)
  +           {
  +                fDeco = f.getDecorator();
  +           }
  +           
  +           if (fDeco != null)
  +           {
  +                fDecoTop = fDeco+"-top.jsp";
  +                fDecoBottom = fDeco+"-bottom.jsp";
  +           }
  +           
  +           renderRequest.setAttribute("fragment",f);
  +           renderRequest.setAttribute("entity",fPE);
        %>
        <tr><td width="100%">
        <%
  +           if (fDecoTop != null)
  +           {
  +     %>
  +     <jsp:include page="<%=fDecoTop%>" />
  +     <%
  +           }
  +     %>
  +     <%
              out.flush();
  -           dispatcher.include(f,(javax.portlet.RenderRequest)renderRequest,renderResponse);
  +           if (!"hidden".equals(f.getState()))
  +           {
  +                dispatcher.include(f,(javax.portlet.RenderRequest)renderRequest,renderResponse);
  +           }
         %>
  +     <%
  +           if (fDecoBottom != null)
  +           {
  +     %>
  +     <jsp:include page="<%=fDecoBottom%>" />
  +     <%
  +           }
  +     %>
        </td></tr>
        <%
           }
  @@ -35,4 +106,15 @@
        }
     %>
     </tr>
  -</table>
  \ No newline at end of file
  +</table>
  +<%
  +  renderRequest.setAttribute("fragment",myFragment);
  +  renderRequest.setAttribute("entity",portletEntity);
  +
  +  if ((decoBottom != null) && (myFragment == myPage.getRootFragment()))
  +  {
  +%>
  +<jsp:include page="<%=decoBottom%>" />
  +<%
  +  }
  +%>
  
  
  
  No                   revision
  
  Index: columns.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/layout/Attic/columns.jsp,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- columns.jsp	6 Dec 2003 23:22:18 -0000	1.1.2.1
  +++ columns.jsp	8 Dec 2003 21:05:55 -0000	1.1.2.2
  @@ -7,9 +7,41 @@
   
   <% 
   List[] table = (List[])renderRequest.getAttribute("columns");
  +Page myPage = (Page)renderRequest.getAttribute("page");
  +Fragment myFragment = (Fragment)renderRequest.getAttribute("fragment");
   ContentDispatcher dispatcher = (ContentDispatcher)renderRequest.getAttribute("dispatcher");  
  +org.apache.pluto.om.entity.PortletEntity portletEntity = 
  +          org.apache.jetspeed.services.entity.PortletEntityAccess.getEntity(
  +              org.apache.jetspeed.util.JetspeedObjectID.createFromString(myFragment.getId()));
  +
  +renderRequest.setAttribute("entity",portletEntity);
   %>
  -<table width="100%">
  +<%
  +  String decorator = myPage.getDefaultDecorator(myFragment.getType());
  +  String decoTop = null;
  +  String decoBottom = null;
  +  
  +  if (myFragment.getDecorator()!=null)
  +  {
  +        decorator = myFragment.getDecorator();
  +  }
  +
  +  if (decorator != null)
  +  {
  +        decoTop = decorator+"-top.jsp";
  +        decoBottom = decorator+"-bottom.jsp";
  +  }
  +%>
  +<!-- Decorator <%= decorator %>  <%=decoTop%>-<%=decoBottom%>-->
  +<%
  +  if ((decoTop != null) && (myFragment == myPage.getRootFragment()))
  +  {
  +%>
  +<jsp:include page="<%=decoTop%>" />
  +<%
  +  }
  +%>
  +<table width="100%" cellspacing="0" cellpadding="0">
     <tr>
     <%
        for(int i=0; i < table.length; i++)
  @@ -20,12 +52,51 @@
           for(Iterator it=table[i].iterator(); it.hasNext();)
           {
              Fragment f = (Fragment)it.next();
  +           org.apache.pluto.om.entity.PortletEntity fPE =
  +             org.apache.jetspeed.services.entity.PortletEntityAccess.getEntity(
  +               org.apache.jetspeed.util.JetspeedObjectID.createFromString(f.getId()));
  +           String fDeco = myPage.getDefaultDecorator(f.getType());
  +           String fDecoTop = null;
  +           String fDecoBottom = null;
  +           
  +           if (f.getDecorator()!=null)
  +           {
  +                fDeco = f.getDecorator();
  +           }
  +           
  +           if (fDeco != null)
  +           {
  +                fDecoTop = fDeco+"-top.jsp";
  +                fDecoBottom = fDeco+"-bottom.jsp";
  +           }
  +           
  +           renderRequest.setAttribute("fragment",f);
  +           renderRequest.setAttribute("entity",fPE);
        %>
        <tr><td width="100%">
        <%
  +           if (fDecoTop != null)
  +           {
  +     %>
  +     <jsp:include page="<%=fDecoTop%>" />
  +     <%
  +           }
  +     %>
  +     <%
              out.flush();
  -           dispatcher.include(f,(javax.portlet.RenderRequest)renderRequest,renderResponse);
  +           if (!"hidden".equals(f.getState()))
  +           {
  +                dispatcher.include(f,(javax.portlet.RenderRequest)renderRequest,renderResponse);
  +           }
         %>
  +     <%
  +           if (fDecoBottom != null)
  +           {
  +     %>
  +     <jsp:include page="<%=fDecoBottom%>" />
  +     <%
  +           }
  +     %>
        </td></tr>
        <%
           }
  @@ -35,4 +106,15 @@
        }
     %>
     </tr>
  -</table>
  \ No newline at end of file
  +</table>
  +<%
  +  renderRequest.setAttribute("fragment",myFragment);
  +  renderRequest.setAttribute("entity",portletEntity);
  +
  +  if ((decoBottom != null) && (myFragment == myPage.getRootFragment()))
  +  {
  +%>
  +<jsp:include page="<%=decoBottom%>" />
  +<%
  +  }
  +%>
  
  
  
  1.1.2.1   +5 -0      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/layout/Attic/clear-bottom.jsp
  
  
  
  
  1.1.2.1   +5 -0      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/layout/Attic/clear-top.jsp
  
  
  
  
  1.1.2.1   +8 -0      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/layout/Attic/portletstd-bottom.jsp
  
  
  
  
  1.1.2.1   +23 -0     jakarta-jetspeed-2/portal/src/webapp/WEB-INF/layout/Attic/portletstd-top.jsp
  
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +2 -2      jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/p001.psml
  
  Index: p001.psml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/pages/p001.psml,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- p001.psml	1 Dec 2003 22:57:15 -0000	1.1.2.1
  +++ p001.psml	8 Dec 2003 21:05:55 -0000	1.1.2.2
  @@ -1,9 +1,9 @@
   <?xml version="1.0" encoding="UTF-8"?>
   <page id="p001">
     <defaults
  -     skin="light-blue"
  +     skin="orange"
        layout-decorator="clear"
  -     portlet-decorator="box-titled"
  +     portlet-decorator="portletstd"
     />
     <title>My First PSML Page</title>
     <fragment id="f001" type="layout" name="TwoColumns">
  
  
  

---------------------------------------------------------------------
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