incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r423283 - in /incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml: TableRenderer.java table/TableRenderingContext.java
Date Tue, 18 Jul 2006 23:01:08 GMT
Author: awiner
Date: Tue Jul 18 16:01:07 2006
New Revision: 423283

URL: http://svn.apache.org/viewvc?rev=423283&view=rev
Log:
Really fix the problem with TableRenderingContext not getting cleaned up properly

Modified:
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/table/TableRenderingContext.java

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java?rev=423283&r1=423282&r2=423283&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java
(original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/TableRenderer.java
Tue Jul 18 16:01:07 2006
@@ -229,8 +229,6 @@
     UIComponent         component,
     FacesBean           bean) throws IOException
   {
-    TableRenderingContext tContext = null;
-
     // save current skin resource map, if any, on the local property
     Map oldSkinResourceMap = arc.getSkinResourceKeyMap();
 
@@ -238,14 +236,13 @@
     // context.getTranslatedValue will get the correct key.
     arc.setSkinResourceKeyMap(_resourceKeyMap);
 
-    try
-    {
-      // Note: because createRenderingContext() might throw
-      // an exception, it is critical that this be inside the
-      // try/finally block.
-      tContext = createRenderingContext(context,
+    TableRenderingContext tContext = createRenderingContext(context,
                                         arc,
                                         component);
+
+    try
+    {
+      tContext.install();
 
       ResponseWriter rw = context.getResponseWriter();
 

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/table/TableRenderingContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/table/TableRenderingContext.java?rev=423283&r1=423282&r2=423283&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/table/TableRenderingContext.java
(original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/table/TableRenderingContext.java
Tue Jul 18 16:01:07 2006
@@ -49,10 +49,6 @@
     AdfRenderingContext arc,
     UIComponent         component)
   {
-    // Set up the ThreadLocal
-    _previous = getCurrentInstance();
-    _CURRENT_CONTEXT.set(this);
-
     CollectionComponent collectionComponent =
       (CollectionComponent) component;
     // =-=AEW Don't like this here:  move it out to the Renderer
@@ -117,6 +113,13 @@
     return component.getAttributes().get(key.getName());
   }
   
+  public void install()
+  {
+    // Set up the ThreadLocal
+    _previous = getCurrentInstance();
+    _CURRENT_CONTEXT.set(this);
+  }
+
   public void release()
   {
     _CURRENT_CONTEXT.set(_previous);
@@ -591,7 +594,7 @@
 
 
   // general fields
-  private final TableRenderingContext _previous;
+  private       TableRenderingContext _previous;
   private       Object                _nodeList;
 
   /**



Mime
View raw message