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/08/06 00:27:48 UTC

svn commit: r982810 - in /myfaces/portlet-bridge/tck/trunk_2.0.x: portlet-bridge-tck-main/src/main/webapp/WEB-INF/ portlet-bridge-tck-section3-2-lifecycle-set/src/main/webapp/WEB-INF/ portlet-bridge-tck-section3-2-render-policy-always-delegate/src/main...

Author: mfreedman
Date: Thu Aug  5 22:27:47 2010
New Revision: 982810

URL: http://svn.apache.org/viewvc?rev=982810&view=rev
Log:
Added some event and resource tests -- fixed things to use portlet.xml 2.0 schema

Modified:
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/web.xml
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-always-delegate/src/main/webapp/WEB-INF/portlet.xml
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-default/src/main/webapp/WEB-INF/portlet.xml
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-never-delegate/src/main/webapp/WEB-INF/portlet.xml
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/TestRunnerBean.java
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/BridgeDestroyTestPortlet.java
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/Tests.java
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/ManualBridgeInvokePortlet.java
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/Tests.java
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/pluto-portal-driver-config.xsl
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test-template.xsl
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test.xsl

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml Thu Aug  5 22:27:47 2010
@@ -9,9 +9,28 @@
       <bridge:excluded-attributes>
         <bridge:excluded-attribute>myFacesConfigExcludedNamespace.*</bridge:excluded-attribute>
         <bridge:excluded-attribute>myFacesConfigExcludedKey</bridge:excluded-attribute>
+        <bridge:excluded-attribute>modelPRP</bridge:excluded-attribute>
         <bridge:excluded-attribute>org.apache.myfaces.portlet.faces.tck.WildcardFacesConfigTest.*</bridge:excluded-attribute>
         <bridge:excluded-attribute>org.apache.myfaces.portlet.faces.tck.ExcludeByFacesConfigRef</bridge:excluded-attribute>
       </bridge:excluded-attributes>
+      <bridge:public-parameter-mappings>
+        <bridge:public-parameter-mapping>
+          <parameter>chapter5_2Tests-eventControllerTest-portlet:testPRP</parameter>
+          <model-el>#{modelPRP}</model-el>
+        </bridge:public-parameter-mapping>
+        <bridge:public-parameter-mapping>
+        <parameter>chapter5_2Tests-eventNoHandlerPRPPreservedTest-portlet:testPRP</parameter>
+          <model-el>#{modelPRP}</model-el>
+        </bridge:public-parameter-mapping>
+        <bridge:public-parameter-mapping>
+          <parameter>chapter6_1_3_1Tests-redirectRenderPRP1Test-portlet:testPRP</parameter>
+          <model-el>#{modelPRP}</model-el>
+        </bridge:public-parameter-mapping>
+        <bridge:public-parameter-mapping>
+          <parameter>chapter6_1_3_1Tests-redirectRenderPRP2Test-portlet:testPRP</parameter>
+          <model-el>#{modelPRP}</model-el>
+        </bridge:public-parameter-mapping>
+      </bridge:public-parameter-mappings>       
     </application-extension>
   </application>
   <factory>
@@ -46,6 +65,11 @@
     <managed-bean-scope>request</managed-bean-scope>
   </managed-bean> 
   <managed-bean>
+    <managed-bean-name>modelPRP</managed-bean-name>
+    <managed-bean-class>java.lang.String</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean> 
+  <managed-bean>
     <managed-bean-name>chapter5_3Tests</managed-bean-name>
     <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_3.Tests</managed-bean-class>
     <managed-bean-scope>request</managed-bean-scope>
@@ -128,6 +152,13 @@
   <navigation-rule>
     <from-view-id>/tests/MultiRequestTest.jsp</from-view-id>
     <navigation-case>
+      <from-outcome>eventDestroyTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+  <navigation-rule>
+    <from-view-id>/tests/MultiRequestTest.jsp</from-view-id>
+    <navigation-case>
       <from-outcome>actionNullRequestTest</from-outcome>
       <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
     </navigation-case>
@@ -198,6 +229,35 @@
       <from-outcome>noViewStateParamOnModeChangeTest</from-outcome>
       <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp?javax.portlet.faces.PortletMode=edit</to-view-id>
     </navigation-case>
+    <navigation-case>
+      <from-outcome>eventScopeRestoredTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>eventScopeNotRestoredRedirectTestEventNavigation</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+      <redirect/>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>eventScopeNotRestoredModeChangedTestEventNavigation</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp?javax.portlet.faces.PortletMode=edit</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>eventControllerTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>eventNoHandlerPRPPreservedTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>facesContextReleasedEventTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>portletPhaseRemovedEventTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
   </navigation-rule>
   
   <navigation-rule>
@@ -345,6 +405,14 @@
       <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
     </navigation-case>   
     <navigation-case>
+      <from-outcome>redirectRenderPRP1Test</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case> 
+    <navigation-case>
+      <from-outcome>redirectRenderPRP2Test</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case> 
+    <navigation-case>
       <from-outcome>portletNamingContainerClientIdConsistentTest</from-outcome>
       <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
     </navigation-case>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml Thu Aug  5 22:27:47 2010
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<portlet-app version="1.0"
-             xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+<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="BridgeHelloDukeDemo" version="2.0">
 
 
 
@@ -106,7 +107,7 @@
     </portlet>
     
     <portlet>
-        <portlet-name>chapter3Tests-destroyActionTest-portlet</portlet-name>
+        <portlet-name>chapter3Tests-actionDestroyTest-portlet</portlet-name>
         <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_3.BridgeDestroyTestPortlet</portlet-class>
         
         <init-param>
@@ -120,12 +121,39 @@
          <mime-type>text/html</mime-type>
        </supports>
         <portlet-info>
-                <title>chapter3Tests-destroyActionTest-portlet</title>
+                <title>chapter3Tests-actionDestroyTest-portlet</title>
         </portlet-info>
     </portlet>
     
     <portlet>
-        <portlet-name>chapter3Tests-destroyRenderTest-portlet</portlet-name>
+        <portlet-name>chapter3Tests-eventDestroyTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_3.BridgeDestroyTestPortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+        
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+        <portlet-info>
+                <title>chapter3Tests-eventDestroyTest-portlet</title>
+        </portlet-info>
+        
+        <supported-publishing-event>
+          <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+        </supported-publishing-event>
+      
+        <supported-processing-event>
+          <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+        </supported-processing-event>
+    </portlet>
+    
+    <portlet>
+        <portlet-name>chapter3Tests-renderDestroyTest-portlet</portlet-name>
         <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_3.BridgeDestroyTestPortlet</portlet-class>
         
         <init-param>
@@ -139,12 +167,32 @@
          <mime-type>text/html</mime-type>
        </supports>
         <portlet-info>
-                <title>chapter3Tests-destroyRenderTest-portlet</title>
+                <title>chapter3Tests-renderDestroyTest-portlet</title>
         </portlet-info>
     </portlet>
     
     <portlet>
-        <portlet-name>chapter3Tests-destroyDoubleTest-portlet</portlet-name>
+        <portlet-name>chapter3Tests-resourceDestroyTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_3.BridgeDestroyTestPortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/ResourceDestroyTest.jsp</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+        
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+        <portlet-info>
+                <title>chapter3Tests-resourceDestroyTest-portlet</title>
+        </portlet-info>
+    </portlet>
+    
+    
+    <portlet>
+        <portlet-name>chapter3Tests-doubleDestroyTest-portlet</portlet-name>
         <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_3.BridgeDestroyTestPortlet</portlet-class>
         
         <init-param>
@@ -158,7 +206,7 @@
          <mime-type>text/html</mime-type>
        </supports>
         <portlet-info>
-                <title>chapter3Tests-destroyDoubleTest-portlet</title>
+                <title>chapter3Tests-doubleDestroyTest-portlet</title>
         </portlet-info>
     </portlet>
     
@@ -987,6 +1035,226 @@
     </portlet> 
     
     <portlet>
+      <portlet-name>chapter5_2Tests-eventScopeRestoredTest-portlet</portlet-name>
+      <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+      
+      <init-param>
+        <name>javax.portlet.faces.defaultViewId.view</name>
+        <value>/tests/MultiRequestTest.jsp</value>
+      </init-param>
+      
+      <init-param>
+        <name>javax.portlet.faces.bridgeEventHandler</name>
+        <value>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.TestEventHandler</value>
+      </init-param>
+      
+      <expiration-cache>0</expiration-cache>
+  
+     <supports>
+       <mime-type>text/html</mime-type>
+     </supports>
+     <portlet-info>
+              <title>chapter5_2Tests-eventScopeRestoredTest-portlet</title>
+      </portlet-info>
+      
+      <supported-publishing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-publishing-event>
+      
+      <supported-processing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-processing-event>
+    </portlet> 
+  
+    <portlet>
+      <portlet-name>chapter5_2Tests-eventScopeNotRestoredRedirectTest-portlet</portlet-name>
+      <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+      
+      <init-param>
+        <name>javax.portlet.faces.defaultViewId.view</name>
+        <value>/tests/MultiRequestTest.jsp</value>
+      </init-param>
+      
+      <init-param>
+        <name>javax.portlet.faces.bridgeEventHandler</name>
+        <value>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.TestEventHandler</value>
+      </init-param>
+      
+      <expiration-cache>0</expiration-cache>
+  
+     <supports>
+       <mime-type>text/html</mime-type>
+     </supports>
+     <portlet-info>
+              <title>chapter5_2Tests-eventScopeNotRestoredRedirectTest-portlet</title>
+      </portlet-info>
+      
+      <supported-publishing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-publishing-event>
+      
+      <supported-processing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-processing-event>
+  </portlet> 
+  
+    <portlet>
+      <portlet-name>chapter5_2Tests-eventScopeNotRestoredModeChangedTest-portlet</portlet-name>
+      <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+      
+      <init-param>
+        <name>javax.portlet.faces.defaultViewId.view</name>
+        <value>/tests/MultiRequestTest.jsp</value>
+      </init-param>
+      
+      <init-param>
+        <name>javax.portlet.faces.defaultViewId.edit</name>
+        <value>/tests/MultiRequestTest.jsp</value>
+      </init-param>
+      
+      <init-param>
+        <name>javax.portlet.faces.bridgeEventHandler</name>
+        <value>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.TestEventHandler</value>
+      </init-param>
+      
+      <expiration-cache>0</expiration-cache>
+  
+     <supports>
+          <mime-type>text/html</mime-type>
+          <portlet-mode>VIEW</portlet-mode>
+          <portlet-mode>EDIT</portlet-mode>
+     </supports>
+     <portlet-info>
+              <title>chapter5_2Tests-eventScopeNotRestoredModeChangedTest-portlet</title>
+      </portlet-info>
+      
+      <supported-publishing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-publishing-event>
+      
+      <supported-processing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-processing-event>
+    </portlet> 
+  
+    <portlet>
+      <portlet-name>chapter5_2Tests-eventControllerTest-portlet</portlet-name>
+      <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+      
+      <init-param>
+        <name>javax.portlet.faces.defaultViewId.view</name>
+        <value>/tests/MultiRequestTest.jsp</value>
+      </init-param>
+      
+      <init-param>
+        <name>javax.portlet.faces.bridgeEventHandler</name>
+        <value>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.TestEventHandler</value>
+      </init-param>
+      
+      <expiration-cache>0</expiration-cache>
+  
+     <supports>
+       <mime-type>text/html</mime-type>
+     </supports>
+     <portlet-info>
+              <title>chapter5_2Tests-eventControllerTest-portlet</title>
+      </portlet-info>
+      
+      <supported-publishing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-publishing-event>
+      
+      <supported-processing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-processing-event>
+      
+      <supported-public-render-parameter>testPRP</supported-public-render-parameter>
+    </portlet> 
+    
+    <portlet>
+      <portlet-name>chapter5_2Tests-eventNoHandlerPRPPreservedTest-portlet</portlet-name>
+      <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+      
+      <init-param>
+        <name>javax.portlet.faces.defaultViewId.view</name>
+        <value>/tests/MultiRequestTest.jsp</value>
+      </init-param>
+           
+      <expiration-cache>0</expiration-cache>
+  
+     <supports>
+       <mime-type>text/html</mime-type>
+     </supports>
+     <portlet-info>
+              <title>chapter5_2Tests-eventNoHandlerPRPPreservedTest-portlet</title>
+      </portlet-info>
+      
+      <supported-publishing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-publishing-event>
+      
+      <supported-processing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-processing-event>
+      
+      <supported-public-render-parameter>testPRP</supported-public-render-parameter>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-facesContextReleasedEventTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-facesContextReleasedEventTest-portlet</title>
+        </portlet-info>
+        
+      <supported-publishing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-publishing-event>
+      
+      <supported-processing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-processing-event>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-portletPhaseRemovedEventTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-portletPhaseRemovedEventTest-portlet</title>
+        </portlet-info>
+        
+      <supported-publishing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-publishing-event>
+      
+      <supported-processing-event>
+        <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+      </supported-processing-event>
+    </portlet> 
+  
+    <portlet>
         <portlet-name>chapter5_2Tests-facesContextReleasedRenderTest-portlet</portlet-name>
         <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
         
@@ -1025,6 +1293,25 @@
     </portlet> 
     
     <portlet>
+        <portlet-name>chapter5_2Tests-verifyResourcePhaseTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/ResourceRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-verifyResourcePhaseTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
         <portlet-name>chapter5_3Tests-noViewStateParamOnModeChangeTest-portlet</portlet-name>
         <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
         
@@ -2427,7 +2714,47 @@
         <portlet-info>
                 <title>chapter6_1_3_1Tests-redirectRenderTest-portlet</title>
         </portlet-info>
-    </portlet>    
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter6_1_3_1Tests-redirectRenderPRP1Test-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>   
+        
+        <expiration-cache>0</expiration-cache>
+
+      <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+        <portlet-info>
+                <title>chapter6_1_3_1Tests-redirectRenderPRP1Test-portlet</title>
+        </portlet-info>
+      <supported-public-render-parameter>testPRP</supported-public-render-parameter>
+    </portlet>
+    
+    <portlet>
+        <portlet-name>chapter6_1_3_1Tests-redirectRenderPRP2Test-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>   
+        
+        <expiration-cache>0</expiration-cache>
+
+      <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+        <portlet-info>
+                <title>chapter6_1_3_1Tests-redirectRenderPRP2Test-portlet</title>
+        </portlet-info>
+      <supported-public-render-parameter>testPRP</supported-public-render-parameter>
+    </portlet>
     
     <portlet>
         <portlet-name>chapter6_1_3_1Tests-illegalRedirectRenderTest-portlet</portlet-name>
@@ -3062,5 +3389,16 @@
                 <title>chapter6_7Tests-setsIsPostbackAttributeTest-portlet</title>
         </portlet-info>
     </portlet>
+    
+    <event-definition>
+  	<qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/event_ns">bridge:myfaces.apache.org.tck.testEvent</qname>
+  	<value-type>java.lang.String</value-type>	
+    </event-definition>
+
+    <public-render-parameter>
+      <description>Test Public Render Parameter</description>
+      <identifier>testPRP</identifier>
+      <qname xmlns:bridge="http://myfaces.apache.org/portlet-bridge/params">bridge:testPRP</qname>
+    </public-render-parameter>
 
 </portlet-app>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/web.xml?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/web.xml Thu Aug  5 22:27:47 2010
@@ -8,7 +8,6 @@
     <param-value>.jsp</param-value>
   </context-param>
   
-  
   <!-- Faces Servlet -->
   <servlet>
     <servlet-name>faces</servlet-name>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-lifecycle-set/src/main/webapp/WEB-INF/portlet.xml Thu Aug  5 22:27:47 2010
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<portlet-app version="1.0"
-             xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+<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="BridgeHelloDukeDemo" version="2.0">
 
     <portlet>
         <portlet-name>chapter3Tests-lifecycleTest-portlet</portlet-name>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-always-delegate/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-always-delegate/src/main/webapp/WEB-INF/portlet.xml?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-always-delegate/src/main/webapp/WEB-INF/portlet.xml (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-always-delegate/src/main/webapp/WEB-INF/portlet.xml Thu Aug  5 22:27:47 2010
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<portlet-app version="1.0"
-             xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+<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="BridgeHelloDukeDemo" version="2.0">
 
     <portlet>
         <portlet-name>chapter3Tests-renderPolicyTest-portlet</portlet-name>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-default/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-default/src/main/webapp/WEB-INF/portlet.xml?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-default/src/main/webapp/WEB-INF/portlet.xml (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-default/src/main/webapp/WEB-INF/portlet.xml Thu Aug  5 22:27:47 2010
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<portlet-app version="1.0"
-             xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+<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="BridgeHelloDukeDemo" version="2.0">
 
     <portlet>
         <portlet-name>chapter3Tests-renderPolicyTest-portlet</portlet-name>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-never-delegate/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-never-delegate/src/main/webapp/WEB-INF/portlet.xml?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-never-delegate/src/main/webapp/WEB-INF/portlet.xml (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-section3-2-render-policy-never-delegate/src/main/webapp/WEB-INF/portlet.xml Thu Aug  5 22:27:47 2010
@@ -1,9 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<portlet-app version="1.0"
-             xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
-             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-             xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+<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="BridgeHelloDukeDemo" version="2.0">
 
     <portlet>
         <portlet-name>chapter3Tests-renderPolicyTest-portlet</portlet-name>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/TestRunnerBean.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/TestRunnerBean.java?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/TestRunnerBean.java (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/TestRunnerBean.java Thu Aug  5 22:27:47 2010
@@ -88,6 +88,11 @@ public class TestRunnerBean
     if (mTestMethod == null)
       throw new IllegalStateException("Couldn't locate (annotation for) test: " + mTestName + "Test in the test object.");
   }
+  
+  public String getTestName()
+  {
+    return mTestName;
+  }
 
   public String runActionTest()
   {

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/BridgeDestroyTestPortlet.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/BridgeDestroyTestPortlet.java?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/BridgeDestroyTestPortlet.java (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/BridgeDestroyTestPortlet.java Thu Aug  5 22:27:47 2010
@@ -25,25 +25,30 @@ import java.io.PrintWriter;
 
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
+import javax.portlet.ClientDataRequest;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.MimeResponse;
 import javax.portlet.PortletConfig;
 import javax.portlet.PortletException;
 import javax.portlet.PortletRequest;
-import javax.portlet.PortletResponse;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
 import javax.portlet.faces.Bridge;
 import javax.portlet.faces.BridgeUninitializedException;
-import javax.portlet.faces.GenericFacesPortlet;
 
-import org.apache.myfaces.portlet.faces.testsuite.common.Constants;
 import org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet;
 import org.apache.myfaces.portlet.faces.testsuite.common.util.BridgeTCKResultWriter;
 
 public class BridgeDestroyTestPortlet extends GenericFacesTestSuitePortlet
 {
-  final static String DESTROY_ACTION_TEST = "destroyActionTest";
-  final static String DESTROY_RENDER_TEST = "destroyRenderTest";
-  final static String DESTROY_DOUBLE_TEST = "destroyDoubleTest";
+  final static String DESTROY_ACTION_TEST = "actionDestroyTest";
+  final static String DESTROY_EVENT_TEST = "eventDestroyTest";  
+  final static String DESTROY_RENDER_TEST = "renderDestroyTest";
+  final static String DESTROY_RESOURCE_TEST = "resourceDestroyTest";
+  final static String DESTROY_DOUBLE_TEST = "doubleDestroyTest";
   final static String NULLREQUEST_RENDER_TEST = "nullRequestRenderTest";
   final static String NULLREQUEST_ACTION_TEST = "nullRequestActionTest";
   
@@ -73,6 +78,18 @@ public class BridgeDestroyTestPortlet ex
     }
   }
   
+  public void  processEvent(EventRequest request, EventResponse response) throws IOException, PortletException
+  {
+    if (getTestName().equals(DESTROY_EVENT_TEST))
+    {
+      runEventDestroyTest(request, response);
+    }
+    else
+    {
+      super.processEvent(request, response);
+    }
+  }
+  
   public void doDispatch(RenderRequest renderRequest, RenderResponse renderResponse)
     throws PortletException, IOException
   {
@@ -84,14 +101,16 @@ public class BridgeDestroyTestPortlet ex
     {
       runDoubleDestroyTest(renderRequest, renderResponse);
     }
-    else if (getTestName().equals(DESTROY_ACTION_TEST) && mActionResult != null)
+    else if (mActionResult != null && (getTestName().equals(DESTROY_ACTION_TEST) 
+             || getTestName().equals(DESTROY_EVENT_TEST)
+             || getTestName().equals(DESTROY_RESOURCE_TEST)))
     {
       outputActionResult(renderRequest, renderResponse);
       // This test can't be rerun until the portlet is reloaded
       // So set a new ActionResult that indicates this
       if (!mActionResultOutput)
       {
-        encodeActionDestroyTestAlreadyRun();
+        encodeDestroyTestAlreadyRun(getTestName());
         mActionResultOutput = true;
       }
     }
@@ -109,9 +128,29 @@ public class BridgeDestroyTestPortlet ex
     }
   }
   
-  private void encodeActionDestroyTestAlreadyRun()
+  public void serveResource(ResourceRequest request, ResourceResponse response) throws IOException, PortletException
   {
-    BridgeTCKResultWriter resultWriter = new BridgeTCKResultWriter(DESTROY_ACTION_TEST);
+    if (getTestName().equals(DESTROY_RESOURCE_TEST))
+    {
+      runResourceDestroyTest(request, response);
+      outputActionResult(request, response);
+      // This test can't be rerun until the portlet is reloaded
+      // So set a new ActionResult that indicates this
+      if (!mActionResultOutput)
+      {
+        encodeDestroyTestAlreadyRun(getTestName());
+        mActionResultOutput = true;
+      }
+    }
+    else
+    {
+      super.serveResource(request, response);
+    }
+  }
+  
+  private void encodeDestroyTestAlreadyRun(String testName)
+  {
+    BridgeTCKResultWriter resultWriter = new BridgeTCKResultWriter(testName);
     
     resultWriter.setStatus(BridgeTCKResultWriter.FAIL);
     resultWriter.setDetail("Test result has already been rendered. This can can only be rendered once prior to portlet or app reload.  To rerun this test reload.  The result that has previously been rendered is: " + mActionResult);
@@ -173,7 +212,34 @@ public class BridgeDestroyTestPortlet ex
     mActionResult = resultWriter.toString();
   }
   
-  private void outputActionResult(RenderRequest request, RenderResponse response) throws PortletException, IOException
+  private void runEventDestroyTest(EventRequest request, EventResponse response) throws PortletException, IOException
+  {
+    BridgeTCKResultWriter resultWriter = new BridgeTCKResultWriter(DESTROY_EVENT_TEST);
+    
+    // Run test
+    Bridge bridge = getFacesBridge(request, response);
+    bridge.destroy();
+    try
+    {
+      bridge.doFacesRequest(request, response);
+      resultWriter.setStatus(BridgeTCKResultWriter.FAIL);
+      resultWriter.setDetail("Didn't throw the BridgeUninitializedException from doFacesRequest(event) when passed a destroyed bridge. Instead the request completed without an exception.");
+    }
+    catch (BridgeUninitializedException bue)
+    {
+      resultWriter.setStatus(BridgeTCKResultWriter.PASS);
+      resultWriter.setDetail("Correctly threw BridgeUninitializedException from doFacesRequest(event) when passed a destroyed bridge.");
+    }
+    catch (Exception e)
+    {
+      resultWriter.setStatus(BridgeTCKResultWriter.FAIL);
+      resultWriter.setDetail("Didn't throw the BridgeUninitializedException from doFacesRequest(event) when passed a destroyed bridge. Instead it threw: " + e.toString());        
+    }
+    
+    mActionResult = resultWriter.toString();
+  }
+  
+  private void outputActionResult(PortletRequest request, MimeResponse response) throws PortletException, IOException
   {
     response.setContentType("text/html");
     PrintWriter out = response.getWriter();
@@ -262,4 +328,31 @@ public class BridgeDestroyTestPortlet ex
     
     out.println(resultWriter.toString());
   }
+  
+  private void runResourceDestroyTest(ResourceRequest request, ResourceResponse response) throws PortletException, IOException
+  {
+    BridgeTCKResultWriter resultWriter = new BridgeTCKResultWriter(DESTROY_EVENT_TEST);
+    
+    // Run test
+    Bridge bridge = getFacesBridge(request, response);
+    bridge.destroy();
+    try
+    {
+      bridge.doFacesRequest(request, response);
+      resultWriter.setStatus(BridgeTCKResultWriter.FAIL);
+      resultWriter.setDetail("Didn't throw the BridgeUninitializedException from doFacesRequest(resource) when passed a destroyed bridge. Instead the request completed without an exception.");
+    }
+    catch (BridgeUninitializedException bue)
+    {
+      resultWriter.setStatus(BridgeTCKResultWriter.PASS);
+      resultWriter.setDetail("Correctly threw BridgeUninitializedException from doFacesRequest(resource) when passed a destroyed bridge.");
+    }
+    catch (Exception e)
+    {
+      resultWriter.setStatus(BridgeTCKResultWriter.FAIL);
+      resultWriter.setDetail("Didn't throw the BridgeUninitializedException from doFacesRequest(resource) when passed a destroyed bridge. Instead it threw: " + e.toString());        
+    }
+    
+    mActionResult = resultWriter.toString();
+  }
 }
\ No newline at end of file

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/Tests.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/Tests.java?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/Tests.java (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_3/Tests.java Thu Aug  5 22:27:47 2010
@@ -34,12 +34,16 @@ import javax.portlet.PortletContext;
 import javax.portlet.PortletMode;
 import javax.portlet.PortletRequest;
 
+import javax.portlet.StateAwareResponse;
 import javax.portlet.faces.Bridge;
 import javax.portlet.faces.BridgeUtil;
 
+import javax.xml.namespace.QName;
+
 import org.apache.myfaces.portlet.faces.testsuite.annotation.BridgeTest;
 import org.apache.myfaces.portlet.faces.testsuite.beans.TestRunnerBean;
 import org.apache.myfaces.portlet.faces.testsuite.common.Constants;
+import org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.TestEventHandler;
 
 public class Tests
   extends Object
@@ -199,6 +203,33 @@ public class Tests
     }
   }
   
+  // Test is MultiRequest -- Render/Action
+  // Should never get to the render portion of this
+  @BridgeTest(test = "eventDestroyTest")
+  public String eventDestroyTest(TestRunnerBean testRunner)
+  {
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    
+    // This tests that we can encode a new mode in an actionURL
+    // done by navigation rule.
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      // Create and raise the event
+      StateAwareResponse response = (StateAwareResponse) extCtx.getResponse();
+      response.setEvent(new QName(TestEventHandler.EVENT_QNAME, TestEventHandler.EVENT_NAME), testRunner.getTestName());
+      return "eventDestroyTest"; // action Navigation result
+    }
+    else
+    {
+      testRunner.setTestComplete(true);
+      testRunner.setTestResult(false,
+                               "unexpectedly got to a render JSP in this test -- should have been handled by the test portlet.");
+      return Constants.TEST_FAILED;
+    }
+  }
+  
   @BridgeTest(test = "portletSetsViewIdTest")
   public String portletSetsViewIdTest(TestRunnerBean testRunner)
   {

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/ManualBridgeInvokePortlet.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/ManualBridgeInvokePortlet.java?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/ManualBridgeInvokePortlet.java (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/ManualBridgeInvokePortlet.java Thu Aug  5 22:27:47 2010
@@ -25,6 +25,8 @@ import java.io.PrintWriter;
 
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
 import javax.portlet.PortletConfig;
 import javax.portlet.PortletException;
 import javax.portlet.PortletRequest;
@@ -50,6 +52,8 @@ public class ManualBridgeInvokePortlet
   private static final String VIEWIDWITHPARAM_TEST = "viewIdWithParam_1_Test";
   private static final String FACESCONTEXTRELEASED_ACTION_TEST = "facesContextReleasedActionTest";
   private static final String PORTLETPHASEREMOVED_ACTION_TEST = "portletPhaseRemovedActionTest";
+  private static final String FACESCONTEXTRELEASED_EVENT_TEST = "facesContextReleasedEventTest";
+  private static final String PORTLETPHASEREMOVED_EVENT_TEST = "portletPhaseRemovedEventTest";
   private static final String FACESCONTEXTRELEASED_RENDER_TEST = "facesContextReleasedRenderTest";
   private static final String PORTLETPHASEREMOVED_RENDER_TEST = "portletPhaseRemovedRenderTest";
   private static final String BRIDGESETSCONTENTTYPE_TEST = "bridgeSetsContentTypeTest";
@@ -95,6 +99,41 @@ public class ManualBridgeInvokePortlet
       }
     }
   }
+  
+  public void processEvent(EventRequest request, EventResponse response) throws
+    PortletException, PortletSecurityException, IOException
+  {
+    super.processEvent(request, response);
+    if (getTestName().equals(FACESCONTEXTRELEASED_EVENT_TEST))
+    {
+      if (request.getPortletSession(true).getAttribute("org.apache.portlet.faces.tck.facesContextReleased") != null)
+      {
+        request.getPortletSession().setAttribute("org.apache.portlet.faces.tck.testResult", Boolean.TRUE);
+        request.getPortletSession().setAttribute("org.apache.portlet.faces.tck.testDetail", "Correctly released FacesContext at end of doFacesRequest (event).");
+        request.getPortletSession().removeAttribute("org.apache.portlet.faces.tck.facesContextReleased");
+      }
+      else
+      {
+        request.getPortletSession().setAttribute("org.apache.portlet.faces.tck.testResult", Boolean.FALSE);
+        request.getPortletSession().setAttribute("org.apache.portlet.faces.tck.testDetail", "Didn't release FacesContext at end of doFacesRequest (event).");        
+      }
+      
+    }
+    else if (getTestName().equals(PORTLETPHASEREMOVED_EVENT_TEST))
+    {
+      if (request.getAttribute(Bridge.PORTLET_LIFECYCLE_PHASE) == null)
+      {
+        request.getPortletSession(true).setAttribute("org.apache.portlet.faces.tck.testResult", Boolean.TRUE);
+        request.getPortletSession().setAttribute("org.apache.portlet.faces.tck.testDetail", "Correctly removed PortletPhase attrbiute at end of doFacesRequest (event).");
+      }
+      else
+      {
+        request.getPortletSession(true).setAttribute("org.apache.portlet.faces.tck.testResult", Boolean.FALSE);
+        request.getPortletSession().setAttribute("org.apache.portlet.faces.tck.testDetail", "Didn't removed PortletPhase attrbiute at end of doFacesRequest (event).");        
+      }
+    }
+  }
+  
 
 
   public void doDispatch(RenderRequest renderRequest, 
@@ -130,7 +169,8 @@ public class ManualBridgeInvokePortlet
       renderRequest.setAttribute(Bridge.VIEW_ID, "/tests/SingleRequestTest.jsp?param1=testValue");
       super.doDispatch(renderRequest, renderResponse);
     }
-    else if (getTestName().equals(FACESCONTEXTRELEASED_ACTION_TEST) || getTestName().equals(PORTLETPHASEREMOVED_ACTION_TEST))
+    else if (getTestName().equals(FACESCONTEXTRELEASED_ACTION_TEST) || getTestName().equals(PORTLETPHASEREMOVED_ACTION_TEST) ||
+             getTestName().equals(FACESCONTEXTRELEASED_EVENT_TEST) || getTestName().equals(PORTLETPHASEREMOVED_EVENT_TEST))
     {
       // Output in the Test method fort his test
       super.doDispatch(renderRequest, renderResponse);

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/Tests.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/Tests.java?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/Tests.java (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_2/Tests.java Thu Aug  5 22:27:47 2010
@@ -19,21 +19,14 @@
 
 package org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2;
 
+import java.lang.Boolean;
 import java.io.IOException;
 
-import java.util.Iterator;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
 
-import java.util.Set;
+import java.util.Map;
 
-import javax.faces.FacesException;
-import javax.faces.FactoryFinder;
-import javax.faces.application.FacesMessage;
 import javax.faces.application.ViewHandler;
-import javax.faces.component.UIViewRoot;
+
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 
@@ -41,25 +34,19 @@ import javax.faces.event.PhaseEvent;
 import javax.faces.event.PhaseId;
 import javax.faces.event.PhaseListener;
 
-import javax.faces.lifecycle.LifecycleFactory;
 
-import javax.faces.render.ResponseStateManager;
+import javax.portlet.Event;
+import javax.portlet.StateAwareResponse;
 
-import javax.portlet.ActionResponse;
-import javax.portlet.PortalContext;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletContext;
-import javax.portlet.PortletMode;
-import javax.portlet.PortletPreferences;
-import javax.portlet.PortletRequest;
 
 import javax.portlet.RenderRequest;
 import javax.portlet.faces.Bridge;
 import javax.portlet.faces.BridgeUtil;
 
+import javax.xml.namespace.QName;
+
 import org.apache.myfaces.portlet.faces.testsuite.annotation.BridgeTest;
 import org.apache.myfaces.portlet.faces.testsuite.beans.TestRunnerBean;
-import org.apache.myfaces.portlet.faces.testsuite.beans.AnnotatedExcludedBean;
 import org.apache.myfaces.portlet.faces.testsuite.common.Constants;
 
 public class Tests
@@ -403,6 +390,72 @@ public class Tests
     }
   }  
   
+  // Test is MultiRequest -- Render/Action
+  // Test #5.59
+  @BridgeTest(test = "facesContextReleasedEventTest")
+  public String facesContextReleasedEventTest(TestRunnerBean testRunner)
+  { 
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      // Create and raise the event
+      StateAwareResponse response = (StateAwareResponse) extCtx.getResponse();
+      response.setEvent(new QName(TestEventHandler.EVENT_QNAME, TestEventHandler.EVENT_NAME), testRunner.getTestName());
+      return "facesContextReleasedEventTest"; // action Navigation result
+    }
+    else
+    {
+      testRunner.setTestComplete(true);
+      // Values set by portlet at end of action
+      boolean result = ((Boolean)extCtx.getSessionMap().get("org.apache.portlet.faces.tck.testResult")).booleanValue();
+      testRunner.setTestResult(result,
+                                (String)extCtx.getSessionMap().get("org.apache.portlet.faces.tck.testDetail"));
+      
+      if (result)
+        return Constants.TEST_SUCCESS;
+      else
+      return Constants.TEST_FAILED;
+    }
+  }  
+  
+  // Test is MultiRequest -- Render/Action
+  // Test #5.60
+  @BridgeTest(test = "portletPhaseRemovedEventTest")
+  public String portletPhaseRemovedEventTest(TestRunnerBean testRunner)
+  { 
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      StateAwareResponse response = (StateAwareResponse) extCtx.getResponse();
+      response.setEvent(new QName(TestEventHandler.EVENT_QNAME, TestEventHandler.EVENT_NAME), testRunner.getTestName());
+      return "portletPhaseRemovedEventTest"; // action Navigation result
+    }
+    else
+    {
+      testRunner.setTestComplete(true);
+      
+      // Values set by portlet at end of action
+      boolean result = ((Boolean)extCtx.getSessionMap().get("org.apache.portlet.faces.tck.testResult")).booleanValue();
+      testRunner.setTestResult(result,
+                                (String)extCtx.getSessionMap().get("org.apache.portlet.faces.tck.testDetail"));
+      
+      if (result)
+        return Constants.TEST_SUCCESS;
+      else
+      return Constants.TEST_FAILED;
+    }
+  }    
+  
   // Test is Render test
   // Test #5.29  
   @BridgeTest(test = "bridgeSetsContentTypeTest")
@@ -553,5 +606,365 @@ public class Tests
       ctx.responseComplete();
     }
   }
+  
+  // Test is MultiRequest -- Render/Action
+  // Test # -- 5.48
+  @BridgeTest(test = "eventScopeRestoredTest")
+  public String eventScopeRestoredTest(TestRunnerBean testRunner)
+  { 
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      // Clear settings from previous run of the test: Done here because this render doesn't happen in scope so second rendition
+      // doesn't keep the test result -- rather rerenders
+      extCtx.getSessionMap().put(TestEventHandler.EVENT_RECEIVED, null);
+      extCtx.getSessionMap().put(TestEventHandler.EVENT_TEST_FAILED, null);
+      
+      // Place a request attr in scope so we can make sure its still there later
+      extCtx.getRequestMap().put(TestEventHandler.EVENTATTR, testRunner.getTestName());
+      // Create and raise the event
+      StateAwareResponse response = (StateAwareResponse) extCtx.getResponse();
+      response.setEvent(new QName(TestEventHandler.EVENT_QNAME, TestEventHandler.EVENT_NAME), testRunner.getTestName());
+      return "eventScopeRestoredTest"; // action Navigation result
+    }
+    else
+    {
+      testRunner.setTestComplete(true);
+      
+      // Values set by portlet at end of action
+      Event event = (Event)extCtx.getSessionMap().get(TestEventHandler.EVENT_RECEIVED);
+      String failedMsg = (String)extCtx.getSessionMap().get(TestEventHandler.EVENT_TEST_FAILED);
+      String payload = (String) extCtx.getRequestMap().get(TestEventHandler.EVENTATTR);
+      if (event == null)
+      {
+        testRunner.setTestResult(false,
+                                 "Raised event wasn't received.");
+        return Constants.TEST_FAILED;
+      }
+      else if (failedMsg != null)
+      {
+        testRunner.setTestResult(false, failedMsg);
+        return Constants.TEST_FAILED;
+      }
+      else if (payload == null || !payload.equals(testRunner.getTestName()))
+      {
+        testRunner.setTestResult(false,
+                                 "Event received and request scope restored but that scope wasn't carried forward into the render");
+        return Constants.TEST_FAILED;
+      }
+      else
+      {
+        testRunner.setTestResult(true,
+                                 "Event received and request scope restored.");
+        return Constants.TEST_SUCCESS;
+      }
+    }
+  }
+    
+  // Test is MultiRequest -- Render/Action
+  // Test # -- 5.49
+  @BridgeTest(test = "eventScopeNotRestoredRedirectTest")
+  public String eventScopeNotRestoredRedirectTest(TestRunnerBean testRunner)
+  { 
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      // Clear settings from previous run of the test
+      extCtx.getSessionMap().put(TestEventHandler.EVENT_RECEIVED, null);
+      extCtx.getSessionMap().put(TestEventHandler.EVENT_TEST_FAILED, null);
+      
+      // Place a request attr in scope so we can make sure its not there later
+      extCtx.getRequestMap().put(TestEventHandler.EVENTATTR, testRunner.getTestName());
+      // Create and raise the event
+      StateAwareResponse response = (StateAwareResponse) extCtx.getResponse();
+      response.setEvent(new QName(TestEventHandler.EVENT_QNAME, TestEventHandler.EVENT_NAME), testRunner.getTestName());
+      return "eventScopeNotRestoredRedirectTest"; // action Navigation result
+    }
+    else
+    {
+      testRunner.setTestComplete(true);
+      
+      // Values set by portlet at end of action
+      Event event = (Event)extCtx.getSessionMap().get(TestEventHandler.EVENT_RECEIVED);
+      String failedMsg = (String)extCtx.getSessionMap().get(TestEventHandler.EVENT_TEST_FAILED);
+      String payload = (String) extCtx.getRequestMap().get(TestEventHandler.EVENTATTR);
+      if (event == null)
+      {
+        testRunner.setTestResult(false,
+                                 "Raised event wasn't received.");
+        return Constants.TEST_FAILED;
+      }
+      else if (failedMsg != null)
+      {
+        testRunner.setTestResult(false, failedMsg);
+        return Constants.TEST_FAILED;
+      }
+      else if (payload != null)
+      {
+        testRunner.setTestResult(false,
+                                 "Event navigation issued a redirect but the request scope was preserved.");
+        return Constants.TEST_FAILED;
+      }
+      else
+      {
+        testRunner.setTestResult(true,
+                                 "Request scope not preserved after event navigation issued a redirect.");
+        return Constants.TEST_SUCCESS;
+      }
+    }
+  }  
+  
+  // Test is MultiRequest -- Render/Action
+  // Test # -- 5.50
+  @BridgeTest(test = "eventScopeNotRestoredModeChangedTest")
+  public String eventScopeNotRestoredModeChangedTest(TestRunnerBean testRunner)
+  { 
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      // Clear settings from previous run of the test
+      extCtx.getSessionMap().put(TestEventHandler.EVENT_RECEIVED, null);
+      extCtx.getSessionMap().put(TestEventHandler.EVENT_TEST_FAILED, null);
+
+      // Place a request attr in scope so we can make sure its not there later
+      extCtx.getRequestMap().put(TestEventHandler.EVENTATTR, testRunner.getTestName());
+      // Create and raise the event
+      StateAwareResponse response = (StateAwareResponse) extCtx.getResponse();
+      response.setEvent(new QName(TestEventHandler.EVENT_QNAME, TestEventHandler.EVENT_NAME), testRunner.getTestName());
+      return "eventScopeNotRestoredModeChangedTest"; // action Navigation result
+    }
+    else
+    {
+      testRunner.setTestComplete(true);
+      
+      // Values set by portlet at end of action
+      Event event = (Event)extCtx.getSessionMap().get(TestEventHandler.EVENT_RECEIVED);
+      String failedMsg = (String)extCtx.getSessionMap().get(TestEventHandler.EVENT_TEST_FAILED);
+      String payload = (String) extCtx.getRequestMap().get(TestEventHandler.EVENTATTR);
+      if (event == null)
+      {
+        testRunner.setTestResult(false,
+                                 "Raised event wasn't received.");
+        return Constants.TEST_FAILED;
+      }
+      else if (failedMsg != null)
+      {
+        testRunner.setTestResult(false, failedMsg);
+        return Constants.TEST_FAILED;
+      }
+      else if (payload != null)
+      {
+        testRunner.setTestResult(false,
+                                 "Event navigation indicated a mode change but the request scope was preserved.");
+        return Constants.TEST_FAILED;
+      }
+      else
+      {
+        testRunner.setTestResult(true,
+                                 "Request scope not preserved after event navigation indicated a mode change.");
+        return Constants.TEST_SUCCESS;
+      }
+    }
+  } 
+  
+  // Test is MultiRequest -- Render/Action
+  // Test # -- 5.54, 5.55, 5.56, 5.57. 5.58
+  @BridgeTest(test = "eventControllerTest")
+  public String eventControllerTest(TestRunnerBean testRunner)
+  { 
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      // Clear settings from previous run of the test: Done here because this render doesn't happen in scope so second rendition
+      // doesn't keep the test result -- rather rerenders
+      extCtx.getSessionMap().put(TestEventHandler.EVENT_RECEIVED, null);
+      extCtx.getSessionMap().put(TestEventHandler.EVENT_TEST_FAILED, null);
+      
+      // Set a render parameter so we can verify its there after the event
+      StateAwareResponse response = (StateAwareResponse) extCtx.getResponse();
+      response.setRenderParameter("tck.renderParam", "value");
+      // Create and raise the event
+      response.setEvent(new QName(TestEventHandler.EVENT_QNAME, TestEventHandler.EVENT_NAME), testRunner.getTestName());
+      return "eventControllerTest"; // action Navigation result
+    }
+    else
+    {
+      testRunner.setTestComplete(true);
+      
+      // Values set by portlet at end of action
+      Boolean eventPhaseCheck= (Boolean)extCtx.getRequestMap().get("tck.eventPhaseCheck");
+      String modelPRP = (String) extCtx.getRequestMap().get("modelPRP");
+      String checkPRP = (String) extCtx.getRequestMap().get("tck.compareModelPRPValue");
+      
+      // Verify the render parameter set in action is still there
+      String param = (String) extCtx.getRequestParameterMap().get("tck.renderParam");
+
+      if (eventPhaseCheck == null)
+      {
+        testRunner.setTestResult(false,
+                                 "Registered Event handler wasn't called to handle raised event.");
+        return Constants.TEST_FAILED;
+      }
+      else if (!eventPhaseCheck.booleanValue())
+      {
+        testRunner.setTestResult(false,
+                                 "Expected EVENT_PHASE request attribute not set during event processing.");
+        return Constants.TEST_FAILED;
+      }
+      else if (param == null)
+      {
+        testRunner.setTestResult(false,
+                                 "Render parameter set in action phase not carried forward through the event phase into the render phase.");
+        return Constants.TEST_FAILED;
+      }
+      else if (!param.equals("value"))
+      {
+        testRunner.setTestResult(false,
+                                 "(Private) Render parameter set in action phase carried forward through the event phase into the render phase but with an unexpected value.  Received: " +
+                                 param + " but expected: value");
+        return Constants.TEST_FAILED;
+      }
+      else if (modelPRP == null)
+      {
+        testRunner.setTestResult(false,
+                                 "(Public) Render parameter set in event phase wasn't received/value pushed to its model in the render phase.");
+        return Constants.TEST_FAILED;
+      } 
+      else if (checkPRP == null || !modelPRP.equals(checkPRP))      {
+        testRunner.setTestResult(false,
+                                 "(Public) Render parameter value set in event phase isn't set in the model in the render.  PRP model value: " + modelPRP + " but expected: " + checkPRP);
+        return Constants.TEST_FAILED;
+      }
+      else
+      {
+        testRunner.setTestResult(true,
+                                 "Event controller tests passed.<br>Registered event handler called and its navigational result processed corectly.");
+        testRunner.appendTestDetail("EVENT_PHASE attribute correctly set during event processing.");
+        testRunner.appendTestDetail("(Private) Render parameter set during action phase was properly carried forward from the event phase.");
+        testRunner.appendTestDetail("(Public) Render parameter whose underlying model value was set during event phase was properly carried forward into the render.");
+        
+        return Constants.TEST_SUCCESS;
+        
+      }
+    }
+  }   
+  
+  // Test is MultiRequest -- Render/Action
+  // Test # -- 5.58
+  @BridgeTest(test = "eventNoHandlerPRPPreservedTest")
+  public String eventNoHandlerPRPPreservedTest(TestRunnerBean testRunner)
+  { 
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      // Set the value into the model underneath the public render parameter
+      extCtx.getRequestMap().put("modelPRP", testRunner.getTestName());
+      // Create and raise the event
+      StateAwareResponse response = (StateAwareResponse) extCtx.getResponse();
+      response.setEvent(new QName(TestEventHandler.EVENT_QNAME, TestEventHandler.EVENT_NAME), testRunner.getTestName());
+      return "eventNoHandlerPRPPreservedTest"; // action Navigation result
+    }
+    else
+    {
+      testRunner.setTestComplete(true);
+      // ensure that both the public render paramter and the model are there and have the same value
+      RenderRequest request = (RenderRequest) extCtx.getRequest();
+      String[] prpArray = request.getPublicParameterMap().get("testPRP");
+      String modelPRP = (String) extCtx.getRequestMap().get("modelPRP");
+      
+      if (prpArray == null)
+      {
+        testRunner.setTestResult(false,
+                                 "event raised without a registered handler didn't carry forward the public render parameter.");
+        return Constants.TEST_FAILED;
+      }
+      else if (modelPRP == null)
+      {
+        testRunner.setTestResult(false,
+                                 "event raised without a registered handler didn't update the model from the passed public render parameter.");
+        return Constants.TEST_FAILED;
+      }
+      else if (!modelPRP.equals(prpArray[0]))
+      {
+        testRunner.setTestResult(false,
+                                 "event raised without a registered handler:  passed public render parameter value doesn't match underlying one.");
+        return Constants.TEST_FAILED;
+      }
+      else if (!modelPRP.equals(testRunner.getTestName()))
+      {
+        testRunner.setTestResult(false,
+                                 "event raised without a registered handler:  public render parameter didn't contain expected value.  PRP value: " + modelPRP + " but expected: " + testRunner.getTestName());
+        return Constants.TEST_FAILED;
+      }
+      else
+      {
+      testRunner.setTestResult(true,
+                             "event raised without a registered handler worked correctly as the public render parameter was maintained.");
+      return Constants.TEST_SUCCESS;
+      }
+    }
+  }
+  
+  // Test is MultiRequest -- Render/Action
+  // Test # -- 5.63
+  @BridgeTest(test = "verifyResourcePhaseTest")
+  public String verifyResourcePhaseTest(TestRunnerBean testRunner)  
+  {
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    Map m = extCtx.getRequestMap();
+    
+    testRunner.setTestComplete(true);
+    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.RESOURCE_PHASE)
+    {
+          
+      testRunner.setTestResult(true,
+              "ResourcePhase attribute correctly set during resource processing.");
+      return Constants.TEST_SUCCESS;
+    }
+    else
+    {
+      testRunner.setTestResult(false,
+            "ResourcePhase attribute not set during resource processing.");
+      return Constants.TEST_FAILED;
+    }
+  }  
+  
+  // Test is MultiRequest -- Render/Action
+  // Test # -- 5.64
+  @BridgeTest(test = "facesResourceTest")
+  public String facesResourceTest(TestRunnerBean testRunner)  
+  {
+    return null;
+  }
      
 }

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java Thu Aug  5 22:27:47 2010
@@ -9,7 +9,7 @@
  *     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
+ * software distributed under the License iRes 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
@@ -3883,6 +3883,183 @@ public class Tests
       return Constants.TEST_FAILED;
     }
   }
+  
+  // Test #6.65  
+  @BridgeTest(test = "redirectRenderPRP1Test")
+  public String redirectRenderPRP1Test(TestRunnerBean testRunner)
+  {
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      /* Test works as follows:
+       *    set a new value for the PRP by updating the model -- this will cause the PRP to come in the render
+       *    in the subsequent render:  set an attribute indicating we are redirecting; redirect; check to see if the PRP is in the request.
+       *    
+       *    Key difference between PRP1Test and PRP2Test is that PRP1 already calls encodeActionURL on url prior to redirect while
+       *    PRP2 does not.
+       */
+      extCtx.getRequestMap().put("modelPRP", testRunner.getTestName());
+      return "redirectRenderPRP1Test";
+    }
+    else
+    {
+      String viewId = ctx.getViewRoot().getViewId();
+      if (viewId.equals("/tests/MultiRequestTestResultRenderCheck.jsp"))
+      {
+        String target = ctx.getApplication().getViewHandler().getActionURL(ctx, "/tests/RedirectTestResultRenderCheck.jsp");
+        try
+        {
+          extCtx.redirect(extCtx.encodeActionURL(target));
+        }
+        catch (Exception e)
+        {
+          testRunner.setTestComplete(true);
+          testRunner.setTestResult(false,
+                                   "Calling extCtx.redirect() threw an exception: " + e.getMessage());
+          return Constants.TEST_FAILED;
+        }
+        return "";
+      }
+      else if (viewId.equals("/tests/RedirectTestResultRenderCheck.jsp"))
+      {
+        testRunner.setTestComplete(true);
+        // ensure that both the public render paramter and the model are there and have the same value
+        RenderRequest request = (RenderRequest) extCtx.getRequest();
+        String[] prpArray = request.getPublicParameterMap().get("testPRP");
+        String modelPRP = (String) extCtx.getRequestMap().get("modelPRP");
+        
+        if (prpArray == null)
+        {
+          testRunner.setTestResult(false,
+                                   "redirected request didn't carry forward the public render parameter.");
+          return Constants.TEST_FAILED;
+        }
+        else if (modelPRP == null)
+        {
+          testRunner.setTestResult(false,
+                                   "redirected request didn't update the model from the passed public render parameter.");
+          return Constants.TEST_FAILED;
+        }
+        else if (!modelPRP.equals(prpArray[0]))
+        {
+          testRunner.setTestResult(false,
+                                   "redirected request:  passed public render parameter value doesn't match underlying one.");
+          return Constants.TEST_FAILED;
+        }
+        else if (!modelPRP.equals(testRunner.getTestName()))
+        {
+          testRunner.setTestResult(false,
+                                   "redirected request:  public render parameter didn't contain expected value.  PRP value: " + modelPRP + " but expected: " + testRunner.getTestName());
+          return Constants.TEST_FAILED;
+        }
+        else
+        {
+        testRunner.setTestResult(true,
+                               "extCtx.redirect() during render worked correctly as we were redirected to the new view.");
+        return Constants.TEST_SUCCESS;
+        }
+      }
+      else
+      {
+        testRunner.setTestResult(false,
+                                 "extCtx.redirect() during render failed as we ended up in an unexpected view: "
+                                 + viewId);
+        return Constants.TEST_FAILED;
+      }
+    }
+  }
+  
+
+  // Test #6.65  
+  @BridgeTest(test = "redirectRenderPRP2Test")
+  public String redirectRenderPRP2Test(TestRunnerBean testRunner)
+  {
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      /* Test works as follows:
+       *    set a new value for the PRP by updating the model -- this will cause the PRP to come in the render
+       *    in the subsequent render:  set an attribute indicating we are redirecting; redirect; check to see if the PRP is in the request.
+       *    
+       *    Key difference between PRP1Test and PRP2Test is that PRP1 already calls encodeActionURL on url prior to redirect while
+       *    PRP2 does not.
+       */
+      extCtx.getRequestMap().put("modelPRP", testRunner.getTestName());
+      return "redirectRenderPRP2Test";
+    }
+    else
+    {
+      String viewId = ctx.getViewRoot().getViewId();
+      if (viewId.equals("/tests/MultiRequestTestResultRenderCheck.jsp"))
+      {
+        String target = ctx.getApplication().getViewHandler().getActionURL(ctx, "/tests/RedirectTestResultRenderCheck.jsp");
+        try
+        {
+          extCtx.redirect(target);
+        }
+        catch (Exception e)
+        {
+          testRunner.setTestComplete(true);
+          testRunner.setTestResult(false,
+                                   "Calling extCtx.redirect() threw an exception: " + e.getMessage());
+          return Constants.TEST_FAILED;
+        }
+        return "";
+      }
+      else if (viewId.equals("/tests/RedirectTestResultRenderCheck.jsp"))
+      {
+        testRunner.setTestComplete(true);
+        // ensure that both the public render paramter and the model are there and have the same value
+        RenderRequest request = (RenderRequest) extCtx.getRequest();
+        String[] prpArray = request.getPublicParameterMap().get("testPRP");
+        String modelPRP = (String) extCtx.getRequestMap().get("modelPRP");
+        
+        if (prpArray == null)
+        {
+          testRunner.setTestResult(false,
+                                   "redirected request didn't carry forward the public render parameter.");
+          return Constants.TEST_FAILED;
+        }
+        else if (modelPRP == null)
+        {
+          testRunner.setTestResult(false,
+                                   "redirected request didn't update the model from the passed public render parameter.");
+          return Constants.TEST_FAILED;
+        }
+        else if (!modelPRP.equals(prpArray[0]))
+        {
+          testRunner.setTestResult(false,
+                                   "redirected request:  passed public render parameter value doesn't match underlying one.");
+          return Constants.TEST_FAILED;
+        }
+        else if (!modelPRP.equals(testRunner.getTestName()))
+        {
+          testRunner.setTestResult(false,
+                                   "redirected request:  public render parameter didn't contain expected value.  PRP value: " + modelPRP + " but expected: " + testRunner.getTestName());
+          return Constants.TEST_FAILED;
+        }
+        else
+        {
+        testRunner.setTestResult(true,
+                               "extCtx.redirect() during render worked correctly as we were redirected to the new view.");
+        return Constants.TEST_SUCCESS;
+        }
+      }
+      else
+      {
+        testRunner.setTestResult(false,
+                                 "extCtx.redirect() during render failed as we ended up in an unexpected view: "
+                                 + viewId);
+        return Constants.TEST_FAILED;
+      }
+    }
+  }
 
   // Test #6.66  
   @BridgeTest(test = "illegalRedirectRenderTest")

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/pluto-portal-driver-config.xsl
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/pluto-portal-driver-config.xsl?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/pluto-portal-driver-config.xsl (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/pluto-portal-driver-config.xsl Thu Aug  5 22:27:47 2010
@@ -17,7 +17,7 @@
     under the License.	   
 -->
 
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pa="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pa="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
   <xsl:strip-space elements="pa:portlet-app"/>
   <xsl:output method="xml" indent="yes"/>
   <xsl:param name="main-portlet-context"/>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test-template.xsl
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test-template.xsl?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test-template.xsl (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test-template.xsl Thu Aug  5 22:27:47 2010
@@ -22,7 +22,7 @@
   one main portlet definition file with one or more additional
   portlet definition files passed in as parameters.
 -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pa="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pa="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
   <xsl:output method="xml" indent="yes" doctype-system="http://java.sun.com/dtd/properties.dtd"/> 
   <xsl:strip-space elements="pa:portlet-app"/>
   <xsl:param name="page-path"/>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test.xsl
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test.xsl?rev=982810&r1=982809&r2=982810&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test.xsl (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/resources/test.xsl Thu Aug  5 22:27:47 2010
@@ -21,7 +21,7 @@
   file at a time to build a java properties file with one 
   entry for each portlet definition.
 -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pa="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pa="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
   <xsl:output method="xml" indent="yes" doctype-system="http://java.sun.com/dtd/properties.dtd"/> 
   <xsl:strip-space elements="pa:portlet-app"/>
   <xsl:param name="page-path"/>