incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r528316 - in /incubator/adffaces/trunk/trinidad/trinidad-impl/src: main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/ test/java/org/apache/myfaces/tr...
Date Fri, 13 Apr 2007 02:02:35 GMT
Author: awiner
Date: Thu Apr 12 19:02:34 2007
New Revision: 528316

URL: http://svn.apache.org/viewvc?view=rev&rev=528316
Log:
ADFFACES-444: Autosubmit not working on CoreTreeTable
- The TableSelectOneRenderer and TableSelectManyRenderer were always using the CoreTable's
FacesBean.Type,
  when they needed to use the Type of whatever component was using them

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TableRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectManyRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRendererTest.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TableRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TableRenderer.java?view=diff&rev=528316&r1=528315&r2=528316
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TableRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TableRenderer.java
Thu Apr 12 19:02:34 2007
@@ -75,9 +75,12 @@
   protected void findTypeConstants(FacesBean.Type type)
   {
     super.findTypeConstants(type);
-    _navBarRenderer = new NavBar(type);
     _widthKey  = type.findKey("width");
     _emptyTextKey  = type.findKey("emptyText");
+    _navBarRenderer = new NavBar(type);
+    _selectRenderer = new SelectionColumnRenderer(type);
+    _selectOne = new TableSelectOneRenderer(type);
+    _selectMany = new TableSelectManyRenderer(type);
   }
 
   @Override
@@ -924,12 +927,12 @@
 
   private static final String _VALUE_FIELD_NAME      = "_value";
 
-  private CoreRenderer _navBarRenderer;
-
-  private final SpecialColumnRenderer _selectRenderer = new SelectionColumnRenderer();
   private final SpecialColumnRenderer _detailRenderer = new DetailColumnRenderer();
-  private final CoreRenderer _selectOne = new TableSelectOneRenderer();
-  private final CoreRenderer _selectMany = new TableSelectManyRenderer();
+
+  private SpecialColumnRenderer _selectRenderer;
+  private CoreRenderer _navBarRenderer;
+  private CoreRenderer _selectOne;
+  private CoreRenderer _selectMany;
 
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(TableRenderer.class);
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java?view=diff&rev=528316&r1=528315&r2=528316
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java
Thu Apr 12 19:02:34 2007
@@ -32,6 +32,11 @@
 
 public class SelectionColumnRenderer extends SpecialColumnRenderer
 {
+  public SelectionColumnRenderer(FacesBean.Type tableType)
+  {
+    _singleRenderer = new TableSelectOneRenderer(tableType);
+    _multiRenderer = new TableSelectManyRenderer(tableType);
+  }
 
   @Override
   protected void renderKids(FacesContext          context,
@@ -84,6 +89,6 @@
     return tContext.hasSelectAll();
   }
   
-  private CoreRenderer _singleRenderer = new TableSelectOneRenderer();
-  private CoreRenderer _multiRenderer = new TableSelectManyRenderer();
+  private final CoreRenderer _singleRenderer;
+  private final CoreRenderer _multiRenderer;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectManyRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectManyRenderer.java?view=diff&rev=528316&r1=528315&r2=528316
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectManyRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectManyRenderer.java
Thu Apr 12 19:02:34 2007
@@ -48,8 +48,9 @@
   public static final String SELECTED_KEY = "_s";
   public static final String SELECTED_MODE_KEY = "_sm";
 
-  public TableSelectManyRenderer()
+  public TableSelectManyRenderer(FacesBean.Type type)
   {
+    super(type);
   }
 
   //

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java?view=diff&rev=528316&r1=528315&r2=528316
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java
Thu Apr 12 19:02:34 2007
@@ -47,9 +47,9 @@
 public class TableSelectOneRenderer extends XhtmlRenderer
 {
 
-  public TableSelectOneRenderer()
+  public TableSelectOneRenderer(FacesBean.Type type)
   {
-    super(CoreTable.TYPE);
+    super(type);
   }
 
   @Override

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRendererTest.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRendererTest.java?view=diff&rev=528316&r1=528315&r2=528316
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRendererTest.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRendererTest.java
Thu Apr 12 19:02:34 2007
@@ -138,7 +138,7 @@
   {
     //this.facesContext.setViewRoot(new UIViewRoot());
     Mock mockRenderKit = getMockRenderKitWrapper().getMock();
-    TableSelectOneRenderer renderer = new TableSelectOneRenderer();
+    TableSelectOneRenderer renderer = new TableSelectOneRenderer(CoreTable.TYPE);
     mockRenderKit.expects(atLeastOnce()).method("getRenderer").will(returnValue(renderer));
 
     



Mime
View raw message