portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/archives/WEB-INF/templates/layout/html/columns_jsp layout.jsp layout.properties
Date Fri, 03 Dec 2004 09:09:41 GMT
taylor      2004/12/03 01:09:41

  Added:       archives/WEB-INF/templates/jsp columns.jsp clear-top.jsp
                        clear-bottom.jsp portletstd-top.jsp
                        portletstd-bottom.jsp
               archives/WEB-INF/decorations/portlet/html/portletstd_jsp
                        decorator.properties decorator.jsp
               archives/WEB-INF/decorations/portlet/html/portletstd
                        decorator.vm decorator.properties
               archives/WEB-INF/templates/vm clear-top.vm clear-bottom.vm
               archives/WEB-INF portlet.xml
               archives/WEB-INF/templates/layout/html/columns_jsp
                        layout.jsp layout.properties
  Log:
  cleanup, moving out some old unused impls
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/templates/jsp/columns.jsp
  
  Index: columns.jsp
  ===================================================================
  <%--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  --%>
  <%@ page language="java" 
           import="javax.portlet.*, java.util.*, org.apache.jetspeed.aggregator.*, org.apache.jetspeed.om.page.*"
           session="false" %>
  <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>
  <portlet:defineObjects/>
  
  <% 
  
  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);
  %>
  <%
    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++)
       {
    %>
      <td valign="top"><table width="100%">
      <%
          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();
             if (!"hidden".equals(f.getState()))
             {
                  dispatcher.include(f,(javax.portlet.RenderRequest)renderRequest, (javax.portlet.RenderResponse)renderResponse);
             }
        %>
       <%
             if (fDecoBottom != null)
             {
       %>
       <jsp:include page="<%=fDecoBottom%>" />
       <%
             }
       %>
       </td></tr>
       <%
          }
       %>
       </table></td>
    <%
       }
    %>
    </tr>
  </table>
  <%
    renderRequest.setAttribute("fragment",myFragment);
    renderRequest.setAttribute("entity",portletEntity);
  
    if ((decoBottom != null) && (myFragment == myPage.getRootFragment()))
    {
  %>
  <jsp:include page="<%=decoBottom%>" />
  <%
    }
  %>
  
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/templates/jsp/clear-top.jsp
  
  Index: clear-top.jsp
  ===================================================================
  <%--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  --%>
  <%@ page language="java"  session="false" %>
  <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>
  <portlet:defineObjects/>
  <!-- Clear decorator top -->
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/templates/jsp/clear-bottom.jsp
  
  Index: clear-bottom.jsp
  ===================================================================
  <%--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  --%>
  <%@ page language="java"  session="false" %>
  <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>
  <portlet:defineObjects/>
  <!-- Clear decorator bottom -->
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/templates/jsp/portletstd-top.jsp
  
  Index: portletstd-top.jsp
  ===================================================================
  <%--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  --%>
  <%@ page language="java" import="org.apache.jetspeed.om.page.*,org.apache.pluto.om.entity.*"
session="false" %>
  <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>
  <portlet:defineObjects/>
  <% 
  Page myPage = (Page)renderRequest.getAttribute("page");
  Fragment myF = (Fragment)renderRequest.getAttribute("fragment");
  PortletEntity myPE = (PortletEntity)renderRequest.getAttribute("entity");
  %>
  <!-- Portlet Std Decorator top -->
  <table width="100%" cellspacing"0" cellpadding="0">
  <tr>
    <td bgcolor="<%=myPage.getDefaultSkin()%>">
    <table width="100%">
    <tr>
      <td><% if (myPE!=null) out.write(myPE.getPortletDefinition().getName());%></td>
      <td>
      </td>
    </tr>
    </table>
    </td>
  </tr>
  <tr><td width="100%" valign="top">
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/templates/jsp/portletstd-bottom.jsp
  
  Index: portletstd-bottom.jsp
  ===================================================================
  <%--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  --%>
  <%@ page language="java"  session="false" %>
  <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>
  
  </td>
  </tr>
  </table>
  <!-- Portlet Std Decorator bottom -->
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/decorations/portlet/html/portletstd_jsp/decorator.properties
  
  Index: decorator.properties
  ===================================================================
  # Copyright 2004 The Apache Software Foundation
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  # 
  #     http://www.apache.org/licenses/LICENSE-2.0
  # 
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  id=portletstd_jsp
  template.type=JSP
  template.extension=.jsp
  decorates=portlet
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/decorations/portlet/html/portletstd_jsp/decorator.jsp
  
  Index: decorator.jsp
  ===================================================================
  <%--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  --%>
  <%@ page language="java" import="org.apache.jetspeed.om.page.*,org.apache.pluto.om.entity.*,
org.apache.jetspeed.velocity.JetspeedPowerTool" session="false" %>
  <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>
  <portlet:defineObjects/>
  <% 
  JetspeedPowerTool jetspeed = new JetspeedPowerTool(pageContext);
  Page myPage = jetspeed.getPage();
  Fragment myF = jetspeed.getCurrentFragment();
  PortletEntity myPE = jetspeed.getCurrentPortletEntity();
  
  %>
  <!-- BEGIN: portletstd_jsp -->
  <table width="100%" cellspacing"0" cellpadding="0">
  <tr>
    <td bgcolor="<%=myPage.getDefaultSkin()%>">
    <table width="100%">
    <tr>
      <td><% jetspeed.getTitle(myPE, myF);%></td>
      <td>
      </td>
    </tr>
    </table>
    </td>
  </tr>
  <tr><td width="100%" valign="top">
       <%
         if (!jetspeed.isHidden(myF))
         {
            jetspeed.include(myF);
         }
       %>
  </td>
  </tr>
  </table>
  <!-- END: portletstd_jsp -->
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/decorations/portlet/html/portletstd/decorator.vm
  
  Index: decorator.vm
  ===================================================================
  #*
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  *#
  
  #set($myPage = $jetspeed.page)
  
  #set($myF = $jetspeed.currentFragment)
  
  #set($myPE = $jetspeed.currentPortletEntity)
  <!-- Begin portletstd.vm -->
  <table width="100%" cellspacing"0" cellpadding="0">
  <tr>
    <td bgcolor="${myPage.defaultSkin}">
    <table width="100%">
    <tr>
      <td>
        $jetspeed.getTitle($myPE, $myF)
      </td>
      <td>
      </td>
    </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="100%" valign="top">
      #if (!$jetspeed.isHidden($myF))
        $jetspeed.include($myF)
      #end
    </td>
  </tr>
  </table>
  <!--  End portletstd.vm -->
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/decorations/portlet/html/portletstd/decorator.properties
  
  Index: decorator.properties
  ===================================================================
  # Copyright 2004 The Apache Software Foundation
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  # 
  #     http://www.apache.org/licenses/LICENSE-2.0
  # 
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  id=portletstd
  template.type=velocity
  template.extension=.vm
  decorates=portlet
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/templates/vm/clear-top.vm
  
  Index: clear-top.vm
  ===================================================================
  #*
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  *#
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/templates/vm/clear-bottom.vm
  
  Index: clear-bottom.vm
  ===================================================================
  #*
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  *#
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/portlet.xml
  
  Index: portlet.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  <!--
  Copyright 2004 The Apache Software Foundation
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
  
  <portlet-app id="jetspeed" version="1.0">
      <portlet id="TwoColumns">
      <portlet-name>TwoColumns</portlet-name>
      <display-name>Two Columns Layout</display-name>
      <init-param>
        <name>ViewPage</name>
        <value>/WEB-INF/layout/columns.jsp</value>
      </init-param>
      <init-param>
        <name>columns</name>
        <value>2</value>
      </init-param>
      <init-param>
        <name>sizes</name>
        <value>50%,50%</value>
      </init-param>
      <init-param>
        <name>layoutType</name>
        <value>TwoColumns</value>
      </init-param>
      <portlet-class>org.apache.jetspeed.portlets.layout.MultiColumnPortlet</portlet-class>
      <expiration-cache>-1</expiration-cache>
      <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>view</portlet-mode>
        <portlet-mode>edit</portlet-mode>
        <portlet-mode>help</portlet-mode>      
      </supports>
      <portlet-info>
        <title>TwoColumns</title>
        <short-title>TwoColumns</short-title>
      </portlet-info>
  </portlet>
  
  <portlet id="VelocityOneColumn">
      <portlet-name>VelocityOneColumn</portlet-name>
      <display-name>One Column Layout Using Velocity</display-name>
      <init-param>
        <name>ViewPage</name>
        <value>columns</value>
      </init-param>
      <init-param>
        <name>MaxPage</name>
        <value>maximized</value>
      </init-param>
      <init-param>
        <name>columns</name>
        <value>1</value>
      </init-param>
      <init-param>
        <name>sizes</name>
        <value>100%</value>
      </init-param>
      <init-param>
        <name>layoutType</name>
        <value>OneColumn</value>
      </init-param>
      <portlet-class>org.apache.jetspeed.portlets.layout.MultiColumnPortlet</portlet-class>
      <expiration-cache>-1</expiration-cache>
      <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>view</portlet-mode>
        <portlet-mode>edit</portlet-mode>
        <portlet-mode>help</portlet-mode>      
      </supports>
      <portlet-info>
        <title>VelocityOneColumn</title>
        <short-title>OneColumn</short-title>
      </portlet-info>
  </portlet>
  
  <portlet id="VelocityTwoColumns">
      <portlet-name>VelocityTwoColumns</portlet-name>
      <display-name>Two Columns Layout Using Velocity</display-name>
      <init-param>
        <name>ViewPage</name>
        <value>columns</value>
      </init-param>
      <init-param>
        <name>MaxPage</name>
        <value>maximized</value>
      </init-param>
      <init-param>
        <name>columns</name>
        <value>2</value>
      </init-param>
      <init-param>
        <name>sizes</name>
        <value>50%,50%</value>
      </init-param>
      <init-param>
        <name>layoutType</name>
        <value>TwoColumns</value>
      </init-param>
      <portlet-class>org.apache.jetspeed.portlets.layout.MultiColumnPortlet</portlet-class>
      <expiration-cache>-1</expiration-cache>
      <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>view</portlet-mode>
        <portlet-mode>edit</portlet-mode>
        <portlet-mode>help</portlet-mode>      
      </supports>
      <portlet-info>
        <title>VelocityTwoColumns</title>
        <short-title>TwoColumns</short-title>
      </portlet-info>
  </portlet>
  
  <portlet id="VelocityThreeColumns">
      <portlet-name>VelocityThreeColumns</portlet-name>
      <display-name>Three Columns Layout Using Velocity</display-name>
      <init-param>
        <name>ViewPage</name>
        <value>columns</value>
      </init-param>
      <init-param>
        <name>MaxPage</name>
        <value>maximized</value>
      </init-param>
      <init-param>
        <name>columns</name>
        <value>3</value>
      </init-param>
      <init-param>
        <name>sizes</name>
        <value>33%,33%,33%</value>
      </init-param>
      <init-param>
        <name>layoutType</name>
        <value>ThreeColumns</value>
      </init-param>
      <portlet-class>org.apache.jetspeed.portlets.layout.MultiColumnPortlet</portlet-class>
      <expiration-cache>-1</expiration-cache>
      <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>view</portlet-mode>
        <portlet-mode>edit</portlet-mode>
        <portlet-mode>help</portlet-mode>      
      </supports>
      <portlet-info>
        <title>VelocityThreeColumns</title>
        <short-title>ThreeColumns</short-title>
      </portlet-info>
  </portlet>
  
  <portlet id="VelocityOneColumnNoActions">
      <portlet-name>VelocityOneColumnNoActions</portlet-name>
      <display-name>One Column Layout Using Velocity with No Page Actions allowed</display-name>
      <init-param>
        <name>ViewPage</name>
        <value>columns</value>
      </init-param>
      <init-param>
        <name>MaxPage</name>
        <value>maximized</value>
      </init-param>
      <init-param>
        <name>columns</name>
        <value>1</value>
      </init-param>
      <init-param>
        <name>sizes</name>
        <value>100%</value>
      </init-param>
      <init-param>
        <name>layoutType</name>
        <value>OneColumn</value>
      </init-param>
      <portlet-class>org.apache.jetspeed.portlets.layout.MultiColumnPortlet</portlet-class>
      <expiration-cache>-1</expiration-cache>
      <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>view</portlet-mode>
      </supports>
      <portlet-info>
        <title>VelocityOneColumn</title>
        <short-title>OneColumn</short-title>
      </portlet-info>
  </portlet>
  
  <portlet id="VelocityTwoColumnsNoActions">
      <portlet-name>VelocityTwoColumnsNoActions</portlet-name>
      <display-name>Two Columns Layout Using Velocity with No Page Actions allowed</display-name>
      <init-param>
        <name>ViewPage</name>
        <value>columns</value>
      </init-param>
      <init-param>
        <name>MaxPage</name>
        <value>maximized</value>
      </init-param>
      <init-param>
        <name>columns</name>
        <value>2</value>
      </init-param>
      <init-param>
        <name>sizes</name>
        <value>50%,50%</value>
      </init-param>
      <init-param>
        <name>layoutType</name>
        <value>TwoColumns</value>
      </init-param>
      <portlet-class>org.apache.jetspeed.portlets.layout.MultiColumnPortlet</portlet-class>
      <expiration-cache>-1</expiration-cache>
      <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>view</portlet-mode>
      </supports>
      <portlet-info>
        <title>VelocityTwoColumns</title>
        <short-title>TwoColumns</short-title>
      </portlet-info>
  </portlet>
  
  <portlet id="VelocityThreeColumnsNoActions">
      <portlet-name>VelocityThreeColumnsNoActions</portlet-name>
      <display-name>Three Columns Layout Using Velocity with No Actions allowed</display-name>
      <init-param>
        <name>ViewPage</name>
        <value>columns</value>
      </init-param>
      <init-param>
        <name>MaxPage</name>
        <value>maximized</value>
      </init-param>
      <init-param>
        <name>columns</name>
        <value>3</value>
      </init-param>
      <init-param>
        <name>sizes</name>
        <value>33%,33%,33%</value>
      </init-param>
      <init-param>
        <name>layoutType</name>
        <value>ThreeColumns</value>
      </init-param>
      <portlet-class>org.apache.jetspeed.portlets.layout.MultiColumnPortlet</portlet-class>
      <expiration-cache>-1</expiration-cache>
      <supports>
        <mime-type>text/html</mime-type>
        <portlet-mode>view</portlet-mode>
      </supports>
      <portlet-info>
        <title>VelocityThreeColumns</title>
        <short-title>ThreeColumns</short-title>
      </portlet-info>
  </portlet>
  
  </portlet-app>
  
  
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/templates/layout/html/columns_jsp/layout.jsp
  
  Index: layout.jsp
  ===================================================================
  <%--
  Copyright 2004 The Apache Software Foundation
  
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
      http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  --%>
  <%@ page language="java" 
           import="javax.portlet.*, java.util.*, org.apache.jetspeed.aggregator.*, org.apache.jetspeed.om.page.*,org.apache.jetspeed.velocity.JetspeedPowerTool"
           session="false" %>
  <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
  <%@ taglib uri='/WEB-INF/portlet.tld' prefix='portlet'%>
  <portlet:defineObjects/>
  
  <% 
  JetspeedPowerTool jetspeed = new JetspeedPowerTool(pageContext);
  List[] table = jetpseed.getColumns();
  Page myPage = jetspeed.getPage();
  Fragment myFragment = jetspeed.getCurrentFragment();
  org.apache.pluto.om.entity.PortletEntity portletEntity =jetspeed.getCurrentPortletEntity();
  %>
  
  <%
    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++)
       {
    %>
      <td valign="top"><table width="100%">
      <%
          for(Iterator it=table[i].iterator(); it.hasNext();)
          {
             Fragment f = (Fragment)it.next();
       %>
       <tr><td width="100%">
       <%
           jetspeed.decorateAndInclude(f);
        %>
  
       </td></tr>
       <%
          }
       %>
       </table></td>
    <%
       }
    %>
    </tr>
  </table>
  <%
  
    if ((decoBottom != null) && (myFragment == myPage.getRootFragment()))
    {
  %>
  <jsp:include page="<%=decoBottom%>" />
  <%
    }
  %>
  
  
  
  1.1                  jakarta-jetspeed-2/archives/WEB-INF/templates/layout/html/columns_jsp/layout.properties
  
  Index: layout.properties
  ===================================================================
  # Copyright 2004 The Apache Software Foundation
  #
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  # 
  #     http://www.apache.org/licenses/LICENSE-2.0
  # 
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  id=columns_jsp
  template.type=JSP
  template.extension=.jsp
  
  

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