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/17 03:33:11 UTC

svn commit: r891522 [13/28] - in /myfaces/trinidad/branches/trinidad-2.0.x: ./ trinidad-api/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/ trinidad-api/src/main/java/org/a...

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PdaPanelPageHeaderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PdaPanelPageHeaderRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PdaPanelPageHeaderRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PdaPanelPageHeaderRenderer.java Thu Dec 17 02:33:05 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,11 +22,10 @@
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-
 import javax.faces.context.ResponseWriter;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.layout.CorePanelPageHeader;
-
 import org.apache.myfaces.trinidad.context.RenderingContext;
 
 
@@ -50,30 +49,31 @@
 
   @Override
   protected void encodeAll(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
 
-    UIComponent branding        = getFacet(component,
-                                           CorePanelPageHeader.BRANDING_FACET);
-    UIComponent brandingApp     = getFacet(component,
-                                       CorePanelPageHeader.BRANDING_APP_FACET);
-    UIComponent navigation1           = getFacet(component,
-                                           CorePanelPageHeader.NAVIGATION1_FACET);
-    UIComponent navigation2           = getFacet(component,
-                                           CorePanelPageHeader.NAVIGATION2_FACET);
+    UIComponent branding    = getFacet(component,
+                                CorePanelPageHeader.BRANDING_FACET);
+    UIComponent brandingApp = getFacet(component,
+                                CorePanelPageHeader.BRANDING_APP_FACET);
+    UIComponent navigation1 = getFacet(component,
+                                CorePanelPageHeader.NAVIGATION1_FACET);
+    UIComponent navigation2 = getFacet(component,
+                                CorePanelPageHeader.NAVIGATION2_FACET);
     writer.startElement("span", component);
-    renderAllAttributes(context, arc, bean);
+    renderAllAttributes(context, rc, component, bean);
     renderId(context, component);
 
     if( branding != null)
       encodeChild(context, branding);
 
     if (branding != null && brandingApp != null)
-      renderSpacer(context, arc, "5", "1");
+      renderSpacer(context, rc, "5", "1");
 
     if(brandingApp != null)
       encodeChild(context, brandingApp);
@@ -85,7 +85,6 @@
       encodeChild(context, navigation1);
     }
 
-
     if( navigation2 != null)
     {
       writer.startElement("div", null);
@@ -94,6 +93,5 @@
     }
 
     writer.endElement("span");
-
   }
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PollRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PollRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PollRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/PollRenderer.java Thu Dec 17 02:33:05 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
@@ -36,6 +36,7 @@
 import org.apache.myfaces.trinidad.event.PollEvent;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
+
 /**
  * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/laf/base/desktop/PollRenderer.java#0 $) $Date: 10-nov-2005.18:55:33 $
  */
@@ -48,17 +49,19 @@
 
   @SuppressWarnings("unchecked")
   @Override
-  public void decode(FacesContext context, UIComponent component)
+  public void decode(
+    FacesContext context,
+    UIComponent  component)
   {
-    Map<String, String> parameters = 
+    Map<String, String> parameters =
       context.getExternalContext().getRequestParameterMap();
-    
+
     Object event = parameters.get(XhtmlConstants.EVENT_PARAM);
     if (XhtmlConstants.POLL_EVENT.equals(event))
     {
       Object source = parameters.get(XhtmlConstants.SOURCE_PARAM);
       String id = component.getClientId(context);
-      
+
       if (id.equals(source))
       {
         // This component always uses PPR (unless not supported at all)
@@ -77,7 +80,8 @@
   }
 
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _intervalKey = type.findKey("interval");
@@ -91,10 +95,11 @@
 
   @Override
   protected void encodeAll(
-    FacesContext        context,
-    RenderingContext    rc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     XhtmlUtils.addLib(context, rc, "PollManager()");
     ResponseWriter rw = context.getResponseWriter();
@@ -116,20 +121,20 @@
 
   /**
    * A page should not auto-refresh while in screen-reader mode.
-   * In this case, we create a button which when clicked will send the 
+   * In this case, we create a button which when clicked will send the
    * "poll" event. This is instead of the setTimeout javascript function,
-   * which we render when not in screen-reader mode.     
+   * which we render when not in screen-reader mode.
    */
   private void _renderManualRefresh(
-    FacesContext        context,
-    RenderingContext    rc,
-    UIComponent         component,
-    FacesBean           bean
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
     ) throws IOException
   {
     String elementID = getClientId(context, component);
     boolean isPartial = PartialPageUtils.supportsPartialRendering(rc);
-    String onclick = _getScriptContents(rc, bean, elementID, isPartial, false);
+    String onclick = _getScriptContents(rc, component, bean, elementID, isPartial, false);
 
     CoreGoButton goButton = new CoreGoButton();
     goButton.setOnclick(onclick);
@@ -138,21 +143,21 @@
     goButton.encodeBegin(context);
     goButton.encodeEnd(context);
   }
-      
+
   /**
    * Renders a script which sends a 'poll' event after a timeout.
    */
   private void _renderPollingScript(
-    FacesContext        context,
-    RenderingContext    rc,
-    UIComponent         component,
-    FacesBean           bean
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
     ) throws IOException
   {
     String elementID = getClientId(context, component);
     boolean isPartial = PartialPageUtils.supportsPartialRendering(rc);
-    String buffer = 
-      _getScriptContents(rc, bean, elementID, isPartial, true);
+    String buffer =
+      _getScriptContents(rc, component, bean, elementID, isPartial, true);
 
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement("script", component);
@@ -160,9 +165,11 @@
     renderScriptDeferAttribute(context, rc);
     rw.writeText(buffer, null);
     rw.endElement("script");
-  } 
+  }
 
-  protected int getInterval(FacesBean bean)
+  protected int getInterval(
+    UIComponent component,
+    FacesBean   bean)
   {
     Object o = bean.getProperty(_intervalKey);
     if (o == null)
@@ -181,24 +188,25 @@
   * extract the attributes of the poll element and build
   * a script.
   * the javascript function we build depends on whether the page is refreshed
-  * full or partially, and whether or not it is in a form and whether or 
+  * full or partially, and whether or not it is in a form and whether or
   * not it should be auto-refreshed. For auto-refresh, then
   * the script is a setTimeout script. For manual-refresh
   * this will be the same script we render,
   * but minus the setTimeout call. In manual-refresh mode
-  * the user will need to click on a button 
+  * the user will need to click on a button
   * to send the 'poll' event
   */
-  private String _getScriptContents( 
-      RenderingContext rc,
-      FacesBean        bean,
-      String           elementID,
-      boolean          isPartial,
-      boolean          isAutoRefreshMode
+  private String _getScriptContents(
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    String           elementID,
+    boolean          isPartial,
+    boolean          isAutoRefreshMode
     )
   {
-    // We will build a script like one of the following: 
-    // (these examples assume isAutoRefreshMode is false, 
+    // We will build a script like one of the following:
+    // (these examples assume isAutoRefreshMode is false,
     // if isAutoRefreshMode is true, these commands are registered in the
     // _TrPollManager javascript object, which will manage executing this commands
     // at the specified pollInterval.)
@@ -207,40 +215,40 @@
     // "_submitPartialChange('formName',0,{event:'poll',source:'pollingWidgetId',
     //    partialTargets:'pollingWidgetId', partial='true'})")
     // Full page refresh when the poll component is inside of a form:
-    // "submitForm('formName',0,{event:'poll', source:'pollingWidgetId'}), 
+    // "submitForm('formName',0,{event:'poll', source:'pollingWidgetId'}),
     //    timeoutMS)
     /* -------------------------------------------------------- */
-    
+
     // get variables needed to create the javascript function
     int pollInterval = 0;
     if (isAutoRefreshMode)
     {
-      pollInterval = getInterval(bean);
+      pollInterval = getInterval(component, bean);
     }
-    
+
     if (rc.getFormData() == null)
     {
       _LOG.warning("POLL_COMPONENT_MUST_INSIDE_FORM", elementID);
       return null;
     }
 
-    String startScript = _getStartScript(isPartial, 
+    String startScript = _getStartScript(isPartial,
                                    isAutoRefreshMode,
                                    elementID);
-    String argumentString = _getArgumentString(elementID, 
+    String argumentString = _getArgumentString(elementID,
                                                rc.getFormData().getName(),
                                                isPartial);
-    int length = _getScriptBufferLength(startScript, 
+    int length = _getScriptBufferLength(startScript,
                                         argumentString,
                                         pollInterval,
                                         isAutoRefreshMode);
 
     // build the script:
     StringBuilder builder = new StringBuilder(length);
-    
+
     builder.append(startScript);
-    
-    //pu: In manual-refresh mode, submit is through onclick of button, not an 
+
+    //pu: In manual-refresh mode, submit is through onclick of button, not an
     //  auto-scheduled command string, hence no escaping "'" in arguments.
     if (_isAutoRefreshMode(rc))
     {
@@ -250,7 +258,7 @@
     {
       builder.append(argumentString);
     }
-    
+
     // auto-refresh is not allowed in accessible mode.
     // So render the pollInterval portion only if in auto-refresh mode.
     if (isAutoRefreshMode)
@@ -258,16 +266,16 @@
       builder.append(_MIDDLE_SCRIPT_AUTO_REFRESH);
       builder.append(pollInterval);
     }
-    
+
     builder.append(_END_SCRIPT);
 
     return builder.toString();
   }
 
- 
+
   /**
   * Computes the length of the buffer that is needed to build up the script
-  */ 
+  */
   private static int _getScriptBufferLength(
     String  startScript,
     String  argumentString,
@@ -279,25 +287,25 @@
     {
       return 0;
     }
-    
-    int length =  startScript.length() + 
-                  argumentString.length() + 
+
+    int length =  startScript.length() +
+                  argumentString.length() +
                   _MIDDLE_SCRIPT_AUTO_REFRESH.length() +
                   _END_SCRIPT.length();
-                  
+
     if (isAutoRefreshMode && (pollInterval != null))
     {
      length +=  pollInterval.toString().length() + 3;
     }
-   
+
     return length;
   }
-  
+
   /**
   * Returns the start script. The start script depends on whether the poll
   * element is within a form and whether the page is in PPR mode and whether
   * the page is in auto-refresh mode.
-  */ 
+  */
   private static String _getStartScript(
     boolean isPartial,
     boolean isAutoRefreshMode,
@@ -320,21 +328,21 @@
     {
       startScript += _START_SCRIPT_FULL_FORM;
     }
-    
+
     return startScript;
   }
 
   /**
    * Returns a String which will be used as the JavaScript arguments: either
-   * a URL with event information or the needed arguments to 
+   * a URL with event information or the needed arguments to
    * submitForm/_submitPartialChange.
    * e.g., if within a form and PPR, the argument string is:
    * 'myform',0,{event:'poll',source:'polling-widget'}",
-  */ 
+  */
   private static String _getArgumentString(
-    String           elementID,
-    String           formName,
-    boolean          isPartial
+    String  elementID,
+    String  formName,
+    boolean isPartial
     )
   {
     StringBuilder buffer = new StringBuilder(60);
@@ -367,7 +375,7 @@
 
   // script constants
   // Script for initializing the auto mode for the command
-  private static final String _PRE_START_SCRIPT_AUTO_REFRESH = 
+  private static final String _PRE_START_SCRIPT_AUTO_REFRESH =
   " if (!self._trPollManager) _trPollManager = new _TrPollManager(); _trPollManager.addAndActivate(\"";
 
   private static final String _START_SCRIPT_PARTIAL_FORM =
@@ -375,8 +383,8 @@
   private static final String _START_SCRIPT_FULL_FORM =
     "submitForm(";
   private static final String _END_SCRIPT     = ");";
-  private static final String _MIDDLE_SCRIPT_AUTO_REFRESH  = ")\", "; 
-  
+  private static final String _MIDDLE_SCRIPT_AUTO_REFRESH  = ")\", ";
+
   private static final int _POLL_INTERVAL_DEFAULT = 5000;
 
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(PollRenderer.class);

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ResetButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ResetButtonRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ResetButtonRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ResetButtonRenderer.java Thu Dec 17 02:33:05 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
@@ -18,10 +18,13 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
+import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.input.CoreResetButton;
 import org.apache.myfaces.trinidad.context.RenderingContext;
 
+
 public class ResetButtonRenderer extends CommandButtonRenderer
 {
   public ResetButtonRenderer()
@@ -42,9 +45,11 @@
   }
 
   @Override
-  protected String getOnclick(FacesBean bean)
+  protected String getOnclick(
+    UIComponent component,
+    FacesBean   bean)
   {
-    String onclick = getComponentOnclick(bean);
+    String onclick = getComponentOnclick(component, bean);
 
     RenderingContext arc = RenderingContext.getCurrentInstance();
     if (arc.getFormData() != null)
@@ -58,24 +63,30 @@
                                           true);
       }
     }
-    
+
     return onclick;
   }
 
   @Override
-  protected String getDefaultStyleClass(FacesBean bean)
+  protected String getDefaultStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return SkinSelectors.AF_RESET_BUTTON_STYLE_CLASS;
   }
 
   @Override
-  protected String getIcon(FacesBean bean)
+  protected String getIcon(
+    UIComponent component,
+    FacesBean   bean)
   {
     return null;
   }
 
   @Override
-  protected boolean getPartialSubmit(FacesBean bean)
+  protected boolean getPartialSubmit(
+    UIComponent component,
+    FacesBean   bean)
   {
     return false;
   }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanCheckboxRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanCheckboxRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanCheckboxRenderer.java Thu Dec 17 02:33:05 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
@@ -18,55 +18,61 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
+import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectBooleanCheckbox;
 
 
 public class SelectBooleanCheckboxRenderer extends InputLabelAndMessageRenderer
 {
-
   public SelectBooleanCheckboxRenderer()
   {
     super(CoreSelectBooleanCheckbox.TYPE);
-  }  
-  
-  protected SelectBooleanCheckboxRenderer(FacesBean.Type type)
+  }
+
+  protected SelectBooleanCheckboxRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _simpleSelectBooleanCheckbox = new SimpleSelectBooleanCheckboxRenderer(type);
   }
 
-
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectBooleanCheckbox";
   }
-  
+
   @Override
   protected boolean isIndented()
   {
     return true;
-  }  
+  }
 
   /**
    * Don't render <label> on the label portion if there's
    * a "text" attribute set.
    */
   @Override
-  protected boolean hasOwnLabel(FacesBean bean)
+  protected boolean hasOwnLabel(
+    UIComponent component,
+    FacesBean   bean)
   {
-    String text = _simpleSelectBooleanCheckbox.getText(bean);
-    
+    String text = _simpleSelectBooleanCheckbox.getText(component, bean);
+
     if (text != null)
       return true;
-      
+
     return false;
   }
 
@@ -74,7 +80,7 @@
   protected FormInputRenderer getFormInputRenderer()
   {
     return _simpleSelectBooleanCheckbox;
-  }  
+  }
 
   private SimpleSelectBooleanCheckboxRenderer _simpleSelectBooleanCheckbox;
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanRadioRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanRadioRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectBooleanRadioRenderer.java Thu Dec 17 02:33:05 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
@@ -18,49 +18,56 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
+import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectBooleanRadio;
 
+
 public class SelectBooleanRadioRenderer extends InputLabelAndMessageRenderer
 {
-
   public SelectBooleanRadioRenderer()
   {
     super(CoreSelectBooleanRadio.TYPE);
-    
-  } 
 
-  protected SelectBooleanRadioRenderer(FacesBean.Type type)
+  }
+
+  protected SelectBooleanRadioRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _simpleSelectBooleanRadio = new SimpleSelectBooleanRadioRenderer(type);
   }
 
-  
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectBooleanRadio";
   }
-  
+
   /**
    * selectBooleanRadio should not render a &lt;label&gt; on itself
    * if "text" is set.
-   */ 
+   */
   @Override
-  protected boolean hasOwnLabel(FacesBean bean)
+  protected boolean hasOwnLabel(
+    UIComponent component,
+    FacesBean   bean)
   {
-    String text = _simpleSelectBooleanRadio.getText(bean);
-    
+    String text = _simpleSelectBooleanRadio.getText(component, bean);
+
     if (text != null)
       return true;
-      
+
     return false;
   }
 
@@ -68,13 +75,13 @@
   protected boolean isIndented()
   {
     return true;
-  }  
- 
+  }
+
   @Override
   protected FormInputRenderer getFormInputRenderer()
   {
     return _simpleSelectBooleanRadio;
-  }  
+  }
 
   private SimpleSelectBooleanRadioRenderer _simpleSelectBooleanRadio;
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyCheckboxRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyCheckboxRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyCheckboxRenderer.java Thu Dec 17 02:33:05 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
@@ -18,6 +18,8 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
+import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectManyCheckbox;
@@ -25,57 +27,68 @@
 
 public class SelectManyCheckboxRenderer extends InputLabelAndMessageRenderer
 {
-
   public SelectManyCheckboxRenderer()
   {
     super(CoreSelectManyCheckbox.TYPE);
   }
-  
-  protected SelectManyCheckboxRenderer(FacesBean.Type type)
+
+  protected SelectManyCheckboxRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _layoutKey = type.findKey("layout");
     _simpleSelectManyCheckbox = new SimpleSelectManyCheckboxRenderer(type);
-  } 
-  
+  }
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectManyCheckbox";
   }
-  
-  protected String getLayout(FacesBean bean)
+
+  protected String getLayout(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_layoutKey));
   }
 
   @Override
-  protected String getDefaultLabelValign(FacesBean bean)
+  protected String getDefaultLabelValign(
+    UIComponent component,
+    FacesBean   bean)
   {
     // Don't top-align for horizontal radio buttons.
-    if (CoreSelectManyCheckbox.LAYOUT_HORIZONTAL.equals(getLayout(bean)))
-      return super.getDefaultLabelValign(bean);
+    if (CoreSelectManyCheckbox.LAYOUT_HORIZONTAL.equals(getLayout(component, bean)))
+      return super.getDefaultLabelValign(component, bean);
 
     return "top";
   }
 
   /**
    * selectManyCheckbox should not render a &lt;label&gt; on itself.
-   */ 
+   */
   @Override
-  protected boolean hasOwnLabel(FacesBean bean)
+  protected boolean hasOwnLabel(
+    UIComponent component,
+    FacesBean   bean)
   {
     return true;
   }
-  
+
   @Override
-  protected boolean showAccessKeyOnLabel(FacesBean bean)
+  protected boolean showAccessKeyOnLabel(
+    UIComponent component,
+    FacesBean   bean)
   {
     return true;
   }
@@ -84,7 +97,7 @@
   protected FormInputRenderer getFormInputRenderer()
   {
     return _simpleSelectManyCheckbox;
-  }  
+  }
 
   private PropertyKey _layoutKey;
 

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyListboxRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyListboxRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyListboxRenderer.java Thu Dec 17 02:33:05 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
@@ -18,38 +18,45 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
+import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectManyListbox;
 
 
 public class SelectManyListboxRenderer extends InputLabelAndMessageRenderer
 {
-
   public SelectManyListboxRenderer()
   {
     super(CoreSelectManyListbox.TYPE);
-  }  
-  
-  protected SelectManyListboxRenderer(FacesBean.Type type)
+  }
+
+  protected SelectManyListboxRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _simpleSelectManyListbox = new SimpleSelectManyListboxRenderer(type);
   }
 
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectManyListbox";
   }
-  
+
   @Override
-  protected String getDefaultLabelValign(FacesBean bean)
+  protected String getDefaultLabelValign(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "top";
   }
@@ -58,7 +65,7 @@
   protected FormInputRenderer getFormInputRenderer()
   {
     return _simpleSelectManyListbox;
-  }  
+  }
 
   private SimpleSelectManyListboxRenderer _simpleSelectManyListbox;
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyShuttleRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyShuttleRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyShuttleRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectManyShuttleRenderer.java Thu Dec 17 02:33:05 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;
 
 import java.io.IOException;
+
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -54,13 +55,15 @@
     this(CoreSelectManyShuttle.TYPE);
   }
 
-  protected SelectManyShuttleRenderer(FacesBean.Type type)
+  protected SelectManyShuttleRenderer(
+    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");
@@ -69,7 +72,7 @@
 
     _trailingHeaderKey = type.findKey("trailingHeader");
     _trailingDescShownKey = type.findKey("trailingDescShown");
-    
+
     _leadingBox = new Box(type,
                           new ShuttleList(type, true),
                           true);
@@ -78,7 +81,6 @@
                            false);
   }
 
-
   @Override
   protected Object getSubmittedValue(
     FacesContext context,
@@ -122,8 +124,9 @@
     return list.toArray(new String[list.size()]);
   }
 
-
-  protected Integer getSize(FacesBean bean)
+  protected Integer getSize(
+    UIComponent component,
+    FacesBean   bean)
   {
     Object o = bean.getProperty(_sizeKey);
     if (o == null)
@@ -137,13 +140,16 @@
     return null;
   }
 
-
-  protected boolean getReorderOnly(FacesBean bean)
+  protected boolean getReorderOnly(
+    UIComponent component,
+    FacesBean   bean)
   {
     return false;
   }
 
-  protected boolean getLeadingDescShown(FacesBean bean)
+  protected boolean getLeadingDescShown(
+    UIComponent component,
+    FacesBean   bean)
   {
     Object o = bean.getProperty(_leadingDescShownKey);
     if (o == null)
@@ -151,12 +157,16 @@
     return Boolean.TRUE.equals(o);
   }
 
-  protected String getLeadingHeader(FacesBean bean)
+  protected String getLeadingHeader(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_leadingHeaderKey));
   }
 
-  protected boolean getTrailingDescShown(FacesBean bean)
+  protected boolean getTrailingDescShown(
+    UIComponent component,
+    FacesBean   bean)
   {
     Object o = bean.getProperty(_trailingDescShownKey);
     if (o == null)
@@ -164,27 +174,34 @@
     return Boolean.TRUE.equals(o);
   }
 
-  protected String getTrailingHeader(FacesBean bean)
+  protected String getTrailingHeader(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_trailingHeaderKey));
   }
 
   @Override
-  protected boolean isAutoSubmit(FacesBean bean)
+  protected boolean isAutoSubmit(
+    UIComponent component,
+    FacesBean   bean)
   {
     // No autoSubmit support yet
     return false;
   }
 
   @Override
-  public boolean getSimple(FacesBean bean)
+  public boolean getSimple(
+    UIComponent component,
+    FacesBean   bean)
   {
     return false;
   }
 
   @Override
   protected boolean renderReadOnlyAsElement(
-    RenderingContext arc,
+    RenderingContext rc,
+    UIComponent      component,
     FacesBean        bean)
   {
     return true;
@@ -192,37 +209,43 @@
 
   @Override
   // Make read-only shuttles show disabled lists
-  protected boolean getDisabled(FacesBean bean)
+  protected boolean getDisabled(
+    UIComponent component,
+    FacesBean   bean)
   {
-    if (super.getDisabled(bean))
+    if (super.getDisabled(component, bean))
       return true;
-    
-    return super.getReadOnly(FacesContext.getCurrentInstance(), bean);
+
+    return super.getReadOnly(FacesContext.getCurrentInstance(), component, bean);
   }
 
   @Override
-  protected String getContentStyleClass(FacesBean bean)
+  protected String getContentStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectManyShuttle::content";
   }
-  
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectManyShuttle";
   }
 
-
   @Override
   protected void encodeElementContent(
-    FacesContext        context,
-    RenderingContext    rc,
-    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
   {
     FormData fData = rc.getFormData();
     if (fData == null)
@@ -247,7 +270,7 @@
 
     // Start the leading list off with everything, and the trailing list
     // off with nothing
-    List<SelectItem> leadingSelectItems = new ArrayList<SelectItem>(selectItems);    
+    List<SelectItem> leadingSelectItems = new ArrayList<SelectItem>(selectItems);
     List<SelectItem> trailingSelectItems =
        new ArrayList<SelectItem>(selectedIndices.length);
 
@@ -280,13 +303,10 @@
       leadingSelectItems.remove(selectedIndex);
     }
 
-    
+
     // Initialize global info
-    ShuttleInfo info = _createAndSetShuttleInfo(rc,
-                                                bean,
-                                                leadingSelectItems,
-                                                trailingSelectItems,
-                                                clientId);
+    ShuttleInfo info = _createAndSetShuttleInfo(rc, component, bean, leadingSelectItems,
+      trailingSelectItems, clientId);
     leadingSelectItems.add(new SelectItem("", info.barText));
     trailingSelectItems.add(new SelectItem("", info.barText));
 
@@ -295,28 +315,28 @@
     /* FIXME: add this?
       XhtmlLafUtils.addOnSubmitRequiredValidator(
                                        context,
-                                       node, 
-                                       UIXSelectMany.REQUIRED_MESSAGE_ID, 
+                                       node,
+                                       UIXSelectMany.REQUIRED_MESSAGE_ID,
                                        getNodeName(context, node));
-                                       
+
     */
 
     ResponseWriter rw = context.getResponseWriter();
 
     _addTranslations(context, rc);
-    
-    boolean onlyOneList = getReorderOnly(bean);
+
+    boolean onlyOneList = getReorderOnly(component, bean);
 
     rw.startElement("table", component);
     OutputUtils.renderLayoutTableAttributes(context, rc, "0", "10%");
     // Don't use renderID(), which because we're on formElement will try to
     // write out "name" too
     rw.writeAttribute("id", clientId, null);
-    renderShortDescAttribute(context, rc, bean);
-    renderEventHandlers(context, bean);
+    renderShortDescAttribute(context, rc, component, bean);
+    renderEventHandlers(context, component, bean);
     renderRootDomElementStyles(context, rc, component, bean);
 
-    _renderHeaderRow(context, rc, bean, onlyOneList);
+    _renderHeaderRow(context, rc, component, bean, onlyOneList);
     _renderContainerRow(context, rc, component, bean, onlyOneList, clientId);
 
     rw.endElement("table");
@@ -328,14 +348,16 @@
   private void _renderScriptsAndValues(
     FacesContext     context,
     RenderingContext rc,
+    UIComponent      component,
     FacesBean        bean,
     String           clientId,
-    boolean          onlyOneList) throws IOException
+    boolean          onlyOneList
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
     ContainerInfo leadingInfo = _getContainerInfo(rc, true);
     ContainerInfo trailingInfo = _getContainerInfo(rc, false);
-      
+
     // Write out some hidden values
     if (!onlyOneList)
     {
@@ -357,12 +379,12 @@
                       _getValue(trailingInfo.itemsList),
                       null);
     rw.endElement("input");
-    
+
     // Render the scripts
     rw.startElement("script", null);
     renderScriptDeferAttribute(context, rc);
     renderScriptTypeAttribute(context, rc);
-    if (!onlyOneList && getLeadingDescShown(bean))
+    if (!onlyOneList && getLeadingDescShown(component, bean))
     {
       _writeDescriptionScript(context,
                               leadingInfo.itemsList,
@@ -380,15 +402,18 @@
   protected void renderReorderButtons(
     FacesContext     context,
     RenderingContext rc,
+    UIComponent      component,
     FacesBean        bean,
-    String           listId) throws IOException
+    String           listId
+    ) throws IOException
   {
   }
 
   private void _writeResetScript(
     FacesContext     context,
     RenderingContext rc,
-    String           clientId) throws IOException
+    String           clientId
+    ) throws IOException
   {
     // FIXME: Make sure we don't NPE when not in form
 
@@ -396,7 +421,7 @@
     String formName = rc.getFormData().getName();
     String jsFormName = XhtmlUtils.getJSIdentifier(formName);
     String jsClientId = XhtmlUtils.getJSIdentifier(clientId);
-    
+
     // Add the reset call to the form as a whole
     StringBuilder funcCallBuffer = new StringBuilder(
                                                19 +
@@ -423,9 +448,10 @@
   }
 
   private void _writeDescriptionScript(
-    FacesContext context,
+    FacesContext     context,
     List<SelectItem> selectItems,
-    String id) throws IOException
+    String           id
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
 
@@ -465,7 +491,7 @@
     for (int j=0; j < length; j++)
     {
       SelectItem oldSelectItem = itemsToConvert.get(j);
-      // We have to create a new item - the old ones are not 
+      // We have to create a new item - the old ones are not
       // necessarily ours, so we can't just mutate 'em
       SelectItem newSelectItem = new SelectItem(j,
                                                oldSelectItem.getLabel(),
@@ -476,7 +502,8 @@
   }
 
 
-  private String _getValue(List<SelectItem> items)
+  private String _getValue(
+    List<SelectItem> items)
   {
     StringBuilder vals = new StringBuilder();
     for (SelectItem item : items)
@@ -491,7 +518,8 @@
 
   private void _addTranslations(
     FacesContext     context,
-    RenderingContext rc) throws IOException
+    RenderingContext rc
+    ) throws IOException
   {
     // Add needed translations
     if (!rc.getProperties().containsKey(_TRANSLATED_VARS_EXIST_PROPERTY_KEY))
@@ -508,7 +536,7 @@
       String noItems = rc.getTranslatedString(_SHUTTLE_NO_ITEMS_FEEDBACK_KEY);
       String noItemsSelected =
         rc.getTranslatedString(_SHUTTLE_NO_ITEM_SELECTED_FEEDBACK_KEY);
-      
+
       rw.writeText(_TRANSLATED_JS_FEEDBACK_NO_ITEMS, null);
       if (noItems != null)
         rw.writeText(XhtmlUtils.escapeJS(noItems, true), null);
@@ -527,8 +555,10 @@
   private void _renderHeaderRow(
     FacesContext     context,
     RenderingContext rc,
+    UIComponent      component,
     FacesBean        bean,
-    boolean          onlyOneList) throws IOException
+    boolean          onlyOneList
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement("tr", null);
@@ -537,7 +567,7 @@
       rw.startElement("td", null);
       renderStyleClass(context, rc, SkinSelectors.SHUTTLE_HEADER_STYLE_CLASS);
       rw.writeAttribute("valign", "bottom", null);
-      String leadingHeader = getLeadingHeader(bean);
+      String leadingHeader = getLeadingHeader(component, bean);
       if (leadingHeader != null)
         rw.writeText(leadingHeader, "leadingHeader");
       rw.endElement("td");
@@ -549,7 +579,7 @@
     rw.startElement("td", null);
     renderStyleClass(context, rc, SkinSelectors.SHUTTLE_HEADER_STYLE_CLASS);
     rw.writeAttribute("valign", "bottom", null);
-    if (getRequired(bean) || getShowRequired(bean))
+    if (getRequired(component, bean) || getShowRequired(component, bean))
     {
       // Get the required Icon from the context
       Icon icon = rc.getIcon(SkinSelectors.REQUIRED_ICON_ALIAS_NAME);
@@ -562,21 +592,21 @@
       }
     }
 
-    String trailingHeader = getTrailingHeader(bean);
+    String trailingHeader = getTrailingHeader(component, bean);
     if (trailingHeader != null)
       rw.writeText(trailingHeader, "trailingHeader");
     rw.endElement("td");
     rw.endElement("tr");
   }
 
-
   private void _renderContainerRow(
     FacesContext     context,
     RenderingContext rc,
     UIComponent      component,
     FacesBean        bean,
     boolean          onlyOneList,
-    String           clientId) throws IOException
+    String           clientId
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
     if (!onlyOneList)
@@ -589,13 +619,13 @@
                        bean,
                        _leadingBox);
       rw.endElement("td");
-      
+
       rw.startElement("td", null);
       rw.writeAttribute("align", "center", null);
       rw.writeAttribute("valign", "middle", null);
       rw.writeAttribute("nowrap", Boolean.TRUE, null);
       rw.writeAttribute("style", "padding:5px", null);
-      _renderMoveButtons(context, rc, bean);
+      _renderMoveButtons(context, rc, component, bean);
       rw.endElement("td");
     }
 
@@ -607,17 +637,18 @@
                      _trailingBox);
 
     // Put the values in this TD, so they're at least inside of the table
-    _renderScriptsAndValues(context, rc, bean, clientId, onlyOneList);
+    _renderScriptsAndValues(context, rc, component, bean, clientId, onlyOneList);
     rw.endElement("td");
 
     rw.endElement("tr");
   }
 
-
   private void _renderMoveButtons(
     FacesContext     context,
     RenderingContext rc,
-    FacesBean        bean) throws IOException
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
 
@@ -626,10 +657,10 @@
     String trailingId = info.trailingInfo.id;
 
     // MOVE button
-    boolean disabled = getDisabled(bean);
+    boolean disabled = getDisabled(component, bean);
     String moveUrl = disabled ? null :
       "javascript:TrShuttleProxy._moveItems('" + leadingId + "','" + trailingId + "');";
-    renderButton(context, rc, 
+    renderButton(context, rc,
                   SkinSelectors.AF_SELECT_MANY_SHUTTLE_MOVE_ICON_NAME,
                   _SELECT_MANY_MOVE_TIP_KEY,
                   moveUrl);
@@ -643,7 +674,7 @@
     // MOVE ALL button
     String moveAllUrl = disabled ? null :
       "javascript:TrShuttleProxy._moveAllItems('" + leadingId + "','" + trailingId + "');";
-    renderButton(context, rc, 
+    renderButton(context, rc,
                   SkinSelectors.AF_SELECT_MANY_SHUTTLE_MOVE_ALL_ICON_NAME,
                   _SELECT_MANY_MOVE_ALL_TIP_KEY,
                   moveAllUrl);
@@ -657,7 +688,7 @@
     // REMOVE button
     String removeUrl = disabled ? null :
       "javascript:TrShuttleProxy._moveItems('" + trailingId + "','" + leadingId + "');";
-    renderButton(context, rc, 
+    renderButton(context, rc,
                   SkinSelectors.AF_SELECT_MANY_SHUTTLE_REMOVE_ICON_NAME,
                   _SELECT_MANY_REMOVE_TIP_KEY,
                   removeUrl);
@@ -671,7 +702,7 @@
     // REMOVE ALL button
     String removeAllUrl = disabled ? null :
       "javascript:TrShuttleProxy._moveAllItems('" + trailingId + "','" + leadingId + "');";
-    renderButton(context, rc, 
+    renderButton(context, rc,
                   SkinSelectors.AF_SELECT_MANY_SHUTTLE_REMOVE_ALL_ICON_NAME,
                   _SELECT_MANY_REMOVE_ALL_TIP_KEY,
                   removeAllUrl);
@@ -681,11 +712,12 @@
   }
 
   private int _getBestListLen(
-    FacesBean bean,
-    int       leadingListCount,
-    int       trailingListCount)
+    UIComponent component,
+    FacesBean   bean,
+    int         leadingListCount,
+    int         trailingListCount)
   {
-    Integer rows = getSize(bean);
+    Integer rows = getSize(component, bean);
     if ( rows != null )
     {
       return Math.min(_MAXIMUM_LIST_LEN,
@@ -699,7 +731,7 @@
                           leadingListCount < _MAXIMUM_LIST_LEN);
       boolean between2 = (trailingListCount > _MINIMUM_LIST_LEN &&
                           trailingListCount < _MAXIMUM_LIST_LEN);
-      
+
       //if either higher than max, take max
       if( higher1 || higher2 )
       {
@@ -717,7 +749,6 @@
     }
   }
 
-
   private static final void _clearContext(
     RenderingContext rc
   )
@@ -726,10 +757,10 @@
     rc.getProperties().remove(_SHUTTLE_INFO_KEY);
   }
 
-
   private void _startRow(
     FacesContext context,
-    int          colspan) throws IOException
+    int          colspan
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement("tr", null);
@@ -743,7 +774,8 @@
   private void _endRow(
     FacesContext     context,
     RenderingContext rc,
-    int              height) throws IOException
+    int              height
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
     rw.endElement("td");
@@ -762,7 +794,8 @@
     RenderingContext rc,
     String           iconName,
     String           shortDescKey,
-    String           href) throws IOException
+    String           href
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement("a", null);
@@ -776,7 +809,7 @@
     // I suspect this came up in strict rendering mode
     if (icon != null)
       OutputUtils.renderIcon(context,
-                             rc, 
+                             rc,
                              icon,
                              rc.getTranslatedString(shortDescKey),
                              null,
@@ -789,7 +822,8 @@
     RenderingContext rc,
     String           textKey,
     String           shortDescKey,
-    String           href) throws IOException
+    String           href
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement("a", null);
@@ -809,23 +843,24 @@
     return _SHUTTLE_KEY_MAP;
   }
 
-
-  private ShuttleInfo _getShuttleInfo(RenderingContext rc)
+  private ShuttleInfo _getShuttleInfo(
+    RenderingContext rc)
   {
     return (ShuttleInfo) rc.getProperties().get(_SHUTTLE_INFO_KEY);
-  } 
+  }
 
   private ContainerInfo _getContainerInfo(
     RenderingContext rc,
-    boolean isLeading)
+    boolean          isLeading)
   {
     ShuttleInfo shuttleInfo = _getShuttleInfo(rc);
     return isLeading ?
         shuttleInfo.leadingInfo : shuttleInfo.trailingInfo;
-  } 
+  }
 
   private ShuttleInfo _createAndSetShuttleInfo(
     RenderingContext rc,
+    UIComponent      component,
     FacesBean        bean,
     List<SelectItem> leadingItems,
     List<SelectItem> trailingItems,
@@ -837,7 +872,7 @@
     leadingInfo.id = clientId + _LEADING_COMPLETE;
     trailingInfo.id = clientId + _TRAILING_COMPLETE;
 
-    shuttleInfo.listLen = _getBestListLen(bean,
+    shuttleInfo.listLen = _getBestListLen(component, bean,
                                           leadingInfo.listCount,
                                           trailingInfo.listCount);
     int barWidth = Math.max(Math.max(trailingInfo.maxWidth,
@@ -863,10 +898,10 @@
     else
     {
       char[] addedChars = new char[barWidth - _BARS_MINIMUM_WIDTH];
-      
+
       for(int i=0; i < barWidth - _BARS_MINIMUM_WIDTH; i++)
         addedChars[i] = '_';
-      
+
       shuttleInfo.barText = _BARS_MINIMUM + new String(addedChars);
     }
 
@@ -880,14 +915,18 @@
 
   private class ShuttleList extends SimpleSelectManyListboxRenderer
   {
-    public ShuttleList(FacesBean.Type type, boolean isLeading)
+    public ShuttleList(
+      FacesBean.Type type,
+      boolean        isLeading)
     {
       super(type);
       _isLeading = isLeading;
     }
 
     @Override
-    protected String getClientId(FacesContext context, UIComponent component)
+    protected String getClientId(
+      FacesContext context,
+      UIComponent  component)
     {
       RenderingContext rc = RenderingContext.getCurrentInstance();
       ContainerInfo info = _getContainerInfo(rc, _isLeading);
@@ -895,12 +934,14 @@
     }
 
     @Override
-    protected String getOndblclick(FacesBean bean)
+    protected String getOndblclick(
+      UIComponent component,
+      FacesBean   bean)
     {
       RenderingContext rc = RenderingContext.getCurrentInstance();
       ContainerInfo info = _getContainerInfo(rc, _isLeading);
       ContainerInfo otherInfo = _getContainerInfo(rc, !_isLeading);
- 
+
       StringBuilder builder = new StringBuilder();
       builder.append("TrShuttleProxy._moveItems('");
       builder.append(info.id);
@@ -913,42 +954,51 @@
     }
 
     @Override
-    protected String getShortDesc(FacesBean bean)
+    protected String getShortDesc(
+      UIComponent component,
+      FacesBean   bean)
     {
       // Use the header as the description for the list
       if (_isLeading)
-        return getLeadingHeader(bean);
+        return getLeadingHeader(component, bean);
       else
-        return getTrailingHeader(bean);
+        return getTrailingHeader(component, bean);
     }
 
     @Override
     // Make read-only shuttles show disabled lists
-    protected boolean getDisabled(FacesBean bean)
+    protected boolean getDisabled(
+      UIComponent component,
+      FacesBean   bean)
     {
-      if (super.getDisabled(bean))
+      if (super.getDisabled(component, bean))
         return true;
 
-      return super.getReadOnly(FacesContext.getCurrentInstance(), bean);
+      return super.getReadOnly(FacesContext.getCurrentInstance(), component, bean);
     }
 
     @Override
-    protected boolean getReadOnly(FacesContext context, FacesBean bean)
+    protected boolean getReadOnly(
+      FacesContext context,
+      UIComponent  component,
+      FacesBean    bean)
     {
       return false;
     }
 
     @Override
-    protected String getOnchange(FacesBean bean)
+    protected String getOnchange(
+      UIComponent component,
+      FacesBean   bean)
     {
       if (_isLeading)
       {
-        if (!getLeadingDescShown(bean))
+        if (!getLeadingDescShown(component, bean))
           return null;
       }
       else
       {
-        if (!getTrailingDescShown(bean))
+        if (!getTrailingDescShown(component, bean))
           return null;
       }
 
@@ -965,12 +1015,12 @@
 
     @Override
     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)
     {
       return _EMPTY_INT_ARRAY;
     }
@@ -986,7 +1036,9 @@
     }
 
     @Override
-    protected int getSize(FacesBean bean)
+    protected int getSize(
+      UIComponent component,
+      FacesBean   bean)
     {
       RenderingContext rc = RenderingContext.getCurrentInstance();
       ShuttleInfo info = _getShuttleInfo(rc);
@@ -994,106 +1046,137 @@
     }
 
     @Override
-    protected boolean isAutoSubmit(FacesBean bean)
+    protected boolean isAutoSubmit(
+      UIComponent component,
+      FacesBean   bean)
     {
       return false;
     }
 
     @Override
-    public boolean getSimple(FacesBean bean)
+    public boolean getSimple(
+      UIComponent component,
+      FacesBean   bean)
     {
       return true;
     }
 
     @Override
-    protected boolean getValuePassThru(FacesBean bean)
+    protected boolean getValuePassThru(
+      UIComponent component,
+      FacesBean   bean)
     {
       // Value passthru has already been accounted for
       return true;
     }
 
-
     @Override
-    protected String getStyleClass(FacesBean bean)
+    protected String getStyleClass(
+      UIComponent component,
+      FacesBean   bean)
     {
       return null;
     }
 
     @Override
-    protected String getInlineStyle(FacesBean bean)
+    protected String getInlineStyle(
+      UIComponent component,
+      FacesBean   bean)
     {
       return null;
     }
 
     private boolean _isLeading;
   }
-  
+
   private class Box extends PanelBoxRenderer
   {
-    public Box(FacesBean.Type type, ShuttleList list, boolean isLeading)
+    public Box(
+      FacesBean.Type type,
+      ShuttleList    list,
+      boolean        isLeading)
     {
       super(type);
       _list = list;
       _isLeading = isLeading;
     }
-    
+
     @Override
-    protected String getClientId(FacesContext context, UIComponent component)
+    protected String getClientId(
+      FacesContext context,
+      UIComponent  component)
     {
       return null;
     }
 
     @Override
-    protected boolean hasChildren(UIComponent component)
+    protected boolean hasChildren(
+      UIComponent component)
     {
       return true;
     }
 
     @Override
-    protected String getShortDesc(FacesBean bean)
+    protected String getShortDesc(
+      UIComponent component,
+      FacesBean   bean)
     {
       return null;
     }
 
     @Override
-    protected String getStyleClass(FacesBean bean)
+    protected String getStyleClass(
+      UIComponent component,
+      FacesBean   bean)
     {
       return null;
     }
 
     @Override
-    protected String getInlineStyle(FacesBean bean)
+    protected String getInlineStyle(
+      UIComponent component,
+      FacesBean   bean)
     {
       return "width:100%";
     }
 
     @Override
-    protected String getText(FacesBean bean)
+    protected String getText(
+      UIComponent component,
+      FacesBean   bean)
     {
       return null;
     }
 
     @Override
-    protected String getIcon(FacesBean bean)
+    protected String getIcon(
+      UIComponent component,
+      FacesBean   bean)
     {
       return null;
     }
 
     @Override
-    protected String getContentStyle(FacesBean bean)
+    protected String getContentStyle(
+      UIComponent component,
+      FacesBean   bean)
     {
       return null;
     }
-    
+
     @Override
-    protected String getBackground(FacesBean bean)
+    protected String getBackground(
+      UIComponent component,
+      FacesBean   bean)
     {
       return null;
     }
 
     @Override
     protected void encodeAllChildren(
-      FacesContext context, UIComponent component) throws IOException
+      FacesContext context,
+      UIComponent  component
+      ) throws IOException
     {
       ResponseWriter rw = context.getResponseWriter();
       RenderingContext rc = RenderingContext.getCurrentInstance();
@@ -1105,8 +1188,6 @@
       rw.startElement("table", null);
       OutputUtils.renderLayoutTableAttributes(context, rc, null, null);
 
-      
-
       // Render the filter, if needed
       if (_isLeading)
       {
@@ -1130,14 +1211,14 @@
       if (!_isLeading && isReorderable())
       {
         rw.endElement("td");
-        renderReorderButtons(context, rc, bean, containerInfo.id);
+        renderReorderButtons(context, rc, component, bean, containerInfo.id);
         rw.startElement("td", null);
       }
 
-      boolean hasLeadingDesc = getLeadingDescShown(bean);
-      boolean hasTrailingDesc = getTrailingDescShown(bean);
+      boolean hasLeadingDesc = getLeadingDescShown(component, bean);
+      boolean hasTrailingDesc = getTrailingDescShown(component, bean);
       boolean hasDescArea = hasLeadingDesc || hasTrailingDesc;
-      
+
       _endRow(context, rc, 0);
 
       if (hasDescArea)
@@ -1164,13 +1245,13 @@
         rw.writeAttribute("wrap", "soft", null);
 
         rw.endElement("textarea");
-        
+
         HiddenLabelUtils.outputHiddenLabelIfNeeded(context,
                                                    rc,
                                                    textareaId,
                                                    label,
                                                    component);
-        
+
         _endRow(context, rc, _DEFAULT_DESC_AREA_HEIGHT);
       }
 
@@ -1189,19 +1270,16 @@
         if (footer != null)
           encodeChild(context, footer);
         _endRow(context, rc, _DEFAULT_FOOTER_HEIGHT);
-        
+
       }
 
       rw.endElement("table");
     }
 
-
     private ShuttleList _list;
     private boolean     _isLeading;
   }
 
-
-
   /*
    * Per render shuttle info
    */
@@ -1215,7 +1293,6 @@
     public ContainerInfo trailingInfo = null;
   }
 
-  
   /*
    * Per render info for each container
    */
@@ -1243,7 +1320,6 @@
     public int    maxWidth  = 0;
   }
 
-
   private PropertyKey _sizeKey;
   private PropertyKey _leadingDescShownKey;
   private PropertyKey _leadingHeaderKey;
@@ -1259,12 +1335,10 @@
 
   private final static String _BARS_MINIMUM    = "_______________";
 
-
   private final static int _DEFAULT_DESC_AREA_HEIGHT = 68;
   private final static int _DEFAULT_FILTER_HEIGHT    = 36;
   private final static int _DEFAULT_FOOTER_HEIGHT    = 36;
 
-
   private final static String _LEADING_COMPLETE     = ":leading";
   private final static String _TRAILING_COMPLETE    = ":trailing";
   private final static String _ITEMS_COMPLETE       = ":items";
@@ -1311,11 +1385,11 @@
     "af_selectManyShuttle.REMOVE_ALL";
   protected final static String _SELECT_MANY_REMOVE_KEY =
     "af_selectManyShuttle.REMOVE";
- 
+
   // map the selectMany translation keys to the selectOrder translation keys.
   // This renderer code uses the selectMany translation keys. If selectOrder
   // shuttle is being rendered, then context.getTranslatedValue will use
-  private static final Map<String, String> _SHUTTLE_KEY_MAP = 
+  private static final Map<String, String> _SHUTTLE_KEY_MAP =
     new HashMap<String, String>();
 
   static

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneChoiceRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneChoiceRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneChoiceRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneChoiceRenderer.java Thu Dec 17 02:33:05 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
@@ -18,41 +18,46 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
+import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectOneChoice;
 
 
 public class SelectOneChoiceRenderer extends InputLabelAndMessageRenderer
 {
-
   public SelectOneChoiceRenderer()
   {
     super(CoreSelectOneChoice.TYPE);
-  }  
+  }
 
-  protected SelectOneChoiceRenderer(FacesBean.Type type)
+  protected SelectOneChoiceRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _simpleSelectOneChoice = new SimpleSelectOneChoiceRenderer(type);
   }
-  
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectOneChoice";
   }
-  
+
   @Override
   protected FormInputRenderer getFormInputRenderer()
   {
     return _simpleSelectOneChoice;
-  }  
+  }
 
   private SimpleSelectOneChoiceRenderer _simpleSelectOneChoice;
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneListboxRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneListboxRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneListboxRenderer.java Thu Dec 17 02:33:05 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
@@ -18,38 +18,45 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
+import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectOneListbox;
 
 
 public class SelectOneListboxRenderer extends InputLabelAndMessageRenderer
 {
-
   public SelectOneListboxRenderer()
   {
     super(CoreSelectOneListbox.TYPE);
   }
 
-  protected SelectOneListboxRenderer(FacesBean.Type type)
+  protected SelectOneListboxRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _simpleSelectOneListbox = new SimpleSelectOneListboxRenderer(type);
   }
-  
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectOneListbox";
   }
-  
+
   @Override
-  protected String getDefaultLabelValign(FacesBean bean)
+  protected String getDefaultLabelValign(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "top";
   }
@@ -58,7 +65,7 @@
   protected FormInputRenderer getFormInputRenderer()
   {
     return _simpleSelectOneListbox;
-  }  
+  }
 
   private SimpleSelectOneListboxRenderer _simpleSelectOneListbox;
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneRadioRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneRadioRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOneRadioRenderer.java Thu Dec 17 02:33:05 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
@@ -18,72 +18,86 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml;
 
+import javax.faces.component.UIComponent;
+
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectOneRadio;
 
+
 public class SelectOneRadioRenderer extends InputLabelAndMessageRenderer
 {
-
   public SelectOneRadioRenderer()
   {
     super(CoreSelectOneRadio.TYPE);
   }
-  
-  protected SelectOneRadioRenderer(FacesBean.Type type)
+
+  protected SelectOneRadioRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _layoutKey = type.findKey("layout");
     _simpleSelectOneRadio = new SimpleSelectOneRadioRenderer(type);
-  } 
-  
+  }
+
   @Override
-  protected String getRootStyleClass(FacesBean bean)  
+  protected String getRootStyleClass(
+    UIComponent component,
+    FacesBean   bean)
   {
     return "af|selectOneRadio";
   }
-  
-  protected String getLayout(FacesBean bean)
+
+  protected String getLayout(
+    UIComponent component,
+    FacesBean   bean)
   {
     return toString(bean.getProperty(_layoutKey));
   }
 
   @Override
-  protected String getDefaultLabelValign(FacesBean bean)
+  protected String getDefaultLabelValign(
+    UIComponent component,
+    FacesBean   bean)
   {
     // Don't top-align for horizontal radio buttons.
-    if (CoreSelectOneRadio.LAYOUT_HORIZONTAL.equals(getLayout(bean)))
-      return super.getDefaultLabelValign(bean);
+    if (CoreSelectOneRadio.LAYOUT_HORIZONTAL.equals(getLayout(component, bean)))
+      return super.getDefaultLabelValign(component, bean);
 
     return "top";
   }
 
   /**
    * selectOneRadio should not render a &lt;label&gt; on itself.
-   */ 
+   */
   @Override
-  protected boolean hasOwnLabel(FacesBean bean)
+  protected boolean hasOwnLabel(
+    UIComponent component,
+    FacesBean   bean)
   {
     return true;
   }
 
   @Override
-  protected boolean showAccessKeyOnLabel(FacesBean bean)
+  protected boolean showAccessKeyOnLabel(
+    UIComponent component,
+    FacesBean   bean)
   {
     return true;
   }
-  
+
   @Override
   protected FormInputRenderer getFormInputRenderer()
   {
     return _simpleSelectOneRadio;
-  }  
+  }
 
   private PropertyKey _layoutKey;
 

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOrderShuttleRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOrderShuttleRenderer.java?rev=891522&r1=891521&r2=891522&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOrderShuttleRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectOrderShuttleRenderer.java Thu Dec 17 02:33:05 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
@@ -23,6 +23,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 
@@ -31,6 +32,7 @@
 import org.apache.myfaces.trinidad.component.core.input.CoreSelectOrderShuttle;
 import org.apache.myfaces.trinidad.context.RenderingContext;
 
+
 public class SelectOrderShuttleRenderer extends SelectManyShuttleRenderer
 {
   public SelectOrderShuttleRenderer()
@@ -38,20 +40,24 @@
     super(CoreSelectOrderShuttle.TYPE);
   }
 
-  protected SelectOrderShuttleRenderer(FacesBean.Type type)
+  protected SelectOrderShuttleRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
 
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _reorderOnlyKey = type.findKey("reorderOnly");
   }
 
   @Override
-  protected boolean getReorderOnly(FacesBean bean)
+  protected boolean getReorderOnly(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_reorderOnlyKey == null)
       return false;
@@ -75,15 +81,17 @@
   protected void renderReorderButtons(
     FacesContext     context,
     RenderingContext rc,
+    UIComponent      component,
     FacesBean        bean,
-    String           listId) throws IOException
+    String           listId
+    ) throws IOException
   {
     ResponseWriter rw = context.getResponseWriter();
     rw.startElement("td", null);
     rw.writeAttribute("align", "center", null);
     rw.writeAttribute("valign", "middle", null);
-    
-    boolean disabled = getDisabled(bean);
+
+    boolean disabled = getDisabled(component, bean);
     renderButton(context,
                   rc,
                   SkinSelectors.AF_SELECT_ORDER_SHUTTLE_REORDER_TOP_ICON_NAME,
@@ -92,7 +100,7 @@
                   "javascript:TrShuttleProxy._orderTopBottomList(0,'" + listId + "');");
     rw.startElement("br", null);
     rw.endElement("br");
-    
+
     renderButton(context,
                   rc,
                   SkinSelectors.AF_SELECT_ORDER_SHUTTLE_REORDER_UP_ICON_NAME,
@@ -103,7 +111,7 @@
     renderSpacer(context, rc, "1", "15");
     rw.startElement("br", null);
     rw.endElement("br");
-    
+
     renderButton(context,
                   rc,
                   SkinSelectors.AF_SELECT_ORDER_SHUTTLE_REORDER_DOWN_ICON_NAME,
@@ -112,14 +120,14 @@
                   "javascript:TrShuttleProxy._orderList(1,'" + listId + "');");
     rw.startElement("br", null);
     rw.endElement("br");
-    
+
     renderButton(context,
                  rc,
                  SkinSelectors.AF_SELECT_ORDER_SHUTTLE_REORDER_BOTTOM_ICON_NAME,
                  "af_selectOrderShuttle.REORDER_DOWN_ALL_TIP",
                  disabled ? null :
                  "javascript:TrShuttleProxy._orderTopBottomList(1,'" + listId + "');");
-    
+
     rw.endElement("td");
   }
 
@@ -145,7 +153,7 @@
     "af_selectOrderShuttle.REMOVE";
 
   // this translation map to map the selectMany keys to the selectOrder keys.
-  private static final Map<String, String> _SELECT_ORDER_KEY_MAP = 
+  private static final Map<String, String> _SELECT_ORDER_KEY_MAP =
     new HashMap<String, String>();
 
   static
@@ -206,5 +214,5 @@
     _SELECT_ORDER_KEY_MAP.put(SkinSelectors.AF_PANEL_BOX_BOTTOM_END_STYLE_CLASS,
                          SkinSelectors.AF_SELECT_ORDER_SHUTTLE_PB_BOTTOM_END_STYLE_CLASS);
 
-  }  
+  }
 }