lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andr...@apache.org
Subject svn commit: r374700 - /lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml
Date Fri, 03 Feb 2006 16:11:12 GMT
Author: andreas
Date: Fri Feb  3 08:11:09 2006
New Revision: 374700

URL: http://svn.apache.org/viewcvs?rev=374700&view=rev
Log:
Updated module docs: /core/modules/... is replaced by cocoon://modules/...

Modified:
    lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml

Modified: lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml
URL: http://svn.apache.org/viewcvs/lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml?rev=374700&r1=374699&r2=374700&view=diff
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/1_4/reference/modules/index.xml Fri Feb  3
08:11:09 2006
@@ -108,25 +108,22 @@
         directory. The Java source files go into the <code>&lt;module&gt;/java/src</code>
directory, they are compiled
         automatically by the Lenya build process.
       </p>
-      </section>
       
-      <section>
-        <title>Sitemaps for Module Usecases</title>
+    </section>
+    
+    <section>
+      <title>Calling the Module Sitemap</title>
       
       <p>
-        Module-specific usecase sitemaps must be located at
+        The following URL syntax is used to make a call to a module sitemap:
       </p>
-<source><![CDATA[<module>/usecases/<usecase-name>/usecase.xmap]]></source>
-      <p>
-        To make a call into a usecase sitemap, use a request of the following form:
-      </p>
-<source><![CDATA[cocoon://core/modules/<module>/usecases/<usecase-name>/<request>]]></source>
+<source><![CDATA[cocoon://modules/<module>/**]]></source>
       
       <p>
-        The usecase sitemap is located at <code>newsletter/usecases/send/usecase.xmap</code>.
To request
+        The module sitemap is located at <code>newsletter/sitemap.xmap</code>.
To request
         the latest newsletter and display it on the confirmation screen using the CInclude
approach
         (for more information, see documentation about the usecase framework), you could
for instance use
-        the URI <code>cocoon://core/modules/newsletter/usecases/send/latestNewsletter.xml</code>:
+        the URI <code>cocoon://modules/newsletter/latestNewsletter.xml</code>:
       </p>
       
 <source xml:space="preserve"><![CDATA[<page:page
@@ -144,15 +141,29 @@
       <jx:import uri="templates/messages.jx"/>
       
       <cinclude:includexml>
-        <cinclude:src>cocoon://core/modules/newsletter/usecases/send/latestNewsletter.xml</cinclude:src>
+        <cinclude:src>cocoon://modules/newsletter/latestNewsletter.xml</cinclude:src>
       </cinclude:includexml>
       
       <input name="submit" type="submit" value="Send Newsletter"/>
     </form>
   </page:body>
 </page:page>]]></source>
-      
-      
+
+        <p>
+        Another useful option is to use a module URL as the usecase view, e.g. to export
some XML.
+        Note that the attribute <code>uri</code> is used instead of <code>template</code>.
+        The usecase class <code>DummyUsecase</code> can be used because no Java
code shall be
+        executed.
+        </p>
+      
+        <source xml:space="preserve"><![CDATA[<xconf xpath="/cocoon/usecases"
+       unless="/cocoon/usecases/component-instance[@name = 'newsletter.download']">
+  <component-instance name="newsletter.send"
+                      logger="lenya.usecases.newsletter.send"
+                      class="org.apache.lenya.cms.usecase.DummyUsecase">
+    <view uri="cocoon://modules/newsletter/downloadNewsletter.xml"/>
+  </component-instance>
+</xconf>]]></source>
       </section>
     
       <section>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org


Mime
View raw message