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/samples/news sitemap.xmap
Date Fri, 12 Dec 2003 16:34:21 GMT
cziegeler    2003/12/12 08:34:21

  Modified:    src/blocks/portal/samples/news/content/resources/xsl
                        rss2html_news.xsl
               src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input
                        CopletModule.java
               src/blocks/portal/samples/news sitemap.xmap
  Log:
  Make the input module more user friendly
  Add fullscreen demo to news coplets
  
  Revision  Changes    Path
  1.3       +3 -3      cocoon-2.1/src/blocks/portal/samples/news/content/resources/xsl/rss2html_news.xsl
  
  Index: rss2html_news.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/samples/news/content/resources/xsl/rss2html_news.xsl,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- rss2html_news.xsl	12 Jul 2003 17:02:47 -0000	1.2
  +++ rss2html_news.xsl	12 Dec 2003 16:34:21 -0000	1.3
  @@ -5,7 +5,7 @@
   <!-- $Id$ 
   
   -->
  -
  +<xsl:param name="fullscreen"/>
   
   <xsl:template match="rss">
     <xsl:apply-templates select="channel"/>
  @@ -26,7 +26,7 @@
   
   <xsl:template match="item">
     <!-- Display the first 5 entries -->
  -  <xsl:if test="position() &lt; 6">
  +  <xsl:if test="$fullscreen='true' or position() &lt; 6">
       <tr>
         <td>
           <a target="_blank" href="{link}">
  
  
  
  1.8       +6 -5      cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java
  
  Index: CopletModule.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/CopletModule.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- CopletModule.java	11 Dec 2003 10:27:35 -0000	1.7
  +++ CopletModule.java	12 Dec 2003 16:34:21 -0000	1.8
  @@ -128,12 +128,14 @@
               } else {
                   copletId = (String)objectModel.get(Constants.COPLET_ID_KEY);
                   
  -                // set portal name
  -                portalService.setPortalName((String)objectModel.get(Constants.PORTAL_NAME_KEY));
  +                if ( copletId != null ) {
  +                    // set portal name
  +                    portalService.setPortalName((String)objectModel.get(Constants.PORTAL_NAME_KEY));
                   
  +                }
               }
               
               if (copletId == null) {
  -                throw new ConfigurationException("copletId must be passed in the object
model either directly (e.g. by using ObjectModelAction) or within the parent context.");
  +                return null;
               }
               
               JXPathContext jxpathContext = JXPathContext.newContext(portalService.getComponentManager().getProfileManager().getCopletInstanceData(copletId));
  @@ -141,7 +143,6 @@
                   
               if (value == null) {
                   return null;
  -                //throw new ConfigurationException("Could not find value for expression
"+name);
               }
                   
               return value.toString();
  
  
  
  1.6       +6 -2      cocoon-2.1/src/blocks/portal/samples/news/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/portal/samples/news/sitemap.xmap,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- sitemap.xmap	13 Aug 2003 09:12:32 -0000	1.5
  +++ sitemap.xmap	12 Dec 2003 16:34:21 -0000	1.6
  @@ -21,12 +21,16 @@
   <!--
           <map:transform type="rss"/>
   -->        
  -        <map:transform type="xslt" src="content/resources/xsl/rss2html_news.xsl"/>
  +        <map:transform type="xslt" src="content/resources/xsl/rss2html_news.xsl">
  +            <map:parameter name="fullscreen" value="{coplet:aspectDatas/fullScreen}"/>

  +        </map:transform>
           <map:serialize type="xml"/>
       </map:match>
       <map:match pattern="*.rss">
           <map:generate type="file" src="content/rss/{1}.xml" label="content" />
  -        <map:transform type="xslt" src="content/resources/xsl/rss2html_news.xsl"/>
  +        <map:transform type="xslt" src="content/resources/xsl/rss2html_news.xsl">
  +            <map:parameter name="fullscreen" value="{coplet:aspectDatas/fullScreen}"/>

  +        </map:transform>
           <map:serialize type="xml"/>
       </map:match>
   
  
  
  

Mime
View raw message