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/12/10 18:46:47 UTC

svn commit: r889345 [16/17] - in /myfaces/trinidad/branches/ar_clientBehaviors: ./ trinidad-api/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ trinidad-api/src/main/java/o...

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TreeRenderer.java Thu Dec 10 17:46:13 2009
@@ -46,6 +46,7 @@
 import org.apache.myfaces.trinidad.skin.Icon;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TreeUtils;
 
+
 /**
  * Renderer for trees.
  *
@@ -57,13 +58,15 @@
     this(CoreTree.TYPE);
   }
 
-  protected TreeRenderer(FacesBean.Type type)
+  protected TreeRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
 
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _immediateKey = type.findKey("immediate");
@@ -80,7 +83,9 @@
    */
   @SuppressWarnings("unchecked")
   @Override
-  public void decode(FacesContext context, UIComponent component)
+  public void decode(
+    FacesContext context,
+    UIComponent  component)
   {
     Map<String, String> parameters =
       context.getExternalContext().getRequestParameterMap();
@@ -112,7 +117,8 @@
     FacesContext     context,
     RenderingContext rc,
     UIComponent      component,
-    FacesBean        bean) throws IOException
+    FacesBean        bean
+    ) throws IOException
   {
     // Since Train is a naming container, we can be more
     // efficient about skipping its children
@@ -142,17 +148,19 @@
   }
 
   @Override
-  protected boolean shouldRenderId(FacesContext context,
-                                   UIComponent component)
+  protected boolean shouldRenderId(
+    FacesContext context,
+    UIComponent  component)
   {
     return true;
   }
 
-  private void _renderContent(FacesContext context,
-                              RenderingContext rc,
-                              UIXHierarchy tree,
-                              FacesBean bean)
-    throws IOException
+  private void _renderContent(
+    FacesContext     context,
+    RenderingContext rc,
+    UIXHierarchy     tree,
+    FacesBean        bean
+    ) throws IOException
   {
     FormData fd = rc.getFormData();
     if (fd == null)
@@ -164,8 +172,8 @@
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement("div", tree);
     renderId(context, tree);
-    renderAllAttributes(context, rc, bean);
-    
+    renderAllAttributes(context, rc, tree, bean);
+
     final String id = getClientId(context, tree);
     UIComponent stamp = getFacet(tree, CoreTree.NODE_STAMP_FACET);
 
@@ -199,7 +207,7 @@
       renderScriptDeferAttribute(context, rc);
       renderScriptTypeAttribute(context, rc);
 
-      _renderTreeJS(context, rc, bean);
+      _renderTreeJS(context, rc, tree, bean);
 
       //out.writeText("_setNodes('"+name+"','"+nodesRendered+"');");
 
@@ -220,19 +228,20 @@
 
   }
 
-
   // return whether to continue with rendering
 
-  protected boolean setInitialPath(UIXHierarchy tree, FacesBean bean)
+  protected boolean setInitialPath(
+    UIXHierarchy tree,
+    FacesBean    bean)
   {
     tree.setRowKey(null);
     return true;
   }
 
-
-  private boolean _isShownSelected(UIXHierarchy tree,
-                                   Map<Object, Boolean> selectedPaths,
-                                   Object currPath)
+  private boolean _isShownSelected(
+    UIXHierarchy         tree,
+    Map<Object, Boolean> selectedPaths,
+    Object               currPath)
   {
 
     boolean selected = false;
@@ -250,7 +259,8 @@
     return false;
   }
 
-  protected Map<Object, Boolean> getSelectedPaths(Object focusPath)
+  protected Map<Object, Boolean> getSelectedPaths(
+    Object focusPath)
   {
     if (focusPath == null)
       return new HashMap<Object, Boolean>(0);
@@ -261,7 +271,8 @@
     return selectedPaths;
   }
 
-  protected RowKeySet getExpandedRowKeys(UIXHierarchy tree)
+  protected RowKeySet getExpandedRowKeys(
+    UIXHierarchy tree)
   {
     return ((UIXTree) tree).getDisclosedRowKeys();
   }
@@ -271,7 +282,8 @@
    * @param rc the RenderingContext
    * @return the value of the AF_TREE_SHOW_LINES skin property
    */
-  protected boolean isShowLines( RenderingContext rc)
+  protected boolean isShowLines(
+    RenderingContext rc)
   {
     Object showLines = rc.getSkin().getProperty(SkinProperties.AF_TREE_SHOW_LINES);
     return showLines == null || showLines.equals(Boolean.TRUE);
@@ -287,11 +299,10 @@
    * @return the URI of the icon
    */
   protected String getConnectingBackgroundIcon(
-      FacesContext context,
-      RenderingContext rc,
-      boolean isLine,
-      boolean leftToRight
-  )
+    FacesContext     context,
+    RenderingContext rc,
+    boolean          isLine,
+    boolean          leftToRight)
   {
     if (!isLine || !isShowLines(rc))
       return null;
@@ -309,11 +320,10 @@
    * @return the URI of the icon
    */
   protected String getIconBackgroundIcon(
-      FacesContext context,
-      RenderingContext rc,
-      boolean isLastSibling,
-      boolean isLeftToRight
-  )
+    FacesContext     context,
+    RenderingContext rc,
+    boolean          isLastSibling,
+    boolean          isLeftToRight)
   {
     Object showLines = rc.getSkin().getProperty(SkinProperties.AF_TREE_SHOW_LINES);
     if (!isShowLines(rc))
@@ -327,16 +337,14 @@
   // render the correct icon for a specific node
 
   protected void renderExpandCell(
-      FacesContext context,
-      RenderingContext rc,
-      UIXHierarchy tree,
-      int expanded,
-      boolean isLastSibling,
-      String onclick
-  )
-      throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIXHierarchy     tree,
+    int              expanded,
+    boolean          isLastSibling,
+    String           onclick
+    ) throws IOException
   {
-
     Icon icon = null;
     String iconURI = null;
 
@@ -350,8 +358,8 @@
     Object altText = null;
 
     String text = null;
-    
-    boolean isMacOS = 
+
+    boolean isMacOS =
                Agent.PLATFORM_MACOS.equals(rc.getAgent().getPlatformName());
     // add in the expandability
     switch (expanded)
@@ -434,18 +442,19 @@
       _renderTextCell(context, rc, tree, expanded, text, altText, _ICON_WIDTH, onclick,
                       SkinSelectors.TREE_DISCLOSED_SYMBOL_STYLE_CLASS);
     }
-
   }
 
-
-  private void _renderTextCell(FacesContext context,
-                               RenderingContext rc,
-                               UIXHierarchy tree,
-                               int expanded,
-                               String text,
-                               Object altText, String width,
-                               String onclick, String styleClass)
-    throws IOException
+  private void _renderTextCell(
+    FacesContext     context,
+    RenderingContext rc,
+    UIXHierarchy     tree,
+    int              expanded,
+    String           text,
+    Object           altText,
+    String           width,
+    String           onclick,
+    String           styleClass
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
 
@@ -465,17 +474,17 @@
       }
       else
       {
-        // For Non-JavaScript browsers, render an input element(type= submit) to 
-        // submit the page. Encode the name attribute with the parameter name 
-        // and value thus it would enable the browsers to include the name of 
+        // For Non-JavaScript browsers, render an input element(type= submit) to
+        // submit the page. Encode the name attribute with the parameter name
+        // and value thus it would enable the browsers to include the name of
         // this element in its payLoad if it submits the page.
         String nameAttr = TreeUtils.renderEncodedNameAttri(
                                         context,
-                                        rc, 
+                                        rc,
                                         tree,
                                         getClientId(context, tree),
                                         expanded == EXPAND_CLOSED);
-                
+
         writer.startElement("input", null);
         writer.writeAttribute("type", "submit",null);
         writer.writeAttribute("name", nameAttr, null);
@@ -502,18 +511,17 @@
   }
 
   protected void renderExpandIconCell(
-      FacesContext context,
-      RenderingContext rc,
-      String backgroundIcon,
-      String nodeBackgroundIcon,
-      String icon,
-      boolean isIconAbsoluteURI,
-      Object altText,
-      String width,
-      String height,
-      String onclick
-  )
-      throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    String           backgroundIcon,
+    String           nodeBackgroundIcon,
+    String           icon,
+    boolean          isIconAbsoluteURI,
+    Object           altText,
+    String           width,
+    String           height,
+    String           onclick
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
 
@@ -562,12 +570,18 @@
   }
 
 
-  protected void renderIconCell(FacesContext context, RenderingContext rc,
-                                UIXHierarchy tree, String backgroundIcon,
-                                String icon, boolean isIconAbsoluteURI,
-                                Object altText, String width,
-                                String height, String onclick)
-    throws IOException
+  protected void renderIconCell(
+    FacesContext     context,
+    RenderingContext rc,
+    UIXHierarchy     tree,
+    String           backgroundIcon,
+    String           icon,
+    boolean          isIconAbsoluteURI,
+    Object           altText,
+    String           width,
+    String           height,
+    String           onclick
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
 
@@ -603,21 +617,25 @@
   }
 
 
-  private static String _createFocusNodeGetter(String focusNodeId) 
+  private static String _createFocusNodeGetter(
+    String focusNodeId)
   {
     return (focusNodeId != null) ? "document.getElementById('" + focusNodeId + "')" : null;
   }
 
-  private static String _callJSSelect(UIXHierarchy tree, String jsVarName)
+  private static String _callJSSelect(
+    UIXHierarchy tree,
+    String       jsVarName)
   {
     String currencyStr = tree.getClientRowKey();
     return jsVarName + ".select(this,'" + currencyStr + "');";
   }
 
-  private String _createNewJSSelectionState(String formName,
-                                                   String treeClientId,
-                                                   String selectParam,
-                                                   String focusNodeId)
+  private String _createNewJSSelectionState(
+    String formName,
+    String treeClientId,
+    String selectParam,
+    String focusNodeId)
   {
     String treeState = TreeUtils.createNewJSCollectionComponentState(formName, treeClientId);
     String focusNode = _createFocusNodeGetter(focusNodeId);
@@ -633,10 +651,12 @@
     return jsSelectionState;
   }
 
-  private void _renderTreeJS(FacesContext context,
-                             RenderingContext rc,
-                             FacesBean bean)
-    throws IOException
+  private void _renderTreeJS(
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     if (!rc.getProperties().containsKey(_JS_RENDERED_KEY))
     {
@@ -645,7 +665,7 @@
       writer.writeText("function _adfTreeSelector(selectParam,tState,focusNode) {" +
                        "this._selectParam = selectParam;" +
                        "this.treeState = tState;" +
-                       "this._pTag = focusNode;" + 
+                       "this._pTag = focusNode;" +
                        "}" +
                        "_adfTreeSelector.prototype.select = function(tag,path) {" +
                        "if (this._pTag != null) {" +
@@ -716,7 +736,7 @@
       //         "}",
       //         null);
 
-      boolean immediate = getImmediate(bean);
+      boolean immediate = getImmediate(component, bean);
       String buff =
         TreeUtils.setupJSTreeCollectionComponent(!immediate) + ";";
       writer.writeText(buff, null);
@@ -725,18 +745,21 @@
 
   // render one row of the tree
 
-  private void _renderNode(FacesContext context,
-                           RenderingContext rc,
-                           UIXHierarchy tree,
-                           FacesBean bean,
-                           UIComponent stamp,
-                           final String varName,
-                           RowKeySet state,
-                           Map<Object, Boolean> selectedPaths,
-                           Boolean[] prepend, boolean leftToRight,
-                           boolean isFirstSibling, boolean isLastSibling,
-                           int nodeDepth)
-    throws IOException
+  private void _renderNode(
+    FacesContext         context,
+    RenderingContext     rc,
+    UIXHierarchy         tree,
+    FacesBean            bean,
+    UIComponent          stamp,
+    final String         varName,
+    RowKeySet            state,
+    Map<Object, Boolean> selectedPaths,
+    Boolean[]            prepend,
+    boolean              leftToRight,
+    boolean              isFirstSibling,
+    boolean              isLastSibling,
+    int                  nodeDepth
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
 
@@ -819,11 +842,11 @@
   }
 
   protected void renderNodeIconCell(
-      FacesContext context,
-      RenderingContext rc,
-      UIXHierarchy tree,
-      int expand
-  ) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIXHierarchy     tree,
+    int              expand
+    ) throws IOException
   {
     String nodeType = getNodeType(tree);
     Icon nodeIcon = getNodeIcon(rc, nodeType, expand);
@@ -846,8 +869,7 @@
   }
 
   protected String getNodeType(
-      UIXHierarchy tree
-  )
+    UIXHierarchy tree)
   {
     String nodeType = null;
     Object rowData = tree.getRowData();
@@ -862,22 +884,15 @@
         nodeType = (String) method.invoke(rowData);
       }
     }
-    catch (IllegalAccessException e)
-    {
-    }
-    catch (NoSuchMethodException e)
-    {
-    }
-    catch (InvocationTargetException e)
-    {
-    }
+    catch (IllegalAccessException e) { ; }
+    catch (NoSuchMethodException e) { ; }
+    catch (InvocationTargetException e) { ; }
     return nodeType;
   }
 
   protected String getNodeIconSelector(
-      String nodeType,
-      int expandedState
-  )
+    String nodeType,
+    int    expandedState)
   {
     switch (expandedState)
     {
@@ -892,9 +907,9 @@
   }
 
   protected Icon getNodeIcon(
-      RenderingContext rc,
-      String nodeType,
-      int expandedState
+    RenderingContext rc,
+    String           nodeType,
+    int              expandedState
   )
   {
     if (nodeType == null || nodeType.length() == 0)
@@ -916,14 +931,14 @@
 
 
   protected void renderStampCell(
-      FacesContext context,
-      RenderingContext rc,
-      UIXHierarchy tree,
-      UIComponent stamp,
-      String onClick,
-      String treeStyle,
-      int nodeDepth
-  ) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIXHierarchy     tree,
+    UIComponent      stamp,
+    String           onClick,
+    String           treeStyle,
+    int              nodeDepth
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
 
@@ -935,7 +950,7 @@
     writer.startElement(XhtmlConstants.SPAN_ELEMENT, null);
     writer.writeAttribute(XhtmlConstants.ID_ATTRIBUTE, getClientId(context, tree), null);
     renderStyleClass(context, rc, treeStyle);
-    
+
     if (supportsScripting(rc))
     {
       writer.writeAttribute(XhtmlConstants.ONCLICK_ATTRIBUTE, onClick, null);
@@ -949,20 +964,20 @@
   }
 
   private void _renderNodeChildren(
-      FacesContext context,
-      RenderingContext rc,
-      UIXHierarchy tree,
-      FacesBean bean,
-      UIComponent stamp,
-      final String varName,
-      RowKeySet state,
-      Map<Object, Boolean> selectedPaths,
-      Boolean[] prepend,
-      boolean leftToRight,
-      boolean isFirstSibling,
-      boolean isLastSibling,
-      int nodeDepth
-  ) throws IOException
+    FacesContext         context,
+    RenderingContext     rc,
+    UIXHierarchy         tree,
+    FacesBean            bean,
+    UIComponent          stamp,
+    final String         varName,
+    RowKeySet            state,
+    Map<Object, Boolean> selectedPaths,
+    Boolean[]            prepend,
+    boolean              leftToRight,
+    boolean              isFirstSibling,
+    boolean              isLastSibling,
+    int                  nodeDepth
+    ) throws IOException
   {
     tree.enterContainer();
     int childCount = tree.getRowCount();
@@ -994,7 +1009,9 @@
 
   // is this row childless, open, or closed?
 
-  private int _getExpandValue(UIXHierarchy tree, RowKeySet state)
+  private int _getExpandValue(
+    UIXHierarchy tree,
+    RowKeySet    state)
   {
     if (tree.isContainer())
     {
@@ -1007,13 +1024,17 @@
     return NO_CHILDREN;
   }
 
-
   // render an icon with our own special formatting
 
-  private void _renderIcon(FacesContext context, RenderingContext rc, String icon,
-                           boolean isIconAbsoluteURI, Object text,
-                           String width, String height)
-    throws IOException
+  private void _renderIcon(
+    FacesContext     context,
+    RenderingContext rc,
+    String           icon,
+    boolean          isIconAbsoluteURI,
+    Object           text,
+    String           width,
+    String           height
+    ) throws IOException
   {
     if (icon != null)
     {
@@ -1048,7 +1069,9 @@
   // add a boolean flag to the chain of icons.
   // the chain is rendered before each icon
 
-  private Boolean[] _appendIcon(Boolean[] prepend, Boolean isLine)
+  private Boolean[] _appendIcon(
+    Boolean[] prepend,
+    Boolean   isLine)
   {
     int currLength = prepend.length;
 
@@ -1074,17 +1097,19 @@
   }
 
 
-  private void _prependIcons(FacesContext context, RenderingContext rc,
-                             UIXHierarchy tree, Boolean[] prepend,
-                             boolean leftToRight)
-    throws IOException
+  private void _prependIcons(
+    FacesContext     context,
+    RenderingContext rc,
+    UIXHierarchy     tree,
+    Boolean[]        prepend,
+    boolean          leftToRight
+    ) throws IOException
   {
     int currLength = prepend.length;
     Boolean isLine;
 
     for (int i = 0; i < currLength; i++)
     {
-
       isLine = prepend[i];
 
       if (isLine != null)
@@ -1099,11 +1124,11 @@
                        _ICON_WIDTH, "100%", null);
       }
     }
-
   }
 
-
-  protected boolean getImmediate(FacesBean bean)
+  protected boolean getImmediate(
+    UIComponent component,
+    FacesBean   bean)
   {
     Object o = bean.getProperty(_immediateKey);
     if (o == null)
@@ -1112,19 +1137,17 @@
     return Boolean.TRUE.equals(o);
   }
 
-
-
   protected String getDefaultIconName()
   {
     return null;
   }
 
-
-  private void _renderStampBasedOnAccessibilty(FacesContext context,
-                                               RenderingContext rc,
-                                               UIComponent stamp,
-                                               int depth)
-    throws IOException
+  private void _renderStampBasedOnAccessibilty(
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      stamp,
+    int              depth
+    ) throws IOException
   {
     if (isScreenReaderMode(rc))
     {
@@ -1155,7 +1178,6 @@
   private static final String _ICON_HEIGHT = "18";
   private static final String _NODE_SPACER = "3";
 
-
   // expanded states
   protected static final int NO_CHILDREN = 0;
   protected static final int EXPAND_CLOSED = 1;
@@ -1173,7 +1195,6 @@
   // Key used by StyledTextBean to query style class
   static final String _STYLE_CLASS_KEY = "_styleClass";
 
-
   private PropertyKey _immediateKey;
 
   // translation keys

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ValueRenderer.java Thu Dec 10 17:46:13 2009
@@ -6,9 +6,9 @@
  *  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
@@ -26,18 +26,20 @@
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
-
 import org.apache.myfaces.trinidadinternal.convert.ConverterUtils;
 
+
 abstract public class ValueRenderer extends XhtmlRenderer
 {
-  protected ValueRenderer(FacesBean.Type type)
+  protected ValueRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
 
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _converterKey = type.findKey("converter");
@@ -49,14 +51,14 @@
     UIComponent  component,
     FacesBean    bean)
   {
-    Object value = getValue(bean);
-    Converter converter = getConverter(bean);
+    Object value = getValue(component, bean);
+    Converter converter = getConverter(component, bean);
     // If there's no explicitly set converter, and the value is non-null
     // and not a String, try to get a default converter
     if ((converter == null) &&
         (value != null) &&
         !(value instanceof String))
-      converter = getDefaultConverter(context, bean);
+      converter = getDefaultConverter(context, component, bean);
 
     if (converter != null)
     {
@@ -66,12 +68,12 @@
     return toString(value);
   }
 
-
   protected Converter getDefaultConverter(
     FacesContext context,
+    UIComponent  component,
     FacesBean    bean)
   {
-    ValueExpression expression = getValueExpression(bean);
+    ValueExpression expression = getValueExpression(component, bean);
     if (expression == null)
       return null;
 
@@ -79,7 +81,9 @@
     return ConverterUtils.createConverter(context, type);
   }
 
-  protected Object getValue(FacesBean bean)
+  protected Object getValue(
+    UIComponent component,
+    FacesBean   bean)
   {
     return bean.getProperty(_valueKey);
   }
@@ -87,12 +91,16 @@
   /**
    * Returns the ValueExpression for the "value" property.
    */
-  protected ValueExpression getValueExpression(FacesBean bean)
+  protected ValueExpression getValueExpression(
+    UIComponent component,
+    FacesBean   bean)
   {
     return bean.getValueExpression(_valueKey);
   }
 
-  protected Converter getConverter(FacesBean bean)
+  protected Converter getConverter(
+    UIComponent component,
+    FacesBean   bean)
   {
     return (Converter) bean.getProperty(_converterKey);
   }

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlRenderer.java Thu Dec 10 17:46:13 2009
@@ -6,9 +6,9 @@
  *  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
@@ -27,19 +27,18 @@
 import javax.faces.context.ResponseWriter;
 import javax.faces.render.Renderer;
 
-import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
+import org.apache.myfaces.trinidad.context.PartialPageContext;
+import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.render.CoreRenderer;
 import org.apache.myfaces.trinidad.render.TypedRenderer;
-
 import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
-import org.apache.myfaces.trinidad.context.PartialPageContext;
-import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidadinternal.util.FormattedTextParser;
 import org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl;
 
+
 /**
  *  @todo Move "supportsStyleAttributes()", etc., architecture
  */
@@ -95,27 +94,28 @@
    * <p>
    * See section 5.16 of xhtml modularization
    */
-  static public boolean supportsScripting(RenderingContext arc)
+  static public boolean supportsScripting(
+    RenderingContext rc)
   {
-    Object scriptingSpeed = arc.getAgent().getCapabilities().get(
+    Object scriptingSpeed = rc.getAgent().getCapabilities().get(
             TrinidadAgent.CAP_SCRIPTING_SPEED);
 
     return ((scriptingSpeed != null) &&
             (TrinidadAgent.SCRIPTING_SPEED_CAP_NONE != scriptingSpeed));
   }
 
-
-  static public boolean supportsEditing(RenderingContext arc)
+  static public boolean supportsEditing(
+    RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_EDITING);
     return !Boolean.FALSE.equals(cap);
   }
 
   public static boolean supportsAdvancedForms(
-    RenderingContext arc)
+    RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_ADVANCED_FORMS);
     return !Boolean.FALSE.equals(cap);
   }
@@ -124,9 +124,9 @@
    * See section 5.14 of xhtml modularization.
    */
   public static boolean supportsIntrinsicEvents(
-    RenderingContext arc)
+    RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_INTRINSIC_EVENTS);
     return !Boolean.FALSE.equals(cap);
   }
@@ -140,16 +140,16 @@
    * See section 5.18 of xhtml modularization
    */
   public static boolean supportsStyleAttributes(
-          RenderingContext arc
-          )
+    RenderingContext rc)
   {
-    return (arc.getAgent().getCapabilities().get(TrinidadAgent.CAP_STYLE_ATTRIBUTES) !=
+    return (rc.getAgent().getCapabilities().get(TrinidadAgent.CAP_STYLE_ATTRIBUTES) !=
             TrinidadAgent.STYLES_NONE);
   }
 
-  static public boolean supportsNavigation(RenderingContext arc)
+  static public boolean supportsNavigation(
+    RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_NAVIGATION);
     return !Boolean.FALSE.equals(cap);
   }
@@ -160,54 +160,56 @@
    * See section 5.4.1 of xhtml modularization.
    */
   public static boolean supportsTextPresentation(
-          RenderingContext arc
-          )
+    RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_TEXT_PRESENTATION);
     return !Boolean.FALSE.equals(cap);
   }
-  static public boolean supportsAccessKeys(RenderingContext arc)
+  static public boolean supportsAccessKeys(
+    RenderingContext rc)
   {
     // In screen reader mode, disable access keys.  Despite
     // the name, they are currently considered an accessibility
     // liability
-    if (isScreenReaderMode(arc))
+    if (isScreenReaderMode(rc))
       return false;
 
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_ACCESS_KEYS);
     return !Boolean.FALSE.equals(cap);
   }
 
-  static public final boolean supportsDisabledFormElements(RenderingContext arc)
+  static public final boolean supportsDisabledFormElements(
+    RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_DISABLED_FORM_ELEMENTS);
     return !Boolean.FALSE.equals(cap);
 
   }
 
-  static public final boolean supportsReadonlyFormElements(RenderingContext arc)
+  static public final boolean supportsReadonlyFormElements(
+    RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_READONLY_FORM_ELEMENTS);
     return !Boolean.FALSE.equals(cap);
 
   }
 
   static public final boolean supportsAutoCompleteFormElements(
-     RenderingContext arc)
+    RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_AUTO_COMPLETE_FORM_ELEMENTS);
     return !Boolean.FALSE.equals(cap);
   }
 
   static public final boolean supportsSeparateWindow(
-    RenderingContext arc)
+    RenderingContext rc)
   {
-    return XhtmlUtils.supportsSeparateWindow(arc.getAgent());
+    return XhtmlUtils.supportsSeparateWindow(rc.getAgent());
   }
 
   /**
@@ -217,10 +219,9 @@
    * See section 5.12 of xhtml modularization.
    */
   static public final boolean supportsTarget(
-     RenderingContext arc)
-
+     RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                     TrinidadAgent.CAP_TARGET);
     return !Boolean.FALSE.equals(cap);
   }
@@ -230,20 +231,17 @@
    * @param context a <code>RenderingContext</code>
    * @return a <code>boolean</code>
    */
-    
-  public static boolean supportsNarrowScreen(RenderingContext arc)
+  public static boolean supportsNarrowScreen(RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get( 
+    Object cap = rc.getAgent().getCapabilities().get(
                                  TrinidadAgent.CAP_NARROW_SCREEN);
     return Boolean.TRUE.equals(cap);
   }
 
-
   //
   // END OF AGENT CAPABILITY CONVENIENCE METHODS
   //
 
-
   @Override
   protected boolean skipDecode(FacesContext context)
   {
@@ -264,7 +262,6 @@
     return TrinidadFilterImpl.isExecutingDialogReturn(context);
   }
 
-
   /**
    * Returns true if the component can skip its own rendering;
    * true if PPR is on for this request, is not currently active,
@@ -324,7 +321,7 @@
     UIComponent  component)
   {
     // If there's partial triggers, always render an ID if possible
-    if (getPartialTriggers(getFacesBean(component)) != null)
+    if (getPartialTriggers(component, getFacesBean(component)) != null)
     {
       return true;
     }
@@ -339,11 +336,13 @@
    * re-divide its functionality in a subclass.  Make it final???
    */
   protected void renderAllAttributes(
-    FacesContext        context,
-    RenderingContext arc,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    renderAllAttributes(context, arc, bean, true);
+    renderAllAttributes(context, rc, component, bean, true);
   }
 
 
@@ -353,33 +352,37 @@
    * renderStyleAttributes should be called, which renders "class", "style"
    */
   protected void renderAllAttributes(
-    FacesContext        context,
-    RenderingContext arc,
-    FacesBean           bean,
-    boolean             renderStyleAttrs) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    boolean          renderStyleAttrs
+    ) throws IOException
   {
-    renderShortDescAttribute(context, arc, bean);
+    renderShortDescAttribute(context, rc, component, bean);
     // render the events only if the browser supports JavaScript
-    if (supportsScripting(arc))
+    if (supportsScripting(rc))
     {
-      renderEventHandlers(context, bean);
+      renderEventHandlers(context, component, bean);
     }
     if (renderStyleAttrs)
-      renderStyleAttributes(context, arc, bean);
+      renderStyleAttributes(context, rc, component, bean);
 
   }
+
   /**
    * Renders the inline style attribute for the specified node
    */
   public static void renderInlineStyleAttribute(
-    FacesContext        context,
-    RenderingContext arc,
-    String              style
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    String           style
     ) throws IOException
   {
     if (style != null)
     {
-      if (supportsStyleAttributes(arc))
+      if (supportsStyleAttributes(rc))
       {
         ResponseWriter writer = context.getResponseWriter();
         writer.writeAttribute("style", style, null);
@@ -389,11 +392,13 @@
   }
 
   protected void renderInlineStyle(
-    FacesContext        context,
-    RenderingContext arc,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    String style = getInlineStyle(bean);
+    String style = getInlineStyle(component, bean);
     if (style != null)
     {
       context.getResponseWriter().writeAttribute("style",
@@ -403,11 +408,13 @@
   }
 
   protected void renderShortDescAttribute(
-    FacesContext        context,
-    RenderingContext arc,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    String shortDesc = getShortDesc(bean);
+    String shortDesc = getShortDesc(component, bean);
     if (shortDesc != null)
       context.getResponseWriter().writeAttribute("title",
                                                  shortDesc,
@@ -415,14 +422,18 @@
   }
 
   protected void renderStyleAttributes(
-    FacesContext        context,
-    RenderingContext arc,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    renderStyleAttributes(context, arc, bean, getDefaultStyleClass(bean));
+    renderStyleAttributes(context, rc, component, bean, getDefaultStyleClass(component, bean));
   }
 
-  protected String getDefaultStyleClass(FacesBean bean)
+  protected String getDefaultStyleClass(
+    UIComponent  component,
+    FacesBean    bean)
   {
     return null;
   }
@@ -431,12 +442,14 @@
    * When there's a default style class pass it in to this method
    */
   protected void renderStyleAttributes(
-    FacesContext        context,
-    RenderingContext    arc,
-    FacesBean           bean,
-    String              defaultStyleClass) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    String           defaultStyleClass
+    ) throws IOException
   {
-    String styleClass = getStyleClass(bean);
+    String styleClass = getStyleClass(component, bean);
     List<String> parsedStyleClasses = OutputUtils.parseStyleClassList(styleClass);
 
     if (defaultStyleClass != null)
@@ -462,33 +475,33 @@
         styleClasses[styleCount] = defaultStyleClass;
 
         renderStyleClasses(context,
-                           arc,
+                           rc,
                            styleClasses);
       }
       else
       {
-        renderStyleClass(context, arc, defaultStyleClass);
+        renderStyleClass(context, rc, defaultStyleClass);
       }
     }
     else if (styleClass != null)
     {
       if (parsedStyleClasses == null)
       {
-        styleClass = arc.getStyleClass(styleClass);
+        styleClass = rc.getStyleClass(styleClass);
         context.getResponseWriter().writeAttribute("class",
-                                                   arc.getStyleClass(styleClass),
+                                                   rc.getStyleClass(styleClass),
                                                    "styleClass");
       }
       else
       {
         renderStyleClasses(context,
-                           arc,
+                           rc,
                            parsedStyleClasses.toArray(
                                    new String[parsedStyleClasses.size()]));
       }
     }
 
-    String style = getInlineStyle(bean);
+    String style = getInlineStyle(component, bean);
     if (style != null)
     {
       context.getResponseWriter().writeAttribute("style",
@@ -497,36 +510,37 @@
     }
   }
 
-
   /**
    * Render all the Javascript attributes.
    */
   protected void renderEventHandlers(
     FacesContext context,
-    FacesBean    bean) throws IOException
+    UIComponent  component,
+    FacesBean    bean
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
-    rw.writeAttribute("onclick", getOnclick(bean),  "onclick");
-    rw.writeAttribute("ondblclick", getOndblclick(bean),  "ondblclick");
-    rw.writeAttribute("onkeydown", getOnkeydown(bean),  "onkeydown");
-    rw.writeAttribute("onkeyup", getOnkeyup(bean),  "onkeyup");
-    rw.writeAttribute("onkeypress", getOnkeypress(bean),  "onkeypress");
-    rw.writeAttribute("onmousedown", getOnmousedown(bean),  "onmousedown");
-    rw.writeAttribute("onmousemove", getOnmousemove(bean),  "onmousemove");
-    rw.writeAttribute("onmouseout", getOnmouseout(bean),  "onmouseout");
-    rw.writeAttribute("onmouseover", getOnmouseover(bean),  "onmouseover");
-    rw.writeAttribute("onmouseup", getOnmouseup(bean),  "onmouseup");
+    rw.writeAttribute("onclick", getOnclick(component, bean), "onclick");
+    rw.writeAttribute("ondblclick", getOndblclick(component, bean), "ondblclick");
+    rw.writeAttribute("onkeydown", getOnkeydown(component, bean), "onkeydown");
+    rw.writeAttribute("onkeyup", getOnkeyup(component, bean), "onkeyup");
+    rw.writeAttribute("onkeypress", getOnkeypress(component, bean), "onkeypress");
+    rw.writeAttribute("onmousedown", getOnmousedown(component, bean), "onmousedown");
+    rw.writeAttribute("onmousemove", getOnmousemove(component, bean), "onmousemove");
+    rw.writeAttribute("onmouseout", getOnmouseout(component, bean), "onmouseout");
+    rw.writeAttribute("onmouseover", getOnmouseover(component, bean), "onmouseover");
+    rw.writeAttribute("onmouseup", getOnmouseup(component, bean), "onmouseup");
   }
 
-
   protected static void renderHAlign(
-    FacesContext        context,
-    RenderingContext arc,
-    Object              hAlign) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    Object           hAlign
+    ) throws IOException
   {
     if (hAlign != null)
     {
-      boolean rtl = arc.isRightToLeft();
+      boolean rtl = rc.isRightToLeft();
 
       if ("start".equals(hAlign))
       {
@@ -549,7 +563,6 @@
   // FORMATTED TEXT
   //
 
-
   final protected void renderPossiblyFormattedText(
     FacesContext context,
     Object       textValue
@@ -567,7 +580,8 @@
 
   final protected void renderFormattedText(
     FacesContext context,
-    Object       textValue) throws IOException
+    Object       textValue
+    ) throws IOException
   {
     if (textValue != null)
     {
@@ -576,7 +590,8 @@
     }
   }
 
-  private boolean _isTextFormatted(String textStr)
+  private boolean _isTextFormatted(
+    String textStr)
   {
     // =-=AEW Should we support "<HTML>" (caps)?
     return textStr.startsWith("<html>");
@@ -595,11 +610,11 @@
   //
 
   static public String getAbsoluteImageUri(
-     FacesContext        context,
-     RenderingContext arc,
-     String              imagePath)
+     FacesContext     context,
+     RenderingContext rc,
+     String           imagePath)
   {
-    return getBaseImageUri(context, arc) + imagePath;
+    return getBaseImageUri(context, rc) + imagePath;
   }
 
   /**
@@ -607,8 +622,8 @@
    * @todo Cache concatentation
    */
   static protected String getBaseImageUri(
-    FacesContext        context,
-    RenderingContext arc)
+    FacesContext     context,
+    RenderingContext rc)
   {
     String contextUri = context.getExternalContext().getRequestContextPath();
     return contextUri + "/adf/images/";
@@ -621,49 +636,48 @@
    * that are purely visual.
    */
   protected final void renderDecorativeIcon(
-    FacesContext        context,
-    RenderingContext arc,
-    String              iconUri,
-    Object              width,
-    Object              height,
-    Object              id,
-    Object              altText
+    FacesContext     context,
+    RenderingContext rc,
+    String           iconUri,
+    Object           width,
+    Object           height,
+    Object           id,
+    Object           altText
     ) throws IOException
   {
-    renderDecorativeIcon(context, arc, iconUri, width, height,
+    renderDecorativeIcon(context, rc, iconUri, width, height,
                          id, altText, null);
   }
 
   protected final void renderDecorativeIcon(
-    FacesContext        context,
-    RenderingContext arc,
-    String              iconUri,
-    Object              width,
-    Object              height,
-    Object              id,
-    Object              altText,
-    UIComponent         comp
+    FacesContext     context,
+    RenderingContext rc,
+    String           iconUri,
+    Object           width,
+    Object           height,
+    Object           id,
+    Object           altText,
+    UIComponent      comp
     ) throws IOException
   {
     // Convert iconUri to an absolute uri
-    String absoluteUri = getAbsoluteImageUri(context, arc, iconUri);
+    String absoluteUri = getAbsoluteImageUri(context, rc, iconUri);
 
-    if ((altText == null) && !isInaccessibleMode(arc))
+    if ((altText == null) && !isInaccessibleMode(rc))
       altText = "";
 
-    OutputUtils.renderImage(context, arc, absoluteUri,
+    OutputUtils.renderImage(context, rc, absoluteUri,
                             width, height, id, altText, comp);
   }
 
-
   /**
    * Renders a vertical spacer for a specified non-null height.
    */
   protected final void renderVerticalSpacer(
-    FacesContext        context,
-    Object              height,
-    Object              id,
-    UIComponent         comp
+    FacesContext context,
+    Object       height,
+    Object       id,
+    UIComponent  comp
     ) throws IOException
   {
     if (height != null)
@@ -690,13 +704,13 @@
    * Renders a spacer.
    */
   protected final void renderSpacer(
-    FacesContext        context,
-    RenderingContext arc,
-    String              width,
-    String              height
+    FacesContext     context,
+    RenderingContext rc,
+    String           width,
+    String           height
     ) throws IOException
   {
-    renderTransparent(context, arc, width, height, false, null);
+    renderTransparent(context, rc, width, height, false, null);
   }
 
 
@@ -704,20 +718,20 @@
    * Renders a transparent gif using a script to save space.
    */
   protected final void renderTransparent(
-    FacesContext        context,
-    RenderingContext arc,
-    String              width,
-    String              height,
-    boolean             needsQuoting,
-    Object              id
+    FacesContext     context,
+    RenderingContext rc,
+    String           width,
+    String           height,
+    boolean          needsQuoting,
+    Object           id
     ) throws IOException
   {
     Counter counter =
-      (Counter) getRenderingProperty(arc, _SCRIPT_SPACER_COUNT);
+      (Counter) getRenderingProperty(rc, _SCRIPT_SPACER_COUNT);
     if (counter == null)
     {
       counter = new Counter();
-      setRenderingProperty(arc, _SCRIPT_SPACER_COUNT, counter);
+      setRenderingProperty(rc, _SCRIPT_SPACER_COUNT, counter);
     }
     int count = counter.count++;
 
@@ -726,70 +740,75 @@
     boolean useScript =
       ((count < 800)
        && (TrinidadAgent.SCRIPTING_SPEED_CAP_FAST ==
-           arc.getAgent().getCapabilities().get(TrinidadAgent.CAP_SCRIPTING_SPEED)));
-    _renderTransparent(context, arc, width, height, needsQuoting, id, useScript);
+           rc.getAgent().getCapabilities().get(TrinidadAgent.CAP_SCRIPTING_SPEED)));
+    _renderTransparent(context, rc, width, height, needsQuoting, id, useScript);
   }
-  
+
   /**
-   * This method evaluates the property of the specified bean if it supports 
-   * the specified property key and if the current value is <code>null</code>, 
+   * This method evaluates the property of the specified bean if it supports
+   * the specified property key and if the current value is <code>null</code>,
    * then evaluate the default value.
    * <p>
-   * If the bean does not support the specified key, this method returns 
-   * <code>null</code>. Unsupported keys occur when the bean's type its type 
-   * returned <code>null</code> from <code>findKey</code> when 
+   * If the bean does not support the specified key, this method returns
+   * <code>null</code>. Unsupported keys occur when the bean's type its type
+   * returned <code>null</code> from <code>findKey</code> when
    * <code>findTypeConstants</code> method was called.
    * </p>
-   * 
+   *
    * @param bean the property value holder.
    * @param key  the key associated to the property to evaluate.
-   * 
-   * @return <code>null</code> if key is <code>null</code>, the current 
-   *         property value in the bean for the specified key if it was 
+   *
+   * @return <code>null</code> if key is <code>null</code>, the current
+   *         property value in the bean for the specified key if it was
    *         set, or the default value if it wasn't.
-   * 
+   *
    * @see #findTypeConstants(org.apache.myfaces.trinidad.bean.FacesBean.Type)
    */
-  protected Object resolveProperty(FacesBean bean, PropertyKey key)
+  protected Object resolveProperty(
+    FacesBean   bean,
+    PropertyKey key)
   {
     return resolveProperty(bean, key, true);
   }
-  
+
   /**
-   * This method evaluates the property of the specified bean if it supports 
-   * the specified property key and if the current value is <code>null</code>, 
-   * then evaluate the default value if and only if <code>checkDefault</code> 
+   * This method evaluates the property of the specified bean if it supports
+   * the specified property key and if the current value is <code>null</code>,
+   * then evaluate the default value if and only if <code>checkDefault</code>
    * is <code>true</code>.
    * <p>
-   * If the bean does not support the specified key, this method returns 
-   * <code>null</code>. Unsupported keys occur when the bean's type its type 
-   * returned <code>null</code> from <code>findKey</code> when 
+   * If the bean does not support the specified key, this method returns
+   * <code>null</code>. Unsupported keys occur when the bean's type its type
+   * returned <code>null</code> from <code>findKey</code> when
    * <code>findTypeConstants</code> method was called.
    * </p>
-   * 
+   *
    * @param bean         the property value holder.
    * @param key          the key associated to the property to evaluate.
-   * @param checkDefault a flag to tell the method to look for the default value 
+   * @param checkDefault a flag to tell the method to look for the default value
    *                     if no value was explicitely set.
-   * 
-   * @return <code>null</code> if key is <code>null</code>, the current 
-   *         property value in the bean for the specified key if it was 
-   *         set, or the default value if it wasn't and checkDefault is 
+   *
+   * @return <code>null</code> if key is <code>null</code>, the current
+   *         property value in the bean for the specified key if it was
+   *         set, or the default value if it wasn't and checkDefault is
    *         <code>true</code>.
    */
-  protected Object resolveProperty(FacesBean bean, PropertyKey key, boolean checkDefault)
+  protected Object resolveProperty(
+    FacesBean   bean,
+    PropertyKey key,
+    boolean     checkDefault)
   {
     if (key == null)
     {
       return null;
     }
-    
+
     Object value = bean.getProperty(key);
     if (value == null && checkDefault)
     {
       value = key.getDefault();
     }
-    
+
     return value;
   }
 
@@ -804,22 +823,22 @@
    * @todo fixup call to addLib
    */
   private void _renderTransparent(
-    FacesContext        context,
-    RenderingContext arc,
-    String              width,
-    String              height,
-    boolean             needsQuoting,
-    Object              id,
-    boolean             useScript
+    FacesContext     context,
+    RenderingContext rc,
+    String           width,
+    String           height,
+    boolean          needsQuoting,
+    Object           id,
+    boolean          useScript
     ) throws IOException
   {
-    PartialPageContext pContext = arc.getPartialPageContext();
+    PartialPageContext pContext = rc.getPartialPageContext();
 
     // cannot use t() in MarlinCore.js on a partial rendering pass
     // just render the icon.
     if (!useScript || (pContext != null))
     {
-      renderDecorativeIcon(context, arc, TRANSPARENT_GIF,
+      renderDecorativeIcon(context, rc, TRANSPARENT_GIF,
                            width, height, id, null);
     }
     else
@@ -827,23 +846,23 @@
       // IE has fast javascript, so render has a js function call
       ResponseWriter writer = context.getResponseWriter();
 
-      if (getRenderingProperty(arc,
+      if (getRenderingProperty(rc,
                                _TRANSPARENT_FUNCTION_WRITTEN_KEY) == null)
       {
         // determine the transparent image's URI
-        String transparentURI = getAbsoluteImageUri(context, arc, TRANSPARENT_GIF);
+        String transparentURI = getAbsoluteImageUri(context, rc, TRANSPARENT_GIF);
 
-        setRenderingProperty(arc,
+        setRenderingProperty(rc,
                              _TRANSPARENT_FUNCTION_WRITTEN_KEY,
                              Boolean.TRUE);
 
         // make sure the transparent image function is loaded
-        XhtmlUtils.addLib(context, arc, "t()");
+        XhtmlUtils.addLib(context, rc, "t()");
 
         writer.startElement("script", null);
         // Bug #3426092:
         // render the type="text/javascript" attribute in accessibility mode
-        renderScriptTypeAttribute(context, arc);
+        renderScriptTypeAttribute(context, rc);
 
         writer.writeAttribute("id", id, null);
 
@@ -854,7 +873,7 @@
         // store accessibility mode as javascript variable
         // which is used in t()
         writer.write("var _axm");
-        if (!isInaccessibleMode(arc))
+        if (!isInaccessibleMode(rc))
           writer.write("=1");
         writer.write(";");
       }
@@ -863,7 +882,7 @@
         writer.startElement("script", null);
         // Bug #3426092:
         // render the type="text/javascript" attribute in accessibility mode
-        renderScriptTypeAttribute(context, arc);
+        renderScriptTypeAttribute(context, rc);
         writer.writeAttribute("id", id, null);
       }
 
@@ -932,8 +951,9 @@
    * before calling this method.
    */
   public static void renderScriptDeferAttribute(
-    FacesContext        context,
-    RenderingContext arc) throws IOException
+    FacesContext     context,
+    RenderingContext rc
+    ) throws IOException
   {
     // At the moment we only render the defer attribute if
     // we are in the partial rendering pass.  This is to
@@ -959,10 +979,11 @@
    * before calling this method.
    */
   public static void renderScriptTypeAttribute(
-    FacesContext        context,
-    RenderingContext arc) throws IOException
+    FacesContext     context,
+    RenderingContext rc
+    ) throws IOException
   {
-    if (!isInaccessibleMode(arc))
+    if (!isInaccessibleMode(rc))
     {
       context.getResponseWriter().writeAttribute("type",
                                                  _ACCESSIBILITY_SCRIPT_TYPE,
@@ -973,21 +994,21 @@
 
   /**
    * This method renders an input element of type "submit". The input element's
-   * name attribute is encoded with parameter name and value pairs. Thus, it 
-   * would enable Non-JavaScript browsers to include the element's name in 
-   * their payLoad, if the element submits the page.    
+   * name attribute is encoded with parameter name and value pairs. Thus, it
+   * would enable Non-JavaScript browsers to include the element's name in
+   * their payLoad, if the element submits the page.
    *
    * @param context a <code>FacesContext</code>
-   * @param arc a <code>RenderingContext</code>
+   * @param rc a <code>RenderingContext</code>
    * @param valueAttri a <code>String</code> it is the value attribute
    *  of the submit button
    * @param nameAttri  a <code>String</code> it is the name attribute
    *  of the submit button
-   * 
+   *
    */
   public static void renderSubmitButtonNonJSBrowser(
     FacesContext     context,
-    RenderingContext arc,
+    RenderingContext rc,
     String           valueAttri,
     String           nameAttri
     ) throws IOException
@@ -997,30 +1018,38 @@
     writer.writeAttribute("type", "submit", null);
     writer.writeAttribute("value", valueAttri, null);
     writer.writeAttribute("name", nameAttri, null);
-    renderStyleClass(context, arc, 
+    renderStyleClass(context, rc,
                        SkinSelectors.AF_COMMAND_BUTTON_STYLE_CLASS);
     writer.endElement("input");
   }
- 
+
   //
   // ATTRIBUTE HOOKS
   //
-  protected String getShortDesc(FacesBean bean)
+  protected String getShortDesc(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_shortDescKey));
   }
 
-  protected String getStyleClass(FacesBean bean)
+  protected String getStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_styleClassKey));
   }
 
-  protected String getInlineStyle(FacesBean bean)
+  protected String getInlineStyle(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_inlineStyleKey));
   }
 
-  protected String getOnclick(FacesBean bean)
+  protected String getOnclick(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onclickKey == null)
       return null;
@@ -1028,7 +1057,9 @@
     return toString(bean.getProperty(_onclickKey));
   }
 
-  protected String getOndblclick(FacesBean bean)
+  protected String getOndblclick(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_ondblclickKey == null)
       return null;
@@ -1036,7 +1067,9 @@
     return toString(bean.getProperty(_ondblclickKey));
   }
 
-  protected String getOnkeydown(FacesBean bean)
+  protected String getOnkeydown(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onkeydownKey == null)
       return null;
@@ -1044,7 +1077,9 @@
     return toString(bean.getProperty(_onkeydownKey));
   }
 
-  protected String getOnkeyup(FacesBean bean)
+  protected String getOnkeyup(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onkeyupKey == null)
       return null;
@@ -1052,7 +1087,9 @@
     return toString(bean.getProperty(_onkeyupKey));
   }
 
-  protected String getOnkeypress(FacesBean bean)
+  protected String getOnkeypress(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onkeypressKey == null)
       return null;
@@ -1060,7 +1097,9 @@
     return toString(bean.getProperty(_onkeypressKey));
   }
 
-  protected String getOnmousedown(FacesBean bean)
+  protected String getOnmousedown(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmousedownKey == null)
       return null;
@@ -1068,7 +1107,9 @@
     return toString(bean.getProperty(_onmousedownKey));
   }
 
-  protected String getOnmousemove(FacesBean bean)
+  protected String getOnmousemove(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmousemoveKey == null)
       return null;
@@ -1076,7 +1117,9 @@
     return toString(bean.getProperty(_onmousemoveKey));
   }
 
-  protected String getOnmouseout(FacesBean bean)
+  protected String getOnmouseout(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmouseoutKey == null)
       return null;
@@ -1084,7 +1127,9 @@
     return toString(bean.getProperty(_onmouseoutKey));
   }
 
-  protected String getOnmouseover(FacesBean bean)
+  protected String getOnmouseover(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmouseoverKey == null)
       return null;
@@ -1092,7 +1137,9 @@
     return toString(bean.getProperty(_onmouseoverKey));
   }
 
-  protected String getOnmouseup(FacesBean bean)
+  protected String getOnmouseup(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_onmouseupKey == null)
       return null;
@@ -1100,7 +1147,9 @@
     return toString(bean.getProperty(_onmouseupKey));
   }
 
-  protected String[] getPartialTriggers(FacesBean bean)
+  protected String[] getPartialTriggers(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_partialTriggersKey == null)
     {
@@ -1113,16 +1162,17 @@
   }
 
   /**
-   * Returns true if the agent supports the "onclick" JS Handler in an "input" 
+   * Returns true if the agent supports the "onclick" JS Handler in an "input"
    * HTML element of type "image"
    */
-  static public boolean supportsOnClickOnImgInput(RenderingContext arc)
+  static public boolean supportsOnClickOnImgInput(
+    RenderingContext rc)
   {
-    Object cap = arc.getAgent().getCapabilities().get(
+    Object cap = rc.getAgent().getCapabilities().get(
                       TrinidadAgent.CAP_ONCLICK_IMG_INPUT);
     return !Boolean.FALSE.equals(cap);
   }
-  
+
   private PropertyKey _shortDescKey;
   private PropertyKey _styleClassKey;
   private PropertyKey _inlineStyleKey;

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlUtils.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlUtils.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/XhtmlUtils.java Thu Dec 10 17:46:13 2009
@@ -43,6 +43,7 @@
 import org.apache.myfaces.trinidad.context.Agent;
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.render.CoreRenderer;
 import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.Scriptlet;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.XhtmlScriptletFactory;
@@ -644,34 +645,32 @@
     return(nameAttri.toString());
   }
 
-
   /**
-   * Renders a non-submission client event handler (onfocus for example) including any associated
+   * Build a client event handler (onfocus for example) including any associated
    * client behaviors for the event.
+   * <p>{@link #setUpClientBehaviorContext} should be called before invoking this function,
+   * otherwise parameters will not be sent to the server for submitting behaviors.</p>
    *
    * @param facesContext The faces context
    * @param component The component
    * @param disabled true if the component is disabled, stops the processing of client behaviors
    * @param eventName The event, without the "on*" prefix, to render
    * @param eventHandlerScript Script to be executed after the behaviors. May be null
-   * @param eventAttributeName the event attribute name. Null if it should not be rendered. Example
-   * value: onclick
    * @param userHandlerScript user event handler to be executed before the event handler script and
    * any client behavior scripts. May be null.
-   * @param params Any parameters that should be sent by behaviors that submit
    * @throws IOException If a rendering exception occurs
    */
-  public static void renderClientEventHandler(
-    FacesContext                                facesContext,
-    UIComponent                                 component,
-    boolean                                     disabled,
-    String                                      eventName,
-    String                                      eventAttributeName,
-    Collection<ClientBehaviorContext.Parameter> params,
-    String                                      userHandlerScript,
-    String                                      eventHandlerScript
+  public static String getClientEventHandler(
+    FacesContext facesContext,
+    UIComponent  component,
+    boolean      disabled,
+    String       eventName,
+    String       userHandlerScript,
+    String       eventHandlerScript
     ) throws IOException
   {
+    Collection<ClientBehaviorContext.Parameter> params = CoreRenderer.getBehaviorParameters(
+      component);
     List<ClientBehavior> behaviors = null;
     ClientBehaviorContext behaviorContext = null;
 
@@ -744,10 +743,7 @@
       }
     }
 
-    if (script != null)
-    {
-      facesContext.getResponseWriter().writeAttribute(eventAttributeName, script, null);
-    }
+    return script;
   }
 
   private static boolean _isSubmittingBehavior(
@@ -756,6 +752,8 @@
     return behavior.getHints().contains(ClientBehaviorHint.SUBMITTING);
   }
 
+  private static final Object _CLIENT_BEHAVIORS_KEY = new Object();
+
   /** HashMap mapping names to their scriptlets */
   private static Map<Object, Scriptlet> _sScriptletTable =
     Collections.synchronizedMap(new HashMap<Object, Scriptlet>(37));

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/DetailColumnRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/DetailColumnRenderer.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/DetailColumnRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/DetailColumnRenderer.java Thu Dec 10 17:46:13 2009
@@ -6,9 +6,9 @@
  *  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
@@ -22,28 +22,30 @@
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.UIXCollection;
 import org.apache.myfaces.trinidad.component.UIXTable;
 import org.apache.myfaces.trinidad.component.core.data.CoreTable;
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.render.CoreRenderer;
-import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ShowDetailRenderer;
 import org.apache.myfaces.trinidad.util.IntegerUtils;
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.ShowDetailRenderer;
 
 
 public class DetailColumnRenderer extends SpecialColumnRenderer
 {
   @Override
   protected void encodeAll(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     TableRenderingContext tContext =
       TableRenderingContext.getCurrentInstance();
-    
+
     if (tContext.getRenderStage().getStage() == RenderStage.INITIAL_STAGE)
     {
       // if we have detail disclosure. then we need to use
@@ -55,82 +57,93 @@
       int physicalIndex = tContext.getColumnData().getPhysicalColumnIndex();
       tContext.setDetailColumnIndex(physicalIndex);
     }
-    
-    super.encodeAll(context, arc, component, bean);
-  }  
-  
+
+    super.encodeAll(context, rc, component, bean);
+  }
+
   @Override
-  protected String getHeaderText(FacesBean bean)
+  protected String getHeaderText(
+    UIComponent component,
+    FacesBean   bean)
   {
     RenderingContext arc = RenderingContext.getCurrentInstance();
     return arc.getTranslatedString("af_table.DETAIL_COLUMN_HEADER");
   }
-  
+
   @Override
-  protected boolean getNoWrap(FacesBean bean)
+  protected boolean getNoWrap(
+    UIComponent component,
+    FacesBean   bean)
   {
     return true;
   }
 
   @Override
-  protected void renderKids(FacesContext          context,
-                            RenderingContext   arc,
-                            TableRenderingContext tContext,
-                            UIComponent           column) throws IOException
+  protected void renderKids(
+    FacesContext          context,
+    RenderingContext      rc,
+    TableRenderingContext tContext,
+    UIComponent           column
+    ) throws IOException
   {
     // Delegate to a ShowDetailRenderer, using the table as the underlying
     // component
     delegateRenderer(context,
-                     arc,
+                     rc,
                      tContext.getTable(),
                      getFacesBean(tContext.getTable()),
                      _detailRenderer);
   }
-  
+
   static private class Detail extends ShowDetailRenderer
   {
-    public Detail() 
+    public Detail()
     {
       super(CoreTable.TYPE);
     }
-    
+
     @Override
     protected void renderAllAttributes(
-       FacesContext        context,
-       RenderingContext arc,
-       FacesBean           bean)
+       FacesContext     context,
+       RenderingContext rc,
+      UIComponent       component,
+       FacesBean        bean)
     {
-      
+
     }
-    
+
     @Override
     protected void renderPromptStart(
-      FacesContext        context,
-      RenderingContext arc,
-      UIComponent         component,
-      FacesBean           bean) throws IOException
+      FacesContext     context,
+      RenderingContext rc,
+      UIComponent      component,
+      FacesBean        bean
+      ) throws IOException
     {
       // bug 4688350:
       component = ((UIXTable) component).getDetailStamp();
-      super.renderPromptStart(context, arc, component, bean);
+      super.renderPromptStart(context, rc, component, bean);
     }
-    
+
     @Override
-    protected String getValueParameter(UIComponent component)
+    protected String getValueParameter(
+      UIComponent component)
     {
       UIXCollection cb = (UIXCollection) component;
       int rowIndex = cb.getRowIndex();
       return IntegerUtils.getString(rowIndex);
     }
-    
+
     @Override
     protected boolean isTableDetailDisclosure()
     {
       return true;
     }
-    
+
     @Override
-    protected boolean getDisclosed(FacesBean bean)
+    protected boolean getDisclosed(
+      UIComponent component,
+      FacesBean   bean)
     {
       TableRenderingContext tContext = TableRenderingContext.getCurrentInstance();
       UIXTable table = (UIXTable) tContext.getCollectionComponent();
@@ -138,13 +151,17 @@
     }
 
     @Override
-   protected String getLinkId(String rootId, boolean disclosed)
+   protected String getLinkId(
+      String  rootId,
+      boolean disclosed)
    {
      return _getDetailLinkId(TableRenderingContext.getCurrentInstance());
    }
-   
+
     @Override
-    protected String getClientId(FacesContext context, UIComponent component)
+    protected String getClientId(
+      FacesContext context,
+      UIComponent  component)
     {
       TableRenderingContext tContext = TableRenderingContext.getCurrentInstance();
       return tContext.getTableId();
@@ -152,7 +169,8 @@
 
     // Returns the ID for the detail-disclosure link.  We use IDs of the
     // form: "<table name>dd<row index>"
-    private static String _getDetailLinkId(TableRenderingContext tContext)
+    private static String _getDetailLinkId(
+      TableRenderingContext tContext)
     {
       String tableId = tContext.getTableId();
       if (tableId == null)
@@ -172,6 +190,6 @@
       return buffer.toString();
     }
   }
-  
+
   private final CoreRenderer _detailRenderer = new Detail();
 }

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/FocusColumnRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/FocusColumnRenderer.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/FocusColumnRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/FocusColumnRenderer.java Thu Dec 10 17:46:13 2009
@@ -6,9 +6,9 @@
  *  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
@@ -28,41 +28,48 @@
 import org.apache.myfaces.trinidad.component.UIXTreeTable;
 import org.apache.myfaces.trinidad.component.core.data.CoreColumn;
 import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidad.skin.Icon;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.OutputUtils;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlConstants;
-import org.apache.myfaces.trinidad.skin.Icon;
 
 
 public class FocusColumnRenderer extends SpecialColumnRenderer
 {
   @Override
-  protected String getHeaderText(FacesBean bean)
+  protected String getHeaderText(
+    UIComponent component,
+    FacesBean   bean)
   {
     RenderingContext arc = RenderingContext.getCurrentInstance();
     return arc.getTranslatedString("af_treeTable.FOCUS_COLUMN_HEADER");
   }
-  
+
   @Override
-  protected String getHeaderStyleClass(TableRenderingContext tContext)
+  protected String getHeaderStyleClass(
+    TableRenderingContext tContext)
   {
     return SkinSelectors.AF_COLUMN_HEADER_ICON_STYLE;
   }
 
   @Override
-  protected String getFormatType(FacesBean bean)
+  protected String getFormatType(
+    UIComponent component,
+    FacesBean   bean)
   {
     return CoreColumn.ALIGN_CENTER;
   }
 
   @Override
-  protected void renderKids(FacesContext          context,
-                            RenderingContext   arc,
-                            TableRenderingContext trc,
-                            UIComponent           column) throws IOException
+  protected void renderKids(
+    FacesContext          context,
+    RenderingContext      rc,
+    TableRenderingContext trc,
+    UIComponent           column
+    ) throws IOException
   {
     TreeTableRenderingContext ttrc = (TreeTableRenderingContext) trc;
-  
+
     ResponseWriter writer = context.getResponseWriter();
     UIXTreeTable hGrid = ttrc.getUIXTreeTable();
 
@@ -72,39 +79,39 @@
 
     // do not render a focus icon if the node is not expandable
     // do not render the focus icon if this is the first row
-    if (hGrid.isContainer() && 
+    if (hGrid.isContainer() &&
         (hGrid.getDepth() >= focusPathSize))
     {
       writer.startElement(XhtmlConstants.LINK_ELEMENT, null);
 
-      if (supportsNavigation(arc))
+      if (supportsNavigation(rc))
       {
-        String onclick = 
+        String onclick =
           TreeUtils.callJSFocusNode(hGrid, ttrc.getJSVarName());
         writer.writeURIAttribute(XhtmlConstants.HREF_ATTRIBUTE, "#", null);
         writer.writeAttribute(XhtmlConstants.ONCLICK_ATTRIBUTE, onclick, null);
       }
 
-      _renderFocusIcon(context, arc, arc.getTranslatedString("af_treeTable.FOCUS_TIP"));
+      _renderFocusIcon(context, rc, rc.getTranslatedString("af_treeTable.FOCUS_TIP"));
 
       writer.endElement(XhtmlConstants.LINK_ELEMENT);
     }
   }
 
-  // Renders the focus icon  
+  // Renders the focus icon
   private void _renderFocusIcon(
-    FacesContext fc,
-    RenderingContext arc,
+    FacesContext     facesContext,
+    RenderingContext rc,
     String           altText
     ) throws IOException
   {
-    Icon icon = arc.getIcon(SkinSelectors.AF_TREE_TABLE_FOCUS_ICON_NAME);
+    Icon icon = rc.getIcon(SkinSelectors.AF_TREE_TABLE_FOCUS_ICON_NAME);
 
     if (icon != null)
     {
-      // Render focus icon with embedded=true, since 
+      // Render focus icon with embedded=true, since
       // focus icon is always rendered within its own link.
-      OutputUtils.renderIcon(fc, arc, icon, altText, null, true);
+      OutputUtils.renderIcon(facesContext, rc, icon, altText, null, true);
     }
   }
 }

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SelectionColumnRenderer.java Thu Dec 10 17:46:13 2009
@@ -6,9 +6,9 @@
  *  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
@@ -39,41 +39,49 @@
   }
 
   @Override
-  protected void renderKids(FacesContext          context,
-                            RenderingContext   arc,
-                            TableRenderingContext trc,
-                            UIComponent           column) throws IOException
+  protected void renderKids(
+    FacesContext          context,
+    RenderingContext      rc,
+    TableRenderingContext trc,
+    UIComponent           column
+    ) throws IOException
   {
     UIComponent table = trc.getTable();
-    delegateRenderer(context, arc, table,
-                     getFacesBean(table), 
+    delegateRenderer(context, rc, table,
+                     getFacesBean(table),
                      trc.hasSelectAll()
                      ? _multiRenderer
                      : _singleRenderer);
   }
-  
+
   @Override
-  protected String getHeaderText(FacesBean bean)
+  protected String getHeaderText(
+    UIComponent component,
+    FacesBean   bean)
   {
     RenderingContext arc = RenderingContext.getCurrentInstance();
     TableRenderingContext tContext =
       TableRenderingContext.getCurrentInstance();
 
-    String key = _isMultipleSelection(tContext) 
+    String key = _isMultipleSelection(tContext)
      ? "af_tableSelectMany.SELECT_COLUMN_HEADER"
      : "af_tableSelectOne.SELECT_COLUMN_HEADER";
-    
+
     return arc.getTranslatedString(key);
-  }  
+  }
 
   @Override
-  protected boolean getNoWrap(FacesBean bean)
+  protected boolean getNoWrap(
+    UIComponent component,
+    FacesBean   bean)
   {
     return false;
   }
 
   @Override
-  protected String getFormatType(FacesBean bean)
+  protected String getFormatType(
+    UIComponent component,
+    FacesBean   bean)
   {
     return CoreColumn.ALIGN_CENTER;
   }
@@ -88,7 +96,7 @@
   {
     return tContext.hasSelectAll();
   }
-  
+
   private final CoreRenderer _singleRenderer;
   private final CoreRenderer _multiRenderer;
 }

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SpecialColumnRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SpecialColumnRenderer.java?rev=889345&r1=889344&r2=889345&view=diff
==============================================================================
--- myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SpecialColumnRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/SpecialColumnRenderer.java Thu Dec 10 17:46:13 2009
@@ -6,9 +6,9 @@
  *  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
@@ -19,6 +19,7 @@
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table;
 
 import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.data.CoreColumn;
 import org.apache.myfaces.trinidad.context.RenderingContext;
@@ -40,35 +41,42 @@
   }
 
   @Override
-  protected boolean getHeaderNoWrap(FacesBean bean)
+  protected boolean getHeaderNoWrap(
+    UIComponent component,
+    FacesBean   bean)
   {
     return true;
   }
 
   @Override
-  protected boolean getSortable(FacesBean bean)
+  protected boolean getSortable(
+    UIComponent component,
+    FacesBean   bean)
   {
     return false;
   }
 
   @Override
-  protected String getSortProperty(FacesBean bean)
+  protected String getSortProperty(
+    UIComponent component,
+    FacesBean   bean)
   {
     return null;
   }
 
   @Override
-  protected String getHeaderInlineStyle(RenderingContext arc)
+  protected String getHeaderInlineStyle(
+    RenderingContext rc)
   {
-    if (XhtmlRenderer.isIE(arc))
+    if (XhtmlRenderer.isIE(rc))
       return "word-break:keep-all"; // bugs 2342291, 1999842
-    
+
     return null;
   }
-  
+
   @Override
   protected boolean isSpecialColumn()
   {
     return true;
-  }  
+  }
 }