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 [14/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/SimpleSelectBooleanRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectBooleanRenderer.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/SimpleSelectBooleanRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectBooleanRenderer.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,35 +26,36 @@
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
-
 import org.apache.myfaces.trinidad.context.RenderingContext;
-import org.apache.myfaces.trinidadinternal.renderkit.core.CoreRendererUtils;
 import org.apache.myfaces.trinidad.skin.Icon;
+import org.apache.myfaces.trinidadinternal.renderkit.core.CoreRendererUtils;
+
 
 /**
  */
 public abstract class SimpleSelectBooleanRenderer extends FormInputRenderer
 {
-  public SimpleSelectBooleanRenderer(FacesBean.Type type)
+  public SimpleSelectBooleanRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _textKey = type.findKey("text");
     _accessKeyKey = type.findKey("accessKey");
   }
 
-  
   //**********************
   //encode
   //**********************
 
-
-  abstract protected Object getValueAttr(RenderingContext arc);
+  abstract protected Object getValueAttr(
+    RenderingContext rc);
 
   abstract protected Object getType();
 
@@ -62,116 +63,116 @@
     boolean selected,
     boolean disabled
   );
-  
+
   abstract protected String getIconAltTextName(
     boolean selected
   );
 
-
   protected void renderNameAttribute(
-    FacesContext        context,
-    RenderingContext arc,
-    FacesBean           bean
-    )throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    FacesBean        bean
+    ) throws IOException
   {
     // no-op
   }
-  
+
   /**
    * @TODO use new renderAllAttributes that doesn't render styleclass once
    * Jeanne adds it.
    */
   @Override
   protected void encodeAllAsElement(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
-    String clientId = LabelAndMessageRenderer.__getCachedClientId(arc); 
-    
-    boolean getRenderSimpleSpan = getRenderSimpleSpan(bean);
+    String clientId = LabelAndMessageRenderer.__getCachedClientId(rc);
+
+    boolean getRenderSimpleSpan = getRenderSimpleSpan(component, bean);
     if (getRenderSimpleSpan)
     {
       writer.startElement("span", component);
       // put the outer style class here, like af_selectBooleanRadio, styleClass,
       // inlineStyle, 'state' styles like p_AFDisabled, etc.
-      renderRootDomElementStyles(context, arc, component, bean);
+      renderRootDomElementStyles(context, rc, component, bean);
       // render transformed id so that it can be PPR'd.
-      _renderPartialId(context, arc, clientId);
+      _renderPartialId(context, rc, clientId);
     }
     // Added span around the entire element
     // for the Visual Editor and PPR. See bug # 2222541.
     writer.startElement("span", component);
-    
+
     // render the events only if the browser supports JavaScript
-    if (supportsScripting(arc))
+    if (supportsScripting(rc))
     {
-      renderSpanEventHandlers(context, bean);
+      renderSpanEventHandlers(context, component, bean);
     }
-    
-    renderStyleClass(context, arc, getContentStyleClass(bean)); 
-    renderInlineStyleAttribute(context, arc, getContentStyle(bean));
+
+    renderStyleClass(context, rc, getContentStyleClass(component, bean));
+    renderInlineStyleAttribute(context, rc, component, getContentStyle(component, bean));
 
     if (!getRenderSimpleSpan)
     {
       // render transformed id so that it can be PPR'd.
-      _renderPartialId(context, arc, clientId);
+      _renderPartialId(context, rc, clientId);
     }
 
     char accessKey;
-    if (supportsAccessKeys(arc))
-      accessKey = getAccessKey(bean);
+    if (supportsAccessKeys(rc))
+      accessKey = getAccessKey(component, bean);
     else
       accessKey = CHAR_UNDEFINED;
 
-    if (isAutoSubmit(bean))
-      AutoSubmitUtils.writeDependencies(context, arc);
-    
+    if (isAutoSubmit(component, bean))
+      AutoSubmitUtils.writeDependencies(context, rc);
+
     writer.startElement("input", null);
     renderId(context, component);
     // Not calling super.renderAllAttributes or style classes are written out
-    renderShortDescAttribute(context, arc, bean);
-    
+    renderShortDescAttribute(context, rc, component, bean);
+
     // render the events only if the browser supports JavaScript
-    if (supportsScripting(arc))
+    if (supportsScripting(rc))
     {
-      renderInputEventHandlers(context, bean);
+      renderInputEventHandlers(context, component, bean);
     }
-    renderDisabledAttribute(context, arc, bean);
+    renderDisabledAttribute(context, rc, component, bean);
     if (!shouldRenderName(context, component))
-      renderNameAttribute(context, arc, bean);    
+      renderNameAttribute(context, rc, bean);
     if (accessKey != CHAR_UNDEFINED)
       writer.writeAttribute("accesskey", Character.toString(accessKey), null);
     writer.writeAttribute("type", getType(), null);
-    writer.writeAttribute("value", getValueAttr(arc), null);
-    
-    Object value = getSubmittedValue(bean);
+    writer.writeAttribute("value", getValueAttr(rc), null);
+
+    Object value = getSubmittedValue(component, bean);
     if (value == null)
-      value = getValue(bean);
-    
-    if (!(value instanceof Boolean)) 
-      value = Boolean.valueOf(getConvertedString(context, component, bean)); 
+      value = getValue(component, bean);
+
+    if (!(value instanceof Boolean))
+      value = Boolean.valueOf(getConvertedString(context, component, bean));
 
-    if ( Boolean.TRUE.equals(value))  
+    if ( Boolean.TRUE.equals(value))
       writer.writeAttribute("checked", Boolean.TRUE, "value");
 
     writer.endElement("input");
-    
-    String text = getText(bean);
 
-    boolean renderLabelTags = _isLabelTagRendered(arc, text, accessKey);
-    
+    String text = getText(component, bean);
+
+    boolean renderLabelTags = _isLabelTagRendered(rc, text, accessKey);
+
     if (renderLabelTags)
     {
       writer.startElement("label", null);
 
       writer.writeAttribute("for", clientId, null);
-      HiddenLabelUtils.rememberLabel(arc, clientId);
+      HiddenLabelUtils.rememberLabel(rc, clientId);
     }
 
-    renderText(context, arc, component, bean, true, false, text, accessKey);
+    renderText(context, rc, component, bean, true, false, text, accessKey);
 
     if (renderLabelTags)
     {
@@ -180,35 +181,36 @@
 
     // see bug 2880407 we dont need to render hidden label when wrapped with
     // fieldset and legend
-    if (isHiddenLabelRequired(arc))
-      renderShortDescAsHiddenLabel(context, arc, component, bean);
-        
-    writer.endElement("span"); 
+    if (isHiddenLabelRequired(rc))
+      renderShortDescAsHiddenLabel(context, rc, component, bean);
+
+    writer.endElement("span");
     if (getRenderSimpleSpan)
-      writer.endElement("span");      
+      writer.endElement("span");
   }
 
   @Override
   protected void encodeAllAsNonElement(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
-    boolean getRenderSimpleSpan = getRenderSimpleSpan(bean);
-    String clientId = LabelAndMessageRenderer.__getCachedClientId(arc);    
+    boolean getRenderSimpleSpan = getRenderSimpleSpan(component, bean);
+    String clientId = LabelAndMessageRenderer.__getCachedClientId(rc);
 
     if (getRenderSimpleSpan)
     {
       writer.startElement("span", component);
       // put the outer style class here, like af_selectBooleanRadio, styleClass,
       // inlineStyle, 'state' styles like p_AFDisabled, etc.
-      renderRootDomElementStyles(context, arc, component, bean);
+      renderRootDomElementStyles(context, rc, component, bean);
       // render transformed id so that it can be PPR'd.
-      _renderPartialId(context, arc, clientId);
+      _renderPartialId(context, rc, clientId);
     }
-    
+
     // Added span around the entire element
     // for the Visual Editor and PPR. See bug # 2222541.
     writer.startElement("div", component);
@@ -216,77 +218,82 @@
     {
       // render transformed id on the span so that it can be PPR'd.
       // this needs to be composite id even when readOnly is true for PPR
-      _renderPartialId(context, arc, clientId);
+      _renderPartialId(context, rc, clientId);
     }
-    renderStyleClass(context, arc, getContentStyleClass(bean));
-    renderInlineStyleAttribute(context, arc, getContentStyle(bean));
-    renderShortDescAttribute(context, arc, bean);
-    
-    Object value = getSubmittedValue(bean);
+    renderStyleClass(context, rc, getContentStyleClass(component, bean));
+    renderInlineStyleAttribute(context, rc, component, getContentStyle(component, bean));
+    renderShortDescAttribute(context, rc, component, bean);
+
+    Object value = getSubmittedValue(component, bean);
     if ( value == null)
-      value = getValue(bean);
+      value = getValue(component, bean);
 
-    if (!(value instanceof Boolean)) 
-      value = Boolean.valueOf(getConvertedString(context, component, bean)); 
+    if (!(value instanceof Boolean))
+      value = Boolean.valueOf(getConvertedString(context, component, bean));
 
     boolean selected = Boolean.TRUE.equals(value);
-    boolean disabled = getDisabled(bean);
+    boolean disabled = getDisabled(component, bean);
+
+    String iconName = getIconName(selected, disabled);
+    Icon icon = rc.getIcon(iconName);
 
-    String iconName = getIconName(selected, disabled);     
-    Icon icon = arc.getIcon(iconName);
-    
     String altTextName = getIconAltTextName(selected);
 
-    String shortDesc = arc.getTranslatedString(altTextName);   
-    OutputUtils.renderIcon(context, arc, icon, shortDesc, null );                      
+    String shortDesc = rc.getTranslatedString(altTextName);
+    OutputUtils.renderIcon(context, rc, icon, shortDesc, null );
 
-    String text = getText(bean);    
+    String text = getText(component, bean);
     if (text != null)
     {
       writer.writeText(XhtmlConstants.NBSP_STRING, null);
-      
+
       // output the text directly since we have no access key
-      writer.writeText(text, "text");        
+      writer.writeText(text, "text");
     }
 
-    writer.endElement("div");   
+    writer.endElement("div");
     if (getRenderSimpleSpan)
       writer.endElement("span");
   }
 
   protected void renderSpanEventHandlers(
-    FacesContext context, 
-    FacesBean    bean) throws IOException
+    FacesContext context,
+    UIComponent  component,
+    FacesBean    bean
+    ) throws IOException
   {
     //no op
   }
-  
+
   protected void renderInputEventHandlers(
-    FacesContext context, 
-    FacesBean    bean) throws IOException
+    FacesContext context,
+    UIComponent  component,
+    FacesBean    bean
+    ) throws IOException
   {
-    renderEventHandlers(context, bean); 
+    renderEventHandlers(context, component, bean);
   }
 
   protected void renderAccessKeyAttribute(
-    FacesContext        context,
-    RenderingContext arc,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    FacesBean        bean
+    ) throws IOException
   {
-  }  
-  
+  }
+
   /**
    * Renders the node text
    */
   protected void renderText(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean,
-    boolean             renderAccessKeys,
-    boolean             renderID,
-    String              text,
-    char                accessKey
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    boolean          renderAccessKeys,
+    boolean          renderID,
+    String           text,
+    char             accessKey
     ) throws IOException
   {
 
@@ -298,7 +305,7 @@
       if (renderID)
         renderId( context, component);
 
-      if (renderAccessKeys && supportsAccessKeys(arc))
+      if (renderAccessKeys && supportsAccessKeys(rc))
       {
         // hightlight any access keys with an underline
         AccessKeyUtils.renderAccessKeyText(context, text, accessKey,
@@ -313,37 +320,41 @@
       writer.endElement("span");
     }
   }
-  
+
   protected String getAutoSubmitScript(
-    FacesBean bean
-  )
+    UIComponent component,
+    FacesBean   bean)
   {
     RenderingContext arc = RenderingContext.getCurrentInstance();
     String source = LabelAndMessageRenderer.__getCachedClientId(arc);
-    boolean immediate = isImmediate(bean);
+    boolean immediate = isImmediate(component, bean);
     boolean isRadio = isRadio();
-    return AutoSubmitUtils.getSubmitScript(arc, source, 
+    return AutoSubmitUtils.getSubmitScript(arc, source,
                                            immediate, isRadio,
                                            XhtmlConstants.AUTOSUBMIT_EVENT, null, true);
-  }                     
+  }
 
   protected boolean isRadio()
   {
     return false;
   }
 
-
-  protected String getCompositeId(String clientId)
+  protected String getCompositeId(
+    String clientId)
   {
-    return clientId + XhtmlConstants.COMPOSITE_ID_EXTENSION + "c";   
+    return clientId + XhtmlConstants.COMPOSITE_ID_EXTENSION + "c";
   }
-    
-  protected String getText(FacesBean bean)
+
+  protected String getText(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_textKey));
   }
 
-  protected char getAccessKey(FacesBean bean)
+  protected char getAccessKey(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toChar(bean.getProperty(_accessKeyKey));
   }
@@ -352,28 +363,28 @@
    * return true if you want to render the span that goes around the simple
    * element, where we put the root dom element styles.
    */
-  protected boolean getRenderSimpleSpan(FacesBean bean)
+  protected boolean getRenderSimpleSpan(
+    UIComponent component,
+    FacesBean   bean)
   {
-    return getSimple(bean);
+    return getSimple(component, bean);
   }
- 
- 
-    
+
   /**
    * checks to see if we need label tags around this element and its text.
    * we don't need label tags if this element is readOnly or disabled, or if
    * it does not have any text.
    */
   private boolean _isLabelTagRendered(
-    RenderingContext arc,
-    String              text,
-    char                accessKey
+    RenderingContext rc,
+    String           text,
+    char             accessKey
     )
   {
     if (text == null)
       return false;
 
-    if (isInaccessibleMode(arc) &&
+    if (isInaccessibleMode(rc) &&
         accessKey == CHAR_UNDEFINED)
       return false;
 
@@ -384,21 +395,20 @@
    * this id is rendered so that the node can be ppr replaced
    */
   private void _renderPartialId(
-    FacesContext        context,
-    RenderingContext arc,
-    String              clientId
-  )throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    String           clientId
+  ) throws IOException
   {
-    if (clientId != null && CoreRendererUtils.supportsPartialRendering(arc))
+    if (clientId != null && CoreRendererUtils.supportsPartialRendering(rc))
     {
-      
+
       String compositeId = getCompositeId(clientId);
 
       context.getResponseWriter().writeAttribute("id", compositeId, null );
     }
   }
 
-
   private PropertyKey _textKey;
   private PropertyKey _accessKeyKey;
 }

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyCheckboxRenderer.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/SimpleSelectManyCheckboxRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyCheckboxRenderer.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,17 +26,15 @@
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 import javax.faces.convert.Converter;
-
 import javax.faces.model.SelectItem;
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
-
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectManyCheckbox;
-
-import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.util.IntegerUtils;
+import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
+
 
 /**
  */
@@ -47,45 +45,47 @@
     this(CoreSelectManyCheckbox.TYPE);
   }
 
-  public SimpleSelectManyCheckboxRenderer(FacesBean.Type type)
+  public SimpleSelectManyCheckboxRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _accessKeyKey   = type.findKey("accessKey");
     _layoutKey = type.findKey("layout");
   }
 
-
   //
   // ENCODE BEHAVIOR
   //
   @Override
   protected void encodeElementContent(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    int[]               selectedIndices,
-    Converter           converter,
-    boolean             valuePassThru) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    int[]            selectedIndices,
+    Converter        converter,
+    boolean          valuePassThru
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
     writer.startElement("span", component);
     renderId(context, component);
     // Render all generic attributes, except styles (they go on the item),
     // and onclick (also on the item, see below)
-    renderAllAttributes(context, arc, bean, false /*no styles*/);
+    renderAllAttributes(context, rc, component, bean, false /*no styles*/);
 
-    boolean applyFieldSet = _applyFieldSetWrapper(arc);
+    boolean applyFieldSet = _applyFieldSetWrapper(rc);
     if (applyFieldSet)
     {
-      String shortDesc = getShortDesc(bean);
+      String shortDesc = getShortDesc(component, bean);
       if (shortDesc == null)
       {
         applyFieldSet = false;
@@ -95,14 +95,14 @@
         writer.startElement("fieldset", null);
         writer.writeAttribute("style", "border:none;margin:0px;padding:0px;", null);
         writer.startElement("legend", null);
-        renderStyleClass(context, arc,
+        renderStyleClass(context, rc,
                          SkinSelectors.HIDDEN_LABEL_STYLE_CLASS);
         writer.writeText(shortDesc, "shortDesc");
         writer.endElement("legend");
       }
     }
 
-    encodeSelectItems(context, arc, component, bean,
+    encodeSelectItems(context, rc, component, bean,
                       selectItems, selectedIndices, converter,
                       valuePassThru);
     if (applyFieldSet)
@@ -114,31 +114,32 @@
   }
 
   protected void encodeSelectItems(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    int[]               selectedIndices,
-    Converter           converter,
-    boolean             valuePassThru) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    int[]            selectedIndices,
+    Converter        converter,
+    boolean          valuePassThru
+    ) throws IOException
   {
     int size = (selectItems == null) ? 0 : selectItems.size();
 
-    boolean disabled = getDisabled(bean);
+    boolean disabled = getDisabled(component, bean);
     boolean isVertical = !CoreSelectManyCheckbox.LAYOUT_HORIZONTAL.equals(
-                           getLayout(bean));
+                           getLayout(component, bean));
     Object accessKey;
-    if (supportsAccessKeys(arc))
+    if (supportsAccessKeys(rc))
     {
-      accessKey = getAccessKey(bean);
+      accessKey = getAccessKey(component, bean);
     }
     else
     {
       accessKey = null;
     }
 
-    String itemOnclick = getItemOnclick(arc, bean);
+    String itemOnclick = getItemOnclick(rc, component, bean);
 
     boolean renderedOne = false;
     int selectedCount = selectedIndices.length;
@@ -152,7 +153,7 @@
         selectedEntry++;
 
       SelectItem item = selectItems.get(i);
-      if (encodeSelectItem(context, arc, component, item, converter,
+      if (encodeSelectItem(context, rc, component, item, converter,
                            valuePassThru, accessKey,
                            i, selected, disabled,
                            renderedOne && isVertical,
@@ -164,23 +165,24 @@
   }
 
   protected boolean encodeSelectItem(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    SelectItem          item,
-    Converter           converter,
-    boolean             valuePassThru,
-    Object              accessKey,
-    int                 index,
-    boolean             isSelected,
-    boolean             isDisabled,
-    boolean             renderBreak,
-    String              itemOnclick) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    SelectItem       item,
+    Converter        converter,
+    boolean          valuePassThru,
+    Object           accessKey,
+    int              index,
+    boolean          isSelected,
+    boolean          isDisabled,
+    boolean          renderBreak,
+    String           itemOnclick
+    ) throws IOException
   {
     if (item == null)
       return false;
 
-    String id = arc.getCurrentClientId();
+    String id = rc.getCurrentClientId();
     if (id == null)
       return false;
 
@@ -227,10 +229,10 @@
     // up the "form event handlers" in one pass (seems to be about
     // 8% sower this way)
     // Also render the events only if the browser supports JavaScript
-    if (supportsScripting(arc))
+    if (supportsScripting(rc))
     {
       rw.writeAttribute("onclick", itemOnclick, null);
-      renderItemFormEventHandlers(context, bean);
+      renderItemFormEventHandlers(context, component, bean);
     }
 
     rw.endElement("input");
@@ -253,21 +255,23 @@
 
   @Override
   protected void renderBetweenNonElements(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    if (CoreSelectManyCheckbox.LAYOUT_HORIZONTAL.equals(getLayout(bean)))
+    if (CoreSelectManyCheckbox.LAYOUT_HORIZONTAL.equals(getLayout(component, bean)))
       context.getResponseWriter().writeText(" ", null);
     else
-      super.renderBetweenNonElements(context, arc, component, bean);
+      super.renderBetweenNonElements(context, rc, component, bean);
   }
 
   @Override
   protected void renderId(
     FacesContext context,
-    UIComponent  component) throws IOException
+    UIComponent  component
+    ) throws IOException
   {
     if (shouldRenderId(context, component))
     {
@@ -284,47 +288,51 @@
   @Override
   protected void renderFormEventHandlers(
     FacesContext context,
-    FacesBean    bean) throws IOException
+    UIComponent  component,
+    FacesBean    bean
+    ) throws IOException
   {
   }
 
-
   /**
    * Disable rendering "onclick" on the parent;  it needs to
    * go on the individual radio buttons
    */
   @Override
   protected String getOnclick(
-    FacesBean bean
-    )
+    UIComponent component,
+    FacesBean   bean)
   {
     return null;
   }
 
-
   /**
    * Render the per-item event handlers
    */
   protected void renderItemFormEventHandlers(
     FacesContext context,
-    FacesBean    bean) throws IOException
+    UIComponent  component,
+    FacesBean    bean
+    ) throws IOException
   {
-    super.renderFormEventHandlers(context, bean);
+    super.renderFormEventHandlers(context, component, bean);
   }
 
-
   /**
    * Get the onclick for the individual checkboxes
    */
-  protected String getItemOnclick(RenderingContext arc, FacesBean bean)
+  protected String getItemOnclick(
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean)
   {
     // Get the overall onclick, and merge in any needed autosubmit script
-    String onclick = super.getOnclick(bean);
-    if (isAutoSubmit(bean))
+    String onclick = super.getOnclick(component, bean);
+    if (isAutoSubmit(component, bean))
     {
-      String source = LabelAndMessageRenderer.__getCachedClientId(arc);
-      boolean immediate = isImmediate(bean);
-      String auto = AutoSubmitUtils.getSubmitScript(arc,
+      String source = LabelAndMessageRenderer.__getCachedClientId(rc);
+      boolean immediate = isImmediate(component, bean);
+      String auto = AutoSubmitUtils.getSubmitScript(rc,
                                                     source,
                                                     XhtmlConstants.AUTOSUBMIT_EVENT,
                                                     immediate);
@@ -334,12 +342,16 @@
     return onclick;
   }
 
-  protected Object getAccessKey(FacesBean bean)
+  protected Object getAccessKey(
+    UIComponent component,
+    FacesBean   bean)
   {
     return bean.getProperty(_accessKeyKey);
   }
 
-  protected String getLayout(FacesBean bean)
+  protected String getLayout(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_layoutKey));
   }
@@ -347,38 +359,43 @@
   // Never render the "hidden label";  labels entirely go on the individual
   // items
   @Override
-  protected boolean isHiddenLabelRequired(RenderingContext arc)
+  protected boolean isHiddenLabelRequired(
+    RenderingContext rc)
   {
     return false;
-  } 
-  
+  }
+
   @Override
-  protected String getContentStyleClass(FacesBean bean)
+  protected String getContentStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
    return "af|selectManyCheckbox::content";
   }
-  
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
    return "af|selectManyCheckbox";
   }
-  
-  private static boolean _applyFieldSetWrapper(RenderingContext arc)
+
+  private static boolean _applyFieldSetWrapper(
+    RenderingContext rc)
   {
     // Don't bother with the output in inaccessible mode
-    if (isInaccessibleMode(arc))
+    if (isInaccessibleMode(rc))
       return false;
 
     // The fieldset trick doesn't work without support for hidden labels
-    if (!HiddenLabelUtils.supportsHiddenLabels(arc))
+    if (!HiddenLabelUtils.supportsHiddenLabels(rc))
       return true;
 
     return Boolean.TRUE.equals(
-       arc.getAgent().getCapabilities().get(TrinidadAgent.CAP_FIELDSET));
+       rc.getAgent().getCapabilities().get(TrinidadAgent.CAP_FIELDSET));
   }
 
-
   private PropertyKey _accessKeyKey;
   private PropertyKey _layoutKey;
 }

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyListboxRenderer.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/SimpleSelectManyListboxRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyListboxRenderer.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,16 @@
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 import javax.faces.convert.Converter;
-
 import javax.faces.model.SelectItem;
 import javax.faces.model.SelectItemGroup;
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
-
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectManyListbox;
-
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.util.IntegerUtils;
 
+
 /**
  * Renderer for SelectMany listboxes.
  * @todo Expose at least some of the decode behavior for access
@@ -50,13 +48,15 @@
     this(CoreSelectManyListbox.TYPE);
   }
 
-  public SimpleSelectManyListboxRenderer(FacesBean.Type type)
+  public SimpleSelectManyListboxRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _sizeKey = type.findKey("size");
@@ -64,23 +64,24 @@
 
   @Override
   protected void encodeElementContent(
-    FacesContext        context,
-    RenderingContext    arc,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    int[]               selectedIndices,
-    Converter           converter,
-    boolean             valuePassThru) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    int[]            selectedIndices,
+    Converter        converter,
+    boolean          valuePassThru
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
     writer.startElement("select", component);
     writer.writeAttribute("multiple", Boolean.TRUE, null);
     renderId(context, component);
-    renderAllAttributes(context, arc, bean, false);
-    
+    renderAllAttributes(context, rc, component, bean, false);
+
     int count = (selectItems == null) ? 0 : selectItems.size();
-    int size = SimpleSelectOneListboxRenderer.getListSize(getSize(bean),
+    int size = SimpleSelectOneListboxRenderer.getListSize(getSize(component, bean),
                                                           count, false);
 
     writer.writeAttribute("size", IntegerUtils.getString(size), "size");
@@ -108,7 +109,7 @@
             selectedEntry++;
 
           SimpleSelectOneRenderer.encodeOption(
-               context, arc, component, items[j], converter,
+               context, rc, component, items[j], converter,
                valuePassThru, counter++, selected);
         }
         writer.endElement("optgroup");
@@ -122,11 +123,11 @@
           selectedEntry++;
 
         SimpleSelectOneRenderer.encodeOption(
-             context, arc, component, item, converter,
+             context, rc, component, item, converter,
              valuePassThru, counter++, selected);
       }
     }
-    
+
     writer.endElement("select");
 
   }
@@ -136,15 +137,15 @@
    */
   @Override
   protected String getOnchange(
-    FacesBean bean
-    )
+    UIComponent component,
+    FacesBean   bean)
   {
-    String onchange = super.getOnchange(bean);
-    if (isAutoSubmit(bean))
+    String onchange = super.getOnchange(component, bean);
+    if (isAutoSubmit(component, bean))
     {
       RenderingContext arc = RenderingContext.getCurrentInstance();
       String source = LabelAndMessageRenderer.__getCachedClientId(arc);
-      boolean immediate = isImmediate(bean);
+      boolean immediate = isImmediate(component, bean);
       String auto = AutoSubmitUtils.getSubmitScript(arc, source,
                XhtmlConstants.AUTOSUBMIT_EVENT, immediate);
       onchange = XhtmlUtils.getChainedJS(onchange, auto, true);
@@ -153,30 +154,34 @@
     return onchange;
   }
 
-  protected int getSize(FacesBean bean)
+  protected int getSize(
+    UIComponent component,
+    FacesBean   bean)
   {
     Object o = bean.getProperty(_sizeKey);
     if (o == null)
       o = _sizeKey.getDefault();
     if (o == null)
       return -1;
-   
+
     return toInt(o);
   }
-  
+
   @Override
-  protected String getContentStyleClass(FacesBean bean)
+  protected String getContentStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectManyListbox::content";
   }
-  
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectManyListbox";
   }
-  
-  private PropertyKey _sizeKey;
-}
-
 
+  private PropertyKey _sizeKey;
+}
\ No newline at end of file

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.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/SimpleSelectManyRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectManyRenderer.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
@@ -33,23 +33,20 @@
 import javax.faces.context.ResponseWriter;
 import javax.faces.convert.Converter;
 import javax.faces.convert.ConverterException;
-
 import javax.faces.model.SelectItem;
 import javax.faces.model.SelectItemGroup;
 
-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.component.UIXSelectMany;
-import org.apache.myfaces.trinidad.util.MessageFactory;
-
-import org.apache.myfaces.trinidadinternal.convert.ConverterUtils;
 import org.apache.myfaces.trinidad.context.FormData;
 import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
+import org.apache.myfaces.trinidad.util.MessageFactory;
+import org.apache.myfaces.trinidadinternal.convert.ConverterUtils;
 import org.apache.myfaces.trinidadinternal.renderkit.uix.SelectItemSupport;
 
+
 /**
  * Renderer for SelectMany listboxes.
  * @todo Expose at least some of the decode behavior for access
@@ -57,13 +54,15 @@
  */
 abstract public class SimpleSelectManyRenderer extends FormInputRenderer
 {
-  public SimpleSelectManyRenderer(FacesBean.Type type)
+  public SimpleSelectManyRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
 
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _valuePassThruKey = type.findKey("valuePassThru");
@@ -80,7 +79,8 @@
   public Object getConvertedValue(
     FacesContext context,
     UIComponent  component,
-    Object       submittedValue) throws ConverterException
+    Object       submittedValue
+    ) throws ConverterException
   {
     // If "submittedValue" is null, something's gone wrong;  that
     // should be caught by editable component
@@ -91,18 +91,18 @@
       return null;
 
     FacesBean bean = getFacesBean(component);
-    Converter converter = getConverter(bean);
+    Converter converter = getConverter(component, bean);
     if ( converter == null)
-      converter = getDefaultConverter(context, bean);
+      converter = getDefaultConverter(context, component, bean);
 
     Class<?> modelClass = null;
-    ValueExpression expression = getValueExpression(bean);
+    ValueExpression expression = getValueExpression(component, bean);
     if (expression != null)
     {
       modelClass = expression.getType(context.getELContext());
     }
 
-    boolean valuePassThru = getValuePassThru(getFacesBean(component));
+    boolean valuePassThru = getValuePassThru(component, bean);
     if (!valuePassThru)
     {
       return _convertIndexedSubmittedValue(context,
@@ -150,9 +150,10 @@
   @Override
   protected Converter getDefaultConverter(
     FacesContext context,
+    UIComponent  copmonent,
     FacesBean    bean)
   {
-    ValueExpression expression = getValueExpression(bean);
+    ValueExpression expression = getValueExpression(copmonent, bean);
     if (expression == null)
       return null;
 
@@ -170,13 +171,13 @@
     return null;
   }
 
-
   static private Object _convertSubmittedValue(
     FacesContext context,
     UIComponent  component,
     Converter    converter,
     String[]     values,
-    Class<?>     modelClass) throws ConverterException
+    Class<?>     modelClass
+    ) throws ConverterException
   {
     // Handle lists
     if ((modelClass == null) || modelClass.isAssignableFrom(List.class))
@@ -233,7 +234,8 @@
     UIComponent  component,
     Converter    converter,
     String[]     values,
-    Class<?>     modelClass) throws ConverterException
+    Class<?>     modelClass
+    ) throws ConverterException
   {
     List<SelectItem> selectItems = getSelectItems(component, converter, true);
 
@@ -313,46 +315,47 @@
   }
 
   protected List<SelectItem> getSelectItems(
-    UIComponent component, 
-    Converter converter)
+    UIComponent component,
+    Converter   converter)
   {
     return getSelectItems(component, converter, false);
   }
 
   protected List<SelectItem> getSelectItems(
     UIComponent component,
-    Converter converter,
-    boolean filteredItems)
+    Converter   converter,
+    boolean     filteredItems)
   {
     return SelectItemSupport.getSelectItems(component, converter, filteredItems);
   }
 
   @Override
   protected void encodeAllAsElement(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    Converter converter = getConverter(bean);
+    Converter converter = getConverter(component, bean);
     if ( converter == null)
-      converter = getDefaultConverter(context, bean);
-    boolean valuePassThru = getValuePassThru(bean);
+      converter = getDefaultConverter(context, component, bean);
+    boolean valuePassThru = getValuePassThru(component, bean);
 
-    if (isAutoSubmit(bean))
-      AutoSubmitUtils.writeDependencies(context, arc);
+    if (isAutoSubmit(component, bean))
+      AutoSubmitUtils.writeDependencies(context, rc);
 
     // Only add in validators and converters when we're in valuePassThru
     // mode; otherwise, there's not enough on the client to even consider
-    FormData fData = arc.getFormData();
+    FormData fData = rc.getFormData();
     if (fData != null)
     {
       ((CoreFormData) fData).addOnSubmitConverterValidators(component,
                       valuePassThru ? converter : null,
-                      valuePassThru ? getValidators(bean) : null,
+                      valuePassThru ? getValidators(component, bean) : null,
                       getClientId(context, component),
-                      isImmediate(bean),
-                      getRequired(bean),
+                      isImmediate(component, bean),
+                      getRequired(component, bean),
                       getRequiredMessageKey());
     }
 
@@ -365,16 +368,16 @@
                                                valuePassThru);
 
     ResponseWriter writer = context.getResponseWriter();
-    boolean simple = getSimple(bean);
+    boolean simple = getSimple(component, bean);
     if (simple)
     {
       writer.startElement("span", component);
       // put the outer style class here, like af_selectManyRadio, styleClass,
       // inlineStyle, 'state' styles like p_AFDisabled, etc.
-      renderRootDomElementStyles(context, arc, component, bean);
+      renderRootDomElementStyles(context, rc, component, bean);
     }
     encodeElementContent(context,
-                         arc,
+                         rc,
                          component,
                          bean,
                          selectItems,
@@ -383,8 +386,8 @@
                          valuePassThru);
 
 
-    if (isHiddenLabelRequired(arc))
-      renderShortDescAsHiddenLabel(context, arc, component, bean);
+    if (isHiddenLabelRequired(rc))
+      renderShortDescAsHiddenLabel(context, rc, component, bean);
     if (simple)
     {
       writer.endElement("span");
@@ -394,47 +397,48 @@
   /**
    * Encode the content of a SelectMany component.
    * @param context the FacesContext
-   * @param arc  the AdfRenderingContext
+   * @param rc  the AdfRenderingContext
    * @param component the UIComponent
    * @param bean the FacesBean
    * @param selectItems a List of SelectItem instances
-   * @param selectItems a List of SelectItem instances
    */
   abstract protected void encodeElementContent(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    int[]               selectedIndices,
-    Converter           converter,
-    boolean             valuePassThru) throws IOException;
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    int[]            selectedIndices,
+    Converter        converter,
+    boolean          valuePassThru
+    ) throws IOException;
 
   @Override
   protected void renderNonElementContent(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     // http://issues.apache.org/jira/browse/ADFFACES-151
     // Getting default converter for null value leads to exception but
     // if value of component is null than there is no need to perform
     // this method
-    if (getValue(bean) == null)
+    if (getValue(component, bean) == null)
       return;
 
-    Converter converter = getConverter(bean);
+    Converter converter = getConverter(component, bean);
     if ( converter == null)
-      converter = getDefaultConverter(context, bean);
-    boolean valuePassThru = getValuePassThru(bean);
+      converter = getDefaultConverter(context, component, bean);
+    boolean valuePassThru = getValuePassThru(component, bean);
 
     // =-=AEW If needed, this could be made more efficient
     // by iterating through the list instead of getting
     // all the items
-    List<SelectItem> selectItems = 
+    List<SelectItem> selectItems =
       getSelectItems(component, converter);
-    
+
     int selectedIndices[] = getSelectedIndices(context,
                                                component,
                                                bean,
@@ -447,7 +451,7 @@
     {
       if (i > 0)
       {
-        renderBetweenNonElements(context, arc, component, bean);
+        renderBetweenNonElements(context, rc, component, bean);
       }
 
       SelectItem item = selectItems.get(selectedIndices[i]);
@@ -456,10 +460,11 @@
   }
 
   protected void renderBetweenNonElements(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement("br", component);
@@ -472,7 +477,9 @@
     return UIXSelectMany.REQUIRED_MESSAGE_ID;
   }
 
-  protected boolean getValuePassThru(FacesBean bean)
+  protected boolean getValuePassThru(
+    UIComponent component,
+    FacesBean   bean)
   {
     Object o = bean.getProperty(_valuePassThruKey);
     if (o == null)
@@ -481,7 +488,6 @@
     return Boolean.TRUE.equals(o);
   }
 
-
   /**
    * Returns true if the renderer cares about order.
    */
@@ -498,15 +504,15 @@
    */
   @SuppressWarnings("unchecked")
   protected int[] getSelectedIndices(
-    FacesContext        context,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    Converter           converter,
-    boolean             valuePassThru)
+    FacesContext     context,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    Converter        converter,
+    boolean          valuePassThru)
   {
     List<SelectItem> selectItemList =  flatItemList(selectItems);
-    Object submittedValue = getSubmittedValue(bean);
+    Object submittedValue = getSubmittedValue(component, bean);
     // In passthru mode, if there's a submitted value, we just
     // have to turn it into an array of ints and range-check it
     if ((submittedValue != null) && !valuePassThru)
@@ -532,7 +538,7 @@
     Object value;
     if (submittedValue == null)
     {
-      value = getValue(bean);
+      value = getValue(component, bean);
     }
     else
     {
@@ -710,7 +716,6 @@
                       component));
   }
 
-
   static private void _throwUnsupportedModelType(
     FacesContext context, Class<?> type, UIComponent component)
       throws ConverterException

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneChoiceRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneChoiceRenderer.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/SimpleSelectOneChoiceRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneChoiceRenderer.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,16 +26,14 @@
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 import javax.faces.convert.Converter;
-
 import javax.faces.model.SelectItem;
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
-
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectOneChoice;
-
 import org.apache.myfaces.trinidad.context.RenderingContext;
 
+
 /**
  */
 public class SimpleSelectOneChoiceRenderer extends SimpleSelectOneRenderer
@@ -45,14 +43,15 @@
     this(CoreSelectOneChoice.TYPE);
   }
 
-  public SimpleSelectOneChoiceRenderer(FacesBean.Type type)
+  public SimpleSelectOneChoiceRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
 
-
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _unselectedLabelKey = type.findKey("unselectedLabel");
@@ -60,43 +59,45 @@
 
   //
   // ENCODE BEHAVIOR
-  // 
+  //
   @Override
   protected void encodeElementContent(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    int                 selectedIndex,
-    Converter           converter,
-    boolean             valuePassThru) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    int              selectedIndex,
+    Converter        converter,
+    boolean          valuePassThru
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
     writer.startElement("select", component);
     renderId(context, component);
-    renderAllAttributes(context, arc, bean, false);
-    
-    encodeSelectItems(context, arc, component, bean,
+    renderAllAttributes(context, rc, component, bean, false);
+
+    encodeSelectItems(context, rc, component, bean,
                       selectItems, selectedIndex, converter,
                       valuePassThru);
-    
+
     writer.endElement("select");
   }
 
   protected void encodeSelectItems(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    int                 selectedIndex,
-    Converter           converter,
-    boolean             valuePassThru) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    int              selectedIndex,
+    Converter        converter,
+    boolean          valuePassThru
+    ) throws IOException
   {
     int size = (selectItems == null) ? 0 : selectItems.size();
 
-    String unselectedLabel = getUnselectedLabel(bean);
+    String unselectedLabel = getUnselectedLabel(component, bean);
 
     // Figure out if we need a label for "nothing is selected".
     // This happens if:
@@ -120,36 +121,34 @@
         unselectedLabel = "";
       SelectItem item = new SelectItem("", unselectedLabel, "", false);
       // @todo Restore the logic below
-      encodeOption(context, arc, component, item, null, true, -1, 
+      encodeOption(context, rc, component, item, null, true, -1,
                    false /*(selectedIndex < 0)*/);
     }
 
     for (int i = 0; i < size; i++)
     {
       SelectItem item = selectItems.get(i);
-      encodeOption(context, arc, component, item, converter,
+      encodeOption(context, rc, component, item, converter,
                    valuePassThru, i, selectedIndex == i);
     }
   }
 
-
-
   /**
    * In Internet Explorer, handle autosubmit.
    */
   @Override
   protected String getOnclick(
-    FacesBean bean)
+    UIComponent component,
+    FacesBean   bean)
   {
-    RenderingContext arc = RenderingContext.getCurrentInstance();
-    String onclick = super.getOnclick(bean);
-    
-    //PH: onclick should be included only for desktop IE since PIE and 
+    RenderingContext rc = RenderingContext.getCurrentInstance();
+    String onclick = super.getOnclick(component, bean);
+
+    //PH: onclick should be included only for desktop IE since PIE and
     //IE mobile do not support onclick on a select component
-    if (isIE(arc) && isDesktop(arc) 
-        && isAutoSubmit(bean) )
+    if (isIE(rc) && isDesktop(rc) && isAutoSubmit(component, bean))
     {
-      String auto = getAutoSubmitScript(arc, bean);
+      String auto = getAutoSubmitScript(rc, component,  bean);
       // On IE, if we autosubmit,
       // we get onChange events whenever a user keys through a SELECT
       // element. Therefore, we can't just fire in response to the
@@ -162,103 +161,109 @@
       auto = _IE_ACTION_HANDLER_PREFIX + auto;
       onclick = XhtmlUtils.getChainedJS(onclick, auto, true);
     }
-    
+
     return onclick;
   }
-  
+
   /**
    * In Internet Explorer, handle autosubmit.
    */
   @Override
   protected String getOnblur(
-    FacesBean bean)
+    UIComponent component,
+    FacesBean   bean)
   {
-    RenderingContext arc = RenderingContext.getCurrentInstance();
-    String onblur = super.getOnblur(bean);
-    
-    //PH: onblur should be included only for desktop IE since PIE and 
-    //IE mobile do not support onblur on a select component    
-    if (isIE(arc) &&  isDesktop(arc) && isAutoSubmit(bean) )
+    RenderingContext rc = RenderingContext.getCurrentInstance();
+    String onblur = super.getOnblur(component, bean);
+
+    //PH: onblur should be included only for desktop IE since PIE and
+    //IE mobile do not support onblur on a select component
+    if (isIE(rc) &&  isDesktop(rc) && isAutoSubmit(component, bean))
     {
-      String auto = getAutoSubmitScript(arc, bean);
+      String auto = getAutoSubmitScript(rc, component, bean);
       // See getOnclick()
       auto = _IE_ACTION_HANDLER_PREFIX + auto;
       onblur = XhtmlUtils.getChainedJS(onblur, auto, true);
     }
-     
+
     return onblur;
   }
 
-
   /**
    * Add autosubmit script, and autosync script.
    */
   @Override
   protected String getOnchange(
-    FacesBean bean
-    )
+    UIComponent component,
+    FacesBean   bean)
   {
-    RenderingContext arc = RenderingContext.getCurrentInstance();
+    RenderingContext rc = RenderingContext.getCurrentInstance();
 
-    String onchange = super.getOnchange(bean);
+    String onchange = super.getOnchange(component, bean);
     String auto = null;
     // Prepend the autosubmit script
-    if (isAutoSubmit(bean))
+    if (isAutoSubmit(component, bean))
     {
        // See getOnclick() for the explanation of the IE code.
-       // PH: The weird behaviour of an IE SELECT element as mentioned in 
+       // PH: The weird behaviour of an IE SELECT element as mentioned in
        // the getOnclick method above is not seen on PIE and IE Mobile.
        // Therefore, _CHOICE_CHANGE_TRACKER is not needed.
-       // Also, since PIE and IE Mobile do not support an 'onclick' javascript 
+       // Also, since PIE and IE Mobile do not support an 'onclick' javascript
        // handler on a SELECT element,
-       // autoSubmit script is added in the 'onchange' javascript handler.       
-      if (isIE(arc) && isDesktop(arc) )
+       // autoSubmit script is added in the 'onchange' javascript handler.
+      if (isIE(rc) && isDesktop(rc) )
         auto = _CHOICE_CHANGE_TRACKER;
       else
-        auto = getAutoSubmitScript(arc, bean);
+        auto = getAutoSubmitScript(rc, component, bean);
     }
 
     // And if we're in a repeating region, add in the synchronization
     // function
-    if (_isRepeatingRegion(arc))
+    if (_isRepeatingRegion(rc))
     {
       if (auto == null)
         auto = _SYNC_FUNC;
       else
         auto = (_SYNC_FUNC + ";") + auto;
-    }  
-    
+    }
+
     // And chain everything together
     return XhtmlUtils.getChainedJS(onchange, auto, true);
   }
 
   @Override
-  protected String getUnselectedLabel(FacesBean bean)
+  protected String getUnselectedLabel(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_unselectedLabelKey));
   }
-  
+
   @Override
-  protected String getContentStyleClass(FacesBean bean)
+  protected String getContentStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectOneChoice::content";
   }
-  
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectOneChoice";
-  }   
+  }
 
   // Is this choice in a branch of the tree that is repeated:
-  static private boolean _isRepeatingRegion(RenderingContext arc)
+  static private boolean _isRepeatingRegion(
+    RenderingContext rc)
   {
     // check to make sure that repeating property is set, and that this choice
     // has a name (see bug 3194812):
-    return (arc.getProperties().get(XhtmlConstants.REPEAT_PROPERTY) != null);
+    return (rc.getProperties().get(XhtmlConstants.REPEAT_PROPERTY) != null);
   }
 
-
   private PropertyKey _unselectedLabelKey;
 
   private static final String _SYNC_FUNC = "_syncChoiceIndex(this)";

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneListboxRenderer.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/SimpleSelectOneListboxRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneListboxRenderer.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,16 @@
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 import javax.faces.convert.Converter;
-
 import javax.faces.model.SelectItem;
 import javax.faces.model.SelectItemGroup;
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
-
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectOneListbox;
-
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.util.IntegerUtils;
 
+
 /**
  */
 public class SimpleSelectOneListboxRenderer extends SimpleSelectOneRenderer
@@ -46,15 +44,16 @@
   {
     this(CoreSelectOneListbox.TYPE);
   }
-  
-  public SimpleSelectOneListboxRenderer(FacesBean.Type type)
+
+  public SimpleSelectOneListboxRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
 
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _sizeKey = type.findKey("size");
@@ -62,16 +61,16 @@
   }
 
   static public int getListSize(
-    int     sizeAttr, 
-    int     itemCount,  
-    boolean addOne)  
+    int     sizeAttr,
+    int     itemCount,
+    boolean addOne)
   {
-   
+
     // Must have size > 1 or we'd render a choice!
     if (sizeAttr < 2)
     {
       sizeAttr = Math.min(8, Math.max(2, itemCount));
-      
+
       if (addOne)
         sizeAttr++;
     }
@@ -81,28 +80,29 @@
 
   //
   // ENCODE BEHAVIOR
-  // 
+  //
   @Override
   protected void encodeElementContent(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    int                 selectedIndex,
-    Converter           converter,
-    boolean             valuePassThru) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    int              selectedIndex,
+    Converter        converter,
+    boolean          valuePassThru
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
     writer.startElement("select", component);
     renderId(context, component);
-    renderAllAttributes(context, arc, bean, false);
-    
+    renderAllAttributes(context, rc, component, bean, false);
+
     int count = (selectItems == null) ? 0 : selectItems.size();
-    String unselectedLabel = getUnselectedLabel(bean);
+    String unselectedLabel = getUnselectedLabel(component, bean);
     boolean hasUnselectedLabel = (unselectedLabel != null);
-    
-    int size = getListSize(getSize(bean), count, hasUnselectedLabel);    
+
+    int size = getListSize(getSize(component, bean), count, hasUnselectedLabel);
 
     writer.writeAttribute("size", IntegerUtils.getString(size), "size");
 
@@ -110,7 +110,7 @@
     {
       SelectItem item = new SelectItem("", unselectedLabel, "", false);
       // @todo Restore the logic below
-      encodeOption(context, arc, component, item, null, true, -1, 
+      encodeOption(context, rc, component, item, null, true, -1,
                    (selectedIndex < 0));
     }
 
@@ -127,7 +127,7 @@
 
           for(int j = 0; j < items.length; j++)
           {
-             encodeOption(context, arc, component, items[j], converter,
+             encodeOption(context, rc, component, items[j], converter,
                           valuePassThru, counter, selectedIndex == counter);
              counter++;
 
@@ -136,17 +136,19 @@
        }
        else
        {
-          encodeOption(context, arc, component, item, converter,
+          encodeOption(context, rc, component, item, converter,
                        valuePassThru, counter, selectedIndex == counter);
           counter++;
        }
     }
-    
+
     writer.endElement("select");
   }
 
   @Override
-  protected String getUnselectedLabel(FacesBean bean)
+  protected String getUnselectedLabel(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_unselectedLabelKey));
   }
@@ -156,43 +158,49 @@
    */
   @Override
   protected String getOnchange(
-    FacesBean bean
-    )
+    UIComponent component,
+    FacesBean   bean)
   {
-    String onchange = super.getOnchange(bean);
-    if (isAutoSubmit(bean))
+    String onchange = super.getOnchange(component, bean);
+    if (isAutoSubmit(component, bean))
     {
-      RenderingContext arc = RenderingContext.getCurrentInstance();
-      String auto = getAutoSubmitScript(arc, bean);
+      RenderingContext rc = RenderingContext.getCurrentInstance();
+      String auto = getAutoSubmitScript(rc, component, bean);
       return XhtmlUtils.getChainedJS(onchange, auto, true);
     }
 
     return onchange;
   }
 
-  protected int getSize(FacesBean bean)
+  protected int getSize(
+    UIComponent component,
+    FacesBean   bean)
   {
     Object o = bean.getProperty(_sizeKey);
     if (o == null)
       o = _sizeKey.getDefault();
     if (o == null)
       return -1;
-   
+
     return toInt(o);
   }
-  
+
   @Override
-  protected String getContentStyleClass(FacesBean bean)
+  protected String getContentStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectOneListbox::content";
   }
-  
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectOneListbox";
   }
-  
+
   private PropertyKey _sizeKey;
   private PropertyKey _unselectedLabelKey;
 }

Modified: myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRadioRenderer.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/SimpleSelectOneRadioRenderer.java (original)
+++ myfaces/trinidad/branches/ar_clientBehaviors/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleSelectOneRadioRenderer.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,17 +26,15 @@
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 import javax.faces.convert.Converter;
-
 import javax.faces.model.SelectItem;
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
-
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectOneRadio;
-
-import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.util.IntegerUtils;
+import org.apache.myfaces.trinidadinternal.agent.TrinidadAgent;
+
 
 /**
  */
@@ -47,13 +45,15 @@
     this(CoreSelectOneRadio.TYPE);
   }
 
-  public SimpleSelectOneRadioRenderer(FacesBean.Type type)
+  public SimpleSelectOneRadioRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
 
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _accessKeyKey   = type.findKey("accessKey");
@@ -61,32 +61,32 @@
     _unselectedLabelKey = type.findKey("unselectedLabel");
   }
 
-
   //
   // ENCODE BEHAVIOR
   //
   @Override
   protected void encodeElementContent(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    int                 selectedIndex,
-    Converter           converter,
-    boolean             valuePassThru) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    int              selectedIndex,
+    Converter        converter,
+    boolean          valuePassThru
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
     writer.startElement("span", component);
     renderId(context, component);
     // Render all generic attributes, except styles (they go on the item),
     // and onclick (also on the item, see below)
-    renderAllAttributes(context, arc, bean, false /*no styles*/);
+    renderAllAttributes(context, rc, component, bean, false /*no styles*/);
 
-    boolean applyFieldSet = _applyFieldSetWrapper(arc);
+    boolean applyFieldSet = _applyFieldSetWrapper(rc);
     if (applyFieldSet)
     {
-      String shortDesc = getShortDesc(bean);
+      String shortDesc = getShortDesc(component, bean);
       if (shortDesc == null)
       {
         applyFieldSet = false;
@@ -96,14 +96,14 @@
         writer.startElement("fieldset", null);
         writer.writeAttribute("style", "border:none;margin:0px;padding:0px;", null);
         writer.startElement("legend", null);
-        renderStyleClass(context, arc,
+        renderStyleClass(context, rc,
                          SkinSelectors.HIDDEN_LABEL_STYLE_CLASS);
         writer.writeText(shortDesc, "shortDesc");
         writer.endElement("legend");
       }
     }
 
-    encodeSelectItems(context, arc, component, bean,
+    encodeSelectItems(context, rc, component, bean,
                       selectItems, selectedIndex, converter,
                       valuePassThru);
     if (applyFieldSet)
@@ -115,38 +115,39 @@
   }
 
   protected void encodeSelectItems(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean,
-    List<SelectItem>    selectItems,
-    int                 selectedIndex,
-    Converter           converter,
-    boolean             valuePassThru) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    List<SelectItem> selectItems,
+    int              selectedIndex,
+    Converter        converter,
+    boolean          valuePassThru
+    ) throws IOException
   {
     int size = (selectItems == null) ? 0 : selectItems.size();
 
-    boolean disabled = getDisabled(bean);
+    boolean disabled = getDisabled(component, bean);
     boolean isVertical = !CoreSelectOneRadio.LAYOUT_HORIZONTAL.equals(
-                           getLayout(bean));
+                           getLayout(component, bean));
     Object accessKey;
-    if (supportsAccessKeys(arc))
+    if (supportsAccessKeys(rc))
     {
-      accessKey = getAccessKey(bean);
+      accessKey = getAccessKey(component, bean);
     }
     else
     {
       accessKey = null;
     }
 
-    String itemOnclick = getItemOnclick(arc, bean);
+    String itemOnclick = getItemOnclick(rc, component, bean);
 
     boolean renderedOne = false;
-    String unselectedLabel = getUnselectedLabel(bean);
+    String unselectedLabel = getUnselectedLabel(component, bean);
     if (unselectedLabel != null)
     {
       SelectItem item = new SelectItem("", unselectedLabel, "", false);
-      encodeSelectItem(context, arc, component, item, null, true,
+      encodeSelectItem(context, rc, component, item, null, true,
                        accessKey, -1,  selectedIndex < 0, disabled, false,
                        itemOnclick);
       renderedOne = true;
@@ -155,7 +156,7 @@
     for (int i = 0; i < size; i++)
     {
       SelectItem item = selectItems.get(i);
-      if (encodeSelectItem(context, arc, component, item, converter,
+      if (encodeSelectItem(context, rc, component, item, converter,
                            valuePassThru, accessKey,
                            i, selectedIndex == i, disabled,
                            renderedOne && isVertical,
@@ -167,23 +168,24 @@
   }
 
   protected boolean encodeSelectItem(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    SelectItem          item,
-    Converter           converter,
-    boolean             valuePassThru,
-    Object              accessKey,
-    int                 index,
-    boolean             isSelected,
-    boolean             isDisabled,
-    boolean             renderBreak,
-    String              itemOnclick) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    SelectItem       item,
+    Converter        converter,
+    boolean          valuePassThru,
+    Object           accessKey,
+    int              index,
+    boolean          isSelected,
+    boolean          isDisabled,
+    boolean          renderBreak,
+    String           itemOnclick
+    ) throws IOException
   {
     if (item == null)
       return false;
 
-    String id = arc.getCurrentClientId();
+    String id = rc.getCurrentClientId();
     if (id == null)
       return false;
 
@@ -230,10 +232,10 @@
     // up the "form event handlers" in one pass (seems to be about
     // 8% slower this way)
     // render the events only if the browser supports JavaScript
-    if (supportsScripting(arc))
+    if (supportsScripting(rc))
     {
       rw.writeAttribute("onclick", itemOnclick, null);
-      renderItemFormEventHandlers(context, bean);
+      renderItemFormEventHandlers(context, component, bean);
     }
 
     rw.endElement("input");
@@ -257,7 +259,8 @@
   @Override
   protected void renderId(
     FacesContext context,
-    UIComponent  component) throws IOException
+    UIComponent  component
+    ) throws IOException
   {
     if (shouldRenderId(context, component))
     {
@@ -274,47 +277,51 @@
   @Override
   protected void renderFormEventHandlers(
     FacesContext context,
-    FacesBean    bean) throws IOException
+    UIComponent  component,
+    FacesBean    bean
+    ) throws IOException
   {
   }
 
-
   /**
    * Disable rendering "onclick" on the parent;  it needs to
    * go on the individual radio buttons
    */
   @Override
   protected String getOnclick(
-    FacesBean bean
-    )
+    UIComponent component,
+    FacesBean   bean)
   {
     return null;
   }
 
-
   /**
    * Render the per-item event handlers
    */
   protected void renderItemFormEventHandlers(
     FacesContext context,
-    FacesBean    bean) throws IOException
+    UIComponent  component,
+    FacesBean    bean
+    ) throws IOException
   {
-    super.renderFormEventHandlers(context, bean);
+    super.renderFormEventHandlers(context, component, bean);
   }
 
-
   /**
    * Get the onclick for the individual radio buttons.
    */
-  protected String getItemOnclick(RenderingContext arc, FacesBean bean)
+  protected String getItemOnclick(
+    RenderingContext rc,
+    UIComponent component,
+    FacesBean   bean)
   {
     // Get the overall onclick, and merge in any needed autosubmit script
-    String onclick = super.getOnclick(bean);
-    if (isAutoSubmit(bean))
+    String onclick = super.getOnclick(component, bean);
+    if (isAutoSubmit(component, bean))
     {
-      String source = LabelAndMessageRenderer.__getCachedClientId(arc);
-      boolean immediate = isImmediate(bean);
-      String auto = AutoSubmitUtils.getSubmitScript(arc,
+      String source = LabelAndMessageRenderer.__getCachedClientId(rc);
+      boolean immediate = isImmediate(component, bean);
+      String auto = AutoSubmitUtils.getSubmitScript(rc,
                                                     source,
                                                     XhtmlConstants.AUTOSUBMIT_EVENT,
                                                     immediate);
@@ -324,18 +331,24 @@
     return onclick;
   }
 
-  protected Object getAccessKey(FacesBean bean)
+  protected Object getAccessKey(
+    UIComponent component,
+    FacesBean   bean)
   {
     return bean.getProperty(_accessKeyKey);
   }
 
-  protected String getLayout(FacesBean bean)
+  protected String getLayout(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_layoutKey));
   }
 
   @Override
-  protected String getUnselectedLabel(FacesBean bean)
+  protected String getUnselectedLabel(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_unselectedLabelKey));
   }
@@ -343,38 +356,43 @@
   // Never render the "hidden label";  labels entirely go on the individual
   // items
   @Override
-  protected boolean isHiddenLabelRequired(RenderingContext arc)
+  protected boolean isHiddenLabelRequired(
+    RenderingContext rc)
   {
     return false;
   }
-   
+
   @Override
-  protected String getContentStyleClass(FacesBean bean)
+  protected String getContentStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectOneRadio::content";
   }
-  
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectOneRadio";
-  }     
+  }
 
-  private static boolean _applyFieldSetWrapper(RenderingContext arc)
+  private static boolean _applyFieldSetWrapper(
+    RenderingContext rc)
   {
     // Don't bother with the output in inaccessible mode
-    if (isInaccessibleMode(arc))
+    if (isInaccessibleMode(rc))
       return false;
 
     // The fieldset trick doesn't work without support for hidden labels
-    if (!HiddenLabelUtils.supportsHiddenLabels(arc))
+    if (!HiddenLabelUtils.supportsHiddenLabels(rc))
       return true;
 
     return Boolean.TRUE.equals(
-       arc.getAgent().getCapabilities().get(TrinidadAgent.CAP_FIELDSET));
+       rc.getAgent().getCapabilities().get(TrinidadAgent.CAP_FIELDSET));
   }
 
-
   private PropertyKey _accessKeyKey;
   private PropertyKey _layoutKey;
   private PropertyKey _unselectedLabelKey;