You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2010/05/26 22:20:58 UTC

svn commit: r948569 [8/12] - in /myfaces/portlet-bridge/core/trunk: ./ api/src/main/java/javax/portlet/faces/component/ examples/ examples/carstore/ examples/carstore/src/ examples/carstore/src/main/ examples/carstore/src/main/java/ examples/carstore/s...

Added: myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/optionsPanel.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/optionsPanel.jsp?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/optionsPanel.jsp (added)
+++ myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/optionsPanel.jsp Wed May 26 20:20:51 2010
@@ -0,0 +1,150 @@
+<!--
+The contents of this file are subject to the terms
+of the Common Development and Distribution License
+(the License). You may not use this file except in
+compliance with the License.
+
+You can obtain a copy of the License at
+https://javaserverfaces.dev.java.net/CDDL.html or
+legal/CDDLv1.0.txt.
+See the License for the specific language governing
+permission and limitations under the License.
+
+When distributing Covered Code, include this CDDL
+Header Notice in each file and include the License file
+at legal/CDDLv1.0.txt.
+If applicable, add the following below the CDDL Header,
+with the fields enclosed by brackets [] replaced by
+your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+[Name of File] [ver.__] [Date]
+
+Copyright 2005 Sun Microsystems Inc. All Rights Reserved
+-->
+<%@ page contentType="text/html"
+         isELIgnored="false" %>
+         
+<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
+<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
+
+
+<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:selectBooleanCheckbox>
+
+    <h:outputText value="#{bundle.sunroofLabel}"/>
+
+    <h:selectBooleanCheckbox title="#{bundle.cruiseLabel}"
+                             binding="#{carstore.currentModel.components.cruisecontrol}">
+    </h:selectBooleanCheckbox>
+
+    <h:outputText value="#{bundle.cruiseLabel}"/>
+
+    <h:selectBooleanCheckbox title="#{bundle.keylessLabel}"
+                             binding="#{carstore.currentModel.components.keylessentry}">
+    </h:selectBooleanCheckbox>
+
+    <h:outputText value="#{bundle.keylessLabel}"/>
+
+    <h:selectBooleanCheckbox
+          title="#{bundle.securityLabel}"
+          binding="#{carstore.currentModel.components.securitySystem}">
+    </h:selectBooleanCheckbox>
+
+    <h:outputText value="#{bundle.securityLabel}"/>
+
+    <h:selectBooleanCheckbox title="#{bundle.skiRackLabel}"
+                             binding="#{carstore.currentModel.components.skiRack}">
+    </h:selectBooleanCheckbox>
+
+    <h:outputText value="#{bundle.skiRackLabel}"/>
+
+    <h:selectBooleanCheckbox title="#{bundle.towPkgLabel}"
+                             binding="#{carstore.currentModel.components.towPackage}">
+    </h:selectBooleanCheckbox>
+
+    <h:outputText value="#{bundle.towPkgLabel}"/>
+
+    <h:selectBooleanCheckbox title="#{bundle.gpsLabel}"
+                             binding="#{carstore.currentModel.components.gps}">
+    </h:selectBooleanCheckbox>
+
+    <h:outputText value="#{bundle.gpsLabel}"/>
+
+</h:panelGrid>
+
+

Added: myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/storeFront.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/storeFront.jsp?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/storeFront.jsp (added)
+++ myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/storeFront.jsp Wed May 26 20:20:51 2010
@@ -0,0 +1,124 @@
+<!--
+The contents of this file are subject to the terms
+of the Common Development and Distribution License
+(the License). You may not use this file except in
+compliance with the License.
+
+You can obtain a copy of the License at
+https://javaserverfaces.dev.java.net/CDDL.html or
+legal/CDDLv1.0.txt.
+See the License for the specific language governing
+permission and limitations under the License.
+
+When distributing Covered Code, include this CDDL
+Header Notice in each file and include the License file
+at legal/CDDLv1.0.txt.
+If applicable, add the following below the CDDL Header,
+with the fields enclosed by brackets [] replaced by
+your own identifying information:
+"Portions Copyrighted [year] [name of copyright owner]"
+
+[Name of File] [ver.__] [Date]
+
+Copyright 2005 Sun Microsystems Inc. All Rights Reserved
+-->
+
+<%@ page contentType="text/html"
+         isELIgnored="false" %>
+
+<html>
+
+<head>
+    <title>Welcome to CarStore</title>
+    <link rel="stylesheet" type="text/css"
+          href="<%=response.encodeURL(request.getContextPath() + "stylesheet.css")%>">
+</head>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<body bgcolor="white">
+
+<f:loadBundle basename="carstore.bundles.Resources" var="bundle"/>
+
+<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}">
+                </h:commandButton>
+
+                <!-- 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:commandButton>
+
+            </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}">
+                </h:commandButton>
+
+                <!-- 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:commandButton>
+
+            </h:panelGrid>
+
+        </h:panelGrid>
+
+    </h:form>
+
+    <jsp:include page="bottomMatter.jsp"/>
+
+</f:view>
+
+</body>
+
+</html>

Added: myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/stylesheet.css
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/stylesheet.css?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/stylesheet.css (added)
+++ myfaces/portlet-bridge/core/trunk/examples/carstore/src/main/webapp/stylesheet.css Wed May 26 20:20:51 2010
@@ -0,0 +1,156 @@
+/*
+ * The contents of this file are subject to the terms
+ * of the Common Development and Distribution License
+ * (the License). You may not use this file except in
+ * compliance with the License.
+ * 
+ * You can obtain a copy of the License at
+ * https://javaserverfaces.dev.java.net/CDDL.html or
+ * legal/CDDLv1.0.txt. 
+ * See the License for the specific language governing
+ * permission and limitations under the License.
+ * 
+ * When distributing Covered Code, include this CDDL
+ * Header Notice in each file and include the License file
+ * at legal/CDDLv1.0.txt.    
+ * If applicable, add the following below the CDDL Header,
+ * with the fields enclosed by brackets [] replaced by
+ * your own identifying information:
+ * "Portions Copyrighted [year] [name of copyright owner]"
+ * 
+ * [Name of File] [ver.__] [Date]
+ * 
+ * Copyright 2005 Sun Microsystems Inc. All Rights Reserved
+ */
+
+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: myfaces/portlet-bridge/core/trunk/examples/demo/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/demo/pom.xml?rev=948569&r1=948568&r2=948569&view=diff
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/demo/pom.xml (original)
+++ myfaces/portlet-bridge/core/trunk/examples/demo/pom.xml Wed May 26 20:20:51 2010
@@ -1,200 +1,234 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <name>MyFaces Portlet Bridge Demo</name>
-  <artifactId>portlet-bridge-demo</artifactId>
-  <packaging>war</packaging>
-
-  <parent>
-    <groupId>org.apache.myfaces.portlet-bridge</groupId>
-    <artifactId>portlet-bridge-examples</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-  
-  <dependencies>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>javax.servlet.jsp</groupId>
-      <artifactId>jsp-api</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>portlet-api</groupId>
-      <artifactId>portlet-api</artifactId>
-    </dependency>
-        
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>portlet-bridge-api</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>portlet-bridge-impl</artifactId>
-    </dependency>
-  </dependencies>
-    
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-jdev-plugin</artifactId>
-        <groupId>org.apache.myfaces.trinidadbuild</groupId>
-        <configuration>
-          <libraries>
-            <library>JSP Runtime</library>
-          </libraries>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
-  <profiles>
-    <profile>
-      <id>pluto-assemble</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-war-plugin</artifactId>
-            <configuration>
-              <warName>${pom.artifactId}-pluto-${pom.version}</warName>
-              <outputDirectory>${project.build.directory}/../../assembly/target/webapp</outputDirectory>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    
-    <!-- sets up the webapp for deployment to pluto  "mvn clean install -Ppluto" -->    
-    <profile>
-      <id>pluto</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-war-plugin</artifactId>
-            <configuration>
-              <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
-            </configuration>
-          </plugin>
-          <plugin>
-            <groupId>org.apache.pluto</groupId>
-            <artifactId>maven-pluto-plugin</artifactId>
-          </plugin>  
-        </plugins>
-      </build>
-    </profile>
-    
-    <!-- To run jetty, issue "mvn clean -PjettyConfig jetty:run" -->
-    <profile>
-      <id>jettyConfig</id>
-		<dependencies>
-        <dependency>
-          <groupId>com.bekk.boss</groupId>
-          <artifactId>maven-jetty-pluto-embedded</artifactId>
-        </dependency>
-		</dependencies>
-		<build>      
-      <plugins>
-        <plugin>
-          <groupId>org.mortbay.jetty</groupId>
-          <artifactId>maven-jetty-plugin</artifactId>
-          <configuration>
-            <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
-            <webDefaultXml>src/main/webapp/WEB-INF/jetty-pluto-web-default.xml</webDefaultXml>
-            <systemProperties>
-              <systemProperty>
-                <name>org.apache.pluto.embedded.portletIds</name>
-                <value>portlet-bridge-demo</value>
-              </systemProperty>
-            </systemProperties>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.pluto</groupId>
-          <artifactId>maven-pluto-plugin</artifactId>
-        </plugin>  
-      </plugins>
-      </build>  
-    </profile>  
-  
-    <!-- By default the war examples use myfaces! :) -->
-    <profile>
-      <id>myfaces</id>
-      <activation>
-        <property>
-          <name>!jsf</name>
-        </property>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>org.apache.myfaces.core</groupId>
-          <artifactId>myfaces-api</artifactId>
-        </dependency>
-
-        <dependency>
-          <groupId>org.apache.myfaces.core</groupId>
-          <artifactId>myfaces-impl</artifactId>
-        </dependency>
-      </dependencies>
-    </profile>
-
-    <!-- To use the examples using the Sun's JSF Reference Implementation: mvn clean install -Djsf=ri -->
-    <profile>
-      <id>jsfri</id>
-      <activation>
-        <property>
-          <name>jsf</name>
-          <value>ri</value>
-        </property>
-      </activation>
-      <dependencies>
-        <dependency>
-          <groupId>javax.faces</groupId>
-          <artifactId>jsf-api</artifactId>
-        </dependency>
-      </dependencies>
-      <properties>
-        <jsf_implementation>JSF-RI</jsf_implementation>
-      </properties>
-    </profile>
-    
-    <profile>
-      <id>jsfri-provided</id>
-      <activation>
-        <property>
-          <name>jsf</name>
-          <value>ri-provided</value>
-        </property>
-      </activation>
-
-      <repositories>
-        <repository>
-          <id>java.net</id>
-          <name>java.net Maven 1 Repository</name>
-          <url>https://maven-repository.dev.java.net/nonav/repository</url>
-          <layout>legacy</layout>
-        </repository>
-      </repositories>
-      <dependencies>
-        <dependency>
-          <groupId>javax.faces</groupId>
-          <artifactId>jsf-api</artifactId>
-          <scope>compile</scope>
-        </dependency>
-        <dependency>
-          <groupId>javax.faces</groupId>
-          <artifactId>jsf-impl</artifactId>
-          <version>${jsf.version}</version>
-          <scope>runtime</scope>
-        </dependency>
-      </dependencies>
-      <properties>
-        <jsf_implementation>JSF-RI</jsf_implementation>
-      </properties>
-    </profile>
-  </profiles>
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <name>MyFaces Portlet Bridge Demo</name>
+  <artifactId>portlet-bridge-demo</artifactId>
+  <packaging>war</packaging>
+
+  <parent>
+    <groupId>org.apache.myfaces.portlet-bridge</groupId>
+    <artifactId>portlet-bridge-examples</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  
+  <dependencies>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>portlet-api</groupId>
+      <artifactId>portlet-api</artifactId>
+    </dependency>
+        
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>portlet-bridge-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>portlet-bridge-impl</artifactId>
+    </dependency>
+  </dependencies>
+    
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-jdev-plugin</artifactId>
+        <groupId>org.apache.myfaces.trinidadbuild</groupId>
+        <configuration>
+          <libraries>
+            <library>JSP Runtime</library>
+          </libraries>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <profiles>
+    <profile>
+      <id>pluto-assemble</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <warName>${pom.artifactId}-pluto-${pom.version}</warName>
+              <outputDirectory>${project.build.directory}/../../assembly/target/webapp</outputDirectory>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    
+    <!-- sets up the webapp for deployment to pluto  "mvn clean install -Ppluto" -->    
+    <profile>
+      <id>pluto</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+            </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.pluto</groupId>
+            <artifactId>maven-pluto-plugin</artifactId>
+          </plugin>  
+        </plugins>
+      </build>
+    </profile>
+    
+    <!-- To run jetty, issue "mvn clean -PjettyConfig jetty:run" -->
+    <profile>
+      <id>jettyConfig</id>
+		<dependencies>
+        <dependency>
+          <groupId>com.bekk.boss</groupId>
+          <artifactId>maven-jetty-pluto-embedded</artifactId>
+        </dependency>
+		</dependencies>
+		<build>      
+      <plugins>
+        <plugin>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>maven-jetty-plugin</artifactId>
+          <configuration>
+            <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+            <webDefaultXml>src/main/webapp/WEB-INF/jetty-pluto-web-default.xml</webDefaultXml>
+            <systemProperties>
+              <systemProperty>
+                <name>org.apache.pluto.embedded.portletIds</name>
+                <value>portlet-bridge-demo</value>
+              </systemProperty>
+            </systemProperties>
+
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.pluto</groupId>
+          <artifactId>maven-pluto-plugin</artifactId>
+        </plugin>  
+      </plugins>
+      </build>  
+    </profile>  
+
+
+    <!-- By default the war examples uses mojarra and packages for a nonjavaee environment (includes the Faces jars)! :) -->
+
+    <!-- If you are running in a nonJavaEE environment (i.e. Faces isn't already deployed) and hence need to have Mojarra packaged in the war: -->
+    <profile>
+      <id>mojarra-nonjavaee</id>
+      <activation>
+        <property>
+          <name>!jsf</name>
+        </property>
+      </activation>
+
+      <dependencies>
+        <dependency>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-api</artifactId>
+	    <version>${mojarra.version}</version>
+          <scope>compile</scope>
+        </dependency>
+        <dependency>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-impl</artifactId>
+          <version>${mojarra.version}</version>
+          <scope>runtime</scope>
+        </dependency>
+      </dependencies>
+      <properties>
+        <jsf_implementation>JSF-RI</jsf_implementation>
+      </properties>
+    </profile>
+
+    <!-- If you are running in a JavaEE environment (i.e. Faces is already deployed) and hence don't need to have Mojarra packaged in the war: -->
+    <!--    mvn install -Djsf=mojarra-nonjavaee -->
+    <profile>
+      <id>mojarra</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>mojarra-javaee</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-api</artifactId>
+        </dependency>
+      </dependencies>
+      <properties>
+        <jsf_implementation>JSF-RI</jsf_implementation>
+      </properties>
+    </profile>
+
+
+    <!-- To use this examples using the MyFacesImplementation: mvn clean install -Djsf=myfaces -->
+    <!-- Note: currently carstore doesn't work properly in a myfaces environment -->
+    <profile>
+      <id>myfaces-javaee</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>myfaces-javaee</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-api</artifactId>
+	    <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-impl</artifactId>
+          <scope>provided</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+   
+
+
+    <!-- If you are running in a nonJavaEE environment (i.e. Faces isn't already deployed) and hence need to have MyFaces packaged in the war: -->
+    <!--    mvn install -Djsf=myfaces-nonjavaee -->
+    <!-- Note: currently carstore doesn't work properly in a myfaces environment -->
+    <profile>
+      <id>myfaces-nonjavaee</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>myfaces-nonjavaee</value>
+        </property>
+      </activation>
+
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-api</artifactId>
+	    <version>${myfaces.version}</version>
+          <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-impl</artifactId>
+          <version>${myfaces.version}</version>
+          <scope>runtime</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+</project>

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/pom.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/pom.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/pom.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,277 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <name>MyFaces Portlet Bridge Facelets Guess Demo</name>
+  <artifactId>portlet-bridge-facelets-guess</artifactId>
+  <packaging>war</packaging>
+
+  <parent>
+    <groupId>org.apache.myfaces.portlet-bridge</groupId>
+    <artifactId>portlet-bridge-examples</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+ 
+  <dependencies>
+    <!-- Facelets-->
+    <dependency>
+      <groupId>com.sun.facelets</groupId>
+      <artifactId>jsf-facelets</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>portlet-api</groupId>
+      <artifactId>portlet-api</artifactId>
+    </dependency>
+        
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>portlet-bridge-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>portlet-bridge-impl</artifactId>
+    </dependency>
+
+  </dependencies>
+    
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-jdev-plugin</artifactId>
+        <groupId>org.apache.myfaces.trinidadbuild</groupId>
+        <configuration>
+          <libraries>
+            <library>JSP Runtime</library>
+          </libraries>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <profiles>
+    <profile>
+      <id>pluto-assemble</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <warName>${pom.artifactId}-pluto-${pom.version}</warName>
+              <outputDirectory>${project.build.directory}/../../assembly/target/webapp</outputDirectory>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    
+    <!-- sets up the webapp for deployment to pluto  "mvn clean install -Ppluto" -->    
+    <profile>
+      <id>pluto</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+            </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.pluto</groupId>
+            <artifactId>maven-pluto-plugin</artifactId>
+            <version>1.1.6</version>
+            <executions>  
+              <execution>  
+                <phase>generate-resources</phase>  
+                <goals>  
+                  <goal>assemble</goal>  
+                </goals>  
+              </execution>  
+            </executions>  
+          </plugin>  
+        </plugins>
+      </build>
+    </profile>
+
+    <profile>
+      <id>pluto2</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+            </configuration>
+          </plugin>
+          
+          <plugin>
+            <groupId>org.apache.portals.pluto</groupId>
+            <artifactId>maven-pluto-plugin</artifactId>
+            <version>2.0.0</version>
+            <executions>  
+              <execution>  
+                <phase>generate-resources</phase>  
+                <goals>  
+                  <goal>assemble</goal>  
+                </goals>  
+              </execution>  
+            </executions>  
+          </plugin>  
+        </plugins>
+      </build>
+    </profile>
+    
+    <!-- To run jetty, issue "mvn clean -PjettyConfig jetty:run" -->
+    <profile>
+      <id>jettyConfig</id>
+		<dependencies>
+        <dependency>
+          <groupId>com.bekk.boss</groupId>
+          <artifactId>maven-jetty-pluto-embedded</artifactId>
+        </dependency>
+		</dependencies>
+		<build>      
+      <plugins>
+        <plugin>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>maven-jetty-plugin</artifactId>
+          <configuration>
+            <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+            <webDefaultXml>src/main/webapp/WEB-INF/jetty-pluto-web-default.xml</webDefaultXml>
+            <systemProperties>
+              <systemProperty>
+                <name>org.apache.pluto.embedded.portletIds</name>
+                <value>portlet-bridge-facelets-guess</value>
+              </systemProperty>
+            </systemProperties>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.pluto</groupId>
+          <artifactId>maven-pluto-plugin</artifactId>
+        </plugin>  
+      </plugins>
+      </build>  
+    </profile>  
+  
+   <!-- By default the war examples uses mojarra and packages for a nonjavaee environment (includes the Faces jars)! :) -->
+
+    <!-- If you are running in a nonJavaEE environment (i.e. Faces isn't already deployed) and hence need to have Mojarra packaged in the war: -->
+    <profile>
+      <id>mojarra-nonjavaee</id>
+      <activation>
+        <property>
+          <name>!jsf</name>
+        </property>
+      </activation>
+
+      <dependencies>
+        <dependency>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-api</artifactId>
+	    <version>${mojarra.version}</version>
+          <scope>compile</scope>
+        </dependency>
+        <dependency>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-impl</artifactId>
+          <version>${mojarra.version}</version>
+          <scope>runtime</scope>
+        </dependency>
+      </dependencies>
+      <properties>
+        <jsf_implementation>JSF-RI</jsf_implementation>
+      </properties>
+    </profile>
+
+    <!-- If you are running in a JavaEE environment (i.e. Faces is already deployed) and hence don't need to have Mojarra packaged in the war: -->
+    <!--    mvn install -Djsf=mojarra-nonjavaee -->
+    <profile>
+      <id>mojarra</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>mojarra-javaee</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-api</artifactId>
+        </dependency>
+      </dependencies>
+      <properties>
+        <jsf_implementation>JSF-RI</jsf_implementation>
+      </properties>
+    </profile>
+
+
+    <!-- To use this examples using the MyFacesImplementation: mvn clean install -Djsf=myfaces -->
+    <!-- Note: currently carstore doesn't work properly in a myfaces environment -->
+    <profile>
+      <id>myfaces-javaee</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>myfaces-javaee</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-api</artifactId>
+	    <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-impl</artifactId>
+          <scope>provided</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+   
+
+
+    <!-- If you are running in a nonJavaEE environment (i.e. Faces isn't already deployed) and hence need to have MyFaces packaged in the war: -->
+    <!--    mvn install -Djsf=myfaces-nonjavaee -->
+    <!-- Note: currently carstore doesn't work properly in a myfaces environment -->
+    <profile>
+      <id>myfaces-nonjavaee</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>myfaces-nonjavaee</value>
+        </property>
+      </activation>
+
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-api</artifactId>
+	    <version>${myfaces.version}</version>
+          <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-impl</artifactId>
+          <version>${myfaces.version}</version>
+          <scope>runtime</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+</project>

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/java/guess/NumberBean.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/java/guess/NumberBean.java?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/java/guess/NumberBean.java (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/java/guess/NumberBean.java Wed May 26 20:20:51 2010
@@ -0,0 +1,89 @@
+/**
+ * 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.
+ */
+
+package guess;
+
+import java.io.Serializable;
+
+import java.util.Random;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.ValidatorException;
+
+public class NumberBean implements Serializable {
+
+  protected final static Random rand = new Random();
+
+  protected int min;
+  protected int max;
+  protected int guess;
+  protected int actual;
+    
+  // Default Constructor
+  public NumberBean() {
+    this.min = 1;
+    this.max = 10;
+  }
+   
+  // called by JSF to validate user input
+  public void validate(FacesContext context, UIComponent component, Object value)
+      throws ValidatorException {
+      
+    // coerce the value to an int
+    try {
+      int param = Integer.parseInt(value.toString());
+    
+      // validate param
+      if (param > this.max || param < this.min) {
+          FacesMessage msg = new FacesMessage("Guess must be between "+this.min+" and "+this.max);
+          throw new ValidatorException(msg);
+      }
+    } catch (NumberFormatException e) {
+      FacesMessage msg = new FacesMessage("Must be a number");
+      throw new ValidatorException(msg);
+    }
+  }
+    
+  // lazy generate our actual value
+  public synchronized int getActual() {
+    if (this.actual == 0) {
+        this.actual = rand.nextInt(this.max-this.min);
+        this.actual += this.min;
+    }
+    return this.actual;
+  }
+  
+  // our message for the response
+  public String getMessage() {    
+    if (this.guess == this.getActual()) {
+      return "Sweet, you got it right!";
+    } else if (this.guess < this.getActual()) {
+      return "Sorry, try something higher";
+    } else {
+      return "Too bad, go lower";
+    }
+  }
+  
+  // other bean properties
+  public int getMin() { return this.min; }
+  public int getMax() { return this.max; }
+  public int getGuess() { return this.guess; }
+    
+  public void setMin(int min) { this.min = min; }
+  public void setMax(int max) { this.max = max; }
+  public void setGuess(int guess) { this.guess = guess; }
+    
+}

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/java/guess/facelets/PortletFaceletViewHandler.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/java/guess/facelets/PortletFaceletViewHandler.java?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/java/guess/facelets/PortletFaceletViewHandler.java (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/java/guess/facelets/PortletFaceletViewHandler.java Wed May 26 20:20:51 2010
@@ -0,0 +1,225 @@
+/**
+ * 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.
+ */
+
+package guess.facelets;
+
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.Writer;
+
+import java.net.URL;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.el.ELException;
+
+import javax.faces.FacesException;
+import javax.faces.application.StateManager;
+import javax.faces.application.ViewHandler;
+import javax.faces.component.UIViewRoot;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.RenderKit;
+
+import com.sun.facelets.FaceletViewHandler;
+import com.sun.facelets.util.DevTools;
+
+import javax.portlet.faces.Bridge;
+
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletResponse;
+
+
+public class PortletFaceletViewHandler
+  extends FaceletViewHandler
+{
+
+  public PortletFaceletViewHandler(ViewHandler parent)
+  {
+    super(parent);
+  }
+
+
+  protected ResponseWriter createResponseWriter(FacesContext context)
+    throws IOException, FacesException
+  {
+    // Only override if in a portlet request
+    if (context.getExternalContext().getRequestMap().get(Bridge.PORTLET_LIFECYCLE_PHASE) == null)
+    {
+      return super.createResponseWriter(context);
+    }
+
+    ExternalContext extContext = context.getExternalContext();
+    RenderKit renderKit = context.getRenderKit();
+    // Avoid a cryptic NullPointerException when the renderkit ID
+    // is incorrectly set
+    if (renderKit == null)
+    {
+      String id = context.getViewRoot().getRenderKitId();
+      throw new IllegalStateException("No render kit was available for id \"" + 
+                                      id + "\"");
+    }
+
+    RenderResponse response = (RenderResponse) extContext.getResponse();
+
+    // get our content type
+    String contentType = 
+      (String) extContext.getRequestMap().get("facelets.ContentType");
+
+    // get the encoding
+    String encoding = 
+      (String) extContext.getRequestMap().get("facelets.Encoding");
+
+    ResponseWriter writer;
+    //append */* to the contentType so createResponseWriter will succeed no matter
+    //the requested contentType.
+    if (contentType != null && !contentType.equals("*/*"))
+    {
+      contentType += ",*/*";
+    }
+    // Create a dummy ResponseWriter with a bogus writer,
+    // so we can figure out what content type the ReponseWriter
+    // is really going to ask for
+    try
+    {
+      writer = 
+          renderKit.createResponseWriter(NullWriter.Instance, contentType, 
+                                         encoding);
+    }
+    catch (IllegalArgumentException e)
+    {
+      //Added because of an RI bug prior to 1.2_05-b3.  Might as well leave it in case other
+      //impls have the same problem.  https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=613
+      log.fine("The impl didn't correctly handled '*/*' in the content type list.  Trying '*/*' directly.");
+      writer = 
+          renderKit.createResponseWriter(NullWriter.Instance, "*/*", encoding);
+    }
+
+    //Override the JSF provided content type if necessary
+    contentType = getResponseContentType(context, writer.getContentType());
+    encoding = getResponseEncoding(context, writer.getCharacterEncoding());
+
+    // apply them to the response
+    response.setContentType(contentType + "; charset=" + encoding);
+
+    // removed 2005.8.23 to comply with J2EE 1.3
+    // response.setCharacterEncoding(encoding);
+
+    // Now, clone with the real writer
+    writer = writer.cloneWithWriter(response.getWriter());
+
+    return writer;
+  }
+
+  /**
+   * Generate the encoding
+   *
+   * @param context
+   * @param orig
+   * @return
+   */
+  protected String getResponseEncoding(FacesContext context, String orig)
+  {
+    String encoding = orig;
+
+    // see if we need to override the encoding
+    Map m = context.getExternalContext().getRequestMap();
+    Map sm = context.getExternalContext().getSessionMap();
+
+    // 1. check the request attribute
+    if (m.containsKey("facelets.Encoding"))
+    {
+      encoding = (String) m.get("facelets.Encoding");
+      if (log.isLoggable(Level.FINEST))
+      {
+        log.finest("Facelet specified alternate encoding '" + encoding + 
+                   "'");
+      }
+      sm.put(CHARACTER_ENCODING_KEY, encoding);
+    }
+
+    // 2. get it from request
+    if (encoding == null)
+    {
+      encoding = 
+          context.getExternalContext().getResponseCharacterEncoding();
+    }
+
+    // 3. get it from the session
+    if (encoding == null)
+    {
+      encoding = (String) sm.get(CHARACTER_ENCODING_KEY);
+      if (log.isLoggable(Level.FINEST))
+      {
+        log.finest("Session specified alternate encoding '" + encoding + 
+                   "'");
+      }
+    }
+
+    // 4. default it
+    if (encoding == null)
+    {
+      encoding = "UTF-8";
+      if (log.isLoggable(Level.FINEST))
+      {
+        log.finest("ResponseWriter created had a null CharacterEncoding, defaulting to UTF-8");
+      }
+    }
+
+    return encoding;
+  }
+
+
+  protected static class NullWriter
+    extends Writer
+  {
+
+    static final NullWriter Instance = new NullWriter();
+
+    public void write(char[] buffer)
+    {
+    }
+
+    public void write(char[] buffer, int off, int len)
+    {
+    }
+
+    public void write(String str)
+    {
+    }
+
+    public void write(int c)
+    {
+    }
+
+    public void write(String str, int off, int len)
+    {
+    }
+
+    public void close()
+    {
+    }
+
+    public void flush()
+    {
+    }
+  }
+
+}

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/resources/META-INF/NOTICE?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/resources/META-INF/NOTICE (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/resources/META-INF/NOTICE Wed May 26 20:20:51 2010
@@ -0,0 +1,20 @@
+Apache MyFaces Portlet Bridge
+Copyright [2007, 2008, 2009] The Apache Software Foundation
+
+This is an implementation of a public review specification
+developed under the Java Community Process (JCP). This
+implementation may not fully conform to this specification.
+This implementation may differ from the final specification.
+The code is not compatible with any specification of the JCP.
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+Portions of this software are Copyright (c) 2007, Oracle 
+Corporation, <http://www.oracle.com/> and are licensed to 
+the Apache Software Foundation under the "Software Grant 
+and Corporate Contribution License Agreement"
+
+See the LICENSE.txt file for information on all licenses 
+associated with this software.
+

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/faces-config.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/faces-config.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,63 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: faces-config.xml,v 1.4 2008/07/13 19:01:52 rlubke Exp $
+-->
+<!DOCTYPE faces-config PUBLIC
+  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
+  "http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+
+<faces-config>
+			
+  <!-- from project setup -->
+  <application>
+    <view-handler>
+      guess.facelets.PortletFaceletViewHandler
+    </view-handler>    
+  </application>
+  
+  <!-- our NumberBean we created before -->
+  <managed-bean>
+    <managed-bean-name>NumberBean</managed-bean-name>
+    <managed-bean-class>guess.NumberBean</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+    <managed-property>
+      <property-name>min</property-name>
+      <value>1</value>
+    </managed-property>
+    <managed-property>
+      <property-name>max</property-name>
+      <value>10</value>
+    </managed-property>
+  </managed-bean>
+  
+  <!-- going from guess.xhtml to response.xhtml -->
+  <navigation-rule>
+    <from-view-id>/guess.xhtml</from-view-id>
+    <navigation-case>
+      <from-outcome>success</from-outcome>
+      <to-view-id>/response.xhtml</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+  <!-- going from response.xhtml to guess.xhtml -->
+  <navigation-rule>
+    <from-view-id>/response.xhtml</from-view-id>
+    <navigation-case>
+        <from-outcome>success</from-outcome>
+      <to-view-id>/guess.xhtml</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+</faces-config>

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/jetty-pluto-web-default.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,242 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+	   
+-->
+
+<!-- This web.xml file is used in order to configure pluto to run with jetty in order to test the appropriate web applications -->
+<web-app 
+   xmlns="http://java.sun.com/xml/ns/javaee" 
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
+   metadata-complete="true"
+   version="2.5"> 
+
+  <context-param>
+    <param-name>org.mortbay.jetty.webapp.NoTLDJarPattern</param-name>
+    <param-value>start.jar|ant-.*\.jar|dojo-.*\.jar|jetty-.*\.jar|jsp-api-.*\.jar|junit-.*\.jar|servlet-api-.*\.jar|dnsns\.jar|rt\.jar|jsse\.jar|tools\.jar|sunpkcs11\.jar|sunjce_provider\.jar|xerces.*\.jar</param-value>
+  </context-param>
+  
+  <!-- Listeners -->
+  <listener>
+    <listener-class>
+      com.bekk.boss.pluto.embedded.jetty.util.OverrideContextLoaderListener
+    </listener-class>
+  </listener>
+  
+  <listener>
+    <listener-class>
      com.bekk.boss.pluto.embedded.util.PortalStartupListener
+    </listener-class>
+  </listener>
+
+  <!-- Filters and Mappings -->
+  <filter>
+    <filter-name>plutoResourceFilter</filter-name>
+    <filter-class>com.bekk.boss.pluto.embedded.util.PlutResourcesFilter</filter-class>
+  </filter>
+
+  <filter>
+    <filter-name>plutoPortalDriver</filter-name>
+    <filter-class>com.bekk.boss.pluto.embedded.util.PlutoPortalDriverFilter</filter-class>
+  </filter>
+	
+  <filter-mapping>
+    <filter-name>plutoResourceFilter</filter-name>
+    <url-pattern>*.css</url-pattern>
+    <url-pattern>*.gif</url-pattern>
+    <url-pattern>*.png</url-pattern>
+    <url-pattern>*.js</url-pattern>
+  </filter-mapping>
+
+  <filter-mapping>
+    <filter-name>plutoPortalDriver</filter-name>
+    <url-pattern>/pluto/index.jsp</url-pattern>
+    <url-pattern>/pluto/index.jsp/*</url-pattern>
+  </filter-mapping>
+
+  <!-- Servlets and Mappings -->
+
+  <!--
+    The default servlet.                                                  
+    This servlet, normally mapped to /, provides the handling for static  
+    content, OPTIONS and TRACE methods for the context.                   
+    The following initParameters are supported:                           
+                                                                          
+      acceptRanges     If true, range requests and responses are          
+                       supported                                          
+                                                                          
+      dirAllowed       If true, directory listings are returned if no     
+                       welcome file is found. Else 403 Forbidden.         
+                                                                          
+      redirectWelcome  If true, redirect welcome file requests            
+                       else use request dispatcher forwards               
+                                                                          
+      gzip             If set to true, then static content will be served  
+                       as gzip content encoded if a matching resource is  
+                       found ending with ".gz"                            
+                                                                          
+      resoureBase      Can be set to replace the context resource base    
+                                                                          
+      relativeResourceBase                                                
+                       Set with a pathname relative to the base of the    
+                       servlet context root. Useful for only serving      
+                       static content from only specific subdirectories.  
+                                                                          
+      useFileMappedBuffer                                                 
+                       If set to true (the default), a  memory mapped     
+                       file buffer will be used to serve static content   
+                       when using an NIO connector. Setting this value    
+                       to false means that a direct buffer will be used   
+                       instead. If you are having trouble with Windows    
+                       file locking, set this to false.                   
+                                                                          
+     cacheControl      If set, all static content will have this value    
+                       set as the cache-control header.                   
+                                                                          
+     maxCacheSize      Maximum size of the static resource cache          
+                                                                          
+     maxCachedFileSize Maximum size of any single file in the cache       
+                                                                          
+     maxCachedFiles    Maximum number of files in the cache               
+  -->
+
+  <servlet>
+    <servlet-name>default</servlet-name>
+    <servlet-class>org.mortbay.jetty.servlet.DefaultServlet</servlet-class>
+    <init-param>
+      <param-name>acceptRanges</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>dirAllowed</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>redirectWelcome</param-name>
+      <param-value>false</param-value>
+    </init-param>
+    <init-param>
+      <param-name>maxCacheSize</param-name>
+      <param-value>4000000</param-value>
+    </init-param>
+    <init-param>
+      <param-name>maxCachedFileSize</param-name>
+      <param-value>254000</param-value>
+    </init-param>
+    <init-param>
+      <param-name>maxCachedFiles</param-name>
+      <param-value>1000</param-value>
+    </init-param>
+    <init-param>
+      <param-name>gzip</param-name>
+      <param-value>true</param-value>
+    </init-param>
+    <init-param>
+      <param-name>useFileMappedBuffer</param-name>
+      <param-value>true</param-value>
+    </init-param>  
+    <load-on-startup>0</load-on-startup>
+  </servlet> 
+
+  <servlet id="jsp">
+    <servlet-name>jsp</servlet-name>
+    <servlet-class>com.bekk.boss.pluto.embedded.util.PortletJspServlet</servlet-class>
+    <init-param>
+        <param-name>logVerbosityLevel</param-name>
+        <param-value>DEBUG</param-value>
+    </init-param>
+    <init-param>
+        <param-name>fork</param-name>
+        <param-value>false</param-value>
+    </init-param>
+    <init-param>
+        <param-name>xpoweredBy</param-name>
+        <param-value>false</param-value>
+    </init-param>
+    <load-on-startup>0</load-on-startup>
+  </servlet>
+
+  <servlet-mapping>
+    <servlet-name>default</servlet-name>
+    <url-pattern>/</url-pattern>
+  </servlet-mapping>
+
+  <servlet-mapping> 
+    <servlet-name>jsp</servlet-name> 
+    <url-pattern>*.jsp</url-pattern> 
+    <url-pattern>*.jspf</url-pattern>
+    <url-pattern>*.jspx</url-pattern>
+    <url-pattern>*.xsp</url-pattern>
+    <url-pattern>*.JSP</url-pattern> 
+    <url-pattern>*.JSPF</url-pattern>
+    <url-pattern>*.JSPX</url-pattern>
+    <url-pattern>*.XSP</url-pattern>
+  </servlet-mapping>
+
+  <!-- Other settings -->
+  <session-config>
+    <session-timeout>60</session-timeout>
+  </session-config>
+
+  <welcome-file-list>
+    <welcome-file>index.jsp</welcome-file>
+  </welcome-file-list>
+	
+  <locale-encoding-mapping-list>
+    <locale-encoding-mapping><locale>ar</locale><encoding>ISO-8859-6</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>be</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>bg</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ca</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>cs</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>da</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>de</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>el</locale><encoding>ISO-8859-7</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>en</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>es</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>et</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>fi</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>fr</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>hr</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>hu</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>is</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>it</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>iw</locale><encoding>ISO-8859-8</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ja</locale><encoding>Shift_JIS</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ko</locale><encoding>EUC-KR</encoding></locale-encoding-mapping>     
+    <locale-encoding-mapping><locale>lt</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>lv</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>mk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>nl</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>no</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>pl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>pt</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ro</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>ru</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sh</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sk</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sl</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sq</locale><encoding>ISO-8859-2</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sr</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>sv</locale><encoding>ISO-8859-1</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>tr</locale><encoding>ISO-8859-9</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>uk</locale><encoding>ISO-8859-5</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>zh</locale><encoding>GB2312</encoding></locale-encoding-mapping>
+    <locale-encoding-mapping><locale>zh_TW</locale><encoding>Big5</encoding></locale-encoding-mapping>   
+  </locale-encoding-mapping-list>
+</web-app>
+

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/portlet.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/portlet.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/portlet.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.	   
+-->
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"             
+                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"             
+                   xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
+                                       http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+                   id="CarStore" version="2.0">
+
+
+  <portlet>
+    <description>Facelets Guess Number Demo</description>
+    <portlet-name>portlet-bridge-facelets-guess</portlet-name>
+    <display-name>Mojarra Car Demo</display-name>
+    <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>
+
+    <init-param>
+      <name>javax.portlet.faces.defaultViewId.view</name>
+      <value>/guess.xhtml</value>
+    </init-param>
+
+    <supports>
+      <mime-type>text/html</mime-type>
+      <portlet-mode>view</portlet-mode>
+    </supports>
+
+    <supported-locale>en</supported-locale>
+
+    <portlet-info>
+      <title>Facelets Guess Number Demo</title>
+      <short-title>Guess Number</short-title>
+    </portlet-info>
+
+  </portlet>
+  
+</portlet-app>

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/web.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/web.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/WEB-INF/web.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,86 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: web.xml,v 1.5 2008/07/13 19:01:52 rlubke Exp $
+-->
+<!DOCTYPE web-app PUBLIC
+  "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+  "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+
+<web-app>
+
+    <display-name>Facelets Tutorial</display-name>
+    <description>Number Guess Game</description>
+
+    <context-param>
+        <param-name>facelets.REFRESH_PERIOD</param-name>
+        <param-value>2</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>facelets.DEVELOPMENT</param-name>
+        <param-value>true</param-value>
+    </context-param>
+
+    <context-param>
+        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+        <param-value>client</param-value>
+    </context-param>
+	
+	<context-param>
+		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+		<param-value>.xhtml</param-value>
+	</context-param>
+
+    <context-param>
+        <param-name>com.sun.faces.validateXml</param-name>
+        <param-value>true</param-value>
+        <description>
+            Set this flag to true if you want the JavaServer Faces
+            Reference Implementation to validate the XML in your
+            faces-config.xml resources against the DTD.  Default
+            value is false.
+        </description>
+    </context-param>
+
+    <context-param>
+        <param-name>com.sun.faces.verifyObjects</param-name>
+        <param-value>true</param-value>
+        <description>
+            Set this flag to true if you want the JavaServer Faces
+            Reference Implementation to verify that all of the application
+            objects you have configured (components, converters,
+            renderers, and validators) can be successfully created.
+            Default value is false.
+        </description>
+    </context-param>
+
+    <!-- Faces Servlet -->
+    <servlet>
+        <servlet-name>Faces Servlet</servlet-name>
+        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
+
+
+    <!-- Faces Servlet Mapping -->
+    <servlet-mapping>
+        <servlet-name>Faces Servlet</servlet-name>
+        <url-pattern>*.jsf</url-pattern>
+    </servlet-mapping>
+
+
+</web-app>

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/guess.xhtml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/guess.xhtml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/guess.xhtml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/guess.xhtml Wed May 26 20:20:51 2010
@@ -0,0 +1,51 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: guess.xhtml,v 1.2 2008/07/13 19:01:42 rlubke Exp $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html">
+<body>
+
+This text above will not be displayed.
+
+<ui:composition template="/template.xhtml">
+
+This text will not be displayed.
+
+  <ui:define name="title">
+    I'm thinking of a number from #{NumberBean.min} to #{NumberBean.max}.  Can you guess it?
+  </ui:define>
+
+This text will also not be displayed.
+
+  <ui:define name="body">
+    <h:form id="helloForm">
+      <h:inputText type="text" id="userNo" value="#{NumberBean.guess}" validator="#{NumberBean.validate}"/>
+      <br/>
+      <h:commandButton type="submit" id="submit" action="success" value="Submit" />
+      <br/>
+      <h:message showSummary="true" showDetail="false" style="color: red; font-weight: bold;" id="errors1" for="userNo"/>
+    </h:form>
+  </ui:define>
+
+This text will not be displayed.
+  
+</ui:composition>
+
+This text below will also not be displayed.
+
+</body>
+</html>
\ No newline at end of file

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/index.html
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/index.html?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/index.html (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/index.html Wed May 26 20:20:51 2010
@@ -0,0 +1,26 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: index.html,v 1.3 2008/07/13 19:01:42 rlubke Exp $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<meta http-equiv="refresh" content="0; url=./guess.jsf" />
+<title>Untitled Document</title>
+</head>
+
+<body>
+</body>
+</html>

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/response.xhtml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/response.xhtml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/response.xhtml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/response.xhtml Wed May 26 20:20:51 2010
@@ -0,0 +1,37 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: response.xhtml,v 1.3 2008/07/13 19:01:42 rlubke Exp $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:h="http://java.sun.com/jsf/html">
+<body>
+
+<ui:composition template="/template.xhtml">
+
+  <ui:define name="title">
+    #{NumberBean.message}
+  </ui:define>
+  
+  <ui:define name="body">
+    <form jsfc="h:form">
+    <input jsfc="h:commandButton" type="submit" id="back" value="Back" action="success"/>
+    </form>
+  </ui:define>
+  
+</ui:composition>
+
+</body>
+</html>
\ No newline at end of file

Added: myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/template.xhtml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/template.xhtml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/template.xhtml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/facelets-guess/src/main/webapp/template.xhtml Wed May 26 20:20:51 2010
@@ -0,0 +1,39 @@
+<!--
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ $Id: template.xhtml,v 1.2 2008/07/13 19:01:42 rlubke Exp $
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Facelets: Number Guess Tutorial</title>
+<style type="text/css">
+body {
+  font-family: Verdana, Arial, Helvetica, sans-serif;
+  font-size: small;
+}
+</style>
+</head>
+
+<body>
+<h1>
+  <ui:insert name="title">Default Title</ui:insert>
+</h1>
+<p>
+  <ui:insert name="body">Default Body</ui:insert>
+</p>
+</body>
+
+</html>
\ No newline at end of file

Added: myfaces/portlet-bridge/core/trunk/examples/guessNumber/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/core/trunk/examples/guessNumber/pom.xml?rev=948569&view=auto
==============================================================================
--- myfaces/portlet-bridge/core/trunk/examples/guessNumber/pom.xml (added)
+++ myfaces/portlet-bridge/core/trunk/examples/guessNumber/pom.xml Wed May 26 20:20:51 2010
@@ -0,0 +1,276 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <name>MyFaces Portlet Bridge GuessNumber JSP Demo</name>
+  <artifactId>portlet-bridge-guessNumber-jsp</artifactId>
+  <packaging>war</packaging>
+
+  <parent>
+    <groupId>org.apache.myfaces.portlet-bridge</groupId>
+    <artifactId>portlet-bridge-examples</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+  
+  <dependencies>
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+    </dependency>
+    
+    <dependency>
+      <groupId>portlet-api</groupId>
+      <artifactId>portlet-api</artifactId>
+    </dependency>
+        
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>portlet-bridge-api</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
+      <artifactId>portlet-bridge-impl</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.faces</groupId>
+      <artifactId>jsf-impl</artifactId>
+    </dependency>
+
+  </dependencies>
+    
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-jdev-plugin</artifactId>
+        <groupId>org.apache.myfaces.trinidadbuild</groupId>
+        <configuration>
+          <libraries>
+            <library>JSP Runtime</library>
+          </libraries>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <profiles>
+    <profile>
+      <id>pluto-assemble</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <warName>${pom.artifactId}-pluto-${pom.version}</warName>
+              <outputDirectory>${project.build.directory}/../../assembly/target/webapp</outputDirectory>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    
+    <!-- sets up the webapp for deployment to pluto  "mvn clean install -Ppluto" -->    
+    <profile>
+      <id>pluto</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+            </configuration>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.pluto</groupId>
+            <artifactId>maven-pluto-plugin</artifactId>
+            <version>1.1.6</version>
+            <executions>  
+              <execution>  
+                <phase>generate-resources</phase>  
+                <goals>  
+                  <goal>assemble</goal>  
+                </goals>  
+              </execution>  
+            </executions>  
+          </plugin>  
+        </plugins>
+      </build>
+    </profile>
+
+    <profile>
+      <id>pluto2</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <configuration>
+              <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+            </configuration>
+          </plugin>
+          
+          <plugin>
+            <groupId>org.apache.portals.pluto</groupId>
+            <artifactId>maven-pluto-plugin</artifactId>
+            <version>2.0.0</version>
+            <executions>  
+              <execution>  
+                <phase>generate-resources</phase>  
+                <goals>  
+                  <goal>assemble</goal>  
+                </goals>  
+              </execution>  
+            </executions>  
+          </plugin>  
+        </plugins>
+      </build>
+    </profile>
+    
+    <!-- To run jetty, issue "mvn clean -PjettyConfig jetty:run" -->
+    <profile>
+      <id>jettyConfig</id>
+		<dependencies>
+        <dependency>
+          <groupId>com.bekk.boss</groupId>
+          <artifactId>maven-jetty-pluto-embedded</artifactId>
+        </dependency>
+		</dependencies>
+		<build>      
+      <plugins>
+        <plugin>
+          <groupId>org.mortbay.jetty</groupId>
+          <artifactId>maven-jetty-plugin</artifactId>
+          <configuration>
+            <webXml>${project.build.directory}/pluto-resources/web.xml</webXml>
+            <webDefaultXml>src/main/webapp/WEB-INF/jetty-pluto-web-default.xml</webDefaultXml>
+            <systemProperties>
+              <systemProperty>
+                <name>org.apache.pluto.embedded.portletIds</name>
+                <value>portlet-bridge-guessNumber-jsp</value>
+              </systemProperty>
+            </systemProperties>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.pluto</groupId>
+          <artifactId>maven-pluto-plugin</artifactId>
+        </plugin>  
+      </plugins>
+      </build>  
+    </profile>  
+  
+   <!-- By default the war examples uses mojarra and packages for a nonjavaee environment (includes the Faces jars)! :) -->
+
+    <!-- If you are running in a nonJavaEE environment (i.e. Faces isn't already deployed) and hence need to have Mojarra packaged in the war: -->
+    <profile>
+      <id>mojarra-nonjavaee</id>
+      <activation>
+        <property>
+          <name>!jsf</name>
+        </property>
+      </activation>
+
+      <dependencies>
+        <dependency>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-api</artifactId>
+	    <version>${mojarra.version}</version>
+          <scope>compile</scope>
+        </dependency>
+        <dependency>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-impl</artifactId>
+          <version>${mojarra.version}</version>
+          <scope>runtime</scope>
+        </dependency>
+      </dependencies>
+      <properties>
+        <jsf_implementation>JSF-RI</jsf_implementation>
+      </properties>
+    </profile>
+
+    <!-- If you are running in a JavaEE environment (i.e. Faces is already deployed) and hence don't need to have Mojarra packaged in the war: -->
+    <!--    mvn install -Djsf=mojarra-nonjavaee -->
+    <profile>
+      <id>mojarra</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>mojarra-javaee</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>javax.faces</groupId>
+          <artifactId>jsf-api</artifactId>
+        </dependency>
+      </dependencies>
+      <properties>
+        <jsf_implementation>JSF-RI</jsf_implementation>
+      </properties>
+    </profile>
+
+
+    <!-- To use this examples using the MyFacesImplementation: mvn clean install -Djsf=myfaces -->
+    <!-- Note: currently carstore doesn't work properly in a myfaces environment -->
+    <profile>
+      <id>myfaces-javaee</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>myfaces-javaee</value>
+        </property>
+      </activation>
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-api</artifactId>
+	    <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-impl</artifactId>
+          <scope>provided</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+   
+
+
+    <!-- If you are running in a nonJavaEE environment (i.e. Faces isn't already deployed) and hence need to have MyFaces packaged in the war: -->
+    <!--    mvn install -Djsf=myfaces-nonjavaee -->
+    <!-- Note: currently carstore doesn't work properly in a myfaces environment -->
+    <profile>
+      <id>myfaces-nonjavaee</id>
+      <activation>
+        <property>
+          <name>jsf</name>
+          <value>myfaces-nonjavaee</value>
+        </property>
+      </activation>
+
+      <dependencies>
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-api</artifactId>
+	    <version>${myfaces.version}</version>
+          <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+          <groupId>org.apache.myfaces.core</groupId>
+          <artifactId>myfaces-impl</artifactId>
+          <version>${myfaces.version}</version>
+          <scope>runtime</scope>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
+</project>