You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2009/12/05 00:19:16 UTC

svn commit: r887443 - in /myfaces/orchestra/trunk: ./ core20/ core20/src/ core20/src/main/ core20/src/main/java/ core20/src/main/java/org/ core20/src/main/java/org/apache/ core20/src/main/java/org/apache/myfaces/ core20/src/main/java/org/apache/myfaces...

Author: lu4242
Date: Fri Dec  4 23:19:15 2009
New Revision: 887443

URL: http://svn.apache.org/viewvc?rev=887443&view=rev
Log:
ORCHESTRA-45 Support for JSF 2.0

Added:
    myfaces/orchestra/trunk/core20/
    myfaces/orchestra/trunk/core20/LICENSE.txt
    myfaces/orchestra/trunk/core20/NOTICE.txt
    myfaces/orchestra/trunk/core20/RELEASE-NOTES.txt
    myfaces/orchestra/trunk/core20/pom.xml
    myfaces/orchestra/trunk/core20/src/
    myfaces/orchestra/trunk/core20/src/main/
    myfaces/orchestra/trunk/core20/src/main/java/
    myfaces/orchestra/trunk/core20/src/main/java/org/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/conversation/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/components/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/components/facelets/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/components/facelets/ConverterTagHandler.java
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/PortletExternalContextWrapper.java
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_FacesContextWrapper.java
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/urlParamNav/
    myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/urlParamNav/UrlParameterViewHandler.java
    myfaces/orchestra/trunk/core20/src/main/resources/
Modified:
    myfaces/orchestra/trunk/pom.xml

Added: myfaces/orchestra/trunk/core20/LICENSE.txt
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/LICENSE.txt?rev=887443&view=auto
==============================================================================
--- myfaces/orchestra/trunk/core20/LICENSE.txt (added)
+++ myfaces/orchestra/trunk/core20/LICENSE.txt Fri Dec  4 23:19:15 2009
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   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.

Added: myfaces/orchestra/trunk/core20/NOTICE.txt
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/NOTICE.txt?rev=887443&view=auto
==============================================================================
--- myfaces/orchestra/trunk/core20/NOTICE.txt (added)
+++ myfaces/orchestra/trunk/core20/NOTICE.txt Fri Dec  4 23:19:15 2009
@@ -0,0 +1,5 @@
+Apache MyFaces Orchestra
+Copyright 2007-2008 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).

Added: myfaces/orchestra/trunk/core20/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/RELEASE-NOTES.txt?rev=887443&view=auto
==============================================================================
--- myfaces/orchestra/trunk/core20/RELEASE-NOTES.txt (added)
+++ myfaces/orchestra/trunk/core20/RELEASE-NOTES.txt Fri Dec  4 23:19:15 2009
@@ -0,0 +1,68 @@
+<!--
+
+ 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.
+
+-->
+
+$Id: RELEASE-NOTES.txt 749034 2009-03-01 14:05:22Z skitching $
+
+
+= 1.3.1 =
+
+== Overview ==
+
+This release is a bugfix release only (and the fixed bugs are not particularly severe).
+Upgrading from 1.3 is necessary only if one of these specific bugfixes are required.
+
+One minor new feature is introduced : the ability to set the ConversationContext timeout.
+See the "New Features" section for details.
+
+== Backwards Compatibility ==
+
+This release is backwards-compatible with version 1.3.
+
+== Bugfixes
+
+* ORCHESTRA-30: viewcontroller framework does not call initView again when conversation containing ViewController bean is invalidated (ie ViewController bean is deleted). This patch doesn't actually make that happen, but it does make it possible for a backing bean to force the viewcontroller framework to do so (by forcing creation of a new ViewRoot instance).
+
+* ORCHESTRA-32: NullPointerException when deserializing an HttpSession containing a ConversationManager instance.
+
+* ORCHESTRA-34: NullPointerException on timeout of ConversationContext. The ConversationWiperThread does not run inside a request, and therefore had no FrameworkAdapter, but removeAndInvalidateConversationContext tries to check the conversationContext query param.
+
+* ORCHESTRA-35: In some containers (eg OC4J), ConversationManager is not removed from ConversationWiperThread on session timeout. Thanks to Steve Ronderos for the bugreport.
+
+* ORCHESTRA-36: Improve error message when dependency injection is misconfigured. Thanks to Kito Mann for the suggestion.
+
+== Known Issues
+
+ * As far as we know, Orchestra still does not work with Portlets (ORCHESTRA-17, ORCHESTRA-22). At least,
+   problems have been reported against earlier versions and no-one has tested this release with Portlets.
+
+== Major Changes
+
+None.
+
+== New Features
+
+* Enhancement ORCHESTRA-33 allows the user to define a bean whose name is the fully-qualified name of the ConversationContextFactory class. An instance of this bean will then be created at startup, and its createConversationContext method used to create new ConversationContext instances configured in any desired way. To simply set the timeout, this bean can be configured as an instance of the default ConversationContextFactoryImpl class, and the timeout property set via normal property injection to any desired value.
+
+== History
+
+1.0 release based on r583187
+Branched for 1.1 release on r634925
+Branched for 1.2 release on r671173
+Branched for 1.3 release on r707462
+Branched for 1.3.1 release on r??

Added: myfaces/orchestra/trunk/core20/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/pom.xml?rev=887443&view=auto
==============================================================================
--- myfaces/orchestra/trunk/core20/pom.xml (added)
+++ myfaces/orchestra/trunk/core20/pom.xml Fri Dec  4 23:19:15 2009
@@ -0,0 +1,491 @@
+<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">
+
+  <parent>
+    <groupId>org.apache.myfaces.orchestra</groupId>
+    <artifactId>myfaces-orchestra-maven</artifactId>
+    <version>1.2</version>
+  </parent>
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.myfaces.orchestra</groupId>
+  <artifactId>myfaces-orchestra-core20</artifactId>
+  <packaging>jar</packaging>
+  <name>MyFaces Orchestra Core 20</name>
+  <description>Core API and implementation of MyFaces Orchestra for JSF 2.0</description>
+  <version>1.4-SNAPSHOT</version>
+
+  <scm>
+    <connection>scm:svn:http://svn.apache.org/repos/asf/myfaces/orchestra/trunk/core12</connection>
+    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/myfaces/orchestra/trunk/core12</developerConnection>
+    <url>http://svn.apache.org/viewcvs.cgi/myfaces/orchestra/trunk/core12</url>
+  </scm>
+
+  <dependencies>
+
+    <dependency>
+      <groupId>org.apache.myfaces.core</groupId>
+      <artifactId>myfaces-api</artifactId>
+      <version>2.0.0-alpha</version>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.myfaces.shared</groupId>
+      <artifactId>myfaces-shared-orchestra</artifactId>
+      <version>${myfaces-orchestra-shared.version}</version>
+      <scope>provided</scope>
+      <!-- because we add all classes to the jar directly -->
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+      <version>2.1</version>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>servlet-api</artifactId>
+      <version>2.5</version>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>portlet-api</groupId>
+      <artifactId>portlet-api</artifactId>
+      <version>1.0</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!--
+    <dependency>
+      <groupId>com.sun.facelets</groupId>
+      <artifactId>jsf-facelets</artifactId>
+      <version>1.1.14</version>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+    -->
+
+    <dependency>
+      <groupId>javax.persistence</groupId>
+      <artifactId>persistence-api</artifactId>
+      <version>1.0</version>
+      <scope>provided</scope>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring</artifactId>
+      <version>2.0.6</version>
+      <scope>compile</scope>
+      <optional>true</optional>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.1</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.1.1</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <!-- test dependencies -->
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-mock</artifactId>
+      <version>2.0.6</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>cglib</groupId>
+      <artifactId>cglib</artifactId>
+      <version>2.1_3</version>
+      <scope>test</scope>
+    </dependency>
+
+    <!--
+    <dependency>
+        <groupId>org.apache.shale</groupId>
+        <artifactId>shale-test</artifactId>
+        <version>1.0.4</version>
+        <scope>test</scope>
+    </dependency>
+    -->
+  </dependencies>
+
+  <build>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+      </resource>
+      <resource>
+        <directory>target/orchestra12_resources</directory>
+      </resource>       
+    </resources>
+    <plugins>
+      <plugin>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.0</version>
+        <executions>
+          <execution>
+            <!-- unpack the shared sources into target/shared_sources-->
+            <id>unpack-shared-impl-sources</id>
+            <phase>process-sources</phase>
+            <goals>
+              <goal>unpack</goal>
+            </goals>
+            <configuration>
+              <artifactItems>
+                <artifactItem>
+                  <groupId>org.apache.myfaces.shared</groupId>
+                  <artifactId>myfaces-shared-orchestra</artifactId>
+                  <version>${myfaces-orchestra-shared.version}</version>
+                  <classifier>sources</classifier>
+                </artifactItem>
+              </artifactItems>
+              <excludes>META-INF/*</excludes>
+              <outputDirectory>${project.build.directory}/shared_sources</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <!-- the following will add the unpacked shared sources directory as source directory into the pom,
+             so also the shared sources are automatically included by the attach source plugin -->
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.0</version>
+        <executions>
+          <execution>
+            <id>add-source</id>
+            <phase>generate-sources</phase>
+            <!-- 
+            <phase>process-sources</phase> -->
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>${project.build.directory}/shared_sources</source>
+                <source>${project.build.directory}/orchestra12_sources</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>xslt-maven-plugin</artifactId>
+        <version>1.0</version>
+        <configuration>
+          <xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile>
+          <srcIncludes>**/*.tld</srcIncludes>
+          <srcDir>src/main/tld</srcDir>
+          <destDir>target/classes/META-INF</destDir>
+        </configuration>
+        <executions>
+          <execution>
+            <goals>
+              <goal>transform</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>2.2-beta-2</version>
+        <configuration>
+          <appendAssemblyId>false</appendAssemblyId>
+          <attach>false</attach>
+          <descriptors>
+            <descriptor>src/main/assembly/assembly.xml</descriptor>
+          </descriptors>
+          <tarLongFileMode>gnu</tarLongFileMode>
+        </configuration>
+      </plugin>
+
+      <plugin>
+          <groupId>org.apache.myfaces.buildtools</groupId>
+          <artifactId>myfaces-builder-plugin</artifactId>
+          <version>1.0.4</version>
+          <executions>
+            <execution>
+              <id>unpack-orchestra12</id>
+              <phase>generate-sources</phase>
+              <goals>
+                <goal>unpack</goal>
+              </goals>
+              <configuration>
+                <scanModel>false</scanModel>
+                <artifactItems>
+                  <artifactItem>
+                    <groupId>org.apache.myfaces.orchestra</groupId>
+                    <artifactId>myfaces-orchestra-core12</artifactId>
+                    <version>${pom.version}</version>
+                    <classifier>sources</classifier>                   
+                    <outputDirectory>${project.build.directory}/orchestra12_sources</outputDirectory>
+                    <includes>**/*.java</includes>
+                    <excludes>**/*.class,**/org/apache/myfaces/shared_orchestra/**,**/META-INF/**</excludes>
+                  </artifactItem>
+                </artifactItems>
+              </configuration>
+            </execution>
+            <execution>
+              <id>unpack-orchestra-resources</id>
+              <phase>generate-resources</phase>
+              <goals>
+                <goal>unpack</goal>
+              </goals>
+              <configuration>
+                <baseDirectory1>${basedir}/src/main/resources</baseDirectory1>
+                <artifactItems>
+                  <artifactItem>
+                    <groupId>org.apache.myfaces.orchestra</groupId>
+                    <artifactId>myfaces-orchestra-core12</artifactId>
+                    <version>${pom.version}</version>                                   
+                    <outputDirectory>${project.build.directory}/orchestra12_resources</outputDirectory>
+                    <excludes>**/*.class,**/META-INF/maven/**,**/META-INF/MANIFEST.MF</excludes>
+                  </artifactItem>
+                </artifactItems>
+              </configuration>
+            </execution>            
+          </executions>
+      </plugin>            
+
+
+      <!--
+         <plugin>
+           <groupId>org.codehaus.mojo</groupId>
+           <artifactId>rat-maven-plugin</artifactId>
+           <version>1.0-alpha-3</version>
+           <executions>
+             <execution>
+               <phase>verify</phase>
+               <goals>
+                 <goal>check</goal>
+               </goals>
+             </execution>
+           </executions>
+         </plugin>
+   -->
+    </plugins>
+  </build>
+
+  <distributionManagement>
+    <site>
+      <id>apache-site</id>
+      <name>Apache Website</name>
+      <url>scpexe://people.apache.org/www/myfaces.apache.org/orchestra/myfaces-orchestra-core</url>
+    </site>
+  </distributionManagement>
+
+  <reporting>
+
+    <plugins>
+
+      <plugin>
+        <artifactId>maven-changelog-plugin</artifactId>
+        <version>2.1</version>
+        <reportSets>
+          <reportSet>
+            <id>dual-report</id>
+            <configuration>
+              <type>range</type>
+              <range>30</range>
+            </configuration>
+            <reports>
+              <report>changelog</report>
+              <report>file-activity</report>
+              <report>dev-activity</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.5</version>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>2.1</version>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>taglist-maven-plugin</artifactId>
+        <version>2.1</version>
+      </plugin>
+
+      <plugin>
+        <artifactId>maven-surefire-report-plugin</artifactId>
+        <version>2.4.3</version>
+      </plugin>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>rat-maven-plugin</artifactId>
+        <version>1.0-alpha-3</version>
+      </plugin>
+
+    </plugins>
+
+  </reporting>
+
+  <profiles>
+
+    <profile>
+      <id>generate-site</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>xslt-maven-plugin</artifactId>
+            <version>1.0</version>
+            <executions>
+              <execution>
+                <id>generate-tld-for-tlddoc</id>
+                <goals>
+                  <goal>transform</goal>
+                </goals>
+                <configuration>
+                  <xslFile>src/main/tld/misc/resolve_entities-tlddoc.xsl</xslFile>
+                  <srcIncludes>**/*.tld</srcIncludes>
+                  <srcDir>src/main/tld</srcDir>
+                  <destDir>target/tlddoc-site</destDir>
+                </configuration>
+              </execution>
+              <execution>
+                <id>generate-tld-for-jar</id>
+                <goals>
+                  <goal>transform</goal>
+                </goals>
+                <configuration>
+                  <xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile>
+                  <srcIncludes>**/*.tld</srcIncludes>
+                  <srcDir>src/main/tld</srcDir>
+                  <destDir>target/classes/META-INF</destDir>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+
+      </build>
+      <reporting>
+        <plugins>
+          <plugin>
+            <groupId>net.sourceforge.maven-taglib</groupId>
+            <artifactId>maven-taglib-plugin</artifactId>
+            <version>2.3.1</version>
+            <configuration>
+              <taglib.src.dir>${basedir}/target/tlddoc-site</taglib.src.dir>
+              <tldDocDir>${basedir}/target/site/tlddoc</tldDocDir>
+            </configuration>
+          </plugin>
+<!--
+          <plugin>
+             Generate a binary-changes-since-previous-release report
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>clirr-maven-plugin</artifactId>
+            <version>2.2.2</version>
+            <configuration>
+            	<minSeverity>info</minSeverity>
+            </configuration>
+          </plugin>
+            -->
+        </plugins>
+      </reporting>
+    </profile>
+    <profile>
+      <id>generate-assembly</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.codehaus.mojo</groupId>
+            <artifactId>xslt-maven-plugin</artifactId>
+            <version>1.0</version>
+            <executions>
+              <execution>
+                <id>generate-tld-for-tlddoc</id>
+                <goals>
+                  <goal>transform</goal>
+                </goals>
+                <configuration>
+                  <xslFile>src/main/tld/misc/resolve_entities-tlddoc.xsl</xslFile>
+                  <srcIncludes>**/*.tld</srcIncludes>
+                  <srcDir>src/main/tld</srcDir>
+                  <destDir>target/tlddoc-site</destDir>
+                </configuration>
+              </execution>
+              <execution>
+                <id>generate-tld-for-jar</id>
+                <goals>
+                  <goal>transform</goal>
+                </goals>
+                <configuration>
+                  <xslFile>src/main/tld/misc/resolve_entities.xsl</xslFile>
+                  <srcIncludes>**/*.tld</srcIncludes>
+                  <srcDir>src/main/tld</srcDir>
+                  <destDir>target/classes/META-INF</destDir>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <version>2.5</version>
+            <executions>
+              <execution>
+                <id>attach-javadoc</id>
+                <goals>
+                  <goal>jar</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>net.sourceforge.maven-taglib</groupId>
+            <artifactId>maven-taglib-plugin</artifactId>
+            <version>2.3.1</version>
+            <configuration>
+              <taglib.src.dir>${basedir}/target/tlddoc-site</taglib.src.dir>
+              <tldDocDir>${basedir}/target/tlddoc</tldDocDir>
+            </configuration>
+            <executions>
+              <execution>
+                <id>attach-javadoc</id>
+                <goals>
+                  <goal>taglibdocjar</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+  <properties>
+    <maven.compile.source>1.5</maven.compile.source>
+    <maven.compile.target>1.5</maven.compile.target>
+  </properties>
+
+</project>

Added: myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/components/facelets/ConverterTagHandler.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/components/facelets/ConverterTagHandler.java?rev=887443&view=auto
==============================================================================
--- myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/components/facelets/ConverterTagHandler.java (added)
+++ myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/conversation/jsf/components/facelets/ConverterTagHandler.java Fri Dec  4 23:19:15 2009
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.orchestra.conversation.jsf.components.facelets;
+
+import java.io.IOException;
+
+import javax.el.ELException;
+import javax.faces.FacesException;
+import javax.faces.application.Application;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.view.facelets.FaceletContext;
+import javax.faces.view.facelets.FaceletException;
+import javax.faces.view.facelets.TagAttribute;
+import javax.faces.view.facelets.TagConfig;
+import javax.faces.view.facelets.TagHandler;
+
+import org.apache.myfaces.orchestra.lib.jsf.SerializableConverter;
+
+public class ConverterTagHandler extends TagHandler
+{
+    private final TagAttribute beanName;
+    private final TagAttribute useWrapper;
+
+    public ConverterTagHandler(TagConfig config)
+    {
+        super(config);
+        beanName = getRequiredAttribute("beanName"); // NON-NLS
+        useWrapper = getAttribute("useWrapper"); // NON-NLS
+    }
+
+    public void apply(FaceletContext faceletContext, UIComponent parent)
+    throws IOException, FacesException, FaceletException, ELException
+    {
+        if (parent.getParent() == null)
+        {
+            if (parent instanceof EditableValueHolder)
+            {
+                Converter converter = createConverter(beanName.getValue());
+
+                if (useWrapper == null || !"false".equals(useWrapper.getValue()) &&
+                    !(converter instanceof SerializableConverter))
+                {
+                    // Needed to check if it is already of the specified type in case the
+                    // managed-bean framework has been configured to auto-wrap Converter
+                    // instances already (eg via a Spring BeanPostProcessor or equivalent).
+                    // This isn't the case, so wrap it now.
+                    converter = new SerializableConverter(beanName.getValue(), converter);
+                }
+
+                ((EditableValueHolder) parent).setConverter(converter);
+            }
+            else
+            {
+                throw new FacesException("parent is not an EditableValueHolder");
+            }
+        }
+    }
+
+    /**
+     * Override this method in order to customise the bean instance.
+     */
+    protected static Converter createConverter(String beanName)
+    {
+        FacesContext facesContext = FacesContext.getCurrentInstance();
+        Application application = facesContext.getApplication();
+        Object converter = application.getVariableResolver().resolveVariable(facesContext, beanName);
+        return (Converter) converter;
+    }
+}

Added: myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/PortletExternalContextWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/PortletExternalContextWrapper.java?rev=887443&view=auto
==============================================================================
--- myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/PortletExternalContextWrapper.java (added)
+++ myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/PortletExternalContextWrapper.java Fri Dec  4 23:19:15 2009
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.orchestra.lib.jsf;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.ExternalContextWrapper;
+
+import org.apache.myfaces.orchestra.requestParameterProvider.RequestParameterProviderManager;
+
+/**
+ * Class used by _PortletFacesContextWrapper to allow orchestra work in portlets
+ * 
+ * This class wraps encodeActionURL and encodeResourceURL to include
+ * conversationContext param like RequestParameterResponseWrapper does. In portlets
+ * we can't do the same than is servlets, because the params added here must be
+ * encoded by the portlet container and in portlets we don't have servlet redirect
+ * cases.
+ * 
+ * @author Leonardo Uribe(latest modification by $Author: lu4242 $)
+ * @version $Revision: 798382 $ $Date: 2009-07-27 22:23:02 -0500 (lun, 27 jul 2009) $
+ */
+public class PortletExternalContextWrapper extends ExternalContextWrapper
+{
+    private ExternalContext _delegate;
+
+    public PortletExternalContextWrapper(ExternalContext context)
+    {
+        super();
+        this._delegate = context;
+    }
+    
+    @Override
+    public ExternalContext getWrapped()
+    {
+        return _delegate;
+    }
+
+    public String encodeActionURL(String url)
+    {
+        if (url != null)
+        {
+            url = RequestParameterProviderManager.getInstance().encodeAndAttachParameters(url);
+        }
+        return getWrapped().encodeActionURL(url);
+    }
+
+    public String encodeResourceURL(String url)
+    {
+        if (url != null)
+        {
+            url = RequestParameterProviderManager.getInstance().encodeAndAttachParameters(url);
+        }
+        return getWrapped().encodeResourceURL(url);
+    }
+}

Added: myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_FacesContextWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_FacesContextWrapper.java?rev=887443&view=auto
==============================================================================
--- myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_FacesContextWrapper.java (added)
+++ myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_FacesContextWrapper.java Fri Dec  4 23:19:15 2009
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.orchestra.lib.jsf;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.FacesContextWrapper;
+
+
+/**
+ * Convenient class to wrap the current FacesContext.
+ * <p>
+ * A class of this name is provided in JSF1.2, but not in JSF1.1.
+ * <p>
+ * Any methods that do not actually need to be overridden are declared final
+ * in order to improve performance (helps the JVM to optimise away the call).
+ * <p>
+ * Note that whether a newly-created instance immediately becomes the
+ * object that is returned by FacesContext.getCurrentInstance() depends
+ * upon the value of the "install" parameter for the constructor method. 
+ * <p>
+ * This class is copied from the code in MyFaces Core Impl 1.2.x, but
+ * modified to be compatible with JSF1.1.
+ * <p>
+ * Note that this class must be public in order to support custom
+ * FacesContextFactory classes in other libraries that also wrap this
+ * instance, then use reflection to invoke methods on this object. In
+ * this case, an IllegalAccessException would occur if this class was
+ * package-scoped. However this class is NOT intended to be part of the
+ * public Orchestra API, and may change at any time.
+ * 
+ * @since 1.1
+ * 
+ * @author Manfred Geiler (latest modification by $Author: skitching $)
+ * @author Anton Koinov
+ * @version $Revision: 672906 $ $Date: 2008-06-30 15:45:16 -0500 (lun, 30 jun 2008) $
+ */
+public class _FacesContextWrapper extends FacesContextWrapper
+{
+    //~ Instance fields -------------------------------------------------------
+
+    private final FacesContext _facesContext;
+
+    //~ Constructors ----------------------------------------------------------
+
+    /**
+     * The install parameter controls whether this object will be configured as
+     * the object returned from calls to FacesContext.getCurrentInstance() or not.
+     * <p>
+     * When only overriding the release() method, then install=false is ok as that
+     * is called directly by the FacesServlet on the instance returned by the
+     * FacesContextFactory. However all other methods are invoked on the object
+     * that is returned from FacesContext.getCurrentInstance, so install=true is
+     * needed in order for any other method overrides to have any effect.
+     * <p>
+     * <b>IMPORTANT</b>: install=true should not be used until MYFACES-1820 is fixed.
+     */
+    public _FacesContextWrapper(FacesContext facesContext, boolean install)
+    {
+        _facesContext = facesContext;
+        
+        if (install)
+        {
+            FacesContext.setCurrentInstance(this);
+        }
+    }
+
+    //~ Non-Final Methods -----------------------------------------------------
+
+    @Override
+    public FacesContext getWrapped()
+    {
+        return _facesContext;
+    }
+
+    //~ Final Methods ---------------------------------------------------------
+
+}

Added: myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java?rev=887443&view=auto
==============================================================================
--- myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java (added)
+++ myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/lib/jsf/_PortletFacesContextWrapper.java Fri Dec  4 23:19:15 2009
@@ -0,0 +1,237 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.orchestra.lib.jsf;
+
+import java.util.List;
+import java.util.ListIterator;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.FacesContextWrapper;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.orchestra.frameworkAdapter.FrameworkAdapter;
+
+/**
+ * Convenient class to wrap the current FacesContext in portlet environment.
+ * 
+ * @since 1.4
+ * 
+ * @author Leonardo Uribe (latest modification by $Author: lu4242 $)
+ * @version $Revision: 798382 $ $Date: 2009-07-27 22:23:02 -0500 (lun, 27 jul 2009) $
+ */
+public class _PortletFacesContextWrapper extends FacesContextWrapper
+{
+    private final static String REQUEST_ADAPTER = "org.apache.myfaces.orchestra.REQUEST_ADAPTER";
+
+    //~ Instance fields -------------------------------------------------------
+
+    private final FacesContext _facesContext;
+    private final ExternalContext externalContextDelegate;
+    private final RequestHandler contextLockHandler;
+    private final List _handlers;
+    private final String _nextToken;
+
+    private final Log log = LogFactory
+            .getLog(_PortletFacesContextWrapper.class);
+
+    //~ Constructors ----------------------------------------------------------
+
+    /**
+     * The install parameter controls whether this object will be configured as
+     * the object returned from calls to FacesContext.getCurrentInstance() or not.
+     * <p>
+     * When only overriding the release() method, then install=false is ok as that
+     * is called directly by the FacesServlet on the instance returned by the
+     * FacesContextFactory. However all other methods are invoked on the object
+     * that is returned from FacesContext.getCurrentInstance, so install=true is
+     * needed in order for any other method overrides to have any effect.
+     * <p>
+     * <b>IMPORTANT</b>: install=true should not be used until MYFACES-1820 is fixed.
+     */
+    public _PortletFacesContextWrapper(final FacesContext facesContext,
+            final boolean install, boolean finit, String fnextToken, List fhandlers,
+            final RequestHandler fcontextLockHandler )
+    {
+        log.debug("getFacesContext: running inner constructor");
+
+        _facesContext = facesContext;
+
+        if (install)
+        {
+            FacesContext.setCurrentInstance(this);
+        }
+
+        externalContextDelegate = new PortletExternalContextWrapper(
+                _facesContext.getExternalContext());
+
+        _handlers = fhandlers;
+        _nextToken = fnextToken;
+        contextLockHandler = fcontextLockHandler;
+        if (finit)
+        {
+            ListIterator i = fhandlers.listIterator();
+            try
+            {
+                contextLockHandler.init(facesContext);
+                while (i.hasNext())
+                {
+                    RequestHandler h = (RequestHandler) i.next();
+
+                    if (log.isDebugEnabled())
+                    {
+                        log.debug("Running inithandler of type "
+                                + h.getClass().getName());
+                    }
+
+                    h.init(facesContext);
+                }
+            }
+            catch (RuntimeException e)
+            {
+                log.error("Problem initialising RequestHandler", e);
+                _release(i);
+                contextLockHandler.deinit();
+                throw e;
+            }
+        }
+        else
+        {
+            try
+            {
+                contextLockHandler.init(facesContext);
+            }
+            catch (RuntimeException e)
+            {
+                contextLockHandler.deinit();
+            }
+
+            RequestType type = ExternalContextUtils.getRequestType(facesContext
+                    .getExternalContext());
+
+            if (RequestType.RENDER.equals(type))
+            {
+                String handlersKey = (String) fnextToken;
+                FrameworkAdapter adapter = (FrameworkAdapter) getExternalContext()
+                        .getApplicationMap().remove(
+                                REQUEST_ADAPTER + handlersKey);
+                if (FrameworkAdapter.getCurrentInstance() == null)
+                {
+                    FrameworkAdapter.setCurrentInstance(adapter);
+                }
+            }
+        }
+    }
+
+    //~ Non-Final Methods -----------------------------------------------------
+
+    public void release()
+    {
+        log.debug("Running release");
+        RequestType type = ExternalContextUtils
+                .getRequestType(getExternalContext());
+        if (RequestType.RENDER.equals(type) || 
+            RequestType.EVENT.equals(type) || 
+            RequestType.RESOURCE.equals(type) || 
+            this.getResponseComplete())
+        {
+            ListIterator i = _handlers.listIterator();
+            while (i.hasNext())
+            {
+                i.next();
+            }
+            _release(i);
+        }
+        if (RequestType.ACTION.equals(type))
+        {
+            if (this.getResponseComplete())
+            {
+                // If response is complete by some reason, we need to
+                // clean request handlers from application map. This is set
+                // before an instance of this class is created.
+                getExternalContext().getApplicationMap().remove(
+                        PortletOrchestraFacesContextFactory.REQUEST_HANDLERS+_nextToken);
+            }
+            else
+            {
+                //Pass the current FrameworkAdapter through application map,
+                //to remove it later when rendering 
+                FrameworkAdapter adapter = FrameworkAdapter.getCurrentInstance();
+                getExternalContext().getApplicationMap().put(
+                        REQUEST_ADAPTER + _nextToken, adapter);
+                
+                //Orchestra suppose the same thread handles the current request, but
+                //in portlets this is not necessary true. One thread could handle action
+                //requests and other render request. To keep code working we set it to
+                //null here, so other request don't mix it.
+                FrameworkAdapter.setCurrentInstance(null);
+            }
+        }
+
+        try
+        {
+            //Since in portlets the same thread does not handler both action and
+            //render phase for the same request contextLockHandler needs to
+            //be cleared and lock again
+            contextLockHandler.deinit();
+        }
+        catch (Exception e)
+        {
+            log.error("Problem deinitialising RequestHandler", e);
+        }
+        log.debug("Release completed");
+        getWrapped().release();
+    }
+    
+    @Override
+    public FacesContext getWrapped()
+    {
+        return _facesContext;
+    }
+
+    private void _release(ListIterator i)
+    {
+        while (i.hasPrevious())
+        {
+            try
+            {
+                RequestHandler h = (RequestHandler) i.previous();
+                if (log.isDebugEnabled())
+                {
+                    log.debug("Running deinithandler of type "
+                            + h.getClass().getName());
+                }
+                h.deinit();
+            }
+            catch (Exception e)
+            {
+                log.error("Problem deinitialising RequestHandler", e);
+            }
+        }
+    }
+
+    //~ Final Methods ---------------------------------------------------------
+
+    public ExternalContext getExternalContext()
+    {
+        return externalContextDelegate == null ? getWrapped()
+                .getExternalContext() : externalContextDelegate;
+    }
+}

Added: myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/urlParamNav/UrlParameterViewHandler.java
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/urlParamNav/UrlParameterViewHandler.java?rev=887443&view=auto
==============================================================================
--- myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/urlParamNav/UrlParameterViewHandler.java (added)
+++ myfaces/orchestra/trunk/core20/src/main/java/org/apache/myfaces/orchestra/urlParamNav/UrlParameterViewHandler.java Fri Dec  4 23:19:15 2009
@@ -0,0 +1,116 @@
+/*
+ * 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.
+ */
+package org.apache.myfaces.orchestra.urlParamNav;
+
+import javax.faces.application.ViewHandler;
+import javax.faces.application.ViewHandlerWrapper;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+
+/**
+ * Allow the to-view-id URL in a faces-config navigation case to include
+ * query parameters and EL expressions.
+ * <p>
+ * This class plays a few tricks to hide from the real NavigationHandler
+ * and ViewHandler classes the fact that a URL contains non-standard data.
+ * <p>
+ * This class also plays a few reflection-based tricks so that the code can
+ * be compiled against JSF1.1, and work with both JSF1.1 and JSF1.2. The
+ * code is a little fragile and will probably need to be updated to work
+ * correctly with JSF2.0, but that is the fault of the JSF spec.
+ */
+public class UrlParameterViewHandler extends ViewHandlerWrapper
+{
+    private final ViewHandler original;
+
+
+
+    /**
+     * Constructor.
+     */
+    public UrlParameterViewHandler(final ViewHandler original)
+    {
+        this.original = original;
+    }
+
+    public ViewHandler getWrapped()
+    {
+        return original;
+    }
+
+    public String getActionURL(FacesContext context, String viewId)
+    {
+        if (viewId != null)
+        {
+            // Expand any EL expression in the URL.
+            //
+            // This handles a call from a NavigationHandler which is processing a redirect
+            // navigation case. A NavigationHandler must call the following in order:
+            //  * ViewHandler.getActionURL,
+            //  * ExternalContext.encodeActionURL
+            //  * ExternalContext.redirect
+            //
+            // Orchestra hooks into ExternalContext.encodeActionURL to trigger the
+            // RequestParameterProviderManager which then inserts various query params
+            // into the URL.
+            //
+            // So here, ensure that any EL expressions are expanded before the
+            // RequestParameterProviderManager is invoked. An alternative would be for
+            // the RequestParameterProviderManager to do the encoding, but at the current
+            // time that class is not JSF-dependent in any way, so calling JSF expression
+            // expansion from there is not possible.
+            //
+            // Note that this method is also called from a Form component when rendering
+            // its 'action' attribute. This code therefore has the side-effect of
+            // permitting EL expressions in a form's action. This is not particularly
+            // useful, however, as they are expected to have been expanded before this
+            // method is invoked.. 
+            viewId = expandExpressions(context, viewId);
+
+            // Hide query parameters from the standard ViewHandlerImpl. The standard
+            // implementation of ViewHandlerImpl.getActionUrl method does not handle
+            // query params well. So strip them off, invoke the processing, then reattach
+            // them afterwards.
+            int pos = viewId.indexOf('?');
+            if (pos > -1)
+            {
+                String realViewId = viewId.substring(0, pos);
+                String params = viewId.substring(pos);
+
+                return original.getActionURL(context, realViewId) + params;
+            }
+        }
+        return original.getActionURL(context, viewId);
+    }
+
+    private static String expandExpressions(FacesContext context, String url)
+    {
+        int pos = url.indexOf("#{");
+        if (pos > -1 && url.indexOf("}", pos) > -1)
+        {
+            // There is at least one EL expression, so evaluate the whole url string.
+            // Note that something like "aaa#{foo}bbb#{bar}ccc" is fine; both the
+            // el expressions will get replaced.
+            ValueBinding vb = context.getApplication().createValueBinding(url);
+            return (String) vb.getValue(context);
+        }
+
+        return url;
+    }
+}
\ No newline at end of file

Modified: myfaces/orchestra/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/pom.xml?rev=887443&r1=887442&r2=887443&view=diff
==============================================================================
--- myfaces/orchestra/trunk/pom.xml (original)
+++ myfaces/orchestra/trunk/pom.xml Fri Dec  4 23:19:15 2009
@@ -63,6 +63,7 @@
     <module>maven</module>
     <module>core</module>
     <module>core12</module>
+    <module>core20</module>
     <!-- module>core15</module -->
     <module>flow</module>
     <module>sandbox</module>