You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2009/01/30 05:17:52 UTC

svn commit: r739162 - in /myfaces/trinidad/branches/1.2.10.1-branch: ./ trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/ trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ trinidad-sandbox/sandbox-api/sr...

Author: arobinson74
Date: Fri Jan 30 04:17:51 2009
New Revision: 739162

URL: http://svn.apache.org/viewvc?rev=739162&view=rev
Log:
TRINIDAD-1385
Apply patch from Blake

Modified:
    myfaces/trinidad/branches/1.2.10.1-branch/   (props changed)
    myfaces/trinidad/branches/1.2.10.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
    myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java
    myfaces/trinidad/branches/1.2.10.1-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/   (props changed)
    myfaces/trinidad/branches/1.2.10.1-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/   (props changed)

Propchange: myfaces/trinidad/branches/1.2.10.1-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 30 04:17:51 2009
@@ -1,2 +1,2 @@
 /myfaces/trinidad/branches/1.2.9.1-branch:697924,699406,699496
-/myfaces/trinidad/trunk_1.2.x:738664
+/myfaces/trinidad/trunk_1.2.x:738664,739156

Modified: myfaces/trinidad/branches/1.2.10.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.10.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java?rev=739162&r1=739161&r2=739162&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.10.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java (original)
+++ myfaces/trinidad/branches/1.2.10.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java Fri Jan 30 04:17:51 2009
@@ -115,6 +115,18 @@
   {
   }
 
+  public void setupEncodingContext(
+    FacesContext context,
+    RenderingContext rc,
+    UIComponent component)
+  {
+    // temporary hack to change UIComponent.  Once the change has propagated through, we will
+    // remove the UIXComponent version.
+    // We need to support UIComponents so that we can use CoreRenderers against non-UIXComponents
+    if (component instanceof UIXComponent)
+      setupEncodingContext(context, rc, (UIXComponent)component);
+  }
+
   /**
    * <p>
    * Called after rendering the current component's children in order to tear
@@ -137,6 +149,19 @@
   {
   }
   
+  public void tearDownEncodingContext(
+    FacesContext context,
+    RenderingContext rc,
+    UIComponent     component)
+  {
+    // temporary hack to change UIComponent.  Once the change has propagated through, we will
+    // remove the UIXComponent version.
+    // We need to support UIComponents so that we can use CoreRenderers against non-UIXComponents
+    if (component instanceof UIXComponent)
+      tearDownEncodingContext(context, rc, (UIXComponent)component);
+  }
+
+  
   //
   // COERCION HELPERS
   //
@@ -683,7 +708,7 @@
     UIComponent      component,
     FacesBean        bean)
   {
-    setupEncodingContext(context, arc, (UIXComponent)component);
+    setupEncodingContext(context, arc, component);
   }
   
   /**
@@ -698,7 +723,7 @@
     UIComponent      component,
     FacesBean        bean)
   {
-    tearDownEncodingContext(context, arc, (UIXComponent)component);
+    tearDownEncodingContext(context, arc, component);
   }
 
   //

Modified: myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java?rev=739162&r1=739161&r2=739162&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java (original)
+++ myfaces/trinidad/branches/1.2.10.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/FormRenderer.java Fri Jan 30 04:17:51 2009
@@ -108,6 +108,16 @@
     RenderingContext rc,
     UIXComponent component)
   {
+    // temp hack
+    setupEncodingContext(context, rc, (UIComponent)component);
+  }
+  
+  @Override
+  public void setupEncodingContext(
+    FacesContext context,
+    RenderingContext rc,
+    UIComponent component)
+  {
     String formName = getClientId(context, component);
 
     CoreFormData fData = new CoreFormData(formName);
@@ -391,6 +401,16 @@
     RenderingContext rc,
     UIXComponent     component)
   {
+    // temp hack
+    tearDownEncodingContext(context, rc, (UIComponent)component);
+  }
+  
+  @Override
+  public void tearDownEncodingContext(
+    FacesContext context,
+    RenderingContext rc,
+    UIComponent     component)
+  {
     // Clear out the form name property
     rc.getProperties().remove(XhtmlConstants.FORM_NAME_PROPERTY);
 

Propchange: myfaces/trinidad/branches/1.2.10.1-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 30 04:17:51 2009
@@ -1,2 +1,2 @@
 /myfaces/trinidad/branches/1.2.9.1-branch/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:699406,699496
-/myfaces/trinidad/trunk_1.2.x/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:738664
+/myfaces/trinidad/trunk_1.2.x/trinidad-sandbox/sandbox-api/src/main/java-templates/org/apache/myfaces/trinidad/sandbox/component:738664,739156

Propchange: myfaces/trinidad/branches/1.2.10.1-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 30 04:17:51 2009
@@ -1,2 +1,2 @@
 /myfaces/trinidad/branches/1.2.9.1-branch/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:699406,699496
-/myfaces/trinidad/trunk_1.2.x/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:738664
+/myfaces/trinidad/trunk_1.2.x/trinidad-sandbox/sandbox-api/src/main/java/org/apache/myfaces/trinidad/sandbox/event:738664,739156