cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: rev 53793 - in cocoon/branches/BRANCH_2_1_X: . src/blocks/faces/WEB-INF src/blocks/faces/conf src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles src/blocks/faces/java/org/apache/cocoon/faces/samples/components src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components src/blocks/faces/java/org/apache/cocoon/faces/samples/components/model src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit src/blocks/faces/java/org/apache/cocoon/faces/samples/components/taglib src/blocks/faces/samples src/blocks/faces/samples/cardemo src/blocks/faces/samples/cardemo/images
Date Tue, 05 Oct 2004 13:47:50 GMT
Author: vgritsenko
Date: Tue Oct  5 06:47:48 2004
New Revision: 53793

Added:
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/conf/faces-taglib.samplesxconf   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CarBean.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CarCustomizer.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CarStore.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CreditCardConverter.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CustomerBean.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/FirstNameChanged.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/FormatValidator.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/FormatValidatorTag.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/MessageFactory.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Common_options.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Custom.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Deluxe.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_de.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_es.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_fr.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_options.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_de.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_es.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_fr.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_options.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages_de.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages_es.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages_fr.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/OptionPrices.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Performance.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_de.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_en.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_es.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_fr.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_de.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_es.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_fr.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_options.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_de.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_es.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_fr.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_options.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Standard.properties   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/AreaComponent.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/AreaSelectedEvent.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/AreaSelectedListener.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/MapComponent.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/model/
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/model/ImageArea.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/AreaRenderer.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/BaseRenderer.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/ConstantMethodBinding.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/MapRenderer.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/Util.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/taglib/
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/taglib/AreaTag.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/taglib/MapTag.java   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/bottomMatter.xml   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/carDetail.xml   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/chooseLocale.xml   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/confirmChoices.xml   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/customerInfo.xml   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/finish.xml   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/150x126_Jalopy.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/150x126_Luxury.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/150x126_Roadster.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/150x126_SUV.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/200x168_Jalopy.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/200x168_Luxury.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/200x168_Roadster.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/200x168_SUV.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/BuyBtn.gif   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/FinishBtn.gif   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/MoreBtn.gif   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/cardemo.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/current.gif   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/duke.gif   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world_france.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world_germany.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world_namer.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world_samer.jpg   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/optionsPanel.xml   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/sitemap.xmap   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/storeFront.xml   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/stylesheet.css   (contents, props changed)
Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/WEB-INF/faces-config.xml
   cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/samples.xml   (contents, props changed)
   cocoon/branches/BRANCH_2_1_X/status.xml
Log:
Add CarStore JSF demo. Subject to nuclear facility clause
(see notice in the source code)


Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/WEB-INF/faces-config.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/faces/WEB-INF/faces-config.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/WEB-INF/faces-config.xml	Tue Oct  5 06:47:48 2004
@@ -19,7 +19,16 @@
 <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
                               "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
 
+<!--
+  - JavaServer Faces Configuration.
+  - All of the entries below are needed only for sample apps.
+  -->
 <faces-config>
+
+  <!--
+    - Hello Application Configuration
+    -->
+
   <managed-bean>
     <managed-bean-name>hello</managed-bean-name>
     <managed-bean-class>org.apache.cocoon.faces.samples.Hello</managed-bean-class>
@@ -39,6 +48,404 @@
     <navigation-case>
       <from-outcome>flip</from-outcome>
       <to-view-id>/samples/blocks/faces/hello</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+
+  <!--
+    - Sun's CarStore Demo Application Configuration
+    - Includes configuration of two custom components.
+    -->
+
+  <component>
+    <component-type>DemoArea</component-type>
+    <component-class>org.apache.cocoon.faces.samples.components.components.AreaComponent</component-class>
+    <property>
+      <description>
+        Alternate text if we synthesize an ImageArea bean.
+      </description>
+      <property-name>alt</property-name>
+      <property-class>java.lang.String</property-class>
+    </property>
+    <property>
+      <description>
+        Hotspot coordinates if we synthesize an ImageArea bean.
+      </description>
+      <property-name>coords</property-name>
+      <property-class>java.lang.String</property-class>
+    </property>
+    <property>
+      <description>
+        Shape (default, rect, circle, poly) if we synthesize an ImageArea bean.
+      </description>
+      <property-name>shape</property-name>
+      <property-class>java.lang.String</property-class>
+    </property>
+
+    <component-extension>
+      <component-family>Area</component-family>
+      <renderer-type>DemoArea</renderer-type>
+    </component-extension>
+  </component>
+
+  <component>
+    <component-type>DemoMap</component-type>
+    <component-class>org.apache.cocoon.faces.samples.components.components.MapComponent</component-class>
+    <property>
+      <description>
+        Alternate text for the currently selected child AreaComponent.
+      </description>
+      <property-name>current</property-name>
+      <property-class>java.lang.String</property-class>
+    </property>
+
+    <component-extension>
+      <component-family>Map</component-family>
+      <renderer-type>DemoMap</renderer-type>
+    </component-extension>
+  </component>
+
+  <render-kit>
+    <renderer>
+      <description>
+        Renderer for a org.apache.cocoon.faces.samples.components.components.AreaComponent component.
+      </description>
+      <component-family>Area</component-family>
+      <renderer-type>DemoArea</renderer-type>
+      <renderer-class>org.apache.cocoon.faces.samples.components.renderkit.AreaRenderer</renderer-class>
+
+      <attribute>
+        <description>
+          Context-relative path to an image to be displayed when the
+          mouse is not hovering over this hotspot.
+        </description>
+        <attribute-name>onmouseout</attribute-name>
+        <attribute-class>java.lang.String</attribute-class>
+      </attribute>
+      <attribute>
+        <description>
+          Context-relative path to an image to be displayed when the
+          mouse is hovering over this hotspot.
+        </description>
+        <attribute-name>onmouseover</attribute-name>
+        <attribute-class>java.lang.String</attribute-class>
+      </attribute>
+      <attribute>
+        <description>
+          CSS style class to use when rendering this component.
+        </description>
+        <attribute-name>styleClass</attribute-name>
+        <attribute-class>java.lang.String</attribute-class>
+      </attribute>
+    </renderer>
+
+    <renderer>
+      <description>
+        Renderer for a org.apache.cocoon.faces.samples.components.components.MapComponent component.
+      </description>
+      <component-family>Map</component-family>
+      <renderer-type>DemoMap</renderer-type>
+      <renderer-class>org.apache.cocoon.faces.samples.components.renderkit.MapRenderer</renderer-class>
+
+      <attribute>
+        <description>
+          CSS style class to use when rendering this component.
+        </description>
+        <attribute-name>styleClass</attribute-name>
+        <attribute-class>java.lang.String</attribute-class>
+      </attribute>
+    </renderer>
+  </render-kit>
+
+  <application>
+    <message-bundle>org.apache.cocoon.faces.samples.carstore.bundles.Messages</message-bundle>
+    <locale-config>
+      <default-locale>en</default-locale>
+      <supported-locale>de</supported-locale>
+      <supported-locale>fr</supported-locale>
+      <supported-locale>es</supported-locale>
+    </locale-config>
+  </application>
+
+  <!-- Validator -->
+  <validator>
+    <description>
+        Registers the concrete Validator implementation,
+        org.apache.cocoon.faces.samples.carstore.FormatValidator with the validator
+        identifier, FormatValidator.
+    </description>
+    <validator-id>FormatValidator</validator-id>
+    <validator-class>org.apache.cocoon.faces.samples.carstore.FormatValidator</validator-class>
+    <attribute>
+      <description>
+        List of format patterns separated by '|'.  The validator
+        compares these patterns against the data entered in a
+        component that has this validator registered on it.
+      </description>
+      <attribute-name>formatPatterns</attribute-name>
+      <attribute-class>java.lang.String</attribute-class>
+    </attribute>
+  </validator>
+
+  <!-- Converter -->
+  <converter>
+    <description>
+        Registers the concrete Converter implementation,
+        org.apache.cocoon.faces.samples.carstore.CreditCardConverter using the ID,
+        creditCardConverter.
+    </description>
+    <converter-id>creditCardConverter</converter-id>
+    <converter-class>org.apache.cocoon.faces.samples.carstore.CreditCardConverter</converter-class>
+  </converter>
+
+  <!-- =================== Initialize Image Map Hotspot Data ============== -->
+
+  <managed-bean>
+    <description>
+      Causes the default VariableResolver implementation to instantiate the
+      managed bean, NA of the class, org.apache.cocoon.faces.samples.components.model.ImageArea in application
+      scope if the bean does not already exist in any scope and initialize the
+      shape, alt, and coords properties with the values specified by the
+      managed-property elements.
+    </description>
+    <managed-bean-name> NA </managed-bean-name>
+    <managed-bean-class> org.apache.cocoon.faces.samples.components.model.ImageArea </managed-bean-class>
+    <managed-bean-scope> application </managed-bean-scope>
+    <managed-property>
+      <description>
+        Initializes the shape property of the managed bean, NA with the value,
+        poly.
+      </description>
+      <property-name>shape</property-name>
+      <value>poly</value>
+    </managed-property>
+    <managed-property>
+      <description>
+        Initializes the alt property of the managed bean, NA with the value,
+        NAmerica.
+      </description>
+      <property-name>alt</property-name>
+      <value>NAmerica</value>
+    </managed-property>
+    <managed-property>
+      <description>
+        Initializes the coords property of the managed bean, NA with the value
+        specified by the value element.
+      </description>
+      <property-name>coords</property-name>
+      <value>
+        53,109,1,110,2,167,19,168,52,149,67,164,67,165,68,167,70,168,72,170,74,172,75,174,77,175,79,177,81,179,80,179,77,179,81,179,81,178,80,178,82,211,28,238,15,233,15,242,31,252,36,247,36,246,32,239,89,209,92,216,93,216,100,216,103,218,113,217,116,224,124,221,128,230,163,234,185,189,178,177,162,188,143,173,79,173,73,163,79,157,64,142,54,139,53,109
+      </value>
+    </managed-property>
+  </managed-bean>
+
+  <managed-bean>
+    <description>
+      Causes the default VariableResolver implementation to instantiate the
+      managed bean, SA of the class, org.apache.cocoon.faces.samples.components.model.ImageArea in application
+      scope if the bean does not already exist in any scope and initialize the
+      shape, alt, and coords properties with the values specified by the
+      managed-property elements.
+    </description>
+    <managed-bean-name>SA</managed-bean-name>
+    <managed-bean-class>org.apache.cocoon.faces.samples.components.model.ImageArea</managed-bean-class>
+    <managed-bean-scope>application</managed-bean-scope>
+    <managed-property>
+      <description>
+        Initializes the shape property of the managed bean, SA with the value,
+        poly.
+      </description>
+      <property-name>shape</property-name>
+      <value>poly</value>
+    </managed-property>
+    <managed-property>
+      <description>
+        Initializes the alt property of the managed bean, SA with the value,
+        SAmerica.
+      </description>
+      <property-name>alt</property-name>
+      <value>SAmerica</value>
+    </managed-property>
+    <managed-property>
+      <description>
+         Initializes the coords property of the managed bean, SA with the value
+         specified by the value element.
+      </description>
+      <property-name>coords</property-name>
+      <value>
+        89,217,95,228,100,234,107,239,109,240,109,237,106,231,110,234,113,240,115,246,118,250,125,254,131,256,135,255,140,257,146,263,151,269,157,271,160,273,159,279,157,287,156,294,163,315,168,324,172,329,173,338,172,351,169,368,168,379,167,388,165,399,165,408,170,415,177,420,183,420,183,415,180,408,180,405,186,400,186,395,186,391,188,388,190,384,193,382,196,379,199,377,201,374,201,371,201,366,197,362,197,358,198,354,199,351,199,347,197,344,196,340,194,337,191,335,191,332,194,332,201,332,199,326,193,317,184,310,180,309,179,311,177,314,175,312,174,308,172,305,170,304,171,302,174,298,177,296,177,290,177,288,180,287,183,287,186,287,187,284,188,280,190,279,192,278,191,282,191,286,194,288,196,288,199,286,201,285,204,285,206,285,208,285,206,280,205,279,205,276,205,274,197,270,194,267,191,265,186,262,182,262,177,261,173,261,167,261,165,265,163,266,159,265,157,263,157,260,153,253,149,251,147,251,149,247,149,244,148,240,144,238,141,238,139,241,138,244,137,245,134,246,131,245,130,242,130,238,130,236,130,233,129,230,125,225,123,221,119,221,118,223,117,220,113,219,104,217,101,215,96,215
+      </value>
+    </managed-property>
+  </managed-bean>
+
+  <managed-bean>
+    <description>
+      Causes the default VariableResolver implementation to instantiate the
+      managed bean, gerA of the class, org.apache.cocoon.faces.samples.components.model.ImageArea in application
+      scope if the bean does not already exist in any scope and initialize the
+      shape, alt, and coords properties with the values specified by the
+      managed-property elements.
+    </description>
+    <managed-bean-name> gerA </managed-bean-name>
+    <managed-bean-class> org.apache.cocoon.faces.samples.components.model.ImageArea </managed-bean-class>
+    <managed-bean-scope> application </managed-bean-scope>
+    <managed-property>
+      <description>
+         Initializes the shape property of the managed bean, gerA with the value
+         poly.
+      </description>
+      <property-name>shape</property-name>
+      <value>poly</value>
+    </managed-property>
+    <managed-property>
+      <description>
+        Initializes the alt property of the managed bean, gerA with the value
+        Germany.
+      </description>
+      <property-name>alt</property-name>
+      <value>Germany</value>
+    </managed-property>
+    <managed-property>
+        <description>
+            Initializes the coords property of the managed bean, gerA with the value
+            specified by the value element.
+      </description>
+      <property-name>coords</property-name>
+      <value>
+        324,163,323,170,322,172,320,173,320,175,321,176,321,177,321,179,321,180,319,180,318,180,317,182,316,183,315,181,314,181,313,181,312,181,311,180,310,177,310,177,307,176,307,173,307,172,308,170,309,169,309,167,309,166,311,165,311,163,311,161,312,159,314,159,316,160,316,162,318,162,319,162
+      </value>
+    </managed-property>
+  </managed-bean>
+
+  <managed-bean>
+    <description>
+      Causes the default VariableResolver implementation to instantiate the
+      managed bean, fraA of the class, org.apache.cocoon.faces.samples.components.model.ImageArea in application
+      scope if the bean does not already exist in any scope and initialize the
+      shape, alt, and coords properties with the values specified by the
+      managed-property elements.
+    </description>
+    <managed-bean-name> fraA </managed-bean-name>
+    <managed-bean-class> org.apache.cocoon.faces.samples.components.model.ImageArea </managed-bean-class>
+    <managed-bean-scope> application </managed-bean-scope>
+    <managed-property>
+        <description>
+            Initializes the shape property of the managed bean, fraA with the value
+            shape.
+      </description>
+      <property-name>shape</property-name>
+      <value>poly</value>
+    </managed-property>
+    <managed-property>
+        <description>
+            Initializes the alt property of the managed bean, fraA with the value
+            France.
+      </description>
+      <property-name>alt</property-name>
+      <value>France</value>
+    </managed-property>
+    <managed-property>
+        <description>
+            Initializes the coords property of the managed bean, fraA with the value
+            specified by the value element.
+      </description>
+      <property-name>coords</property-name>
+      <value>
+        312,178,308,182,310,184,310,187,310,189,309,191,307,192,305,192,304,192,304,193,303,195,302,195,300,194,299,194,297,194,295,193,295,191,295,189,294,186,293,184,292,182,291,181,289,180,288,178,288,176,289,175,292,175,293,176,294,174,296,174,297,174,299,174,299,172,300,170,302,170,304,172,306,173,308,173,310,174
+      </value>
+    </managed-property>
+  </managed-bean>
+
+  <!-- =================== Business Logic Beans ============== -->
+
+  <managed-bean>
+    <description>
+      Causes the default VariableResolver implementation to instantiate
+      the managed bean, CustomerBean of the class, org.apache.cocoon.faces.samples.carstore.CustomerBean
+      in session scope if the bean does not already exist in any scope.
+    </description>
+    <managed-bean-name>customer</managed-bean-name>
+    <managed-bean-class>org.apache.cocoon.faces.samples.carstore.CustomerBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+
+  <managed-bean>
+    <description>
+      The main backing file mean
+    </description>
+    <managed-bean-name>carstore</managed-bean-name>
+    <managed-bean-class>org.apache.cocoon.faces.samples.carstore.CarStore</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+
+  <navigation-rule>
+    <from-view-id>/samples/blocks/faces/cardemo/chooseLocale.faces</from-view-id>
+    <navigation-case>
+      <description>
+        Any action on chooseLocale should cause navigation to storeFront.faces
+      </description>
+      <from-outcome>storeFront</from-outcome>
+      <to-view-id>/samples/blocks/faces/cardemo/storeFront.faces</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+  <navigation-rule>
+    <from-view-id>/samples/blocks/faces/cardemo/storeFront.faces</from-view-id>
+    <navigation-case>
+      <description>
+        Any action that returns "carDetail" on storeFront.faces should
+        cause navigation to carDetail.faces
+      </description>
+      <from-outcome>carDetail</from-outcome>
+      <to-view-id>/samples/blocks/faces/cardemo/carDetail.faces</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+  <navigation-rule>
+    <from-view-id>/samples/blocks/faces/cardemo/carDetail.faces</from-view-id>
+    <navigation-case>
+      <description>
+        Any action that returns "confirmChoices" on carDetail.faces should
+        cause navigation to confirmChoices.faces
+      </description>
+      <from-outcome>confirmChoices</from-outcome>
+      <to-view-id>/samples/blocks/faces/cardemo/confirmChoices.faces</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+  <navigation-rule>
+    <from-view-id>/samples/blocks/faces/cardemo/confirmChoices.faces</from-view-id>
+    <navigation-case>
+      <description>
+        Any action that returns "carDetail" on confirmChoices.faces should
+        cause navigation to carDetail.faces
+      </description>
+      <from-outcome>carDetail</from-outcome>
+      <to-view-id>/samples/blocks/faces/cardemo/carDetail.faces</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+  <navigation-rule>
+    <from-view-id>/samples/blocks/faces/cardemo/confirmChoices.faces</from-view-id>
+    <navigation-case>
+      <description>
+        Any action that returns "customerInfo" on confirmChoices.faces should
+        cause navigation to customerInfo.faces
+      </description>
+      <from-outcome>customerInfo</from-outcome>
+      <to-view-id>/samples/blocks/faces/cardemo/customerInfo.faces</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+  <navigation-rule>
+    <from-view-id>/samples/blocks/faces/cardemo/customerInfo.faces</from-view-id>
+    <navigation-case>
+      <description>
+        Any action that returns "finish" on customerInfo.faces should
+        cause navigation to finish.faces
+      </description>
+      <from-outcome>finish</from-outcome>
+      <to-view-id>/samples/blocks/faces/cardemo/finish.faces</to-view-id>
     </navigation-case>
   </navigation-rule>
 

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/conf/faces-taglib.samplesxconf
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/conf/faces-taglib.samplesxconf	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+
+<!--
+  Copyright 1999-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.
+-->
+
+<samplesxconf xpath="/cocoon/component[@role='org.apache.cocoon.taglib.TagSelector']"
+              unless="taglib[@name='http://java.sun.com/jsf/demo/components']">
+
+    <!--
+      - CarStore Demo taglib: Custom components
+      -->
+    <taglib name="http://java.sun.com/jsf/demo/components" logger="sitemap.taglib.jsf.demo" class="org.apache.cocoon.components.ExtendedComponentSelector">
+      <tag name="area" class="org.apache.cocoon.faces.samples.components.taglib.AreaTag" logger="sitemap.taglib.jsf.demo"/>
+      <tag name="map" class="org.apache.cocoon.faces.samples.components.taglib.MapTag" logger="sitemap.taglib.jsf.demo"/>
+    </taglib>
+
+    <!--
+      - CarStore Demo taglib: Custom validator
+      -->
+    <taglib name="urn:carstoretaglibrary_1.1" logger="sitemap.taglib.jsf.carstore" class="org.apache.cocoon.components.ExtendedComponentSelector">
+      <tag name="format_validator" class="org.apache.cocoon.faces.samples.carstore.FormatValidatorTag" logger="sitemap.taglib.jsf.carstore"/>
+    </taglib>
+
+</samplesxconf>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CarBean.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CarBean.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,589 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+
+package org.apache.cocoon.faces.samples.carstore;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.faces.application.Application;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.component.UISelectItems;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.model.SelectItem;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.util.StringTokenizer;
+
+/**
+ * <p>This bean encapsulates a car model, including pricing and package
+ * choices.  The system allows the user to customize the properties of
+ * this bean with the help of the {@link CarCustomizer}.</p>
+ *
+ * <h3>Data Access</h3>
+ *
+ * <p>This is the only bean in the system that has complicated access to
+ * the persistent store of data.  In the present implementation, this
+ * persistent store is in <code>ResourceBundle</code> instances.</p>
+ *
+ * <p>There are three data source <code>ResourceBundle</code> files
+ * used:</p>
+ *
+ * 	<ol>
+ *
+ * 	  <li><p><code>&lt;ModelName&gt;</code></p>
+ *
+ *        <p>This contains the localized content for this model.  There
+ *        is a variant of this file for each supported locale, for
+ *        example, <code>Jalopy_de.properties</code></p>
+ *
+ *         </li>
+ *
+ * 	  <li><p><code>&lt;Common_properties&gt;</code></p>
+ *
+ *        <p>This contains the localized content common to all
+ *        models.</p>
+ *
+ *         </li>
+ *
+ * 	  <li><p><code>&lt;ModelName_options&gt;</code></p>
+ *
+ *        <p>This contains the non-localized content for this model,
+ *        including the non-localized options.  There is only one
+ *        variant of this file for all locales for example,
+ *        <code>Jalopy_options.properties</code></p>
+ *
+ *         </li>
+ *
+ *	</ol>
+ *
+ * <p>All files conform to the following convention:</p>
+ *
+ * <code><pre>
+ * key
+ * key_componentType
+ * key_valueType
+ * </pre></code>
+ *
+ * <p>Where <code>key</code> is the name of an attribute of this car.
+ * For example, <code>basePrice</code>, or <code>description</code>.
+ * <code>key_componentType</code> is the component type of the
+ * <code>UIComponent</code> subclass to be used to represent this
+ * attribute in the page, for example <code>SelectManyMenu</code>.
+ * <code>key_valueType</code> is the data type of the value of the
+ * <code>UIComponent</code>, for example <code>java.lang.Integer</code>.
+ * For all non-String valueTypes.</p>
+ *
+ * <p>When the bean is instantiated, we load both of the above
+ * properties files and iterate over the keys in each one.  For each
+ * key, we look at the <code>componentType</code> and ask the
+ * <code>Application</code> to create a component of that type.  We
+ * store that <code>UIComponent</code> instance in our
+ * <code>components</code> <code>Map</code> under the name
+ * <code>key</code>.  We look at the <code>valueType</code> for the
+ * <code>key</code>.  For non <code>java.lang.String</code> types, we
+ * ask the <code>Application</code> for a <code>Converter</code>
+ * instance for that class.  If found, we use it to convert the value
+ * for the <code>key</code> to the appropriate type and store that as
+ * the <code>value</code> of the <code>UIComponent</code> instance.</p>
+ */
+
+public class CarBean extends Object {
+
+    protected static final Log log = LogFactory.getLog(CarBean.class);
+
+    /**
+     * <p>The message identifier of the Message to be created if
+     * the conversion fails.  The message format string for this
+     * message may optionally include a <code>{0}</code>
+     * placeholder, which will be replaced by the object and value.</p>
+     */
+    public static final String CONVERTER_ERROR_MESSAGE_ID =
+        "carstore.Converter_Error";
+
+
+    //
+    // Relationship Instance Variables
+    //
+
+    /**
+     * Localized labels
+     */
+
+    private ResourceBundle resources = null;
+
+    /**
+     * Price data
+     */
+    private ResourceBundle priceData = null;
+
+    /**
+     * Keys: String attribute name, such as engine. Values: UIComponent
+     * for the attribute
+     */
+
+    private Map components = null;
+
+    /**
+     * Keys: String attribute name, such as engine. Values: String value
+     * of the component named by key in our components Map.
+     */
+
+    private Map attributes = null;
+
+    //
+    // Constructors
+    //
+
+    public CarBean() {
+        this.init(CarStore.DEFAULT_MODEL_PROPERTIES);
+    }
+
+
+    public CarBean(String bundleName) {
+        this.init(bundleName);
+    }
+
+
+    /**
+     * <p>Initialize our components <code>Map</code> as described in the
+     * class documentation.</p>
+     *
+     * <p>Create a wrapper <code>Map</code> around the components
+     * <code>Map</code> that exposes the String converted value of each
+     * component.</p>
+     */
+
+    private void init(String bundleName) {
+        FacesContext context = FacesContext.getCurrentInstance();
+        ResourceBundle data = null;
+        Enumeration keys = null;
+        components = new HashMap();
+
+        // load the labels
+        resources =
+            ResourceBundle.getBundle(CarStore.CARSTORE_PREFIX +
+                                     ".bundles.Resources",
+                                     context.getViewRoot().getLocale());
+
+        // load the prices
+        priceData = ResourceBundle.getBundle(CarStore.CARSTORE_PREFIX +
+                                             ".bundles.OptionPrices");
+
+        // populate the locale-specific information
+        if (log.isDebugEnabled()) {
+            log.debug("Loading bundle: " + bundleName + ".");
+        }
+        data = ResourceBundle.getBundle(bundleName,
+                                        context.getViewRoot().getLocale());
+        if (log.isDebugEnabled()) {
+            log.debug("Bundle " + bundleName +
+                      " loaded. Reading properties...");
+        }
+        initComponentsFromProperties(context, data);
+        if (log.isDebugEnabled()) {
+            log.debug("done.");
+        }
+
+        // populate the non-locale-specific information common to all cars
+        if (log.isDebugEnabled()) {
+            log.debug("Loading bundle: Common_options.");
+        }
+        data = ResourceBundle.getBundle(CarStore.CARSTORE_PREFIX +
+                                        ".bundles.Common_options");
+        if (log.isDebugEnabled()) {
+            log.debug("Bundle Common_options loaded. Reading properties...");
+        }
+        initComponentsFromProperties(context, data);
+        if (log.isDebugEnabled()) {
+            log.debug("done.");
+        }
+
+        // populate the non-locale-specific information specific to each car
+        if (log.isDebugEnabled()) {
+            log.debug("Loading bundle: " + bundleName + "_options.");
+        }
+        data = ResourceBundle.getBundle(bundleName + "_options");
+        if (log.isDebugEnabled()) {
+            log.debug("Bundle " + bundleName +
+                      "_options loaded. Reading properties...");
+        }
+        initComponentsFromProperties(context, data);
+        if (log.isDebugEnabled()) {
+            log.debug("done.");
+        }
+
+        // create a read-only Map exposing the values of all of our
+        // components.
+        attributes =
+            new Map() {
+                public void clear() {
+                    CarBean.this.components.clear();
+                }
+
+
+                public boolean containsKey(Object key) {
+                    return CarBean.this.components.containsKey(key);
+                }
+
+
+                public boolean containsValue(Object value) {
+                    throw new UnsupportedOperationException();
+                }
+
+
+                public java.util.Set entrySet() {
+                    throw new UnsupportedOperationException();
+                }
+
+
+                public boolean equals(Object o) {
+                    throw new UnsupportedOperationException();
+                }
+
+
+                public Object get(Object key) {
+                    UIComponent component = null;
+                    Converter converter = null;
+                    Object result = null;
+                    if (null == key) {
+                        return null;
+                    }
+                    if (null != (component = (UIComponent)
+                        CarBean.this.components.get(key))) {
+                        // if this component can have a Converter
+                        if (component instanceof ValueHolder) {
+                            // try to get it
+                            converter = ((ValueHolder) component).
+                                getConverter();
+                            result = ((ValueHolder) component).getValue();
+                        }
+
+                        // if we do have a value
+                        if (null != result) {
+                            // and we do have a converter
+                            if (null != converter) {
+                                // convert the value to String
+                                result = converter.
+                                    getAsString(FacesContext.
+                                                getCurrentInstance(),
+                                                component, result);
+                            }
+                        }
+                    }
+                    return result;
+                }
+
+
+                public int hashCode() {
+                    return CarBean.this.components.hashCode();
+                }
+
+
+                public boolean isEmpty() {
+                    return CarBean.this.components.isEmpty();
+                }
+
+
+                public java.util.Set keySet() {
+                    return CarBean.this.components.keySet();
+                }
+
+
+                public Object put(Object k, Object v) {
+                    throw new UnsupportedOperationException();
+                }
+
+
+                public void putAll(Map t) {
+                    throw new UnsupportedOperationException();
+                }
+
+
+                public Object remove(Object k) {
+                    throw new UnsupportedOperationException();
+                }
+
+
+                public int size() {
+                    return CarBean.this.components.size();
+                }
+
+
+                public java.util.Collection values() {
+                    ArrayList result = new ArrayList();
+                    Iterator keys = keySet().iterator();
+                    while (keys.hasNext()) {
+                        result.add(get(keys.next()));
+                    }
+                    return result;
+                }
+            };
+
+    }
+
+
+    /**
+     * <p>For each entry in data, create component and cause it to be
+     * populated with values.</p>
+     */
+
+    private void initComponentsFromProperties(FacesContext context,
+                                              ResourceBundle data) {
+        Application application = context.getApplication();
+        Enumeration keys = data.getKeys();
+        String
+            key = null,
+            value = null,
+            componentType = null,
+            valueType = null;
+        UIComponent component = null;
+
+        // populate the map
+        while (keys.hasMoreElements()) {
+            key = (String) keys.nextElement();
+            if (key == null) {
+                continue;
+            }
+            // skip secondary keys.
+            if (-1 != key.indexOf("_")) {
+                continue;
+            }
+            value = data.getString(key);
+            componentType = data.getString(key + "_componentType");
+            valueType = data.getString(key + "_valueType");
+            if (log.isDebugEnabled()) {
+                log.debug("populating map for " + key + "\n" +
+                          "\n\tvalue: " + value +
+                          "\n\tcomponentType: " + componentType +
+                          "\n\tvalueType: " + valueType);
+            }
+            // create the component for this componentType
+            component = application.createComponent(componentType);
+            populateComponentWithValue(context, component, componentType,
+                                       value, valueType);
+            components.put(key, component);
+        }
+    }
+
+
+    /**
+     * <p>populate the argument component with values, being sensitive
+     * to the possible multi-nature of the values, and to the type of
+     * the values.</p>
+     */
+
+    private void populateComponentWithValue(FacesContext context,
+                                            UIComponent component,
+                                            String componentType,
+                                            String value, String valueType) {
+        Application application = context.getApplication();
+        Converter converter = null;
+        UISelectItems items = null;
+
+        // if we need a converter, and can have a converter
+        if (!valueType.equals("java.lang.String") &&
+            component instanceof ValueHolder) {
+            // if so create it,
+            try {
+                converter =
+                    application.createConverter(CarStore.loadClass(valueType,
+                                                                   this));
+            } catch (ClassNotFoundException cne) {
+                FacesMessage errMsg = MessageFactory.getMessage(
+                    CONVERTER_ERROR_MESSAGE_ID,
+                    (new Object[]{valueType}));
+                throw new IllegalStateException(errMsg.getSummary());
+            }
+            // add it to our component,
+            ((ValueHolder) component).setConverter(converter);
+        }
+
+        // if this component is a SelectOne or SelectMany, take special action
+        if (isMultiValue(componentType)) {
+            // create a UISelectItems instance
+            items = new UISelectItems();
+            items.setValue(parseStringIntoArrayList(context, component,
+                                                    value, valueType,
+                                                    converter));
+            // add it to the component
+            component.getChildren().add(items);
+        } else {
+            // we have a single value
+            if (null != converter) {
+                component.getAttributes().put("value",
+                                              converter.getAsObject(context,
+                                                                    component,
+                                                                    value));
+            } else {
+                component.getAttributes().put("value", value);
+            }
+        }
+    }
+
+
+    /**
+     * @return true if componentType starts with SelectMany or SelectOne
+     */
+    private boolean isMultiValue(String componentType) {
+        if (null == componentType) {
+            return false;
+        }
+        return (componentType.startsWith("javax.faces.SelectMany") ||
+            componentType.startsWith("javax.faces.SelectOne"));
+    }
+
+
+    /**
+     * Tokenizes the passed in String which is a comma separated string of
+     * option values that serve as keys into the main resources file.
+     * For example, optionStr could be "Disc,Drum", which corresponds to
+     * brake options available for the chosen car. This String is tokenized
+     * and used as key into the main resource file to get the localized option
+     * values and stored in the passed in ArrayList.
+     */
+    public ArrayList parseStringIntoArrayList(FacesContext context,
+                                              UIComponent component,
+                                              String value,
+                                              String valueType,
+                                              Converter converter) {
+        ArrayList optionsList = null;
+        int i = 0;
+        Object optionValue = null;
+        String
+            optionKey = null,
+            optionLabel = null;
+        Map nonLocalizedOptionValues = null;
+
+        if (value == null) {
+            return null;
+        }
+        StringTokenizer st = new StringTokenizer(value, ",");
+        optionsList = new ArrayList((st.countTokens()) + 1);
+        while (st.hasMoreTokens()) {
+            optionKey = st.nextToken();
+            try {
+                optionLabel = resources.getString(optionKey);
+            } catch (MissingResourceException e) {
+                // if we can't find a hit, the key is the label
+                optionLabel = optionKey;
+            }
+
+            if (null != converter) {
+                // PENDING deal with the converter case
+            } else {
+                optionsList.add(new SelectItem(optionKey, optionLabel));
+            }
+        }
+        return optionsList;
+    }
+
+
+    public String updatePricing() {
+        getCurrentPrice();
+        return null;
+    }
+
+
+    public Integer getCurrentPrice() {
+        // go through our options and try to get the prices
+        int sum = ((Integer) ((ValueHolder) getComponents().get("basePrice")).
+            getValue()).intValue();
+        Iterator iter = getComponents().keySet().iterator();
+        String key = null;
+        Object value = null;
+        UIComponent component = null;
+        while (iter.hasNext()) {
+            key = (String) iter.next();
+            component = (UIComponent) getComponents().get(key);
+            value = component.getAttributes().get("value");
+            if (null == value || (!(component instanceof UIInput))) {
+                continue;
+            }
+
+            // if the value is a String, see if we have priceData for it
+            if (value instanceof String) {
+                try {
+                    sum +=
+                        Integer.valueOf(priceData.getString((String) value))
+                        .intValue();
+                } catch (NumberFormatException e) {
+                }
+            }
+            // if the value is a Boolean, look up the price by name
+            else if (value instanceof Boolean &&
+                ((Boolean) value).booleanValue()) {
+                try {
+                    sum +=
+                        Integer.valueOf(priceData.getString(key)).intValue();
+                } catch (NumberFormatException e) {
+                }
+            } else if (value instanceof Number) {
+                sum += ((Number) value).intValue();
+            }
+        }
+        Integer result = new Integer(sum);
+        // store the new price into the component for currentPrice
+        ((ValueHolder) getComponents().get("currentPrice")).
+            setValue(result);
+        return result;
+    }
+
+
+    public Map getComponents() {
+        return components;
+    }
+
+
+    public Map getAttributes() {
+        return attributes;
+    }
+
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CarCustomizer.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CarCustomizer.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+
+package org.apache.cocoon.faces.samples.carstore;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+import java.util.Enumeration;
+import java.util.ResourceBundle;
+
+/**
+ * <p>A helper class that customizes a CarBean for a set of options
+ * in a package.</p>
+ *
+ * <p>This class reads its settings from a Properties file</p>
+ */
+
+public class CarCustomizer extends Object {
+
+    protected static final Log log = LogFactory.getLog(CarCustomizer.class);
+
+    //
+    // Relationship Instance Variables
+    //
+
+    private ResourceBundle bundle = null;
+
+
+    public CarCustomizer() {
+        this.init(CarStore.DEFAULT_PACKAGE_PROPERTIES);
+    }
+
+
+    public CarCustomizer(String bundleName) {
+        this.init(bundleName);
+    }
+
+
+    private void init(String bundleName) {
+        FacesContext context = FacesContext.getCurrentInstance();
+
+        if (log.isDebugEnabled()) {
+            log.debug("Loading bundle: " + bundleName + ".");
+        }
+        bundle = ResourceBundle.getBundle(bundleName);
+    }
+
+
+    private String buttonStyle = null;
+
+
+    public String getButtonStyle() {
+        return buttonStyle;
+    }
+
+
+    public void setButtonStyle(String newButtonStyle) {
+        buttonStyle = newButtonStyle;
+    }
+
+
+    public void customizeCar(CarBean toCustomize) {
+        FacesContext context = FacesContext.getCurrentInstance();
+        Enumeration keys = bundle.getKeys();
+        String
+            key = null,
+            disabledStr = null,
+            curSetting = null;
+        Boolean disabled = null;
+        UIComponent component = null;
+        Converter converter = null;
+        Object valueToSet = null;
+
+        while (keys.hasMoreElements()) {
+            key = (String) keys.nextElement();
+            // skip null and secondary keys.
+            if (key == null || -1 != key.indexOf("_")) {
+                continue;
+            }
+            // skip null values
+            if (null == (curSetting = bundle.getString(key))) {
+                continue;
+            }
+
+            // skip null components
+            if (null ==
+                (component =
+                (UIComponent) toCustomize.getComponents().get(key))) {
+                continue;
+            }
+
+            // handle the disabled setting, if necessary
+            disabled = null;
+            try {
+                if (null !=
+                    (disabledStr = bundle.getString(key + "_disabled"))) {
+                    disabled = Boolean.valueOf(disabledStr);
+                }
+            } catch (Throwable e) {
+            }
+            if (null != disabled) {
+                component.getAttributes().put("disabled", disabled);
+            }
+
+            // set the value
+            // If the component can and does have a converter
+            if (component instanceof ValueHolder &&
+                (null != (converter =
+                ((ValueHolder) component).getConverter()))) {
+                valueToSet = converter.getAsObject(context, component,
+                                                   curSetting);
+            } else {
+                valueToSet = curSetting;
+            }
+
+            if (component instanceof ValueHolder) {
+                ((ValueHolder) component).setValue(valueToSet);
+            }
+        }
+    }
+}
+
+
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CarStore.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CarStore.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,331 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+
+package org.apache.cocoon.faces.samples.carstore;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import org.apache.cocoon.faces.samples.components.components.AreaSelectedEvent;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * <p>This is the main bean for the application.  It maintains a
+ * <code>Map</code> of {@link CarBean} instances, keyed by model name,
+ * and a <code>Map</code> of {@link CarCustomizer} instances, keyed by
+ * package name.  The <code>CarBean</code> instances in the model
+ * <code>Map</code> are accessed from several pages, as described
+ * below.</p>
+ *
+ * <p>Several pages in the application use this bean as the target of
+ * method reference and value reference expressions.</p>
+ *
+ * <ul>
+ *
+ * <li><p>The "chooseLocale" page uses <code>actionListener</code>
+ * attributes to point to the {@link #chooseLocaleFromMap} and {@link
+ * #chooseLocaleFromLink} methods.</p></li>
+ *
+ * <li><p>The "storeFront" page uses value binding expressions to pull
+ * information about four of the known car models in the store.</p></li>
+ *
+ * <li><p>The "carDetail" page uses value binding expressions to pull
+ * information about the currently chosen model.  It also uses the
+ * <code>action</code> attribute to convey the user's package
+ * choices.</p></li>
+ *
+ * <li><p>The "confirmChoices" page uses value binding expressions to
+ * pull the user's choices from the currently chosen model.</p></li>
+ *
+ * </ul>
+ */
+
+public class CarStore extends Object {
+
+    protected static final Log log = LogFactory.getLog(CarStore.class);
+
+    static final String CARSTORE_PREFIX = "org.apache.cocoon.faces.samples.carstore";
+
+    static final String DEFAULT_MODEL = "Jalopy";
+
+    static final String DEFAULT_PACKAGE = "Custom";
+
+    static final String DEFAULT_MODEL_PROPERTIES = CARSTORE_PREFIX +
+        ".bundles." + DEFAULT_MODEL;
+
+    static final String DEFAULT_PACKAGE_PROPERTIES = CARSTORE_PREFIX +
+        ".bundles." + DEFAULT_PACKAGE;
+
+    //
+    // Relationship Instance Variables
+    //
+
+    /**
+     * <p>The locales to be selected for each hotspot, keyed by the
+     * alternate text for that area.</p>
+     */
+    private Map locales = null;
+
+    /**
+     * <p>The currently selected car model.</p>
+     */
+
+    private String currentModelName = DEFAULT_MODEL;
+
+    /**
+     * <p>The car models we offer.</p>
+     *
+     * <p>Keys: Strings that happen to correspond to the name of the
+     * packages.</p>
+     *
+     * <p>Values: CarBean instances</p>
+     */
+    private Map carModels = null;
+
+    /**
+     * <p>Keys: Strings that happen to correspond to the name of the
+     * Properties file for the car (without the package prefix).</p>
+     *
+     * <p>Values: CarBeanCustomizer instances</p>
+     */
+
+    private Map carCustomizers = null;
+
+
+    public CarStore() {
+        if (log.isDebugEnabled()) {
+            log.debug("Creating main CarStore bean");
+            log.debug("Populating locale map");
+        }
+        locales = new HashMap();
+        locales.put("NAmerica", Locale.ENGLISH);
+        locales.put("SAmerica", new Locale("es", "es"));
+        locales.put("Germany", Locale.GERMAN);
+        locales.put("France", Locale.FRENCH);
+    }
+
+    //
+    // ActionListener handlers
+    //
+
+    public void chooseLocaleFromMap(ActionEvent actionEvent) {
+        AreaSelectedEvent event = (AreaSelectedEvent) actionEvent;
+        String current = event.getMapComponent().getCurrent();
+        FacesContext context = FacesContext.getCurrentInstance();
+        context.getViewRoot().setLocale((Locale) locales.get(current));
+        resetMaps();
+    }
+
+
+    public void chooseLocaleFromLink(ActionEvent event) {
+        String current = event.getComponent().getId();
+        FacesContext context = FacesContext.getCurrentInstance();
+        context.getViewRoot().setLocale((Locale) locales.get(current));
+        resetMaps();
+    }
+
+
+    private void resetMaps() {
+        if (null != carModels) {
+            carModels.clear();
+            carModels = null;
+        }
+        if (null != carCustomizers) {
+            carCustomizers.clear();
+            carCustomizers = null;
+        }
+    }
+
+
+    public void choosePackage(ActionEvent event) {
+        String packageName = event.getComponent().getId();
+        choosePackage(packageName);
+    }
+
+
+    public void choosePackage(String packageName) {
+        CarCustomizer packageCustomizer =
+            (CarCustomizer) carCustomizers.get(packageName);
+        packageCustomizer.customizeCar(getCurrentModel());
+        getCurrentModel().getCurrentPrice();
+
+        // HERE IS WHERE WE UPDATE THE BUTTON STYLE!
+        String curName;
+        Iterator iter = carCustomizers.keySet().iterator();
+        // go through all the available packages and set the button
+        // style accordingly.
+        while (iter.hasNext()) {
+            curName = (String) iter.next();
+            packageCustomizer = (CarCustomizer) carCustomizers.get(curName);
+            if (curName.equals(packageName)) {
+                packageCustomizer.setButtonStyle("package-selected");
+            } else {
+                packageCustomizer.setButtonStyle("package-unselected");
+            }
+        }
+    }
+
+    //
+    // action handlers
+    //
+
+    public String storeFrontJalopyPressed() {
+        setCurrentModelName("Jalopy");
+        return "carDetail";
+    }
+
+
+    public String storeFrontRoadsterPressed() {
+        setCurrentModelName("Roadster");
+        return "carDetail";
+    }
+
+
+    public String storeFrontLuxuryPressed() {
+        setCurrentModelName("Luxury");
+        return "carDetail";
+    }
+
+
+    public String storeFrontSUVPressed() {
+        setCurrentModelName("SUV");
+        return "carDetail";
+    }
+
+
+    public String buyCurrentCar() {
+        getCurrentModel().getCurrentPrice();
+        return "confirmChoices";
+    }
+
+    //
+    // Accessors
+    //
+
+    public CarBean getCurrentModel() {
+        CarBean result = (CarBean) carModels.get(getCurrentModelName());
+        return result;
+    }
+
+
+    public Map getModels() {
+        if (null == carModels) {
+            carModels = new HashMap();
+            if (log.isDebugEnabled()) {
+                log.debug("Populating carModel map");
+            }
+            carModels.put(DEFAULT_MODEL,
+                          new CarBean(DEFAULT_MODEL_PROPERTIES));
+            carModels.put("Roadster",
+                          new CarBean(CARSTORE_PREFIX + ".bundles.Roadster"));
+            carModels.put("Luxury", new CarBean(CARSTORE_PREFIX +
+                                                ".bundles.Luxury"));
+            carModels.put("SUV", new CarBean(CARSTORE_PREFIX +
+                                             ".bundles.SUV"));
+        }
+
+        return carModels;
+    }
+
+
+    public Map getCustomizers() {
+        getModels();
+        if (null == carCustomizers) {
+            carCustomizers = new HashMap();
+            if (log.isDebugEnabled()) {
+                log.debug("Populating carCustomizers map");
+            }
+            carCustomizers.put("Custom", new CarCustomizer(CARSTORE_PREFIX +
+                                                           ".bundles.Custom"));
+            carCustomizers.put("Standard",
+                               new CarCustomizer(CARSTORE_PREFIX +
+                                                 ".bundles.Standard"));
+            carCustomizers.put("Performance",
+                               new CarCustomizer(CARSTORE_PREFIX +
+                                                 ".bundles.Performance"));
+            carCustomizers.put("Deluxe",
+                               new CarCustomizer(CARSTORE_PREFIX +
+                                                 ".bundles.Deluxe"));
+            choosePackage("Custom");
+        }
+        return carCustomizers;
+    }
+
+
+
+    //
+    // private methods
+    //
+
+    private String getCurrentModelName() {
+        return currentModelName;
+    }
+
+
+    private void setCurrentModelName(String newName) {
+        currentModelName = newName;
+    }
+
+    // package private util methods
+
+    static Class loadClass(String name,
+                           Object fallbackClass) throws ClassNotFoundException {
+        ClassLoader loader = getCurrentLoader(fallbackClass);
+        return loader.loadClass(name);
+    }
+
+
+    static ClassLoader getCurrentLoader(Object fallbackClass) {
+        ClassLoader loader =
+            Thread.currentThread().getContextClassLoader();
+        if (loader == null) {
+            loader = fallbackClass.getClass().getClassLoader();
+        }
+        return loader;
+    }
+
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CreditCardConverter.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CreditCardConverter.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,145 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.carstore;
+
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
+
+/**
+ * CreditCardConverter Class accepts a Credit Card Number of type String
+ * and strips blanks and <oode>"-"</code> if any from it. It also formats the
+ * CreditCardNumber such a blank space separates every four characters.
+ * Blanks and <oode>"-"</code> characters are the expected demiliters
+ * that could be used as part of a CreditCardNumber.
+ */
+public class CreditCardConverter implements Converter {
+
+    /**
+     * <p>The message identifier of the Message to be created if
+     * the conversion fails.  The message format string for this
+     * message may optionally include a <code>{0}</code> and
+     * <code>{1}</code> placeholders, which
+     * will be replaced by the object and value.</p>
+     */
+    public static final String CONVERSION_ERROR_MESSAGE_ID =
+        "carstore.Conversion_Error";
+
+
+    /**
+     * Parses the CreditCardNumber and strips any blanks or <oode>"-"</code>
+     * characters from it.
+     */
+    public Object getAsObject(FacesContext context, UIComponent component,
+                              String newValue) throws ConverterException {
+
+        String convertedValue = null;
+        if (newValue == null) {
+            return newValue;
+        }
+        // Since this is only a String to String conversion, this conversion
+        // does not throw ConverterException.
+        convertedValue = newValue.trim();
+        if (((convertedValue.indexOf("-")) != -1) ||
+            ((convertedValue.indexOf(" ")) != -1)) {
+            char[] input = convertedValue.toCharArray();
+            StringBuffer buffer = new StringBuffer(50);
+            for (int i = 0; i < input.length; ++i) {
+                if (input[i] == '-' || input[i] == ' ') {
+                    continue;
+                } else {
+                    buffer.append(input[i]);
+                }
+            }
+            convertedValue = buffer.toString();
+        }
+        // System.out.println("Converted value " + convertedValue);
+        return convertedValue;
+    }
+
+
+    /**
+     * Formats the value by inserting space after every four characters
+     * for better readability if they don't already exist. In the process
+     * converts any <oode>"-"</code> characters into blanks for consistency.
+     */
+    public String getAsString(FacesContext context, UIComponent component,
+                              Object value) throws ConverterException {
+
+        String inputVal = null;
+        if (value == null) {
+            return null;
+        }
+        // value must be of the type that can be cast to a String.
+        try {
+            inputVal = (String) value;
+        } catch (ClassCastException ce) {
+            FacesMessage errMsg = MessageFactory.getMessage(
+                CONVERSION_ERROR_MESSAGE_ID,
+                (new Object[]{value, inputVal}));
+            throw new ConverterException(errMsg.getSummary());
+        }
+
+        // insert spaces after every four characters for better
+        // readability if it doesn't already exist.
+        char[] input = inputVal.toCharArray();
+        StringBuffer buffer = new StringBuffer(50);
+        for (int i = 0; i < input.length; ++i) {
+            if ((i % 4) == 0 && i != 0) {
+                if (input[i] != ' ' || input[i] != '-') {
+                    buffer.append(" ");
+                    // if there any "-"'s convert them to blanks.
+                } else if (input[i] == '-') {
+                    buffer.append(" ");
+                }
+            }
+            buffer.append(input[i]);
+        }
+        String convertedValue = buffer.toString();
+        // System.out.println("Formatted value " + convertedValue);
+        return convertedValue;
+    }
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CustomerBean.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/CustomerBean.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,198 @@
+/*
+ * $Id$
+ */
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.carstore;
+
+import javax.faces.context.FacesContext;
+import javax.faces.model.SelectItem;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.ResourceBundle;
+
+public class CustomerBean extends Object {
+
+
+    String firstName = null;
+    String middleInitial = null;
+    String lastName = null;
+    String mailingAddress = null;
+    String city = null;
+    String state = null;
+    String zip = null;
+    String month = null;
+    String year = null;
+
+
+    public CustomerBean() {
+        super();
+    }
+
+
+    protected Collection titleOptions = null;
+
+
+    public Collection getTitleOptions() {
+        titleOptions = new ArrayList();
+        ResourceBundle rb = ResourceBundle.getBundle(
+            "org.apache.cocoon.faces.samples.carstore.bundles.Resources",
+            (FacesContext.getCurrentInstance().getViewRoot().getLocale()));
+        String titleStr = (String) rb.getObject("mrLabel");
+        titleOptions.add(new SelectItem(titleStr, titleStr,
+                                        titleStr));
+        titleStr = (String) rb.getObject("mrsLabel");
+        titleOptions.add(new SelectItem(titleStr, titleStr,
+                                        titleStr));
+        titleStr = (String) rb.getObject("msLabel");
+        titleOptions.add(new SelectItem(titleStr, titleStr,
+                                        titleStr));
+
+        return titleOptions;
+    }
+
+
+    public void setTitleOptions(Collection newOptions) {
+        titleOptions = new ArrayList(newOptions);
+    }
+
+
+    String title = null;
+
+
+    public void setCurrentTitle(String newTitle) {
+        title = newTitle;
+    }
+
+
+    public String getCurrentTitle() {
+        return title;
+    }
+
+
+    public void setFirstName(String first) {
+        firstName = first;
+    }
+
+
+    public String getFirstName() {
+        return firstName;
+    }
+
+
+    public void setMiddleInitial(String mI) {
+        middleInitial = mI;
+    }
+
+
+    public String getMiddleInitial() {
+        return middleInitial;
+    }
+
+
+    public void setLastName(String last) {
+        lastName = last;
+    }
+
+
+    public String getLastName() {
+        return lastName;
+    }
+
+
+    public void setMailingAddress(String mA) {
+        mailingAddress = mA;
+    }
+
+
+    public String getMailingAddress() {
+        return mailingAddress;
+    }
+
+
+    public void setCity(String cty) {
+        city = cty;
+    }
+
+
+    public String getCity() {
+        return city;
+    }
+
+
+    public void setState(String sT) {
+        state = sT;
+    }
+
+
+    public String getState() {
+        return state;
+    }
+
+
+    public void setZip(String zipCode) {
+        zip = zipCode;
+    }
+
+
+    public String getZip() {
+        return zip;
+    }
+
+
+    public void setMonth(String mth) {
+        month = mth;
+    }
+
+
+    public String getMonth() {
+        return month;
+    }
+
+
+    public void setYear(String yr) {
+        year = yr;
+    }
+
+
+    public String getYear() {
+        return year;
+    }
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/FirstNameChanged.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/FirstNameChanged.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+
+package org.apache.cocoon.faces.samples.carstore;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.PhaseId;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.event.ValueChangeListener;
+
+public class FirstNameChanged extends Object implements ValueChangeListener {
+
+    public void processValueChange(ValueChangeEvent event)
+        throws AbortProcessingException {
+        if (null != event.getNewValue()) {
+            FacesContext.getCurrentInstance().getExternalContext()
+                .getSessionMap()
+                .put("firstName", event.getNewValue());
+        }
+    }
+
+
+    public PhaseId getPhaseId() {
+        return PhaseId.ANY_PHASE;
+    }
+
+}
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/FormatValidator.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/FormatValidator.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,298 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.carstore;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIOutput;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.StringTokenizer;
+
+
+/**
+ * <p><strong>FormatValidator</strong> is a Validator that checks
+ * the validity of String representation of the value of the
+ * associated component against a list of specified patterns.</p>
+ * <ul>
+ * <li>Call getValue() to retrieve the current value of the component.
+ * If it is <code>null</code>, exit immediately.  (If null values
+ * should not be allowed, a RequiredValidator can be configured
+ * to check for this case.)</li>
+ * <li><code>formatPattern</code> is a <code>|</code> separated string
+ * of allowed patterns. </li>
+ * <li> This validator uses the following rules to match a value against a
+ * pattern.
+ * <li> if the matching pattern has a "A", then corresponding character
+ * in input value should be a letter.
+ * <li> if the matching pattern has a "9", then corresponding character
+ * in input value should be a number.
+ * <li> if the matching pattern has a "#", then corresponding character
+ * in input value should be a number or  a letter.
+ * <li> Any other character must match literally.
+ * </ul> </ul>
+ *
+ * Validators have to be Serializable, so you can't maintain a reference to
+ * a java.sql.Connection or javax.sql.DataSource inside this class in case
+ * you need to hook upto the database or some other back end resource.
+ * One approach would be to use JNDI-based data source lookups or do
+ * this verification in the business tier.
+ */
+
+public class FormatValidator implements Validator, StateHolder {
+
+
+    // ----------------------------------------------------- Manifest Constants
+
+    /**
+     * <p>The message identifier of the Message to be created if
+     * the validation fails.  The message format string for this
+     * message may optionally include a <code>{0}</code> placeholder, which
+     * will be replaced by list of format patterns.</p>
+     */
+    public static final String FORMAT_INVALID_MESSAGE_ID =
+        "carstore.Format_Invalid";
+
+    private ArrayList formatPatternsList = null;
+
+
+    //
+    // Constructors and Initializers
+    //
+    public FormatValidator() {
+        super();
+    }
+
+
+    /**
+     * <p>Construct a FormatValidator with the specified formatPatterns
+     * String. </p>
+     *
+     * @param formatPatterns <code>|</code> separated String of format patterns
+     *                       that this validator must match against.
+     */
+    public FormatValidator(String formatPatterns) {
+        super();
+        this.formatPatterns = formatPatterns;
+        parseFormatPatterns();
+    }
+
+    //
+    // General Methods
+    //
+    /**
+     * <code>|</code> separated String of format patterns
+     * that this validator must match against.
+     */
+    private String formatPatterns = null;
+
+
+    /**
+     * <p>Return the format patterns that the validator supports.
+     */
+    public String getFormatPatterns() {
+
+        return (this.formatPatterns);
+
+    }
+
+
+    /**
+     * <p>Set the format patterns that the validator support..</p>
+     *
+     * @param formatPatterns <code>|</code> separated String of format patterns
+     *                       that this validator must match against.
+     */
+    public void setFormatPatterns(String formatPatterns) {
+
+        this.formatPatterns = formatPatterns;
+        parseFormatPatterns();
+    }
+
+
+    /**
+     * Parses the <code>formatPatterns</code> into validPatterns
+     * <code>ArrayList</code>. The delimiter must be "|".
+     */
+    public void parseFormatPatterns() {
+        if (formatPatterns == null || formatPatterns.length() == 0) {
+            return;
+        }
+        if (formatPatternsList != null) {
+            // formatPatterns have been parsed already.
+            return;
+        } else {
+            formatPatternsList = new ArrayList();
+        }
+        StringTokenizer st = new StringTokenizer(formatPatterns, "|");
+        while (st.hasMoreTokens()) {
+            String token = st.nextToken();
+            formatPatternsList.add(token);
+        }
+    }
+
+
+    //
+    // Methods from Validator
+    //
+    public void validate(FacesContext context, UIComponent component,
+                         Object toValidate) {
+        boolean valid = false;
+        String value = null;
+        if ((context == null) || (component == null)) {
+            throw new NullPointerException();
+        }
+        if (!(component instanceof UIOutput)) {
+            return;
+        }
+
+        if (null == formatPatternsList || null == toValidate) {
+            return;
+        }
+
+        value = toValidate.toString();
+        // validate the value against the list of valid patterns.
+        Iterator patternIt = formatPatternsList.iterator();
+        while (patternIt.hasNext()) {
+            valid = isFormatValid(((String) patternIt.next()), value);
+            if (valid) {
+                break;
+            }
+        }
+        if (!valid) {
+            FacesMessage errMsg = MessageFactory.getMessage(context,
+                                                            FORMAT_INVALID_MESSAGE_ID,
+                                                            (new Object[]{
+                                                                formatPatterns
+                                                            }));
+            throw new ValidatorException(errMsg);
+        }
+    }
+
+
+    /**
+     * Returns true if the value matches one of the valid patterns.
+     */
+    protected boolean isFormatValid(String pattern, String value) {
+        boolean valid = true;
+        // if there is no pattern to match then value is valid
+        if (pattern == null || pattern.length() == 0) {
+            return true;
+        }
+        // if the value is null or a zero length string return false.
+        if (value == null || value.length() == 0) {
+            return false;
+        }
+        // if the length of the value is not equal to the length of the
+        // pattern string then the value is not valid.
+        if (value.length() != pattern.length()) {
+            return false;
+        }
+        value = value.trim();
+        // rules for matching.
+        // 1. if the matching pattern has a "A", then corresponding character
+        // in the value should a letter.
+        // 2. if the matching pattern has a "9", then corresponding character
+        // in the value should a number
+        // 3. if the matching pattern has a "#", then corresponding character
+        // in the value should a number or a letter
+        // 4.. any other character must match literally.
+        char[] input = value.toCharArray();
+        char[] fmtpattern = pattern.toCharArray();
+        for (int i = 0; i < fmtpattern.length; ++i) {
+            if (fmtpattern[i] == 'A') {
+                if (!(Character.isLetter(input[i]))) {
+                    valid = false;
+                }
+            } else if (fmtpattern[i] == '9') {
+                if (!(Character.isDigit(input[i]))) {
+                    valid = false;
+                }
+            } else if (fmtpattern[i] == '#') {
+                if ((!(Character.isDigit(input[i]))) &&
+                    (!(Character.isLetter(input[i])))) {
+                    valid = false;
+                }
+            } else {
+                if (!(fmtpattern[i] == input[i])) {
+                    valid = false;
+                }
+            }
+        }
+        return valid;
+
+    }
+
+
+    public Object saveState(FacesContext context) {
+        Object values[] = new Object[2];
+        values[0] = formatPatterns;
+        values[1] = formatPatternsList;
+        return (values);
+    }
+
+
+    public void restoreState(FacesContext context, Object state) {
+        Object values[] = (Object[]) state;
+        formatPatterns = (String) values[0];
+        formatPatternsList = (ArrayList) values[1];
+    }
+
+
+    private boolean transientValue = false;
+
+
+    public boolean isTransient() {
+        return (this.transientValue);
+    }
+
+
+    public void setTransient(boolean transientValue) {
+        this.transientValue = transientValue;
+    }
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/FormatValidatorTag.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/FormatValidatorTag.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,113 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.carstore;
+
+
+import org.apache.cocoon.faces.taglib.ValidatorTag;
+
+import javax.faces.validator.Validator;
+import javax.servlet.jsp.JspException;
+
+/**
+ * FormatValidatorTag is the tag handler class for FormatValidator tag,
+ * <code>format_validator</code>.
+ */
+
+public class FormatValidatorTag extends ValidatorTag {
+
+    //
+    // Protected Constants
+    //
+
+    //
+    // Class Variables
+    //
+
+    //
+    // Instance Variables
+    //
+
+    // Attribute Instance Variables
+    protected String formatPatterns = null;
+
+
+    // Relationship Instance Variables
+
+    //
+    // Constructors and Initializers
+    //
+
+    public FormatValidatorTag() {
+        super();
+    }
+
+    //
+    // Class methods
+    //
+
+    //
+    // General Methods
+    //
+
+    public String getFormatPatterns() {
+        return formatPatterns;
+    }
+
+
+    public void setFormatPatterns(String fmtPatterns) {
+        formatPatterns = fmtPatterns;
+    }
+
+    //
+    // Methods from ValidatorTag
+    //
+
+    protected Validator createValidator() {
+        setValidatorId("FormatValidator");
+        FormatValidator result = (FormatValidator) super.createValidator();
+
+        result.setFormatPatterns(formatPatterns);
+        return result;
+    }
+
+} // end of class FormatValidatorTag

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/MessageFactory.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/MessageFactory.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,269 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.carstore;
+
+import javax.faces.application.Application;
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+import java.text.MessageFormat;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * <p>supported filters: <code>package</code> and
+ * <code>protection</code>.</p>
+ */
+
+public class MessageFactory extends Object {
+
+    //
+    // Protected Constants
+    //
+
+    //
+    // Class Variables
+    //
+
+    //
+    // Instance Variables
+    //
+
+    // Attribute Instance Variables
+
+    // Relationship Instance Variables
+
+
+    //
+    // Constructors and Initializers
+    //
+
+    private MessageFactory() {
+    }
+
+    //
+    // Class methods
+    //
+
+    //
+    // General Methods
+    //
+
+    public static String substituteParams(Locale locale, String msgtext, Object params[]) {
+        String localizedStr = null;
+
+        if (params == null || msgtext == null) {
+            return msgtext;
+        }
+        StringBuffer b = new StringBuffer(100);
+        MessageFormat mf = new MessageFormat(msgtext);
+        if (locale != null) {
+            mf.setLocale(locale);
+            b.append(mf.format(params));
+            localizedStr = b.toString();
+        }
+        return localizedStr;
+    }
+
+
+    /**
+     * This version of getMessage() is used in the RI for localizing RI
+     * specific messages.
+     */
+
+    public static FacesMessage getMessage(String messageId, Object params[]) {
+        Locale locale = null;
+        FacesContext context = FacesContext.getCurrentInstance();
+        // context.getViewRoot() may not have been initialized at this point.
+        if (context != null && context.getViewRoot() != null) {
+            locale = context.getViewRoot().getLocale();
+            if (locale == null) {
+                locale = Locale.getDefault();
+            }
+        } else {
+            locale = Locale.getDefault();
+        }
+
+        return getMessage(locale, messageId, params);
+    }
+
+
+    public static FacesMessage getMessage(Locale locale, String messageId,
+                                          Object params[]) {
+        FacesMessage result = null;
+        String
+            summary = null,
+            detail = null,
+            bundleName = null;
+        ResourceBundle bundle = null;
+
+        // see if we have a user-provided bundle
+        if (null != (bundleName = getApplication().getMessageBundle())) {
+            if (null !=
+                (bundle =
+                ResourceBundle.getBundle(bundleName, locale,
+                                         getCurrentLoader(bundleName)))) {
+                // see if we have a hit
+                try {
+                    summary = bundle.getString(messageId);
+                } catch (MissingResourceException e) {
+                }
+            }
+        }
+
+        // we couldn't find a summary in the user-provided bundle
+        if (null == summary) {
+            // see if we have a summary in the app provided bundle
+            bundle = ResourceBundle.getBundle(FacesMessage.FACES_MESSAGES,
+                                              locale,
+                                              getCurrentLoader(bundleName));
+            if (null == bundle) {
+                throw new NullPointerException();
+            }
+            // see if we have a hit
+            try {
+                summary = bundle.getString(messageId);
+            } catch (MissingResourceException e) {
+            }
+        }
+
+        // we couldn't find a summary anywhere!  Return null
+        if (null == summary) {
+            return null;
+        }
+
+        // At this point, we have a summary and a bundle.
+        if (null == summary || null == bundle) {
+            throw new NullPointerException();
+        }
+        summary = substituteParams(locale, summary, params);
+
+        try {
+            detail = substituteParams(locale,
+                                      bundle.getString(messageId + "_detail"),
+                                      params);
+        } catch (MissingResourceException e) {
+        }
+
+        return (new FacesMessage(summary, detail));
+    }
+
+
+    //
+    // Methods from MessageFactory
+    //
+    public static FacesMessage getMessage(FacesContext context, String messageId) {
+        return getMessage(context, messageId, null);
+    }
+
+
+    public static FacesMessage getMessage(FacesContext context, String messageId,
+                                          Object params[]) {
+        if (context == null || messageId == null) {
+            throw new NullPointerException(
+                "One or more parameters could be null");
+        }
+        Locale locale = null;
+        // viewRoot may not have been initialized at this point.
+        if (context != null && context.getViewRoot() != null) {
+            locale = context.getViewRoot().getLocale();
+        } else {
+            locale = Locale.getDefault();
+        }
+        if (null == locale) {
+            throw new NullPointerException();
+        }
+        FacesMessage message = getMessage(locale, messageId, params);
+        if (message != null) {
+            return message;
+        }
+        locale = Locale.getDefault();
+        return (getMessage(locale, messageId, params));
+    }
+
+
+    public static FacesMessage getMessage(FacesContext context, String messageId,
+                                          Object param0) {
+        return getMessage(context, messageId, new Object[]{param0});
+    }
+
+
+    public static FacesMessage getMessage(FacesContext context, String messageId,
+                                          Object param0, Object param1) {
+        return getMessage(context, messageId, new Object[]{param0, param1});
+    }
+
+
+    public static FacesMessage getMessage(FacesContext context, String messageId,
+                                          Object param0, Object param1,
+                                          Object param2) {
+        return getMessage(context, messageId,
+                          new Object[]{param0, param1, param2});
+    }
+
+
+    public static FacesMessage getMessage(FacesContext context, String messageId,
+                                          Object param0, Object param1,
+                                          Object param2, Object param3) {
+        return getMessage(context, messageId,
+                          new Object[]{param0, param1, param2, param3});
+    }
+
+
+    protected static Application getApplication() {
+        return (FacesContext.getCurrentInstance().getApplication());
+    }
+
+
+    protected static ClassLoader getCurrentLoader(Object fallbackClass) {
+        ClassLoader loader =
+            Thread.currentThread().getContextClassLoader();
+        if (loader == null) {
+            loader = fallbackClass.getClass().getClassLoader();
+        }
+        return loader;
+    }
+
+
+} // end of class MessageFactory

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Common_options.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Common_options.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,61 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the non-localized set of options common to all cars
+
+sunroof=false
+sunroof_componentType=javax.faces.SelectBoolean
+sunroof_valueType=java.lang.Boolean
+cruisecontrol=false
+cruisecontrol_componentType=javax.faces.SelectBoolean
+cruisecontrol_valueType=java.lang.Boolean
+keylessentry=false
+keylessentry_componentType=javax.faces.SelectBoolean
+keylessentry_valueType=java.lang.Boolean
+securitySystem=false
+securitySystem_componentType=javax.faces.SelectBoolean
+securitySystem_valueType=java.lang.Boolean
+skiRack=false
+skiRack_componentType=javax.faces.SelectBoolean
+skiRack_valueType=java.lang.Boolean
+towPackage=false
+towPackage_componentType=javax.faces.SelectBoolean
+towPackage_valueType=java.lang.Boolean
+gps=false
+gps_componentType=javax.faces.SelectBoolean
+gps_valueType=java.lang.Boolean

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Custom.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Custom.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,58 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+sunroof=false
+sunroof_disabled=false
+cruisecontrol=false
+cruisecontrol_disabled=false
+keylessentry=false
+keylessentry_disabled=false
+securitySystem=false
+securitySystem_disabled=false
+skirack=false
+skirack_disabled=false
+towPackage=false
+towPackage_disabled=false
+gps=false
+gps_disabled=false
+
+engine=V4
+brake=Disc
+suspension=Regular
+speaker=4
+audio=Standard
+transmission=Manual

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Deluxe.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Deluxe.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,58 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+sunroof=true
+sunroof_disabled=false
+cruisecontrol=true
+cruisecontrol_disabled=false
+keylessentry=true
+keylessentry_disabled=false
+securitySystem=true
+securitySystem_disabled=false
+skirack=true
+skirack_disabled=false
+towPackage=true
+towPackage_disabled=false
+gps=true
+gps_disabled=false
+
+engine=V8
+brake=Drum
+suspension=Regular
+speaker=6
+audio=Premium
+transmission=Auto

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,46 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Jalopy 
+
+title=Duke's Stripped-Down Jalopy
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=If you're the type who doesn't care what anyone thinks, this is the car for you. Strictly for point-a-to-point-b types.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_de.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_de.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,46 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Jalopy 
+
+title=Dukes alte Kiste
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Wenn Sie der Typ von Mensch sind, den es nicht k\u00fcmmert, was jeder denkt, dann ist dies genau der richtige Wagen f\u00fcr Sie! Gedacht f\u00fcr Punkt-A-Nach-Punkt-B Typen. 
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_es.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_es.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,46 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Jalopy 
+
+title=El cacharro de Duke
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Este es el carro para ti si tu eres el tipo de persona de que no le importa lo que otros opinion de ti.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_fr.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_fr.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,46 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Jalopy 
+
+title=La coccinelle de Duke
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Si l'opinion des autres ne vous d\u00e9range pas, c'est l'automobile qu'il vous faut.  Id\u00e9al pous vous permettre d'aller du point A au point B.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_options.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Jalopy_options.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,71 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the non-localized set of options for the Jalopy
+
+basePrice=10750
+basePrice_componentType=javax.faces.Output
+basePrice_valueType=java.lang.Integer
+currentPrice=10750
+currentPrice_componentType=javax.faces.Output
+currentPrice_valueType=java.lang.Integer
+brake=Disc,Drum
+brake_componentType=javax.faces.SelectOne
+brake_valueType=java.lang.String
+suspension=Performance,Regular
+suspension_componentType=javax.faces.SelectOne
+suspension_valueType=java.lang.String
+audio=Standard,Premium
+audio_componentType=javax.faces.SelectOne
+audio_valueType=java.lang.String
+transmission=Auto,Manual
+transmission_componentType=javax.faces.SelectOne
+transmission_valueType=java.lang.String
+image=images/200x168_Jalopy.jpg
+image_componentType=javax.faces.Graphic
+image_valueType=java.lang.String
+imageSmall=images/150x126_Jalopy.jpg
+imageSmall_componentType=javax.faces.Graphic
+imageSmall_valueType=java.lang.String
+engine=V4,V6
+engine_componentType=javax.faces.SelectOne
+engine_valueType=java.lang.String
+speaker=4,6
+speaker_componentType=javax.faces.SelectOne
+speaker_valueType=java.lang.String
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,47 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Luxury
+
+
+title=Duke's Vulgar Luxury Car
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Those Joneses next door have everything, don't they? Well, show them that you're the one pulling in the big bucks by driving up in this loaded chassis.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_de.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_de.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,47 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Luxury
+
+title=Dukes geschmacklose Luxus-Limosine
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Diese Meiers von nebenan haben Alles, nicht war? Nun, zeigen Sie denen mal, dass bei Ihnen der Rubel rollt und fahren Sie mit diesem \u00fcberladenen Chassis vorbei.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_es.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_es.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,47 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Luxury
+
+title=El carro delujo de Duke.
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Los vecinos Delgados tienen de todo, cierto? Bien tu les puedes ense\u00f1ar de que ganas mas dinero cuando compres y manejes este carro.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_fr.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_fr.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,47 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Luxury
+
+title=La luxueuse de Duke
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Les Lamotte font l'envie de tous parce qu'ils possedent tout? C'est maintenant votre chance d'attirer les regards d�s que vous serez au volant de cette voiture sublime.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_options.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Luxury_options.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,70 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the non-localized set of options for the Luxury
+
+basePrice=20700
+basePrice_componentType=javax.faces.Output
+basePrice_valueType=java.lang.Integer
+currentPrice=20700
+currentPrice_componentType=javax.faces.Output
+currentPrice_valueType=java.lang.Integer
+image=images/200x168_Luxury.jpg
+image_componentType=javax.faces.Graphic
+image_valueType=java.lang.String
+imageSmall=images/150x126_Luxury.jpg
+imageSmall_componentType=javax.faces.Graphic
+imageSmall_valueType=java.lang.String
+brake=Disc,Drum
+brake_componentType=javax.faces.SelectOne
+brake_valueType=java.lang.String
+suspension=Performance,Regular
+suspension_componentType=javax.faces.SelectOne
+suspension_valueType=java.lang.String
+audio=Standard,Premium
+audio_componentType=javax.faces.SelectOne
+audio_valueType=java.lang.String
+transmission=Auto,Manual
+transmission_componentType=javax.faces.SelectOne
+transmission_valueType=java.lang.String
+engine=V4,V6,V8
+engine_componentType=javax.faces.SelectOne
+engine_valueType=java.lang.String
+speaker=4,6
+speaker_componentType=javax.faces.SelectOne
+speaker_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,41 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+carstore.Format_Invalid=Input must match one of the following patterns {0}
+carstore.Conversion_Error=Conversion Error setting value '{0}' for '{1}'
+carstore.Converter_Error=Converter Not Found for identifier: '{0}'

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages_de.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages_de.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,41 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+carstore.Format_Invalid=Eingang mu\u00df eins der folgenden Muster zusammenbringen {0}
+carstore.Conversion_Error=Konvertierungs-Fehler: Wert '{0}' f\u00fcr Modell '{1}'
+carstore.Converter_Error=Konverter gefunden nicht f�r Bezeichner: '{0}'

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages_es.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages_es.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,41 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+carstore.Format_Invalid=La entrada debe emparejar uno de los patrones siguientes {0}
+carstore.Conversion_Error=Error de conversion en el valor puesto '{0}' del modelo '{1}'
+carstore.Converter_Error=Convertidor no encontrado para el identificador: '{0}'

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages_fr.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Messages_fr.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,41 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+carstore.Format_Invalid=L'entr\u00e9 doit assortir un des mod'les suivants {0}
+carstore.Conversion_Error=Erreur de conversion quand la valeur '{0}' est commise pour le mod\u00e9le '{1}'
+carstore.Converter_Error=Convertisseur non trouv� pour la marque: '{0}'

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/OptionPrices.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/OptionPrices.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,58 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+V4=100
+V6=200
+V8=300
+Disc=100
+Drum=200
+Regular=150
+Performance=300
+4=100
+6=200
+Standard=100
+Premium=200
+Auto=300
+Manual=200
+sunroof=100
+cruisecontrol=150
+keylessentry=100
+skirack=200
+securitySystem=100
+skiRack=200
+towPackage=200
+gps=200

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Performance.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Performance.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,58 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+sunroof=true
+sunroof_disabled=true
+cruisecontrol=true
+cruisecontrol_disabled=true
+keylessentry=true
+keylessentry_disabled=true
+securitySystem=false
+securitySystem_disabled=true
+skirack=true
+skirack_disabled=true
+towPackage=true
+towPackage_disabled=true
+gps=false
+gps_disabled=true
+
+engine=V8
+brake=Drum
+suspension=Performance
+speaker=6
+audio=Premium
+transmission=Manual

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,119 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+#
+# Resources common to the entire app.
+#
+
+moreButton=More
+
+chooseLocale=Choose Your Preferred Locale From the Map
+
+chooseCar=Which car would you like to buy?
+
+carDetails=Here are the details for your car.
+
+basePriceLabel=Base Price
+yourPriceLabel=Your Price 
+OptionsPackages=Options and Packages
+
+Package=Package
+Custom=Custom
+Deluxe=Deluxe
+
+Engine=Engine
+
+Brakes=Brakes
+Disc=disc
+Drum=drum
+
+Suspension=Suspension
+Regular=regular
+Performance=performance
+
+Speakers=Speakers
+
+Audio=Audio
+Standard=Standard
+Premium=premium
+
+Transmission=Transmission
+Auto=auto
+Manual=manual
+
+OtherOptions=Other Options
+
+sunroofLabel=Sunroof
+cruiseLabel=Cruise Control
+keylessLabel=Keyless Entry
+securityLabel=Security System
+skiRackLabel=Ski Rack
+towPkgLabel=Tow Package
+gpsLabel=GPS
+buy=Buy
+back=Back
+buyLabel=Thanks for stopping by!
+
+recalculate=Recalculate
+buyTitle=You have chosen the following options:
+configureButton=Reconfigure
+customerTitle=Please fill in your name and address.
+
+titleLabel=Title
+mrLabel=Mr.
+msLabel=Ms.
+mrsLabel=Mrs.
+firstLabel=First Name
+middleLabel=Middle Initial
+lastLabel=Last Name
+mailingLabel=Mailing Address
+cityLabel=City
+stateLabel=State
+zipLabel=Zip Code
+ccNumberLabel=Credit Card Number
+monthLabel=Expiry Date
+finishButton=Finish
+errorLabel=An Error Happened!
+thanksLabel=Thanks, {0}, for using CarStore! Your car will ship soon.
+
+outputMessageKey=bundle param 0: {0} bundle param: 1 {1} bundle param: 2 {2}
+
+english=English
+german=German
+spanish=Spanish
+french=French

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_de.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_de.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,116 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+carDetails=Here are the details for your car.
+
+moreButton=Mehr
+
+chooseLocale=W\u00e4hlen Sie Ihren bevorzugten Standort aus der Karte.
+
+basePriceLabel=Basis-Preis
+yourPriceLabel=Ihr Preis 
+OptionsPackages=Optionen und Pakete
+
+Package=Package
+Custom=Kundenspezifisch
+Deluxe=Deluxe
+
+Engine=Motor
+
+Brakes=Bremsen
+Disc=Scheibenbremse
+Drum=Trommelbremse
+
+Suspension=Aufh\u00e4ngung
+Regular=regul\u00e4r
+Performance=Leistung
+ 
+Speakers=Lautsprecher
+
+Audio=Audio
+Standard=Standard 
+Premium=Premium
+
+Transmission=Getriebe
+Auto=automatisch
+Manual=manuell
+
+OtherOptions=Andere Optionen
+
+sunroofLabel=Sonnendach
+cruiseLabel=Tempomat
+keylessLabel=Zentralverriegelung mit Fernbedienung
+securityLabel=Sicherheits-System
+skiRackLabel=Ski-Tr\u00e4ger
+towPkgLabel=Abschleppkabel
+gpsLabel=GPS
+buy=Kaufen
+back=Zur\u00fck
+buyLabel=Vielen Dank!
+
+recalculate=berechnen
+buyTitle=Sie haben die folgenden Optionen gew\u00e4hlt:
+configureButton=Neu Konfigurieren
+customerTitle=Bitte f\u00fcllen Sie Name und Adresse aus.
+
+titleLabel=Titel
+mrLabel=Herr
+msLabel=Frau 
+mrsLabel=Fr\u00e4ulein
+firstLabel=Vorname
+middleLabel=Mittlerer Initial
+lastLabel=Nachname
+mailingLabel=Adresse 
+cityLabel=Stadt
+stateLabel=Bundesstaat
+zipLabel=Postleizahl
+ccNumberLabel=Keditkarten-Nummer
+monthLabel=G\u00fcltig bis 
+finishButton=Ende
+errorLabel=Es ist ein Fehler aufgetreten! 
+thanksLabel=Vielen Dank, {0}, dass Sie die CarStore benutzt haben! Ihr Wagen wird bald geliefert...
+
+outputMessageKey=bundle param 0: {0} bundle param: 1 {1} bundle param: 2 {2}
+
+stockLabel=Traurig, ist Sonne-Dach f\u00FCr Jalopy momentan nicht vorr\u00E4tig.\ 
+chooseCar=Which car would you like to buy?
+
+english=English
+german=Deutsch
+spanish=Espanol
+french=Francais

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_en.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_en.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,119 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+#
+# Resources common to the entire app.
+#
+
+moreButton=More
+
+chooseLocale=Choose Your Preferred Locale From the Map
+
+chooseCar=Which car would you like to buy?
+
+carDetails=Here are the details for your car.
+
+basePriceLabel=Base Price
+yourPriceLabel=Your Price 
+OptionsPackages=Options and Packages
+
+Package=Package
+Custom=Custom
+Deluxe=Deluxe
+
+Engine=Engine
+
+Brakes=Brakes
+Disc=disc
+Drum=drum
+
+Suspension=Suspension
+Regular=regular
+Performance=performance
+
+Speakers=Speakers
+
+Audio=Audio
+Standard=Standard
+Premium=premium
+
+Transmission=Transmission
+Auto=auto
+Manual=manual
+
+OtherOptions=Other Options
+
+sunroofLabel=Sunroof
+cruiseLabel=Cruise Control
+keylessLabel=Keyless Entry
+securityLabel=Security System
+skiRackLabel=Ski Rack
+towPkgLabel=Tow Package
+gpsLabel=GPS
+buy=Buy
+back=Back
+buyLabel=Thanks for stopping by!
+
+recalculate=Recalculate
+buyTitle=You have chosen the following options:
+configureButton=Reconfigure
+customerTitle=Please fill in your name and address.
+
+titleLabel=Title
+mrLabel=Mr.
+msLabel=Ms.
+mrsLabel=Mrs.
+firstLabel=First Name
+middleLabel=Middle Initial
+lastLabel=Last Name
+mailingLabel=Mailing Address
+cityLabel=City
+stateLabel=State
+zipLabel=Zip Code
+ccNumberLabel=Credit Card Number
+monthLabel=Expiry Date
+finishButton=Finish
+errorLabel=An Error Happened!
+thanksLabel=Thanks, {0}, for using CarStore! Your car will ship soon.
+
+outputMessageKey=bundle param 0: {0} bundle param: 1 {1} bundle param: 2 {2}
+
+english=English
+german=German
+spanish=Spanish
+french=French

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_es.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_es.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,187 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+carDetails=Here are the details for your car.
+
+moreButton=M\u00e1s
+
+
+
+chooseLocale=Escoje tu sitio favorito del mapa 
+
+
+
+basePriceLabel=Precio base
+
+yourPriceLabel=Tu precio 
+
+OptionsPackages=Paquete de opci\u00f3nes
+
+
+
+Custom=personalizado a tu gusto
+
+Deluxe=delujo
+
+Package=paquete
+
+
+
+Engine=Motor
+
+
+
+Brakes=Frenos
+
+Disc=Disco de frenos
+
+Drum=Tambor de frenos
+
+
+
+Suspension=suspensi\u00f3n
+
+Regular=Regular
+
+Performance=Redimiento
+
+
+
+Speakers=Bocinas
+
+
+
+Audio=Equipo de sonido
+
+Standard=Est\u00e1ndar
+
+Premium=Superior
+
+
+
+Transmission=Transmisi\u00f3n
+
+Auto=Transmisi\u00f3n   Automatica
+
+Manual=Transmisi\u00f3n  Manual
+
+
+
+OtherOptions=Otras opci\u00f3nes
+
+
+
+sunroofLabel=techo corredizo
+
+cruiseLabel=control de velocidad constante
+
+keylessLabel=sistema de entrada sin llaves a control remoto
+
+securityLabel=Sistema de seguridad
+
+skiRackLabel=Porta esquis
+
+towPkgLabel=Paquete para remolque
+
+gpsLabel=Sistema de posicionamiento global
+
+buy=Comprar
+back=Regresar
+
+buyLabel=Gracias por visitamos!
+
+
+
+recalculate=Calcular de nuevo
+
+buyTitle=Tu has escojido las siguientes opci\u00f3nes: 
+
+configureButton=Reconfigurar
+
+customerTitle=Por favor complete su nombre y direcci\u00f3n.
+
+
+
+titleLabel=T\u00edtulo
+
+mrLabel=Se\u00f1or
+
+msLabel=Srta.
+
+mrsLabel=Sra.
+
+firstLabel=Primer Nombre
+
+middleLabel=Segundo Nombre
+
+lastLabel=Apellido
+
+mailingLabel=Dirrecci\u00f3n
+
+cityLabel=Ciudad
+
+stateLabel=Estado
+
+zipLabel=C\u00f3digo postal
+
+ccNumberLabel=Numero de carta de cr\u00e9dito
+
+monthLabel=Fecha de expiraci\u00f3n
+
+finishButton=Terminar
+
+errorLabel=Un error de sucedio
+
+thanksLabel=Gracias, {0}, para usar CarStore! Tu carro enviado pronto.
+
+
+
+outputMessageKey=bundle param 0: {0} bundle param: 1 {1} bundle param: 2 {2}
+
+
+
+
+
+
+stockLabel=Apesadumbrada, la azotea del sol para Jalopy est\u00E1 actualmente fuera de acci\u00F3n.\ 
+chooseCar=Which car would you like to buy?
+
+english=English
+german=Deutsch
+spanish=Espanol
+french=Francais

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_fr.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Resources_fr.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,116 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+carDetails=Here are the details for your car.
+
+moreButton=Plus
+
+chooseLocale=Choisissez votre locale pr\u00e9f\u00e9r\u00e9e avec la carte g\u00e9ographique
+
+basePriceLabel=Prix de Base
+yourPriceLabel=Votre Prix 
+OptionsPackages=Options
+
+Package=Pack
+Custom=Sp\u00e9cifique
+Deluxe=Grand Confort
+
+Engine=Moteur
+
+Brakes=Freins
+Disc=disque
+Drum=tambour
+
+Suspension=Suspension
+Regular=r\u00e9gulier
+Performance=performance
+
+Speakers=Hauts-parleurs
+
+Audio=Audio
+Standard=standard
+Premium=premium
+
+Transmission=Transmission
+Auto=automatique
+Manual=manuelle
+
+OtherOptions=Autres Options
+
+sunroofLabel=Toit Ouvrant
+cruiseLabel=R\u00e9gulateur de Vitesse
+keylessLabel=Entr\u00e9e sans clef
+securityLabel=Syst\u00e8me de s\u00e9curit\u00e9
+skiRackLabel=Porte Skis
+towPkgLabel=Remorquage
+gpsLabel=Syst\u00e8me de navigation par satellite
+buy=Acheter
+back=retourner
+buyLabel=Merci de nous visiter!
+
+recalculate=Recalculer
+buyTitle=Vous avez s\u00e9lectionn\u00e9 les options suivantes:
+configureButton=Reconfigurer
+customerTitle=S.V.P., sp\u00e9cifiez votre nom et adresse.
+
+titleLabel=Titre
+mrLabel=M.
+msLabel=Mlle
+mrsLabel=Mme
+firstLabel=Pr\u00e9nom
+middleLabel=Initiale
+lastLabel=Nom de Famille
+mailingLabel=Adresse
+cityLabel=Ville
+stateLabel=Province
+zipLabel=Code Postal
+ccNumberLabel=Num\u00e9ro de carte de cr\u00e9dit
+monthLabel=Date d'expiration
+finishButton=Terminer
+errorLabel=Il s'est produit une erreur!
+thanksLabel=Merci d utiliser, {0}, D\u00e9moVoiture! Votre automobile arrivera bient\u00f4t.
+
+outputMessageKey=bundle param 0: {0} bundle param: 1 {1} bundle param: 2 {2}
+
+stockLabel=D\u00E9sol\u00E9, le toit du soleil pour Jalopy est actuellement hors des actions.\ 
+chooseCar=Which car would you like to buy?
+
+english=English
+german=Deutsch
+spanish=Espanol
+french=Francais

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,46 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Roadster
+
+title=Duke's MLC Roadster
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Getting on in years? Need to make one last-ditch grasp at youth?  You'll feel 20 years younger when step behind the wheel of this baby.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_de.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_de.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,47 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the Roadster
+
+title=Duke's MLC Roadster
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Kommen Sie in die Jahre? Wollen Sie nicht noch mal nach der Jugend greifen? Sie f\u00fchlen sich 20 Jahre j\u00fcnger, wenn Sie sich hinter das Lenkrad dieses Babies setzen.
+destcription_componentType=javax.faces.Output
+destcription_valueType=java.lang.String
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_es.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_es.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,43 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+title=El coche MLC de Duke.
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Te sientes como que los a\u00f1os se estan acumulando? Te quieres sentir como adolecente de Nuevo? Tu te vas a sentir como un nuevo joven una vez mas te montes en  este autom\u00d3vil.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_fr.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_fr.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,46 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+title=La sportive de Duke
+
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=On vieillit? On aimerait revivre cette jeunesse pass\u00e9e? Rajeunissez de 20 ans au volant de cette petite merveille.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_options.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Roadster_options.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,71 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the non-localized set of options for the Roadster
+
+
+basePrice=15700
+basePrice_componentType=javax.faces.Output
+basePrice_valueType=java.lang.Integer
+currentPrice=15700
+currentPrice_componentType=javax.faces.Output
+currentPrice_valueType=java.lang.Integer
+image=images/200x168_Roadster.jpg
+image_componentType=javax.faces.Graphic
+image_valueType=java.lang.String
+imageSmall=images/150x126_Roadster.jpg
+imageSmall_componentType=javax.faces.Graphic
+imageSmall_valueType=java.lang.String
+brake=Disc,Drum
+brake_componentType=javax.faces.SelectOne
+brake_valueType=java.lang.String
+suspension=Performance,Regular
+suspension_componentType=javax.faces.SelectOne
+suspension_valueType=java.lang.String
+audio=Standard,Premium
+audio_componentType=javax.faces.SelectOne
+audio_valueType=java.lang.String
+transmission=Auto,Manual
+transmission_componentType=javax.faces.SelectOne
+transmission_valueType=java.lang.String
+engine=V4,V6,V8
+engine_componentType=javax.faces.SelectOne
+engine_valueType=java.lang.String
+speaker=4,6
+speaker_componentType=javax.faces.SelectOne
+speaker_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,47 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the SUV
+
+
+title=Duke's Bloated SUV
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Sometimes you can never be high enough or big enough compared to the car next to you. And those newborns come out bigger every time. Get the SUV that will hold everything and scare the begeezes out of everyone on the road.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_de.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_de.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,47 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the SUV
+
+title=Dukes aufgeblasener Gel\u00e4ndewagen
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Manchmal k\u00f6nnen Sie niemels hoch oder gro\u00df genug sein, verglichen mit dem Wagen neben Ihnen. Und diese Welpen kommen jedesmal gr\u00fc\u00dfer raus. Nehmen Sie diesen Gel\u00e4ndewagen, der allem standh\u00e4lt und jeden auf der Stra\u00dfe beeindruckt.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_es.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_es.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,47 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the SUV
+
+title=El enorme carro SUV de Duke
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Hay muchas veces de que uno nunca puede tener un carro mas grande de que el carro ala par de uno. Compra el SUV mas grande para poder poner todas las cosas que quiras y asustar a todos que se aproximen a tu SUV.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_fr.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_fr.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,47 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the localized content for the SUV
+
+title=Le SUV de Duke
+title_componentType=javax.faces.Output
+title_valueType=java.lang.String
+description=Que ce soit en hauteur ou en grosseur, vous voulez surpasser toutes les voitures sur la route? Les rejetons grandissent trop vite? Vous devez vous procurer ce v\u00e9hicule utilitaire qui regorge d'espace pour asseoir tout le monde confortablement en plus de demander le respect de quiconque s'aventure sur la route avec vous.
+description_componentType=javax.faces.Output
+description_valueType=java.lang.String
+

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_options.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/SUV_options.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,70 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+
+# this file contains the non-localized set of options for the SUV
+
+basePrice=25000
+basePrice_componentType=javax.faces.Output
+basePrice_valueType=java.lang.Integer
+currentPrice=25000
+currentPrice_componentType=javax.faces.Output
+currentPrice_valueType=java.lang.Integer
+image=images/200x168_SUV.jpg
+image_componentType=javax.faces.Graphic
+image_valueType=java.lang.String
+imageSmall=images/150x126_SUV.jpg
+imageSmall_componentType=javax.faces.Graphic
+imageSmall_valueType=java.lang.String
+brake=Disc,Drum
+brake_componentType=javax.faces.SelectOne
+brake_valueType=java.lang.String
+suspension=Performance,Regular
+suspension_componentType=javax.faces.SelectOne
+suspension_valueType=java.lang.String
+audio=Standard,Premium
+audio_componentType=javax.faces.SelectOne
+audio_valueType=java.lang.String
+transmission=Auto,Manual
+transmission_componentType=javax.faces.SelectOne
+transmission_valueType=java.lang.String
+engine=V4,V6,V8
+engine_componentType=javax.faces.SelectOne
+engine_valueType=java.lang.String
+speaker=4,6
+speaker_componentType=javax.faces.SelectOne
+speaker_valueType=java.lang.String

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Standard.properties
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/carstore/bundles/Standard.properties	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,58 @@
+#
+# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+# 
+# Redistribution and use in source and binary forms, with or
+# without modification, are permitted provided that the following
+# conditions are met:
+# 
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# 
+# - Redistribution in binary form must reproduce the above
+#   copyright notice, this list of conditions and the following
+#   disclaimer in the documentation and/or other materials
+#   provided with the distribution.
+#    
+# Neither the name of Sun Microsystems, Inc. or the names of
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#  
+# This software is provided "AS IS," without a warranty of any
+# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+#  
+# You acknowledge that this software is not designed, licensed or
+# intended for use in the design, construction, operation or
+# maintenance of any nuclear facility.
+#
+sunroof=true
+sunroof_disabled=true
+cruisecontrol=true
+cruisecontrol_disabled=true
+keylessentry=true
+keylessentry_disabled=true
+securitySystem=false
+securitySystem_disabled=true
+skirack=true
+skirack_disabled=true
+towPackage=false
+towPackage_disabled=true
+gps=false
+gps_disabled=true
+
+engine=V4
+brake=Disc
+suspension=Regular
+speaker=4
+audio=Standard
+transmission=Auto

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/AreaComponent.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/AreaComponent.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,216 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.components;
+
+
+import org.apache.cocoon.faces.samples.components.model.ImageArea;
+
+import javax.faces.component.UIOutput;
+import javax.faces.context.FacesContext;
+
+import java.io.IOException;
+
+
+/**
+ * <p>{@link AreaComponent} is a JavaServer Faces component that represents
+ * a particular hotspot in a client-side image map defined by our parent
+ * {@link MapComponent}.  The <code>valueRef</code> property (if present)
+ * must point at a JavaBean of type <code>org.apache.cocoon.faces.samples.components.model.ImageArea</code>;
+ * if not present, an <code>ImageArea</code> instance will be synthesized
+ * from the values of the <code>alt</code>, <code>coords</code>, and
+ * <code>shape</code> properties, and assigned to the <code>value</code>
+ * property.</p>
+ */
+
+public class AreaComponent extends UIOutput {
+
+
+    // ------------------------------------------------------ Instance Variables
+
+
+    private String alt = null;
+    private String coords = null;
+    private String shape = null;
+    private String targetImage = null;
+
+
+
+    // -------------------------------------------------------------- Properties
+
+
+    /**
+     * <p>Return the alternate text for our synthesized {@link ImageArea}.</p>
+     */
+    public String getAlt() {
+        return (this.alt);
+    }
+
+
+    /**
+     * <p>Set the alternate text for our synthesized {@link ImageArea}.</p>
+     *
+     * @param alt The new alternate text
+     */
+    public void setAlt(String alt) {
+        this.alt = alt;
+    }
+
+
+    /**
+     * <p>Return the hotspot coordinates for our synthesized {@link ImageArea}.
+     * </p>
+     */
+    public String getCoords() {
+        return (this.coords);
+    }
+
+
+    /**
+     * <p>Set the hotspot coordinates for our synthesized {@link ImageArea}.</p>
+     *
+     * @param coords The new coordinates
+     */
+    public void setCoords(String coords) {
+        this.coords = coords;
+    }
+
+
+    /**
+     * <p>Return the shape for our synthesized {@link ImageArea}.</p>
+     */
+    public String getShape() {
+        return (this.shape);
+    }
+
+
+    /**
+     * <p>Set the shape for our synthesized {@link ImageArea}.</p>
+     *
+     * @param shape The new shape (default, rect, circle, poly)
+     */
+    public void setShape(String shape) {
+        this.shape = shape;
+    }
+
+
+    /**
+     * <p>Set the image that is the target of this <code>AreaComponent</code>.</p>
+     *
+     * @return the target image of this area component.
+     */
+    public String getTargetImage() {
+        return targetImage;
+    }
+
+
+    /**
+     * <p>Set the image that is the target of this <code>AreaComponent</code>.</p>
+     *
+     * @param targetImage the ID of the target of this <code>AreaComponent</code>
+     */
+    public void setTargetImage(String targetImage) {
+        this.targetImage = targetImage;
+    }
+
+
+    /**
+     * <p>Return the component family for this component.</p>
+     */
+    public String getFamily() {
+
+        return ("Area");
+
+    }
+
+    // -------------------------------------------------------- UIOutput Methods
+
+
+    /**
+     * <p>Synthesize and return an {@link ImageArea} bean for this hotspot,
+     * if there is no <code>valueRef</code> property on this component.</p>
+     */
+    public Object getValue() {
+
+        if (super.getValue() == null) {
+            setValue(new ImageArea(getAlt(), getCoords(), getShape()));
+        }
+        return (super.getValue());
+
+    }
+
+
+    // ----------------------------------------------------- StateHolder Methods
+
+
+    /**
+     * <p>Return the state to be saved for this component.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     */
+
+    public Object saveState(FacesContext context) {
+        Object values[] = new Object[5];
+        values[0] = super.saveState(context);
+        values[1] = alt;
+        values[2] = coords;
+        values[3] = shape;
+        values[4] = targetImage;
+        return (values);
+    }
+
+
+    /**
+     * <p>Restore the state for this component.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     * @param state   State to be restored
+     *
+     * @throws IOException if an input/output error occurs
+     */
+    public void restoreState(FacesContext context, Object state) {
+        Object values[] = (Object[]) state;
+        super.restoreState(context, values[0]);
+        alt = (String) values[1];
+        coords = (String) values[2];
+        shape = (String) values[3];
+        targetImage = (String) values[4];
+    }
+
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/AreaSelectedEvent.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/AreaSelectedEvent.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,81 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.components;
+
+
+import javax.faces.event.ActionEvent;
+
+
+/**
+ * <p>An {@link ActionEvent} indicating that the specified {@link AreaComponent}
+ * has just become the currently selected hotspot within the source
+ * {@link MapComponent}.</p>
+ */
+
+public class AreaSelectedEvent extends ActionEvent {
+
+    // ------------------------------------------------------------ Constructors
+
+
+    /**
+     * <p>Construct a new {@link AreaSelectedEvent} from the specified
+     * source map.</p>
+     *
+     * @param map The {@link MapComponent} originating this event
+     */
+    public AreaSelectedEvent(MapComponent map) {
+        super(map);
+    }
+
+
+    // -------------------------------------------------------------- Properties
+
+
+    /**
+     * <p>Return the {@link MapComponent} of the map for which an area
+     * was selected.</p>
+     */
+    public MapComponent getMapComponent() {
+        return ((MapComponent) getComponent());
+    }
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/AreaSelectedListener.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/AreaSelectedListener.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,65 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.components;
+
+
+import javax.faces.event.FacesListener;
+
+
+/**
+ * <p>{@link AreaSelectedListener} defines an event listener interested in
+ * {@link AreaSelectedEvent}s from a {@link MapComponent}.</p>
+ */
+
+public interface AreaSelectedListener extends FacesListener {
+
+
+    /**
+     * <p>Process the specified event.</p>
+     *
+     * @param event The event to be processed
+     */
+    public void processAreaSelected(AreaSelectedEvent event);
+
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/MapComponent.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/components/MapComponent.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,250 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.components;
+
+
+import javax.faces.component.UICommand;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.PhaseId;
+
+import java.io.IOException;
+
+/**
+ * <p>{@link MapComponent} is a JavaServer Faces component that corresponds
+ * to a client-side image map.  It can have one or more children of type
+ * {@link AreaComponent}, each representing hot spots, which a user can
+ * click on and mouse over.</p>
+ *
+ * <p>This component is a source of {@link AreaSelectedEvent} events,
+ * which are fired whenever the current area is changed.</p>
+ */
+
+public class MapComponent extends UICommand {
+
+
+    // ------------------------------------------------------ Instance Variables
+
+
+    private String current = null;
+
+    private MethodBinding action = null;
+    private MethodBinding actionListener = null;
+    private boolean immediate = false;
+    private boolean immediateSet = false;
+
+
+
+    // --------------------------------------------------------------Constructors
+
+    public MapComponent() {
+        super();
+        addDefaultActionListener(getFacesContext());
+    }
+
+
+    // -------------------------------------------------------------- Properties
+
+
+    /**
+     * <p>Return the alternate text label for the currently selected
+     * child {@link AreaComponent}.</p>
+     */
+    public String getCurrent() {
+        return (this.current);
+    }
+
+
+    /**
+     * <p>Set the alternate text label for the currently selected child.
+     * If this is different from the previous value, fire an
+     * {@link AreaSelectedEvent} to interested listeners.</p>
+     *
+     * @param current The new alternate text label
+     */
+    public void setCurrent(String current) {
+
+        String previous = this.current;
+        this.current = current;
+
+        // Fire an {@link AreaSelectedEvent} if appropriate
+        if ((previous == null) && (current == null)) {
+            return;
+        } else if ((previous != null) && (current != null) &&
+            (previous.equals(current))) {
+            return;
+        } else {
+            this.queueEvent(new AreaSelectedEvent(this));
+        }
+
+    }
+
+
+    /**
+     * <p>Return the component family for this component.</p>
+     */
+    public String getFamily() {
+
+        return ("Map");
+
+    }
+
+    // ----------------------------------------------------- Event Methods
+
+    private static Class signature[] = {AreaSelectedEvent.class};
+
+
+    /**
+     * <p>In addition to to the default <code>UIComponentBase#broadcast</code>
+     * processing, pass the {@link ActionEvent} being broadcast to the
+     * method referenced by <code>actionListener</code> (if any).</p>
+     *
+     * @param event   {@link FacesEvent} to be broadcast
+     *
+     * @throws AbortProcessingException Signal the JavaServer Faces
+     *                                  implementation that no further processing on the current event
+     *                                  should be performed
+     * @throws IllegalArgumentException if the implementation class
+     *                                  of this {@link FacesEvent} is not supported by this component
+     * @throws IllegalStateException    if PhaseId.ANY_PHASE is passed
+     *                                  for the phase identifier
+     * @throws NullPointerException     if <code>event</code> is
+     *                                  <code>null</code>
+     */
+    public void broadcast(FacesEvent event) throws AbortProcessingException {
+
+        // Perform standard superclass processing
+        super.broadcast(event);
+
+        // Notify the specified action listener method (if any)
+        MethodBinding mb = getActionListener();
+        if (mb != null) {
+            if ((isImmediate() &&
+                event.getPhaseId().equals(PhaseId.APPLY_REQUEST_VALUES)) ||
+                (!isImmediate() &&
+                event.getPhaseId().equals(PhaseId.INVOKE_APPLICATION))) {
+                FacesContext context = getFacesContext();
+                mb.invoke(context, new Object[]{event});
+            }
+        }
+
+    }
+
+
+    /**
+     * <p>Intercept <code>queueEvent</code> and mark the phaseId for the
+     * event to be <code>PhaseId.APPLY_REQUEST_VALUES</code> if the
+     * <code>immediate</code> flag is true,
+     * <code>PhaseId.INVOKE_APPLICATION</code> otherwise.</p>
+     */
+
+    public void queueEvent(FacesEvent e) {
+        if (e instanceof ActionEvent) {
+            if (isImmediate()) {
+                e.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+            } else {
+                e.setPhaseId(PhaseId.INVOKE_APPLICATION);
+            }
+        }
+        super.queueEvent(e);
+    }
+
+    // ----------------------------------------------------- StateHolder Methods
+
+
+    /**
+     * <p>Return the state to be saved for this component.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     */
+    public Object saveState(FacesContext context) {
+        removeDefaultActionListener(context);
+        Object values[] = new Object[6];
+        values[0] = super.saveState(context);
+        values[1] = current;
+        values[2] = saveAttachedState(context, action);
+        values[3] = saveAttachedState(context, actionListener);
+        values[4] = immediate ? Boolean.TRUE : Boolean.FALSE;
+        values[5] = immediateSet ? Boolean.TRUE : Boolean.FALSE;
+        addDefaultActionListener(context);
+        return (values);
+    }
+
+
+    /**
+     * <p>Restore the state for this component.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     * @param state   State to be restored
+     *
+     * @throws IOException if an input/output error occurs
+     */
+    public void restoreState(FacesContext context, Object state) {
+        removeDefaultActionListener(context);
+        Object values[] = (Object[]) state;
+        super.restoreState(context, values[0]);
+        current = (String) values[1];
+        action = (MethodBinding) restoreAttachedState(context, values[2]);
+        actionListener = (MethodBinding) restoreAttachedState(context,
+                                                              values[3]);
+        immediate = ((Boolean) values[4]).booleanValue();
+        immediateSet = ((Boolean) values[5]).booleanValue();
+        addDefaultActionListener(context);
+    }
+
+    // ----------------------------------------------------- Private Methods
+
+    // Add the default action listener
+    private void addDefaultActionListener(FacesContext context) {
+        ActionListener listener =
+            context.getApplication().getActionListener();
+        addActionListener(listener);
+    }
+
+
+    // Remove the default action listener
+    private void removeDefaultActionListener(FacesContext context) {
+        removeActionListener(context.getApplication().getActionListener());
+    }
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/model/ImageArea.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/model/ImageArea.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,145 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.model;
+
+
+import java.io.Serializable;
+
+
+/**
+ * <p>{@link ImageArea} is a JavaBean that represents a hotspot in an
+ * image map.  Within a particular image map, no two hotspots may have
+ * the same alternate text, because this is treated as a key.</p>
+ */
+
+public class ImageArea implements Serializable {
+
+
+    // ------------------------------------------------------------ Constructors
+
+
+    /**
+     * <p>Construct an uninitialized {@link ImageArea} instance.</p>
+     */
+    public ImageArea() {
+    }
+
+
+    /**
+     * <p>Construct an {@link ImageArea} initialized with the specified
+     * property values.</p>
+     *
+     * @param alt    Alternate text for this hotspot
+     * @param coords Coordinate positions for this hotspot
+     * @param shape  Shape of this hotspot (default, rect, circle, poly)
+     */
+    public ImageArea(String alt, String coords, String shape) {
+        setAlt(alt);
+        setCoords(coords);
+        setShape(shape);
+    }
+
+
+    // -------------------------------------------------------------- Properties
+
+
+    private String alt = null;
+
+
+    /**
+     * <p>Return the alternate text for this hotspot.</p>
+     */
+    public String getAlt() {
+        return (this.alt);
+    }
+
+
+    /**
+     * <p>Set the alternate text for this hotspot.</p>
+     *
+     * @param alt The new alternate text
+     */
+    public void setAlt(String alt) {
+        this.alt = alt;
+    }
+
+
+    private String coords = null;
+
+
+    /**
+     * <p>Return the coordinate positions for this hotspot.</p>
+     */
+    public String getCoords() {
+        return (this.coords);
+    }
+
+
+    /**
+     * <p>Set the coordinate positions for this hotspot.</p>
+     *
+     * @param coords The new coordinate positions
+     */
+    public void setCoords(String coords) {
+        this.coords = coords;
+    }
+
+
+    private String shape = null;
+
+
+    /**
+     * <p>Return the shape for this hotspot.</p>
+     */
+    public String getShape() {
+        return (this.shape);
+    }
+
+
+    /**
+     * <p>Set the shape for this hotspot.</p>
+     *
+     * @param shape The new shape
+     */
+    public void setShape(String shape) {
+        this.shape = shape;
+    }
+
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/AreaRenderer.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/AreaRenderer.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,200 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.renderkit;
+
+
+import org.apache.cocoon.faces.samples.components.components.AreaComponent;
+import org.apache.cocoon.faces.samples.components.components.MapComponent;
+import org.apache.cocoon.faces.samples.components.model.ImageArea;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import java.io.IOException;
+
+
+/**
+ * This class converts the internal representation of a <code>UIArea</code>
+ * component into the output stream associated with the response to a
+ * particular request.
+ */
+
+public class AreaRenderer extends BaseRenderer {
+
+
+    // -------------------------------------------------------- Renderer Methods
+
+
+    /**
+     * <p>No decoding is required.</p>
+     *
+     * @param context   <code>FacesContext</code>for the current request
+     * @param component <code>UIComponent</code> to be decoded
+     */
+    public void decode(FacesContext context, UIComponent component) {
+
+        if ((context == null) || (component == null)) {
+            throw new NullPointerException();
+        }
+
+    }
+
+
+    /**
+     * <p>No begin encoding is required.</p>
+     *
+     * @param context   <code>FacesContext</code>for the current request
+     * @param component <code>UIComponent</code> to be decoded
+     */
+    public void encodeBegin(FacesContext context, UIComponent component)
+        throws IOException {
+
+        if ((context == null) || (component == null)) {
+            throw new NullPointerException();
+        }
+
+    }
+
+
+    /**
+     * <p>No children encoding is required.</p>
+     *
+     * @param context   <code>FacesContext</code>for the current request
+     * @param component <code>UIComponent</code> to be decoded
+     */
+    public void encodeChildren(FacesContext context, UIComponent component)
+        throws IOException {
+
+        if ((context == null) || (component == null)) {
+            throw new NullPointerException();
+        }
+
+    }
+
+
+    /**
+     * <p>Encode this component.</p>
+     *
+     * @param context   <code>FacesContext</code>for the current request
+     * @param component <code>UIComponent</code> to be decoded
+     */
+    public void encodeEnd(FacesContext context, UIComponent component)
+        throws IOException {
+
+        if ((context == null) || (component == null)) {
+            throw new NullPointerException();
+        }
+        AreaComponent area = (AreaComponent) component;
+        String targetImageId =
+            area.findComponent(area.getTargetImage()).getClientId(context);
+        ImageArea iarea = (ImageArea) area.getValue();
+        ResponseWriter writer = context.getResponseWriter();
+        StringBuffer sb = null;
+
+        writer.startElement("area", area);
+        writer.writeAttribute("alt", iarea.getAlt(), "alt");
+        writer.writeAttribute("coords", iarea.getCoords(), "coords");
+        writer.writeAttribute("shape", iarea.getShape(), "shape");
+        // PENDING(craigmcc) - onmouseout only works on first form of a page
+        sb =
+            new StringBuffer("document.forms[0]['").append(targetImageId)
+            .append("'].src='");
+        sb.append(
+            getURI(context, (String) area.getAttributes().get("onmouseout")));
+        sb.append("'");
+        writer.writeAttribute("onmouseout", sb.toString(), "onmouseout");
+        // PENDING(craigmcc) - onmouseover only works on first form of a page
+        sb =
+            new StringBuffer("document.forms[0]['").append(targetImageId)
+            .append("'].src='");
+        sb.append(
+            getURI(context, (String) area.getAttributes().get("onmouseover")));
+        sb.append("'");
+        writer.writeAttribute("onmouseover", sb.toString(), "onmouseover");
+        // PENDING(craigmcc) - onclick only works on first form of a page
+        sb = new StringBuffer("document.forms[0]['");
+        sb.append(getName(context, area));
+        sb.append("'].value='");
+        sb.append(iarea.getAlt());
+        sb.append("'; document.forms[0].submit()");
+        writer.writeAttribute("onclick", sb.toString(), "value");
+        writer.endElement("area");
+
+    }
+
+
+    // --------------------------------------------------------- Private Methods
+
+
+    /**
+     * <p>Return the calculated name for the hidden input field.</p>
+     *
+     * @param context   Context for the current request
+     * @param component Component we are rendering
+     */
+    private String getName(FacesContext context, UIComponent component) {
+        while (component != null) {
+            if (component instanceof MapComponent) {
+                return (component.getId() + "_current");
+            }
+            component = component.getParent();
+        }
+        throw new IllegalArgumentException();
+    }
+
+
+    /**
+     * <p>Return the path to be passed into JavaScript for the specified
+     * value.</p>
+     *
+     * @param context Context for the current request
+     * @param value   Partial path to be (potentially) modified
+     */
+    private String getURI(FacesContext context, String value) {
+        if (value.startsWith("/")) {
+            return (context.getExternalContext().getRequestContextPath() +
+                value);
+        } else {
+            return (value);
+        }
+    }
+
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/BaseRenderer.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/BaseRenderer.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,135 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.renderkit;
+
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.render.Renderer;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * <p>Convenient base class for <code>Renderer</code> implementations.</p>
+ */
+
+public abstract class BaseRenderer extends Renderer {
+
+    public static final String BUNDLE_ATTR = "com.sun.faces.bundle";
+
+
+    public String convertClientId(FacesContext context, String clientId) {
+        return clientId;
+    }
+
+    /*
+     * NOTE: Commented out to remove JSTL dependency.
+    protected String getKeyAndLookupInBundle(FacesContext context,
+                                             UIComponent component,
+                                             String keyAttr)
+        throws MissingResourceException {
+        String key = null, bundleName = null;
+        ResourceBundle bundle = null;
+
+        key = (String) component.getAttributes().get(keyAttr);
+        bundleName = (String) component.getAttributes().get(BUNDLE_ATTR);
+
+        // if the bundleName is null for this component, it might have
+        // been set on the root component.
+        if (bundleName == null) {
+            UIComponent root = context.getViewRoot();
+
+            bundleName = (String) root.getAttributes().get(BUNDLE_ATTR);
+        }
+        // verify our component has the proper attributes for key and bundle.
+        if (null == key || null == bundleName) {
+            throw new MissingResourceException("Can't load JSTL classes",
+                                               bundleName, key);
+        }
+
+        // verify the required Class is loadable
+        // PENDING(edburns): Find a way to do this once per ServletContext.
+        if (null == Thread.currentThread().getContextClassLoader().
+            getResource("javax.servlet.jsp.jstl.fmt.LocalizationContext")) {
+            Object[] params = {
+                "javax.servlet.jsp.jstl.fmt.LocalizationContext"
+            };
+            throw new MissingResourceException("Can't load JSTL classes",
+                                               bundleName, key);
+        }
+
+        // verify there is a ResourceBundle in scoped namescape.
+        javax.servlet.jsp.jstl.fmt.LocalizationContext locCtx = null;
+        if (null == (locCtx = (javax.servlet.jsp.jstl.fmt.LocalizationContext)
+            (Util.getValueBinding(bundleName)).getValue(context)) ||
+            null == (bundle = locCtx.getResourceBundle())) {
+            throw new MissingResourceException("Can't load ResourceBundle ",
+                                               bundleName, key);
+        }
+
+        return bundle.getString(key);
+    }
+    */
+
+    protected void encodeRecursive(FacesContext context, UIComponent component)
+        throws IOException {
+
+        component.encodeBegin(context);
+        if (component.getRendersChildren()) {
+            component.encodeChildren(context);
+        } else {
+            Iterator kids = component.getChildren().iterator();
+            while (kids.hasNext()) {
+                UIComponent kid = (UIComponent) kids.next();
+                encodeRecursive(context, kid);
+            }
+        }
+        component.encodeEnd(context);
+
+    }
+
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/ConstantMethodBinding.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/ConstantMethodBinding.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,98 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+// BuildComponentFromTagImpl.java
+
+package org.apache.cocoon.faces.samples.components.renderkit;
+
+import javax.faces.component.StateHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+
+public class ConstantMethodBinding extends MethodBinding
+    implements StateHolder {
+
+    private String outcome = null;
+
+
+    public ConstantMethodBinding() {
+    }
+
+
+    public ConstantMethodBinding(String yourOutcome) {
+        outcome = yourOutcome;
+    }
+
+
+    public Object invoke(FacesContext context, Object params[]) {
+        return outcome;
+    }
+
+
+    public Class getType(FacesContext context) {
+        return String.class;
+    }
+
+    // ----------------------------------------------------- StateHolder Methods
+
+    public Object saveState(FacesContext context) {
+        return outcome;
+    }
+
+
+    public void restoreState(FacesContext context, Object state) {
+        outcome = (String) state;
+    }
+
+
+    private boolean transientFlag = false;
+
+
+    public boolean isTransient() {
+        return (this.transientFlag);
+    }
+
+
+    public void setTransient(boolean transientFlag) {
+        this.transientFlag = transientFlag;
+    }
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/MapRenderer.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/MapRenderer.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,177 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.renderkit;
+
+
+import org.apache.cocoon.faces.samples.components.components.MapComponent;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import java.io.IOException;
+
+
+/**
+ * <p>Renderer for {@link MapComponent} in an HTML environment.</p>
+ */
+
+public class MapRenderer extends BaseRenderer {
+
+
+    // -------------------------------------------------------- Renderer Methods
+
+
+    /**
+     * <p>Decode the incoming request parameters to determine which
+     * hotspot (if any) has been selected.</p>
+     *
+     * @param context   <code>FacesContext</code>for the current request
+     * @param component <code>UIComponent</code> to be decoded
+     */
+    public void decode(FacesContext context, UIComponent component) {
+
+        if ((context == null) || (component == null)) {
+            throw new NullPointerException();
+        }
+        MapComponent map = (MapComponent) component;
+
+        String key = getName(context, map);
+        String value = (String)
+            context.getExternalContext().getRequestParameterMap().get(key);
+        if (value != null) {
+            map.setCurrent(value);
+        }
+
+    }
+
+
+    /**
+     * <p>Encode the beginning of this component.</p>
+     *
+     * @param context   <code>FacesContext</code>for the current request
+     * @param component <code>UIComponent</code> to be decoded
+     */
+    public void encodeBegin(FacesContext context, UIComponent component)
+        throws IOException {
+
+        if ((context == null) || (component == null)) {
+            throw new NullPointerException();
+        }
+        MapComponent map = (MapComponent) component;
+        ResponseWriter writer = context.getResponseWriter();
+
+        writer.startElement("map", map);
+        writer.writeAttribute("name", map.getId(), "id");
+
+    }
+
+
+    /**
+     * <p>Encode the children of this component.</p>
+     *
+     * @param context   <code>FacesContext</code>for the current request
+     * @param component <code>UIComponent</code> to be decoded
+     */
+    public void encodeChildren(FacesContext context, UIComponent component)
+        throws IOException {
+
+        if ((context == null) || (component == null)) {
+            throw new NullPointerException();
+        }
+
+    }
+
+
+    /**
+     * <p>Encode the ending of this component.</p>
+     *
+     * @param context   <code>FacesContext</code>for the current request
+     * @param component <code>UIComponent</code> to be decoded
+     */
+    public void encodeEnd(FacesContext context, UIComponent component)
+        throws IOException {
+
+        if ((context == null) || (component == null)) {
+            throw new NullPointerException();
+        }
+        MapComponent map = (MapComponent) component;
+        ResponseWriter writer = context.getResponseWriter();
+
+        writer.startElement("input", map);
+        writer.writeAttribute("type", "hidden", null);
+        writer.writeAttribute("name", getName(context, map), "clientId");
+        writer.endElement("input");
+        writer.endElement("map");
+
+    }
+
+
+    // --------------------------------------------------------- Private Methods
+
+
+    /**
+     * <p>Return the calculated name for the hidden input field.</p>
+     *
+     * @param context   Context for the current request
+     * @param component Component we are rendering
+     */
+    private String getName(FacesContext context, UIComponent component) {
+        return (component.getId() + "_current");
+    }
+
+
+    /**
+     * <p>Return the context-relative path for the current page.</p>
+     *
+     * @param context Context for the current request
+     */
+    private String getURI(FacesContext context) {
+
+        StringBuffer sb = new StringBuffer();
+        sb.append(context.getExternalContext().getRequestContextPath());
+        // PENDING(craigmcc) - will need to change if this is generalized
+        sb.append("/faces");
+        sb.append(context.getViewRoot().getViewId());
+        return (sb.toString());
+
+    }
+
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/Util.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/renderkit/Util.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,340 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+// Util.java
+
+package org.apache.cocoon.faces.samples.components.renderkit;
+
+import javax.faces.FactoryFinder;
+import javax.faces.application.Application;
+import javax.faces.application.ApplicationFactory;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+
+import java.util.Locale;
+
+/**
+ * <B>Util</B> is a class which houses common functionality used by
+ * other classes.
+ *
+ * @version $Id$
+ */
+
+public class Util extends Object {
+
+//
+// Protected Constants
+//
+
+//
+// Class Variables
+//
+
+    /**
+     * This array contains attributes that have a boolean value in JSP,
+     * but have have no value in HTML.  For example "disabled" or
+     * "readonly". <P>
+     *
+     * @see #renderBooleanPassthruAttributes
+     */
+
+    private static String booleanPassthruAttributes[] = {
+        "disabled",
+        "readonly",
+        "ismap"
+    };
+
+    /**
+     * This array contains attributes whose value is just rendered
+     * straight to the content.  This array should only contain
+     * attributes that require no interpretation by the Renderer.  If an
+     * attribute requires interpretation by a Renderer, it should be
+     * removed from this array.<P>
+     *
+     * @see #renderPassthruAttributes
+     */
+    private static String passthruAttributes[] = {
+        "accesskey",
+        "alt",
+        "cols",
+        "height",
+        "lang",
+        "longdesc",
+        "maxlength",
+        "onblur",
+        "onchange",
+        "onclick",
+        "ondblclick",
+        "onfocus",
+        "onkeydown",
+        "onkeypress",
+        "onkeyup",
+        "onload",
+        "onmousedown",
+        "onmousemove",
+        "onmouseout",
+        "onmouseover",
+        "onmouseup",
+        "onreset",
+        "onselect",
+        "onsubmit",
+        "onunload",
+        "rows",
+        "size",
+        "tabindex",
+        //"class",   PENDING(rlubke)  revisit this for JSFA105
+        "title",
+        "style",
+        "width",
+        "dir",
+        "rules",
+        "frame",
+        "border",
+        "cellspacing",
+        "cellpadding",
+        "summary",
+        "bgcolor",
+        "usemap",
+        "enctype",
+        "accept-charset",
+        "accept",
+        "target",
+        "onsubmit",
+        "onreset"
+    };
+
+    private static long id = 0;
+
+
+//
+// Instance Variables
+//
+
+// Attribute Instance Variables
+
+// Relationship Instance Variables
+
+//
+// Constructors and Initializers
+//
+
+    private Util() {
+        throw new IllegalStateException();
+    }
+
+//
+// Class methods
+//
+    public static Class loadClass(String name) throws ClassNotFoundException {
+        ClassLoader loader =
+            Thread.currentThread().getContextClassLoader();
+        if (loader == null) {
+            return Class.forName(name);
+        } else {
+            return loader.loadClass(name);
+        }
+    }
+
+
+    /**
+     * Generate a new identifier currently used to uniquely identify
+     * components.
+     */
+    public static synchronized String generateId() {
+        if (id == Long.MAX_VALUE) {
+            id = 0;
+        } else {
+            id++;
+        }
+        return Long.toHexString(id);
+    }
+
+
+    /**
+     * NOTE: Commented out to remove JSTL dependency.
+     * 
+     * Return a Locale instance using the following algorithm: <P>
+     *
+     * <UL>
+     *
+     * <LI>
+     *
+     * If this component instance has an attribute named "bundle",
+     * interpret it as a model reference to a LocalizationContext
+     * instance accessible via FacesContext.getModelValue().
+     *
+     * </LI>
+     *
+     * <LI>
+     *
+     * If FacesContext.getModelValue() returns a LocalizationContext
+     * instance, return its Locale.
+     *
+     * </LI>
+     *
+     * <LI>
+     *
+     * If FacesContext.getModelValue() doesn't return a
+     * LocalizationContext, return the FacesContext's Locale.
+     *
+     * </LI>
+     *
+     * </UL>
+
+    public static Locale
+        getLocaleFromContextOrComponent(FacesContext context,
+                                        UIComponent component) {
+        Locale result = null;
+        String bundleName = null, bundleAttr = "bundle";
+
+//	ParameterCheck.nonNull(context);
+//	ParameterCheck.nonNull(component);
+
+        // verify our component has the proper attributes for bundle.
+        if (null !=
+            (bundleName = (String) component.getAttributes().get(bundleAttr))) {
+            // verify there is a Locale for this modelReference
+            javax.servlet.jsp.jstl.fmt.LocalizationContext locCtx = null;
+            if (null != (locCtx =
+                (javax.servlet.jsp.jstl.fmt.LocalizationContext)
+                (Util.getValueBinding(bundleName)).getValue(context))) {
+                result = locCtx.getLocale();
+//		Assert.assert_it(null != result);
+            }
+        }
+        if (null == result) {
+            result = context.getViewRoot().getLocale();
+        }
+
+        return result;
+    }
+     */
+
+
+    /**
+     * Render any boolean "passthru" attributes.
+     * <P>
+     *
+     * @see passthruAttributes
+     */
+
+    public static String renderBooleanPassthruAttributes(FacesContext context,
+                                                         UIComponent component) {
+        int i = 0, len = booleanPassthruAttributes.length;
+        String value;
+        boolean thisIsTheFirstAppend = true;
+        StringBuffer renderedText = new StringBuffer();
+
+        for (i = 0; i < len; i++) {
+            if (null != (value = (String)
+                component.getAttributes().get(booleanPassthruAttributes[i]))) {
+                if (thisIsTheFirstAppend) {
+                    // prepend ' '
+                    renderedText.append(' ');
+                    thisIsTheFirstAppend = false;
+                }
+                if (Boolean.valueOf(value).booleanValue()) {
+                    renderedText.append(booleanPassthruAttributes[i] + ' ');
+                }
+            }
+        }
+
+        return renderedText.toString();
+    }
+
+
+    /**
+     * Render any "passthru" attributes, where we simply just output the
+     * raw name and value of the attribute.  This method is aware of the
+     * set of HTML4 attributes that fall into this bucket.  Examples are
+     * all the javascript attributes, alt, rows, cols, etc.  <P>
+     *
+     * @return the rendererd attributes as specified in the component.
+     *         Padded with leading and trailing ' '.  If there are no passthru
+     *         attributes in the component, return the empty String.
+     *
+     * @see passthruAttributes
+     */
+
+    public static String renderPassthruAttributes(FacesContext context,
+                                                  UIComponent component) {
+        int i = 0, len = passthruAttributes.length;
+        String value;
+        boolean thisIsTheFirstAppend = true;
+        StringBuffer renderedText = new StringBuffer();
+
+        for (i = 0; i < len; i++) {
+            if (null != (value = (String)
+                component.getAttributes().get(passthruAttributes[i]))) {
+                if (thisIsTheFirstAppend) {
+                    // prepend ' '
+                    renderedText.append(' ');
+                    thisIsTheFirstAppend = false;
+                }
+                renderedText.append(passthruAttributes[i] + "=\"" + value +
+                                    "\" ");
+            }
+        }
+
+        return renderedText.toString();
+    }
+
+
+    public static ValueBinding getValueBinding(String valueRef) {
+        ApplicationFactory af = (ApplicationFactory)
+            FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
+        Application a = af.getApplication();
+        return (a.createValueBinding(valueRef));
+    }
+
+
+    public static MethodBinding createConstantMethodBinding(String outcome) {
+        return new ConstantMethodBinding(outcome);
+    }
+
+//
+// General Methods
+//
+
+} // end of class Util

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/taglib/AreaTag.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/taglib/AreaTag.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,204 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.taglib;
+
+import org.apache.cocoon.faces.FacesUtils;
+import org.apache.cocoon.faces.taglib.UIComponentTag;
+import org.apache.cocoon.faces.samples.components.components.AreaComponent;
+import org.apache.cocoon.faces.samples.components.renderkit.Util;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.ValueHolder;
+
+
+/**
+ * <p>{@link UIComponentTag} for an image map hotspot.</p>
+ */
+
+public class AreaTag extends UIComponentTag {
+
+
+    private String alt = null;
+
+
+    public void setAlt(String alt) {
+        this.alt = alt;
+    }
+
+
+    private String targetImage = null;
+
+
+    public void setTargetImage(String targetImage) {
+        this.targetImage = targetImage;
+    }
+
+
+    private String coords = null;
+
+
+    public void setCoords(String coords) {
+        this.coords = coords;
+    }
+
+
+    private String onmouseout = null;
+
+
+    public void setOnmouseout(String newonmouseout) {
+        onmouseout = newonmouseout;
+    }
+
+
+    private String onmouseover = null;
+
+
+    public void setOnmouseover(String newonmouseover) {
+        onmouseover = newonmouseover;
+    }
+
+
+    private String shape = null;
+
+
+    public void setShape(String shape) {
+        this.shape = shape;
+    }
+
+
+    private String styleClass = null;
+
+
+    public void setStyleClass(String styleClass) {
+        this.styleClass = styleClass;
+    }
+
+
+    private String value = null;
+
+
+    public void setValue(String newValue) {
+        value = newValue;
+    }
+
+
+    public String getComponentType() {
+        return ("DemoArea");
+    }
+
+
+    public String getRendererType() {
+        return ("DemoArea");
+    }
+
+
+    public void recycle() {
+        super.recycle();
+        this.alt = null;
+        this.coords = null;
+        this.onmouseout = null;
+        this.onmouseover = null;
+        this.shape = null;
+        this.styleClass = null;
+        this.value = null;
+    }
+
+
+    protected void setProperties(UIComponent component) {
+        super.setProperties(component);
+        AreaComponent area = (AreaComponent) component;
+        if (alt != null) {
+            if (FacesUtils.isExpression(alt)) {
+                area.setValueBinding("alt", Util.getValueBinding(alt));
+            } else {
+                area.getAttributes().put("alt", alt);
+            }
+        }
+        if (coords != null) {
+            if (FacesUtils.isExpression(coords)) {
+                area.setValueBinding("coords", Util.getValueBinding(coords));
+            } else {
+                area.getAttributes().put("coords", coords);
+            }
+        }
+        if (onmouseout != null) {
+            if (FacesUtils.isExpression(onmouseout)) {
+                area.setValueBinding("onmouseout",
+                                     Util.getValueBinding(onmouseout));
+            } else {
+                area.getAttributes().put("onmouseout", onmouseout);
+            }
+        }
+        if (onmouseover != null) {
+            if (FacesUtils.isExpression(onmouseover)) {
+                area.setValueBinding("onmouseover",
+                                     Util.getValueBinding(onmouseover));
+            } else {
+                area.getAttributes().put("onmouseover", onmouseover);
+            }
+        }
+        if (shape != null) {
+            if (FacesUtils.isExpression(shape)) {
+                area.setValueBinding("shape", Util.getValueBinding(shape));
+            } else {
+                area.getAttributes().put("shape", shape);
+            }
+        }
+        if (styleClass != null) {
+            if (FacesUtils.isExpression(styleClass)) {
+                area.setValueBinding("styleClass",
+                                     Util.getValueBinding(styleClass));
+            } else {
+                area.getAttributes().put("styleClass", styleClass);
+            }
+        }
+        if (area instanceof ValueHolder) {
+            ValueHolder valueHolder = (ValueHolder) component;
+            if (value != null) {
+                if (FacesUtils.isExpression(value)) {
+                    area.setValueBinding("value", Util.getValueBinding(value));
+                } else {
+                    valueHolder.setValue(value);
+                }
+            }
+        }
+        // target image is required
+        area.setTargetImage(targetImage);
+    }
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/taglib/MapTag.java
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/java/org/apache/cocoon/faces/samples/components/taglib/MapTag.java	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,176 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+package org.apache.cocoon.faces.samples.components.taglib;
+
+
+import org.apache.cocoon.faces.FacesUtils;
+import org.apache.cocoon.faces.taglib.UIComponentTag;
+import org.apache.cocoon.faces.samples.components.components.MapComponent;
+import org.apache.cocoon.faces.samples.components.renderkit.Util;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.MethodBinding;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.ActionEvent;
+
+
+/**
+ * <p>{@link UIComponentTag} for an image map.</p>
+ */
+
+public class MapTag extends UIComponentTag {
+
+
+    private String current = null;
+
+
+    public void setCurrent(String current) {
+        this.current = current;
+    }
+
+
+    private String actionListener = null;
+
+
+    public void setActionListener(String actionListener) {
+        this.actionListener = actionListener;
+    }
+
+
+    private String action = null;
+
+
+    public void setAction(String action) {
+        this.action = action;
+    }
+
+
+    private String immediate = null;
+
+
+    public void setImmediate(String immediate) {
+        this.immediate = immediate;
+    }
+
+
+    private String styleClass = null;
+
+
+    public void setStyleClass(String styleClass) {
+        this.styleClass = styleClass;
+    }
+
+
+    public String getComponentType() {
+        return ("DemoMap");
+    }
+
+
+    public String getRendererType() {
+        return ("DemoMap");
+    }
+
+
+    public void recycle() {
+        super.recycle();
+        current = null;
+        styleClass = null;
+        actionListener = null;
+        action = null;
+        immediate = null;
+        styleClass = null;
+    }
+
+
+    protected void setProperties(UIComponent component) {
+        super.setProperties(component);
+        MapComponent map = (MapComponent) component;
+        //        if (current != null) {
+        //            map.setCurrent(current);
+        //        }
+        if (styleClass != null) {
+            if (FacesUtils.isExpression(styleClass)) {
+                ValueBinding vb = FacesContext.getCurrentInstance()
+                    .getApplication().
+                    createValueBinding(styleClass);
+                map.setValueBinding("styleClass", vb);
+            } else {
+                map.getAttributes().put("styleClass", styleClass);
+            }
+        }
+        if (actionListener != null) {
+            if (FacesUtils.isExpression(actionListener)) {
+                Class args[] = {ActionEvent.class};
+                MethodBinding mb = FacesContext.getCurrentInstance()
+                    .getApplication()
+                    .createMethodBinding(actionListener, args);
+                map.setActionListener(mb);
+            } else {
+                Object params [] = {actionListener};
+                throw new javax.faces.FacesException();
+            }
+        }
+
+        if (action != null) {
+            if (FacesUtils.isExpression(action)) {
+                MethodBinding vb = FacesContext.getCurrentInstance()
+                    .getApplication()
+                    .createMethodBinding(action, null);
+                map.setAction(vb);
+            } else {
+                map.setAction(Util.createConstantMethodBinding(action));
+            }
+        }
+        if (immediate != null) {
+            if (FacesUtils.isExpression(immediate)) {
+                ValueBinding vb = FacesContext.getCurrentInstance()
+                    .getApplication().
+                    createValueBinding(immediate);
+                map.setValueBinding("immediate", vb);
+            } else {
+                boolean _immediate = new Boolean(immediate).booleanValue();
+                map.setImmediate(_immediate);
+            }
+        }
+
+    }
+
+
+}

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/bottomMatter.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/bottomMatter.xml	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ 
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+ 
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ 
+ - Redistribution in binary form must reproduce the above
+   copyright notice, this list of conditions and the following
+   disclaimer in the documentation and/or other materials
+   provided with the distribution.
+    
+ Neither the name of Sun Microsystems, Inc. or the names of
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+  
+ This software is provided "AS IS," without a warranty of any
+ kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+  
+ You acknowledge that this software is not designed, licensed or
+ intended for use in the design, construction, operation or
+ maintenance of any nuclear facility.
+-->
+
+<f:subview xmlns:f="http://java.sun.com/jsf/core"
+           xmlns:h="http://java.sun.com/jsf/html"
+           id="bottom">
+
+  <h:outputLink value="javadocs">
+     <f:verbatim>Documentation for this demo</f:verbatim>
+  </h:outputLink>
+
+</f:subview>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/carDetail.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/carDetail.xml	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,93 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistribution in binary form must reproduce the above
+   copyright notice, this list of conditions and the following
+   disclaimer in the documentation and/or other materials
+   provided with the distribution.
+
+ Neither the name of Sun Microsystems, Inc. or the names of
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ This software is provided "AS IS," without a warranty of any
+ kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ You acknowledge that this software is not designed, licensed or
+ intended for use in the design, construction, operation or
+ maintenance of any nuclear facility.
+-->
+
+<html xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:i="http://apache.org/cocoon/include/1.0">
+  <head>
+    <title>CarStore</title>
+    <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+  </head>
+
+  <f:loadBundle basename="org.apache.cocoon.faces.samples.carstore.bundles.Resources" var="bundle"/>
+
+  <body bgcolor="white">
+    <f:view>
+      <h:form>
+        <!-- non-option details -->
+        <h:panelGrid columns="1"
+                     summary="#{bundle.carDetails}"
+                     title="#{bundle.carDetails}">
+
+          <h:graphicImage url="images/cardemo.jpg" />
+          <h:graphicImage binding="#{carstore.currentModel.components.image}" />
+
+          <h:outputText styleClass="subtitlebig"
+                        binding="#{carstore.currentModel.components.title}" />
+          <h:outputText binding="#{carstore.currentModel.components.description}" />
+
+          <h:panelGrid columns="2">
+            <h:outputText styleClass="subtitle"
+                          value="#{bundle.basePriceLabel}" />
+            <h:outputText binding="#{carstore.currentModel.components.basePrice}" />
+
+            <h:outputText styleClass="subtitle"
+                          value="#{bundle.yourPriceLabel}" />
+
+            <h:outputText value="#{carstore.currentModel.currentPrice}" />
+          </h:panelGrid>
+
+          <h:commandButton action="#{carstore.buyCurrentCar}"
+                           value="#{bundle.buy}" />
+        </h:panelGrid>
+
+        <i:include src="optionsPanel.xml"/>
+
+        <h:commandButton value="#{bundle.recalculate}"
+                         action="#{carstore.currentModel.updatePricing}" />
+
+        <h:commandButton action="#{carstore.buyCurrentCar}"
+                         value="#{bundle.buy}" />
+      </h:form>
+
+      <i:include src="bottomMatter.xml"/>
+    </f:view>
+  </body>
+</html>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/chooseLocale.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/chooseLocale.xml	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,161 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistribution in binary form must reproduce the above
+   copyright notice, this list of conditions and the following
+   disclaimer in the documentation and/or other materials
+   provided with the distribution.
+
+ Neither the name of Sun Microsystems, Inc. or the names of
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ This software is provided "AS IS," without a warranty of any
+ kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ You acknowledge that this software is not designed, licensed or
+ intended for use in the design, construction, operation or
+ maintenance of any nuclear facility.
+-->
+
+<html xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:d="http://java.sun.com/jsf/demo/components"
+      xmlns:i="http://apache.org/cocoon/include/1.0">
+
+  <head>
+   <title>CarStore</title>
+   <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+  </head>
+
+  <f:loadBundle basename="org.apache.cocoon.faces.samples.carstore.bundles.Resources" var="bundle"/>
+
+  <f:view>
+    <h:form>
+      <h:panelGrid columns="1"
+                   footerClass="form-footer"
+                   headerClass="form-header"
+                   styleClass="main-background"
+                   columnClasses="single-column"
+                   summary="#{bundle.chooseLocale}"
+                   title="#{bundle.chooseLocale}">
+
+        <h:graphicImage url="images/cardemo.jpg" />
+
+        <h:outputText styleClass="maintitle"
+                      value="#{bundle.chooseLocale}" />
+
+        <h:graphicImage id="mapImage" url="images/world.jpg"
+                        alt="#{bundle.chooseLocale}"
+                        usemap="#worldMap"/>
+
+        <d:map id="worldMap" current="NAmericas" immediate="true"
+               action="storeFront"
+               actionListener="#{carstore.chooseLocaleFromMap}">
+          <d:area id="NAmerica" value="#{NA}"
+            onmouseover="images/world_namer.jpg"
+            onmouseout="images/world.jpg"
+            targetImage="mapImage" />
+          <d:area id="SAmerica" value="#{SA}"
+            onmouseover="images/world_samer.jpg"
+            onmouseout="images/world.jpg"
+            targetImage="mapImage" />
+          <d:area id="Germany" value="#{gerA}"
+            onmouseover="images/world_germany.jpg"
+            onmouseout="images/world.jpg"
+            targetImage="mapImage" />
+          <d:area id="France" value="#{fraA}"
+            onmouseover="images/world_france.jpg"
+            onmouseout="images/world.jpg"
+            targetImage="mapImage" />
+        </d:map>
+
+      </h:panelGrid>
+    </h:form>
+
+    <h:form>
+      <!-- For non graphical browsers  -->
+      <p>Example of <code>commandLink</code></p>
+
+      <h:panelGrid id="links" columns="4"
+                   summary="#{bundle.chooseLocale}"
+                   title="#{bundle.chooseLocale}" >
+
+        <h:commandLink id="NAmerica"
+                       action="storeFront"
+                       actionListener="#{carstore.chooseLocaleFromLink}">
+          <h:outputText value="#{bundle.english}" />
+        </h:commandLink>
+
+        <h:commandLink id="Germany"
+                       action="storeFront"
+                       actionListener="#{carstore.chooseLocaleFromLink}">
+          <h:outputText value="#{bundle.german}" />
+        </h:commandLink>
+
+        <h:commandLink id="France"
+                       action="storeFront"
+                       actionListener="#{carstore.chooseLocaleFromLink}">
+          <h:outputText value="#{bundle.french}" />
+        </h:commandLink>
+
+        <h:commandLink id="SAmerica"
+                       action="storeFront"
+                       actionListener="#{carstore.chooseLocaleFromLink}">
+          <h:outputText value="#{bundle.spanish}" />
+        </h:commandLink>
+
+      </h:panelGrid>
+    </h:form>
+
+    <h:form>
+      <p>Example of <code>commandButton</code></p>
+
+      <h:panelGrid id="buttons" columns="4"
+                   summary="#{bundle.chooseLocale}"
+                   title="#{bundle.chooseLocale}" >
+        <h:commandButton id="NAmerica"
+                         action="storeFront"
+                         value="#{bundle.english}"
+                         actionListener="#{carstore.chooseLocaleFromLink}"/>
+
+        <h:commandButton id="Germany"
+                         action="storeFront"
+                         value="#{bundle.german}"
+                         actionListener="#{carstore.chooseLocaleFromLink}"/>
+
+        <h:commandButton id="France"
+                         action="storeFront"
+                         value="#{bundle.french}"
+                         actionListener="#{carstore.chooseLocaleFromLink}"/>
+
+        <h:commandButton id="SAmerica"
+                         action="storeFront"
+                         value="#{bundle.spanish}"
+                         actionListener="#{carstore.chooseLocaleFromLink}"/>
+      </h:panelGrid>
+    </h:form>
+
+    <i:include src="bottomMatter.xml"/>
+  </f:view>
+</html>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/confirmChoices.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/confirmChoices.xml	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,139 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistribution in binary form must reproduce the above
+   copyright notice, this list of conditions and the following
+   disclaimer in the documentation and/or other materials
+   provided with the distribution.
+
+ Neither the name of Sun Microsystems, Inc. or the names of
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ This software is provided "AS IS," without a warranty of any
+ kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ You acknowledge that this software is not designed, licensed or
+ intended for use in the design, construction, operation or
+ maintenance of any nuclear facility.
+-->
+
+<html xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:i="http://apache.org/cocoon/include/1.0">
+
+  <head>
+    <title>Welcome to CarStore</title>
+    <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+  </head>
+
+  <f:loadBundle basename="org.apache.cocoon.faces.samples.carstore.bundles.Resources" var="bundle"/>
+
+  <body bgcolor="white">
+    <f:view>
+      <h:form>
+        <h:panelGrid id="mainPanel" columns="1" footerClass="subtitle"
+                     styleClass="medium" columnClasses="medium">
+          <h:graphicImage  url="images/cardemo.jpg" />
+          <h:outputText binding="#{carstore.currentModel.components.title}" />
+
+          <h:panelGrid columns="2"  footerClass="subtitle"
+                       headerClass="subtitlebig" styleClass="medium" columnClasses="subtitle,medium">
+
+            <f:facet name="header">
+              <h:outputText  value="#{bundle.buyTitle}" />
+            </f:facet>
+
+            <h:outputText value="#{bundle.Engine}" />
+
+            <h:outputText value="#{carstore.currentModel.attributes.engine}"  />
+
+            <h:outputText value="#{bundle.Brakes}" />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.brake}" />
+
+            <h:outputText  value="#{bundle.Suspension}" />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.suspension}" />
+
+            <h:outputText  value="#{bundle.Speakers}" />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.speaker}" />
+
+            <h:outputText  value="#{bundle.Audio}" />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.audio}" />
+
+            <h:outputText  value="#{bundle.Transmission}" />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.transmission}" />
+
+            <h:outputText  value="#{bundle.sunroofLabel}"  />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.sunroof}" />
+
+            <h:outputText  value="#{bundle.cruiseLabel}"  />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.cruisecontrol}" />
+
+            <h:outputText value="#{bundle.keylessLabel}"  />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.keylessentry}" />
+
+            <h:outputText  value="#{bundle.securityLabel}"  />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.securitySystem}" />
+
+            <h:outputText  value="#{bundle.skiRackLabel}"  />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.skiRack}" />
+
+            <h:outputText  value="#{bundle.towPkgLabel}"  />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.towPackage}" />
+
+            <h:outputText  value="#{bundle.gpsLabel}"  />
+
+            <h:outputText  value="#{carstore.currentModel.attributes.gps}" />
+
+            <f:facet name="footer">
+              <h:panelGroup>
+                <h:outputText  value="#{bundle.yourPriceLabel}" />
+                &#160;
+                <h:outputText  value="#{carstore.currentModel.currentPrice}" />
+              </h:panelGroup>
+            </f:facet>
+          </h:panelGrid>
+
+          <h:panelGroup>
+            <h:commandButton value="#{bundle.buy}" action="customerInfo" title="#{bundle.buy}" />
+            <h:commandButton value="#{bundle.back}" action="carDetail" title="#{bundle.back}"/>
+          </h:panelGroup>
+
+        </h:panelGrid>
+      </h:form>
+      <i:include src="bottomMatter.xml"/>
+    </f:view>
+
+  </body>
+</html>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/customerInfo.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/customerInfo.xml	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,216 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistribution in binary form must reproduce the above
+   copyright notice, this list of conditions and the following
+   disclaimer in the documentation and/or other materials
+   provided with the distribution.
+
+ Neither the name of Sun Microsystems, Inc. or the names of
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ This software is provided "AS IS," without a warranty of any
+ kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ You acknowledge that this software is not designed, licensed or
+ intended for use in the design, construction, operation or
+ maintenance of any nuclear facility.
+-->
+
+<html xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:cs="urn:carstoretaglibrary_1.1">
+  <head>
+    <title>Customer Details</title>
+    <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+  </head>
+
+  <f:loadBundle basename="org.apache.cocoon.faces.samples.carstore.bundles.Resources" var="bundle"/>
+
+  <body>
+    <f:view>
+      <h:form>
+        <h:panelGrid id="mainPanel" columns="1" footerClass="subtitle"
+                     headerClass="subtitlebig" styleClass="medium" columnClasses="medium">
+
+          <h:graphicImage url="images/cardemo.jpg" />
+
+          <h:outputText value="#{bundle.customerTitle}" />
+
+          <h:panelGrid id="subPanel" columns="3" footerClass="medium"
+                       headerClass="subtitlebig" styleClass="medium" columnClasses="medium">
+
+            <h:outputText value="#{bundle.titleLabel}" />
+
+            <h:selectOneMenu id="title" value="#{customer.currentTitle}">
+              <f:selectItems value="#{customer.titleOptions}" />
+            </h:selectOneMenu>
+
+            <h:outputText value=""/>
+
+            <h:outputText value="#{bundle.firstLabel}" />
+
+            <h:inputText  id="firstName" value="#{customer.firstName}" required="true">
+              <f:valueChangeListener type="org.apache.cocoon.faces.samples.carstore.FirstNameChanged" />
+            </h:inputText>
+
+            <h:message styleClass="validationMessage"  for="firstName"/>
+
+            <h:outputText value="#{bundle.middleLabel}" />
+
+            <h:inputText id="middleInitial" size="1" maxlength="1"
+              value="#{customer.middleInitial}" >
+            </h:inputText>
+
+            <h:message  styleClass="validationMessage" for="middleInitial"/>
+
+            <h:outputText value="#{bundle.lastLabel}" />
+            <h:inputText  value="#{customer.lastName}" />
+            <h:outputText value=""/>
+
+            <h:outputText value="#{bundle.mailingLabel}"/>
+            <h:inputText  value="#{customer.mailingAddress}" />
+            <h:outputText value=""/>
+
+            <h:outputText value="#{bundle.cityLabel}" />
+            <h:inputText  value="#{customer.city}" />
+            <h:outputText value=""/>
+
+            <h:outputText value="#{bundle.stateLabel}" />
+            <h:selectOneMenu  value="#{customer.state}" >
+
+              <f:selectItem  itemValue="AL" itemLabel="AL" />
+              <f:selectItem  itemValue="AK" itemLabel="AK"/>
+              <f:selectItem  itemValue="AZ" itemLabel="AZ"/>
+              <f:selectItem  itemValue="AR" itemLabel="AR"/>
+              <f:selectItem  itemValue="CA" itemLabel="CA"/>
+              <f:selectItem  itemValue="CO" itemLabel="CO"/>
+              <f:selectItem  itemValue="CT" itemLabel="CT"/>
+              <f:selectItem  itemValue="DE" itemLabel="DE"/>
+              <f:selectItem  itemValue="FL" itemLabel="FL"/>
+              <f:selectItem  itemValue="GA" itemLabel="GA"/>
+
+              <f:selectItem  itemValue="HI" itemLabel="HI"/>
+              <f:selectItem  itemValue="ID" itemLabel="ID"/>
+              <f:selectItem  itemValue="IL" itemLabel="IL"/>
+              <f:selectItem  itemValue="IN" itemLabel="IN"/>
+              <f:selectItem  itemValue="IA" itemLabel="IA"/>
+              <f:selectItem  itemValue="KS" itemLabel="KS"/>
+              <f:selectItem  itemValue="KY" itemLabel="KY"/>
+              <f:selectItem  itemValue="LA" itemLabel="LA"/>
+              <f:selectItem  itemValue="ME" itemLabel="ME"/>
+              <f:selectItem  itemValue="MD" itemLabel="MD"/>
+
+              <f:selectItem  itemValue="MA" itemLabel="MA"/>
+              <f:selectItem  itemValue="MI" itemLabel="MI"/>
+              <f:selectItem  itemValue="MN" itemLabel="MN"/>
+              <f:selectItem  itemValue="MO" itemLabel="MO"/>
+              <f:selectItem  itemValue="MT" itemLabel="MT"/>
+              <f:selectItem  itemValue="NE" itemLabel="NE"/>
+              <f:selectItem  itemValue="NV" itemLabel="NV"/>
+              <f:selectItem  itemValue="NH" itemLabel="NH"/>
+              <f:selectItem  itemValue="NJ" itemLabel="NJ"/>
+              <f:selectItem  itemValue="NM" itemLabel="NM"/>
+
+              <f:selectItem  itemValue="MY" itemLabel="MY"/>
+              <f:selectItem  itemValue="NC" itemLabel="NC"/>
+              <f:selectItem  itemValue="ND" itemLabel="ND"/>
+              <f:selectItem  itemValue="OH" itemLabel="OH"/>
+              <f:selectItem  itemValue="OK" itemLabel="OK"/>
+              <f:selectItem  itemValue="OR" itemLabel="OR"/>
+              <f:selectItem  itemValue="PA" itemLabel="PA"/>
+              <f:selectItem  itemValue="RI" itemLabel="RI"/>
+              <f:selectItem  itemValue="SC" itemLabel="SC"/>
+              <f:selectItem  itemValue="SD" itemLabel="SD"/>
+
+              <f:selectItem  itemValue="TN" itemLabel="TN"/>
+              <f:selectItem  itemValue="TX" itemLabel="TX"/>
+              <f:selectItem  itemValue="UT" itemLabel="UT"/>
+              <f:selectItem  itemValue="VT" itemLabel="VT"/>
+              <f:selectItem  itemValue="VA" itemLabel="VA"/>
+              <f:selectItem  itemValue="WA" itemLabel="WA"/>
+              <f:selectItem  itemValue="WV" itemLabel="WV"/>
+              <f:selectItem  itemValue="WI" itemLabel="WI"/>
+              <f:selectItem  itemValue="WY" itemLabel="WY"/>
+            </h:selectOneMenu>
+            <h:outputText value=""/>
+
+            <h:outputText  value="#{bundle.zipLabel}" />
+            <h:inputText id="zip"
+              value="#{customer.zip}"
+              size="10" required="true">
+              <cs:format_validator formatPatterns="99999|99999-9999|### ###"/>
+            </h:inputText>
+            <h:message  styleClass="validationMessage" for="zip" />
+
+            <h:outputText  value="#{bundle.ccNumberLabel}" />
+            <h:inputText id="ccno" size="16"
+              converter="creditCardConverter" required="true">
+              <cs:format_validator
+                formatPatterns="9999999999999999|9999 9999 9999 9999|9999-9999-9999-9999"/>
+            </h:inputText>
+            <h:message styleClass="validationMessage"  for="ccno"/>
+
+            <h:outputText  value="#{bundle.monthLabel}" />
+            <h:panelGrid id="monthYearPanel" columns="2" footerClass="medium"
+              headerClass="medium" styleClass="medium" columnClasses="medium">
+              <h:selectOneMenu  value="#{customer.month}">
+                <f:selectItem itemValue="01" itemLabel="01"/>
+                <f:selectItem itemValue="02" itemLabel="02"/>
+                <f:selectItem itemValue="03" itemLabel="03"/>
+                <f:selectItem itemValue="04" itemLabel="04"/>
+                <f:selectItem itemValue="05" itemLabel="05"/>
+                <f:selectItem itemValue="06" itemLabel="06"/>
+                <f:selectItem itemValue="07" itemLabel="07"/>
+                <f:selectItem itemValue="08" itemLabel="08"/>
+                <f:selectItem itemValue="09" itemLabel="09"/>
+                <f:selectItem itemValue="10" itemLabel="10"/>
+                <f:selectItem itemValue="11" itemLabel="11"/>
+                <f:selectItem itemValue="12" itemLabel="12"/>
+              </h:selectOneMenu>
+
+              <h:selectOneMenu  value="#{customer.year}" >
+                <f:selectItem itemValue="2002" itemLabel="2002"/>
+                <f:selectItem itemValue="2003" itemLabel="2003"/>
+                <f:selectItem itemValue="2004" itemLabel="2004"/>
+                <f:selectItem itemValue="2005" itemLabel="2005"/>
+                <f:selectItem itemValue="2006" itemLabel="2006"/>
+                <f:selectItem itemValue="2007" itemLabel="2007"/>
+                <f:selectItem itemValue="2008" itemLabel="2008"/>
+              </h:selectOneMenu>
+            </h:panelGrid>
+            <h:outputText value=""/>
+          </h:panelGrid>
+
+          <h:commandButton  value="#{bundle.finishButton}" action="finish" />
+
+          <h:graphicImage id="duke" url="/images/duke.gif" />
+
+          <h:outputText  value="#{bundle.buyLabel}" />
+        </h:panelGrid>
+
+      </h:form>
+    </f:view>
+  </body>
+</html>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/finish.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/finish.xml	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistribution in binary form must reproduce the above
+   copyright notice, this list of conditions and the following
+   disclaimer in the documentation and/or other materials
+   provided with the distribution.
+
+ Neither the name of Sun Microsystems, Inc. or the names of
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ This software is provided "AS IS," without a warranty of any
+ kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ You acknowledge that this software is not designed, licensed or
+ intended for use in the design, construction, operation or
+ maintenance of any nuclear facility.
+-->
+
+<html xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:i="http://apache.org/cocoon/include/1.0">
+
+  <head>
+    <title>Welcome to CarStore</title>
+    <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+  </head>
+
+  <body bgcolor="white">
+    <f:loadBundle basename="org.apache.cocoon.faces.samples.carstore.bundles.Resources" var="bundle"/>
+    <f:view>
+      <h:form>
+        <h:graphicImage url="images/cardemo.jpg" />
+
+        <h:panelGrid id="thanksPanel" columns="1" footerClass="subtitle"
+                     headerClass="subtitlebig" styleClass="medium" columnClasses="subtitle,medium">
+          <f:facet name="header">
+            <h:outputFormat title="thanks" value="#{bundle.thanksLabel}">
+              <f:param value="#{sessionScope.firstName}"/>
+            </h:outputFormat>
+          </f:facet>
+        </h:panelGrid>
+
+      </h:form>
+      <i:include src="bottomMatter.xml"/>
+    </f:view>
+  </body>
+</html>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/150x126_Jalopy.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/150x126_Luxury.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/150x126_Roadster.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/150x126_SUV.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/200x168_Jalopy.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/200x168_Luxury.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/200x168_Roadster.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/200x168_SUV.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/BuyBtn.gif
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/FinishBtn.gif
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/MoreBtn.gif
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/cardemo.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/current.gif
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/duke.gif
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world_france.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world_germany.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world_namer.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/images/world_samer.jpg
==============================================================================
Binary file. No diff available.

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/optionsPanel.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/optionsPanel.xml	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,145 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ 
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+ 
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+ 
+ - Redistribution in binary form must reproduce the above
+   copyright notice, this list of conditions and the following
+   disclaimer in the documentation and/or other materials
+   provided with the distribution.
+    
+ Neither the name of Sun Microsystems, Inc. or the names of
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+  
+ This software is provided "AS IS," without a warranty of any
+ kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+  
+ You acknowledge that this software is not designed, licensed or
+ intended for use in the design, construction, operation or
+ maintenance of any nuclear facility.
+-->
+
+<f:subview xmlns:f="http://java.sun.com/jsf/core"
+           xmlns:h="http://java.sun.com/jsf/html"
+           id="optionsPanel">
+
+  <h:panelGrid>
+    <h:outputText value="#{bundle.OptionsPackages}" />
+
+    <!-- options package chooser -->
+    <h:panelGrid columns="4">
+      <h:commandButton id="Custom" value="#{bundle.Custom}"
+          styleClass="#{carstore.customizers.Custom.buttonStyle}"
+          actionListener="#{carstore.choosePackage}" />
+
+      <h:commandButton id="Standard" value="#{bundle.Standard}"
+          styleClass="#{carstore.customizers.Standard.buttonStyle}"
+          actionListener="#{carstore.choosePackage}" />
+
+      <h:commandButton id="Performance" value="#{bundle.Performance}"
+          styleClass="#{carstore.customizers.Performance.buttonStyle}"
+          actionListener="#{carstore.choosePackage}" />
+
+      <h:commandButton id="Deluxe" value="#{bundle.Deluxe}"
+          styleClass="#{carstore.customizers.Deluxe.buttonStyle}"
+          actionListener="#{carstore.choosePackage}" />
+    </h:panelGrid>
+  </h:panelGrid>
+
+  <h:panelGrid columns="2">
+    <h:outputText value="#{bundle.Engine}"
+                  styleClass="optionLabel"/>
+
+    <h:selectOneMenu styleClass="optionValue"
+                     binding="#{carstore.currentModel.components.engine}"/>
+
+    <h:outputText value="#{bundle.Brakes}"
+                  styleClass="optionLabel" />
+
+    <h:selectOneRadio styleClass="optionValue"
+                      binding="#{carstore.currentModel.components.brake}"/>
+
+    <h:outputText value="#{bundle.Suspension}"
+                  styleClass="optionLabel"/>
+
+    <h:selectOneMenu styleClass="optionValue"
+                     binding="#{carstore.currentModel.components.suspension}"/>
+
+    <h:outputText value="#{bundle.Speakers}"
+                  styleClass="optionLabel"/>
+
+    <h:selectOneRadio styleClass="optionValue"
+                      binding="#{carstore.currentModel.components.speaker}"/>
+
+    <h:outputText value="#{bundle.Audio}"
+                  styleClass="optionLabel"/>
+
+    <h:selectOneRadio styleClass="optionValue"
+                      binding="#{carstore.currentModel.components.audio}"/>
+
+    <h:outputText value="#{bundle.Transmission}"
+                  styleClass="optionLabel"/>
+
+    <h:selectOneMenu styleClass="optionValue"
+                     binding="#{carstore.currentModel.components.transmission}"/>
+  </h:panelGrid>
+
+  <h:outputText value="#{bundle.OtherOptions}"
+                styleClass="optionLabel"/>
+
+  <h:panelGrid columns="6">
+    <h:selectBooleanCheckbox title="#{bundle.sunroofLabel}"
+                             binding="#{carstore.currentModel.components.sunroof}" />
+
+    <h:outputText value="#{bundle.sunroofLabel}" />
+
+    <h:selectBooleanCheckbox title="#{bundle.cruiseLabel}"
+                             binding="#{carstore.currentModel.components.cruisecontrol}" />
+
+    <h:outputText value="#{bundle.cruiseLabel}" />
+
+    <h:selectBooleanCheckbox title="#{bundle.keylessLabel}"
+                             binding="#{carstore.currentModel.components.keylessentry}" />
+
+    <h:outputText value="#{bundle.keylessLabel}" />
+
+    <h:selectBooleanCheckbox title="#{bundle.securityLabel}"
+                             binding="#{carstore.currentModel.components.securitySystem}" />
+
+    <h:outputText value="#{bundle.securityLabel}" />
+
+    <h:selectBooleanCheckbox title="#{bundle.skiRackLabel}"
+                             binding="#{carstore.currentModel.components.skiRack}" />
+
+    <h:outputText value="#{bundle.skiRackLabel}" />
+
+    <h:selectBooleanCheckbox title="#{bundle.towPkgLabel}"
+                             binding="#{carstore.currentModel.components.towPackage}" />
+
+    <h:outputText value="#{bundle.towPkgLabel}" />
+
+    <h:selectBooleanCheckbox title="#{bundle.gpsLabel}"
+                             binding="#{carstore.currentModel.components.gps}" />
+
+    <h:outputText value="#{bundle.gpsLabel}" />
+  </h:panelGrid>
+</f:subview>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/sitemap.xmap
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/sitemap.xmap	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+
+  <map:components>
+    <map:actions>
+      <map:action name="faces"
+                  logger="sitemap.action.faces"
+                  src="org.apache.cocoon.faces.FacesAction">
+        <cut-suffix>.faces</cut-suffix>
+        <add-suffix>.view</add-suffix>
+      </map:action>
+    </map:actions>
+  </map:components>
+
+  <map:pipelines>
+    <map:pipeline>
+      <map:match pattern="">
+        <map:redirect-to uri="chooseLocale.faces"/>
+      </map:match>
+   
+      <map:match pattern="*.faces">
+        <map:act type="faces"/>
+      </map:match>
+   
+      <map:match pattern="*.view">
+        <map:generate src="{1}.xml"/>
+        <map:transform type="cinclude"/>
+        <map:transform type="taglib"/>
+        <map:serialize/>
+      </map:match>
+   
+      <!-- images -->
+      <map:match pattern="images/*.gif">
+        <map:read mime-type="images/gif" src="images/{1}.gif"/>
+      </map:match>
+   
+      <map:match pattern="images/*.jpg">
+        <map:read mime-type="images/jpeg" src="images/{1}.jpg"/>
+      </map:match>
+   
+      <!-- CSS stylesheets -->
+      <map:match pattern="*.css">
+        <map:read mime-type="text/css" src="{1}.css"/>
+      </map:match>
+   
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/storeFront.xml
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/storeFront.xml	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,108 @@
+<?xml version="1.0"?>
+
+<!--
+ Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+
+ Redistribution and use in source and binary forms, with or
+ without modification, are permitted provided that the following
+ conditions are met:
+
+ - Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ - Redistribution in binary form must reproduce the above
+   copyright notice, this list of conditions and the following
+   disclaimer in the documentation and/or other materials
+   provided with the distribution.
+
+ Neither the name of Sun Microsystems, Inc. or the names of
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ This software is provided "AS IS," without a warranty of any
+ kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ You acknowledge that this software is not designed, licensed or
+ intended for use in the design, construction, operation or
+ maintenance of any nuclear facility.
+-->
+
+<html xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:i="http://apache.org/cocoon/include/1.0">
+
+  <head>
+    <title>Welcome to CarStore</title>
+    <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
+  </head>
+
+  <f:loadBundle basename="org.apache.cocoon.faces.samples.carstore.bundles.Resources" var="bundle"/>
+
+  <body bgcolor="white">
+    <f:view>
+      <h:form>
+        <h:graphicImage url="images/cardemo.jpg" />
+
+        <h:panelGrid columns="2"
+                     footerClass="form-footer"
+                     headerClass="form-header"
+                     styleClass="top-table"
+                     columnClasses="single-column"
+                     summary="#{bundle.chooseCar}"
+                     title="#{bundle.chooseCar}" >
+
+          <h:panelGrid columns="2" styleClass="storeFrontCar">
+            <!-- Jalopy -->
+            <h:graphicImage binding="#{carstore.models.Jalopy.components.imageSmall}" />
+            <h:outputText styleClass="subtitlebig"
+                          value="#{carstore.models.Jalopy.attributes.title}" />
+            <h:outputText value="#{carstore.models.Jalopy.attributes.description}"/>
+            <h:commandButton action="#{carstore.storeFrontJalopyPressed}"
+                             value="#{bundle.moreButton}" />
+
+            <!-- Roadster -->
+            <h:graphicImage binding="#{carstore.models.Roadster.components.imageSmall}" />
+            <h:outputText styleClass="subtitlebig"
+                          value="#{carstore.models.Roadster.attributes.title}" />
+            <h:outputText value="#{carstore.models.Roadster.attributes.description}" />
+            <h:commandButton action="#{carstore.storeFrontRoadsterPressed}"
+                             value="#{bundle.moreButton}" />
+          </h:panelGrid>
+
+          <h:panelGrid columns="2" styleClass="storeFrontCar">
+            <!-- Luxury -->
+            <h:graphicImage binding="#{carstore.models.Luxury.components.imageSmall}" />
+            <h:outputText styleClass="subtitlebig"
+                          value="#{carstore.models.Luxury.attributes.title}" />
+            <h:outputText value="#{carstore.models.Luxury.attributes.description}" />
+            <h:commandButton action="#{carstore.storeFrontLuxuryPressed}"
+                             value="#{bundle.moreButton}" />
+
+            <!-- SUV -->
+            <h:graphicImage binding="#{carstore.models.SUV.components.imageSmall}" />
+            <h:outputText styleClass="subtitlebig"
+                          value="#{carstore.models.SUV.attributes.title}" />
+            <h:outputText value="#{carstore.models.SUV.attributes.description}" />
+            <h:commandButton action="#{carstore.storeFrontSUVPressed}"
+                             value="#{bundle.moreButton}" />
+          </h:panelGrid>
+
+        </h:panelGrid>
+      </h:form>
+
+      <i:include src="bottomMatter.xml"/>
+
+    </f:view>
+  </body>
+</html>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/stylesheet.css
==============================================================================
--- (empty file)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/cardemo/stylesheet.css	Tue Oct  5 06:47:48 2004
@@ -0,0 +1,169 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ * 
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * 
+ * - Redistribution in binary form must reproduce the above
+ *   copyright notice, this list of conditions and the following
+ *   disclaimer in the documentation and/or other materials
+ *   provided with the distribution.
+ *    
+ * Neither the name of Sun Microsystems, Inc. or the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *  
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
+ * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *  
+ * You acknowledge that this software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+body {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 12px;
+}
+
+td {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 12px;
+}
+
+th {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 12px;
+}
+
+.bodystyle {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 12px;
+}
+
+.small {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 9px;
+}
+
+.medium {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 12px;
+}
+
+.maintitle {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 14px;
+	color: #330066;
+}
+
+.subtitle {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 12px;
+	color: #93B629;
+}
+
+.subtitlebig {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 16px;
+	color: #93B629;
+        padding-top: 10;
+        padding-bottom: 10;
+}
+
+.big {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 16px;
+}
+
+.xbig {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 24px;
+}
+
+.expanded {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 12px;
+	line-height: 24px;
+	letter-spacing: 2px;
+}
+
+.justified {
+	font-family: Arial, Helvetica, sans-serif;
+	text-align: justify;
+}
+
+.footer {
+	font-family: "Times New Roman", Times, serif;
+	font-size: 9px;
+	color: #999999;
+}
+
+.box1 {
+	padding: 3px;
+	border-width: medium;
+	border-style: solid;
+	border-color: #CCCCCC #666666 #666666 #CCCCCC;
+}
+
+.box2 {
+	font-style: italic;
+	word-spacing: 2pt;
+	padding: 3px;
+	border: 1px solid;
+}
+
+.align-left {
+  text-align: left;
+}
+
+.panel-background { 
+  background-color: #7171A5;
+  border: 5px outset #71A5A5;
+  border-collapse: collapse;
+  font-family: sans-serif;
+  font-size: 14pt;
+  padding: 10px;
+}
+
+.package-selected {
+  background-color: #93B629;
+}
+
+.package-unselected {
+  background-color: #C0C0C0;
+}
+
+.option-unselected {
+  background-color: #FFFFFF;
+}
+
+.top-table { 
+  padding: 0;
+  border: 0;
+  width: 660px;
+}
+
+.storeFrontCar { 
+  padding: 0
+  border: 0
+}
+
+.validationMessage { 
+  color: red;
+}

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/samples.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/samples.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/faces/samples/samples.xml	Tue Oct  5 06:47:48 2004
@@ -43,6 +43,12 @@
     <sample name="Hello" href="hello">
       Simple two-page JSF application
     </sample>
+    <note>
+      License for CarStore JSF demo warns: Don't use in nuclear facility.
+    </note>
+    <sample name="CarStore" href="cardemo/">
+      CarStore demo JSF application
+    </sample>
   </group>
 
   <group name="Resources">

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml	(original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml	Tue Oct  5 06:47:48 2004
@@ -205,6 +205,9 @@
 
   <changes>
  <release version="@version@" date="@date@">
+   <action dev="VG" type="add">
+     Faces block: Added JSF CarStore demo.
+   </action>
    <action dev="VG" type="fix">
      Flow preserves global variables on sitemap reload.
    </action>

Mime
View raw message