You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2007/11/14 20:34:06 UTC
svn commit: r595019 - in
/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF:
flow/README.txt flow/samples.xml flow/sitemap.xmap samples.xml sitemap.xmap
Author: vgritsenko
Date: Wed Nov 14 11:34:04 2007
New Revision: 595019
URL: http://svn.apache.org/viewvc?rev=595019&view=rev
Log:
two flow samples do not need separate page
Removed:
cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/README.txt
cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/samples.xml
Modified:
cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap
cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/samples.xml
cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap
Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap?rev=595019&r1=595018&r2=595019&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/flow/sitemap.xmap Wed Nov 14 11:34:04 2007
@@ -16,51 +16,22 @@
limitations under the License.
-->
-<!-- CVS $Id$ -->
-
+<!--
+ - Cocoon Flow samples are located in sub-sitemaps.
+ -
+ - $Id$
+ -->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
- <map:views>
- <map:view name="content" from-label="content">
- <map:serialize type="xml" />
- </map:view>
-
- <map:view from-label="content" name="pretty-content">
- <!-- Make use of servlet services -->
- <map:serialize type="servletService">
- <map:parameter name="service" value="servlet:style-default:/service/system/xml2html" />
- </map:serialize>
- </map:view>
-
- <map:view name="links" from-position="last">
- <map:serialize type="links" />
- </map:view>
- </map:views>
-
<map:pipelines>
<map:pipeline>
-
- <map:match pattern="j">
- <map:generate src="samples.xml" type="jx" />
- <map:serialize type="xml" />
- </map:match>
-
- <map:match pattern="">
- <map:generate src="samples.xml" />
- <!-- Make use of servlet services -->
- <map:serialize type="servletService">
- <map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html" />
- </map:serialize>
- </map:match>
-
<map:match pattern="*">
- <map:redirect-to uri="{1}/" />
+ <map:redirect-to uri="{1}/"/>
</map:match>
<map:match pattern="*/**">
- <map:mount uri-prefix="{1}" src="{1}/" />
+ <map:mount uri-prefix="{1}" src="{1}/"/>
</map:match>
-
</map:pipeline>
</map:pipelines>
</map:sitemap>
Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/samples.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/samples.xml?rev=595019&r1=595018&r2=595019&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/samples.xml (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/samples.xml Wed Nov 14 11:34:04 2007
@@ -16,13 +16,12 @@
limitations under the License.
-->
-<!--+
- | Main samples page
- |
- | CVS $Id$
- +-->
-
-<samples name="Cocoon Core Samples (main group)" xmlns:xlink="http://www.w3.org/1999/xlink">
+<!--
+ - Main samples page
+ -
+ - $Id$
+ -->
+<samples name="Cocoon Core Samples">
<group name="Cocoon Pipelines">
<sample name="Hello World!" href="hello-world/">
@@ -35,11 +34,20 @@
<note>
These are basic examples of Flow usage, but it is also used in the samples
of several other blocks, see the forms and tour blocks for more advanced examples.
- </note>
- <sample name="Flow" href="flow/">
- Cocoon Flow examples.
+ </note>
+ <sample name="Calculator" href="flow/jxcalc/">
+ A simple web-based calculator that uses javascript on the server side
+ to describe the web application flow between screens in a coherent
+ unique location and continuations to maintain state between requests.
+ </sample>
+ <sample name="User Preferences" href="flow/prefs/">
+ A common portion of an application which requires users to be
+ registered. This example shows how to use java objects from the
+ javascript flow as it is best practice to put business logic into
+ strongly-typed java objects and use javascript to describe only the
+ page flow.
</sample>
- </group>
+ </group>
<group name="Spring Sample">
<sample name="Spring Sample" href="spring/">
@@ -49,10 +57,10 @@
<group name="Internationalization">
<sample name="Internationalization (i18n) & Localization (l10n)" href="i18n/">
- Samples of the powerful Cocoon i18n and l10n Cocoon tools.
+ Samples of the powerful Cocoon i18n and l10n Cocoon tools.
</sample>
- </group>
-
+ </group>
+
<group name="System Tools And Pages">
<sample name="System Tools" href="system/">
Display Cocoon status, clear the Cocoon cache, etc.
@@ -62,10 +70,10 @@
<group name="Reloading classes">
<note>
Trivial sample of class reloading
- </note>
+ </note>
<sample name="Reloading" href="reloading/">
Class Reloading sample.
</sample>
- </group>
+ </group>
</samples>
Modified: cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap?rev=595019&r1=595018&r2=595019&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap (original)
+++ cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/sitemap.xmap Wed Nov 14 11:34:04 2007
@@ -34,7 +34,6 @@
</map:view>
<map:view from-label="content" name="pretty-content">
- <!-- Make use of servlet services -->
<map:serialize type="servletService">
<map:parameter name="service" value="servlet:style-default:/service/system/xml2html"/>
</map:serialize>
@@ -51,7 +50,6 @@
<map:pipeline>
<map:match pattern="">
<map:generate src="samples.xml"/>
- <!-- Make use of servlet services -->
<map:serialize type="servletService">
<map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html"/>
</map:serialize>
@@ -60,7 +58,37 @@
<map:match pattern="*/**">
<map:mount uri-prefix="{1}" src="{1}/"/>
</map:match>
- </map:pipeline>
+ <map:handle-errors>
+ <map:select type="exception">
+ <map:when test="not-found">
+ <map:generate type="exception"/>
+ <map:transform src="servlet:style-default:/stylesheets/system/exception2html.xslt">
+ <map:parameter name="realPath" value="{realpath:}"/>
+ <map:parameter name="pageTitle" value="Resource not found"/>
+ </map:transform>
+ <map:serialize status-code="404"/>
+ </map:when>
+
+ <map:when test="invalid-continuation">
+ <map:generate type="exception"/>
+ <map:transform src="servlet:style-default:/stylesheets/system/exception2html.xslt">
+ <map:parameter name="realPath" value="{realpath:}"/>
+ <map:parameter name="pageTitle" value="Invalid Continuation"/>
+ </map:transform>
+ <map:serialize status-code="404"/>
+ </map:when>
+
+ <map:otherwise>
+ <map:generate type="exception"/>
+ <map:transform src="servlet:style-default:/stylesheets/system/exception2html.xslt">
+ <map:parameter name="realPath" value="{realpath:}"/>
+ </map:transform>
+ <map:serialize status-code="500"/>
+ </map:otherwise>
+ </map:select>
+ </map:handle-errors>
+
+ </map:pipeline>
</map:pipelines>
</map:sitemap>