You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by jw...@apache.org on 2008/02/07 19:23:27 UTC

svn commit: r619546 - in /myfaces/trinidad/branches/jwaldman_1.2-issue936: src/site/xdoc/devguide/ trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/ trinidad-examples...

Author: jwaldman
Date: Thu Feb  7 10:23:21 2008
New Revision: 619546

URL: http://svn.apache.org/viewvc?rev=619546&view=rev
Log:
TRINIDAD-936 changed the partialTrigger syntax to move between naming containers. first checkin. Still need a JUnit test. added a couple demo/test jspx files. changed warning message for deprecated syntax. changed ppr documentation.
TODO - JUnit test

Added:
    myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TestRelativePartialTriggers.java
    myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggers.jspx
    myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggersPrevRelease.jspx
Modified:
    myfaces/trinidad/branches/jwaldman_1.2-issue936/src/site/xdoc/devguide/ppr.xml
    myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/pprDemos.jspx
    myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
    myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts

Modified: myfaces/trinidad/branches/jwaldman_1.2-issue936/src/site/xdoc/devguide/ppr.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/src/site/xdoc/devguide/ppr.xml?rev=619546&r1=619545&r2=619546&view=diff
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/src/site/xdoc/devguide/ppr.xml (original)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/src/site/xdoc/devguide/ppr.xml Thu Feb  7 10:23:21 2008
@@ -155,21 +155,17 @@
 
 <P>
 Also, if you've got JSF NamingContainers (e.g., f:subview) between the trigger and its target,
-you'll need to incorporate that into the partialTriggers definition:
+you'll need to incorporate that into the partialTriggers definition. The syntax is:
 <ul>
 <li>If you need to go down through a naming container to get to the trigger, include the naming container's ID with a colon (e.g., partialTriggers="theSubform:theLink"</li>
 <li>If you need to start at the root of the page to get the trigger component, start with a single colon (e.g., partialTriggers=":someRootComponent"</li>
-<li>If you need to go up and out of a parent naming container to get the trigger component, start with multiple colons. 
-  <ul>
-    <li>If the target component is not a NamingContainer, then the trigger is relative to the target component. To find it relative to the parent naming
-    container, start with two colons (e.g, partialTriggers="::myTrigger"). To find it relative to the grandparent naming container,
-    start with three colons (e.g., partialTriggers=":::myTrigger"), and so forth.
-    </li>
-    <li>If the target component is a NamingContainer, then the trigger is relative to the target component's parent, not the component itself.
-    </li>
-  </ul>
-</li>
+<li>If you need to go up and out of a naming container to get the trigger component, start with two colons. (e.g., partialTriggers="::someComponentOutsideNamingContainer")
+This includes the current component if the component is a NamingContainer. (e.g., tr:table partialTriggers="::mySiblingComponent" pops out of the table to get to the sibling)</li>
+<li>If you need to go up and out of two naming containers to get the trigger component, start with three colons.
+To pop out of three naming containers, start with four colons, and so on. (e.g., partialTriggers=":::someOtherComponent" pops out of two naming containers)</li>
 </ul>
+
+Here are some examples:
 </P>
 <source>
 <![CDATA[
@@ -189,23 +185,22 @@
               </f:subview>
             </f:subview>
 
-            <!-- Button 2 has four colons. Two to get it to button2WrapperB, three to get it to buttons2WrapperA,
-            and four to get it to wrapperAroundEverything. It will find the trigger from there. 
+            <!-- Button 2's partialTrigger starts with ':::'. 
+            Two colons to pop it out of button2WrapperB, another colon to pop it out of buttons2WrapperA.
             commandButton is not a NamingContainer -->
             <f:subview id="button2WrapperA">
               <f:subview id="button2WrapperB">
                 <tr:commandButton
-                  partialTriggers="::::button1WrapperA:button1WrapperB:button1"
+                  partialTriggers=":::button1WrapperA:button1WrapperB:button1"
                   partialSubmit="true"
                   id="button2"
                   text="button 2"/>
               </f:subview>
             </f:subview>
         ....
-            <!-- table is a NamingContainer, so finding the trigger starts
-            with the parent component -- the panelGroupLayout.. If the 
-            parent is a NamingContainer (like if you take the panelGroupLayout
-            away) then there would only be three colons. -->
+            <!-- table is a NamingContainer. Two colons pop out of the table.
+            Two more to pop it out of the two subviews.
+            -->
             <f:subview id="table7WrapperA">
               <f:subview id="table7WrapperB">
                 <tr:panelGroupLayout layout="vertical">

Added: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TestRelativePartialTriggers.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TestRelativePartialTriggers.java?rev=619546&view=auto
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TestRelativePartialTriggers.java (added)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TestRelativePartialTriggers.java Thu Feb  7 10:23:21 2008
@@ -0,0 +1,148 @@
+package org.apache.myfaces.trinidaddemo;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.myfaces.trinidad.component.core.data.CoreTable;
+import org.apache.myfaces.trinidad.component.core.input.CoreInputText;
+import org.apache.myfaces.trinidad.component.core.nav.CoreCommandButton;
+
+public class TestRelativePartialTriggers {
+
+
+  public String commandButton1_action() {
+      // Add event code here...
+    if (commandButton2 != null)
+      commandButton2.setText("Found!");
+    if (inputText1 != null)
+      inputText1.setValue("inputText1 found commandButton1");
+    if (inputText2 != null)
+      inputText2.setValue("inputText2 found commandButton1");
+    if (inputText3 != null)
+      inputText3.setContentStyle("background-color:green");
+    if (inputText4 != null)
+      inputText4.setValue("inputText4 found commandButton1");
+    if (table1 != null)
+      table1.setInlineStyle("background-color: red");
+    if (table2 != null)
+      table2.setInlineStyle("background-color: aqua");    
+    
+    return null;
+  } 
+  
+  public String commandButton3_action() {
+
+    if (inputText1 != null)
+      inputText1.setValue("inputText1 found commandButton3");
+    if (inputText2 != null)
+      inputText2.setValue("inputText2 found commandButton3");
+    if (inputText3 != null)
+      inputText3.setDisabled(true);
+    // Add event code here...
+    if (table1 != null)
+      table1.setInlineStyle("background-color: pink");
+    
+    return null;
+  }  
+  
+  
+  public void setCommandButton2(CoreCommandButton cb2) {
+    this.commandButton2 = cb2;
+  }
+
+  public CoreCommandButton getCommandButton2() {
+    return commandButton2;
+  } 
+  
+  public void setInputText1(CoreInputText inputText1) {
+    this.inputText1 = inputText1;
+  }
+
+  public CoreInputText getInputText1() {
+    return inputText1;
+  }
+  
+  public void setInputText2(CoreInputText inputText2) {
+    this.inputText2 = inputText2;
+  }
+
+  public CoreInputText getInputText2() {
+    return inputText2;
+  }   
+  
+  public void setInputText3(CoreInputText inputText3) {
+    this.inputText3 = inputText3;
+  }
+
+  public CoreInputText getInputText3() {
+    return inputText3;
+  }
+  
+  public void setInputText4(CoreInputText inputText4) {
+    this.inputText4 = inputText4;
+  }
+
+  public CoreInputText getInputText4() {
+    return inputText4;
+  } 
+  
+  public void setTable1(CoreTable table1) {
+    this.table1 = table1;
+  }
+
+  public CoreTable getTable1() {
+    return table1;
+  }  
+  
+  public void setTable2(CoreTable table2) {
+    this.table2 = table2;
+  }
+
+  public CoreTable getTable2() {
+    return table2;
+  }   
+  
+  public List<Person> getTableData() 
+  {
+    if (tableData == null)
+    {
+      tableData = new ArrayList<Person>();
+      tableData.add(new Person("Bob"));
+      tableData.add(new Person("Kat"));
+    }
+    return tableData;
+  }
+
+  public String commandButton4_action()
+  {
+    // Add event code here...
+    // refresh the table
+    if (table1 != null)
+      table1.setInlineStyle("background-color: gold");
+    return null;
+  }
+
+  public static class Person 
+  {
+    public Person(String name)
+    {
+      _name = name;
+    }
+    private String _name;
+    
+    public String getName()
+    {
+      return _name;
+    }
+  }
+  private CoreCommandButton commandButton2;
+  private CoreInputText inputText1;
+  private CoreInputText inputText2;   
+  private CoreInputText inputText3;
+  private CoreInputText inputText4;
+  private CoreTable table1;
+  private CoreTable table2;  
+  private List<Person> tableData;
+
+}

Modified: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml?rev=619546&r1=619545&r2=619546&view=diff
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/WEB-INF/faces-config.xml Thu Feb  7 10:23:21 2008
@@ -3056,4 +3056,10 @@
     <managed-bean-class>org.apache.myfaces.trinidaddemo.DemoShowDetailDisclosureBean</managed-bean-class>
     <managed-bean-scope>request</managed-bean-scope>
   </managed-bean>
+  <managed-bean>
+    <managed-bean-name>testTriggers</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.trinidaddemo.TestRelativePartialTriggers</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+    <!--oracle-jdev-comment:managed-bean-jsp-link:1demos/testRelativePartialTriggers.jspx-->
+  </managed-bean>
 </faces-config>

Modified: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/pprDemos.jspx
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/pprDemos.jspx?rev=619546&r1=619545&r2=619546&view=diff
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/pprDemos.jspx (original)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/pprDemos.jspx Thu Feb  7 10:23:21 2008
@@ -245,10 +245,9 @@
        <tr:panelHeader text="Naming container tests; partial triggers are the previous command components with partialSubmit"> 
          <tr:panelGroupLayout layout="vertical">
            <f:subview id="sub">
-             <!-- use '::' in front of the identifier to get to the parent naming
-             container, add ':::' to get to the grandparent naming container, etc.
-             This works for non-Naming Container components. -->
-             <tr:outputFormatted  partialTriggers=":::pSub_link :::pSub_button"
+             <!-- use '::' in front of the identifier to pop out of the current naming container.
+             Additional colons continue to pop. -->
+             <tr:outputFormatted  partialTriggers="::pSub_link ::pSub_button"
                                   styleUsage="instruction"
                                   value="#{partialDemoUtil.status.linkUpdate}">
                <f:convertDateTime pattern="HH:mm:ss"/>
@@ -259,7 +258,7 @@
              This works for non-Naming Container components. -->
            <f:subview id="sub2">
             <f:subview id="sub3">
-             <tr:outputFormatted  partialTriggers="::::pSub_link ::::pSub_button"
+             <tr:outputFormatted  partialTriggers=":::pSub_link :::pSub_button"
                                   styleUsage="instruction"
                                   value="#{partialDemoUtil.status.linkUpdate}">
                <f:convertDateTime pattern="HH:mm:ss"/>
@@ -284,6 +283,10 @@
           <tr:selectItem label="Index" value="/index.jspx"/>
           <tr:selectItem label="Component Demos" value="/componentDemos.jspx"/>
          </tr:selectOneChoice>
+       </tr:panelHeader>
+        <tr:panelHeader text="More ppr demos showing partialTriggers syntax with regard to NamingContainers.">
+        <tr:goLink text="Relative Partial Triggers Demo"
+                destination="testRelativePartialTriggers.jspx" />      
        </tr:panelHeader>
       </tr:panelGroupLayout>
      </tr:panelHeader>

Added: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggers.jspx
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggers.jspx?rev=619546&view=auto
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggers.jspx (added)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggers.jspx Thu Feb  7 10:23:21 2008
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
+<!--
+    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.
+	   
+-->
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
+          xmlns:f="http://java.sun.com/jsf/core"
+          xmlns:h="http://java.sun.com/jsf/html"
+          xmlns:trh="http://myfaces.apache.org/trinidad/html"
+          xmlns:tr="http://myfaces.apache.org/trinidad">
+  <jsp:directive.page contentType="text/html;charset=utf-8"/>
+  <f:view>
+    <tr:document title="Partial Page Rendering Demos">
+      <tr:form>
+        <tr:panelPage>
+          <f:facet name="navigationGlobal">
+            <tr:navigationPane hint="buttons">
+              <tr:commandNavigationItem text="Return to Feature Demos page"
+                                        immediate="true" action="demos"/>
+              <tr:commandNavigationItem text="Return to PPR Demo page"
+                                  immediate="true"
+                                  action="demos.ppr"/>
+            </tr:navigationPane>
+          </f:facet>
+          <tr:outputText  styleClass="AFInstructionText" 
+            value="This tests the syntax for partialTriggers. :: pops you out of the current NamingContainer 
+            including yourself if you are a naming container. Each additional colon pops out of a NamingContainer."/>
+          <tr:separator/>
+          <f:subview id="nc1">
+            <tr:commandButton text="commandButton 1" partialSubmit="true"
+                              id="commandButton1"
+                              action="#{testTriggers.commandButton1_action}"/>
+            <tr:commandButton text="commandButton 2"
+                              binding="#{testTriggers.commandButton2}"
+                              id="commandButton2"
+                              partialTriggers="commandButton1"/>
+            <f:subview id="nc2">
+              <tr:panelGroupLayout>
+                <tr:inputText label="Label 1"
+                              binding="#{testTriggers.inputText1}"
+                              id="inputText1"
+                              partialTriggers="::commandButton1 ::nc4:table1:commandButton3"/>
+              </tr:panelGroupLayout>
+            </f:subview>
+            <f:subview id="nc3">
+              <tr:inputText label="Label 2" binding="#{testTriggers.inputText2}"
+                            id="inputText2"
+                            partialTriggers="::commandButton1 ::nc4:table1:commandButton3"/>
+            </f:subview>
+            <f:subview id="nc4">
+              <tr:table value="#{testTriggers.tableData}" id="table1" var="row"
+                        partialTriggers=":::commandButton1 commandButton3  ::commandButton4"
+                        binding="#{testTriggers.table1}">
+                <tr:column headerText="Column">
+                  <tr:panelGroupLayout>
+                    <tr:inputText value="#{row.name}" id="inputText3"
+                                  binding="#{testTriggers.inputText3}"
+                                  partialTriggers=":::commandButton1 commandButton3"/>
+                    <tr:commandButton text="Refresh table"
+                                      action="#{testTriggers.commandButton3_action}"
+                                      id="commandButton3" partialSubmit="true"/>
+                  </tr:panelGroupLayout>
+                </tr:column>
+              </tr:table>
+              <tr:commandButton text="Make table gold"
+                                action="#{testTriggers.commandButton4_action}"
+                                id="commandButton4" partialSubmit="true"/>
+            </f:subview>
+            <tr:separator/>
+            <f:subview id="nc5">
+              <tr:panelHeader text="Header">
+                <tr:table value="#{testTriggers.tableData}" id="table2"
+                          var="row" partialTriggers=":::commandButton1"
+                          binding="#{testTriggers.table2}">
+                  <tr:column headerText="Table2Column">
+                    <tr:inputText value="#{row.name}" id="inputText4"/>
+                  </tr:column>
+                </tr:table>
+              </tr:panelHeader>
+            </f:subview>
+          </f:subview>
+        </tr:panelPage>
+      </tr:form>
+    </tr:document>
+  </f:view>
+</jsp:root>
+

Added: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggersPrevRelease.jspx
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggersPrevRelease.jspx?rev=619546&view=auto
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggersPrevRelease.jspx (added)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-examples/trinidad-demo/src/main/webapp/demos/testRelativePartialTriggersPrevRelease.jspx Thu Feb  7 10:23:21 2008
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
+<!--
+    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.
+	   
+-->
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
+          xmlns:f="http://java.sun.com/jsf/core"
+          xmlns:h="http://java.sun.com/jsf/html"
+          xmlns:trh="http://myfaces.apache.org/trinidad/html"
+          xmlns:tr="http://myfaces.apache.org/trinidad">
+  <jsp:directive.page contentType="text/html;charset=utf-8"/>
+  <f:view>
+    <tr:document title="Partial Page Rendering Demos, previous release syntax (backward-compatible)">
+      <tr:form>
+        <tr:panelPage>
+          <f:facet name="navigationGlobal">
+            <tr:navigationPane hint="buttons">
+              <tr:commandNavigationItem text="Return to Feature Demos page"
+                                        immediate="true" action="demos"/>
+              <tr:commandNavigationItem text="Return to PPR Demo page"
+                                        immediate="true" action="demos.ppr"/>                                       
+            </tr:navigationPane>
+          </f:facet>
+          <tr:outputText styleClass="AFInstructionText" 
+            value="This tests the DEPRECATED syntax for partialTriggers. It's meant as a test for backward compatibility.
+            You will see warnings in the console for using deprecated syntax."/>
+          <tr:goLink destination="testRelativePartialTriggers.jspx" text="Go to SUPPORTED syntax test page"/>
+          <tr:separator/>
+          <f:subview id="nc1">
+            <tr:commandButton text="commandButton 1" partialSubmit="true"
+                              id="commandButton1"
+                              action="#{testTriggers.commandButton1_action}"/>
+            <tr:commandButton text="commandButton 2"
+                              binding="#{testTriggers.commandButton2}"
+                              id="commandButton2"
+                              partialTriggers="commandButton1"/>
+            <f:subview id="nc2">
+              <tr:panelGroupLayout>
+                <tr:inputText label="Label 1"
+                              binding="#{testTriggers.inputText1}"
+                              id="inputText1"
+                              partialTriggers=":::commandButton1 :::nc4:table1:commandButton3"/>
+              </tr:panelGroupLayout>
+            </f:subview>
+            <f:subview id="nc3">
+              <tr:inputText label="Label 2" binding="#{testTriggers.inputText2}"
+                            id="inputText2"
+                            partialTriggers=":::commandButton1 :::nc4:table1:commandButton3"/>
+            </f:subview>
+            <f:subview id="nc4">
+              <tr:table value="#{testTriggers.tableData}" id="table1" var="row"
+                        partialTriggers="::commandButton1 table1:commandButton3 commandButton4"
+                        binding="#{testTriggers.table1}">
+                <tr:column headerText="Column">
+                  <tr:panelGroupLayout>
+                    <tr:inputText value="#{row.name}" id="inputText3"
+                                  binding="#{testTriggers.inputText3}"
+                                  partialTriggers=":::commandButton1 commandButton3"/>
+                    <tr:commandButton text="Refresh table"
+                                      action="#{testTriggers.commandButton3_action}"
+                                      id="commandButton3" partialSubmit="true"/>
+                  </tr:panelGroupLayout>
+                </tr:column>
+              </tr:table>
+              <tr:commandButton text="Make table gold"
+                                action="#{testTriggers.commandButton4_action}"
+                                id="commandButton4" partialSubmit="true"/>
+            </f:subview>
+            <tr:separator/>
+            <f:subview id="nc5">
+              <tr:panelHeader text="Header">
+                <tr:table value="#{testTriggers.tableData}" id="table2"
+                          var="row" partialTriggers=":::commandButton1"
+                          binding="#{testTriggers.table2}">
+                  <tr:column headerText="Table2Column">
+                    <tr:inputText value="#{row.name}" id="inputText4"/>
+                  </tr:column>
+                </tr:table>
+              </tr:panelHeader>
+            </f:subview>
+          </f:subview>
+        </tr:panelPage>
+      </tr:form>
+    </tr:document>
+  </f:view>
+</jsp:root>
+

Modified: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java?rev=619546&r1=619545&r2=619546&view=diff
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java (original)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/context/RequestContextImpl.java Thu Feb  7 10:23:21 2008
@@ -537,35 +537,39 @@
     for (int i = 0; i < triggers.length; i++)
     {
       String trigger = triggers[i];
-
-      // Look for the master component.  Note that if the listener is itself 
-      // a naming container, we don't want to restrict ourselves to looking
-      // inside - we want to look outside instead (at least, that was
-      // the old ADF Faces rules, and now we should stick with it for
-      // backwards compatibility even within Trinidad)
       
-      // The rule is "if the component is a naming container, search relative 
-      // to the parent; otherwise, search relative to the component." In the
-      // non-naming container case, if it fails, then search relative to the 
-      // parent, for backwards compatibility only, since we were always 
-      // searching relative to the parent.
-      UIComponent from;
-      boolean isNamingContainer = false;
-      boolean deprecatedFind = false;
-      if (listener instanceof NamingContainer)
+      // if naming container, then use at naming container to start
+      // the findRelativeComponent.
+      // if not naming container, find the naming container and start the
+      // findRelativeComponent from there.
+      // '::' will pop out of the naming container (including itself if
+      // the listener is a NamingContainer). Each additional ':' will pop
+      // out of the next naming container.
+      UIComponent from = listener;
+      if (!(listener instanceof NamingContainer))
       {
-        from = listener.getParent();
-        isNamingContainer = true;
+        // get the component's naming container as the 'from'.
+        while (from.getParent() != null)
+        {
+          from = from.getParent();
+          if (from instanceof NamingContainer)
+            break;
+        }
       }
-      else
-        from = listener;
-        
       UIComponent master = ComponentUtils.findRelativeComponent(from, trigger);
-      
-      if (master == null && !isNamingContainer)
+  
+      boolean deprecatedFind = false;
+      if (master == null)
       {
-        // for backwards compatibility, look from the parent.
-        from = listener.getParent();
+        // backward compatible code
+        // The old rule is "if the component is a naming container, search relative 
+        // to the parent; otherwise, search relative to the component." 
+        if (listener instanceof NamingContainer)
+        {
+          from = listener.getParent();
+        }
+        else
+          from = listener;
         master = ComponentUtils.findRelativeComponent(from, trigger);
         deprecatedFind = true;
       }
@@ -576,11 +580,11 @@
       }
       else
       {
-        // if we found this with the deprecated method of searching relative to
-        // the component's parent, then warn the user to change their syntax.
+        // if we found this with the deprecated method, 
+        // then warn the user to change their syntax.
         if (deprecatedFind)
         {
-          _LOG.warning("DEPRECATED_PARTIAL_TRIGGER_SYNTAX", 
+          _LOG.warning("DEPRECATED_TRIGGER_SYNTAX", 
             new Object[] {trigger, listener});
         }
       

Modified: myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts?rev=619546&r1=619545&r2=619546&view=diff
==============================================================================
--- myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts (original)
+++ myfaces/trinidad/branches/jwaldman_1.2-issue936/trinidad-impl/src/main/xrts/org/apache/myfaces/trinidadinternal/resource/LoggerBundle.xrts Thu Feb  7 10:23:21 2008
@@ -1044,8 +1044,8 @@
 <!-- INVALID_TIMEZONE_IN_CONFIG -->
 <resource key="INVALID_TIMEZONE_IN_CONFIG">The trinidad-config.xml contains an invalid value for time-zone ({0}). The default timezone will be used instead.</resource>
 
-<!-- DEPRECATED_PARTIAL_TRIGGER_SYNTAX -->
-<resource key="DEPRECATED_PARTIAL_TRIGGER_SYNTAX">Could not find partial trigger {0} from {1} searching relative to the component. The partial trigger was found relative to the component's parent but this is deprecated. Change the partial trigger to be relative to component, not relative to parent.</resource>
+<!-- DEPRECATED_TRIGGER_SYNTAX -->
+<resource key="DEPRECATED_TRIGGER_SYNTAX">Could not find partial trigger {0} from {1} with the supported partialTriggers syntax. The partial trigger was found with the deprecated syntax. Please use the supported syntax.</resource>
 
 <!-- DATETIMERANGEVALIDATOR_REQUIRES_VALUEHOLDER -->
 <resource key="DATETIMERANGEVALIDATOR_REQUIRES_EDITABLEVALUEHOLDER">The DateTimeRangeValidator requires the component to be an EditableValueHolder for client validation to work. Client validation will be disabled for component {0}.</resource>