myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arobinso...@apache.org
Subject svn commit: r891522 [5/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/ap...
Date Thu, 17 Dec 2009 02:33:11 GMT
Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.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/desktop/TreeTableRenderer.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/desktop/TreeTableRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.java Thu Dec 17 02:33:05 2009
@@ -19,6 +19,7 @@
 package org.apache.myfaces.trinidadinternal.renderkit.core.desktop;
 
 import java.io.IOException;
+
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -59,6 +60,7 @@
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TreeTableRenderingContext;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TreeUtils;
 
+
 /**
  * Renderer for treeTable
  * <p>
@@ -72,7 +74,8 @@
   }
 
   @Override
-  protected void findTypeConstants(FacesBean.Type type)
+  protected void findTypeConstants(
+    FacesBean.Type type)
   {
     super.findTypeConstants(type);
     _immediateKey  = type.findKey("immediate");
@@ -89,7 +92,7 @@
   @Override
   public void decode(
     FacesContext context,
-    UIComponent component)
+    UIComponent  component)
   {
     decodeSelection(context, component);
 
@@ -115,12 +118,12 @@
    */
   @Override
   protected TableRenderingContext createRenderingContext(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component
     )
   {
-    return new TreeTableRenderingContext(context, arc, component);
+    return new TreeTableRenderingContext(context, rc, component);
   }
 
   /**
@@ -131,9 +134,10 @@
   @Override
   protected boolean renderTableWithoutColumns(
     FacesContext          context,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    UIComponent           component) throws IOException
+    UIComponent           component
+    ) throws IOException
   {
     return false;
   }
@@ -143,12 +147,13 @@
    */
   @Override
   protected void encodeAll(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    FormData fData = arc.getFormData();
+    FormData fData = rc.getFormData();
     if (fData != null)
     {
       fData.addNeededValue(XhtmlConstants.PARTIAL_TARGETS_PARAM);
@@ -165,19 +170,19 @@
     TreeUtils.setDefaultFocusRowKey((UIXTree) component);
     TreeUtils.expandFocusRowKey((UIXTree) component);
 
-    super.encodeAll(context, arc, component, bean);
+    super.encodeAll(context, rc, component, bean);
 
     // have we rendered the script before?
     // and are we not in printable mode (scripting disabled)?
-    if (arc.getProperties().put(_JS_LIBS_KEY, Boolean.TRUE) == null
-        && supportsScripting(arc))
+    if (rc.getProperties().put(_JS_LIBS_KEY, Boolean.TRUE) == null
+        && supportsScripting(rc))
     {
       ResponseWriter writer = context.getResponseWriter();
       writer.startElement(XhtmlConstants.SCRIPT_ELEMENT, null);
-      renderScriptDeferAttribute(context, arc);
+      renderScriptDeferAttribute(context, rc);
       // Bug #3426092:
       // render the type="text/javascript" attribute in accessibility mode
-      renderScriptTypeAttribute(context, arc);
+      renderScriptTypeAttribute(context, rc);
       boolean validate = !isImmediate(component, bean);
       String buff = TreeUtils.setupJSTreeCollectionComponent(validate);
       writer.writeText(buff, null);
@@ -186,11 +191,16 @@
   }
 
   @Override
-  protected String getDefaultStyleClass(FacesBean bean) {
+  protected String getDefaultStyleClass(
+    UIComponent component,
+    FacesBean   bean)
+  {
     return null;
   }
 
-  protected boolean isImmediate(UIComponent component, FacesBean bean)
+  protected boolean isImmediate(
+    UIComponent component,
+    FacesBean   bean)
   {
     return  Boolean.TRUE.equals(bean.getProperty(_immediateKey));
   }
@@ -202,22 +212,23 @@
   @Override
   protected void renderNavigationHeaderBars(
     FacesContext          context,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext tContext,
     UIComponent           component,
-    FacesBean           bean) throws IOException
+    FacesBean             bean
+    ) throws IOException
   {
-    super.renderNavigationHeaderBars(context, arc, tContext, component, bean);
-    _renderBreadCrumbs(context, arc, tContext, component, bean);
+    super.renderNavigationHeaderBars(context, rc, tContext, component, bean);
+    _renderBreadCrumbs(context, rc, tContext, component, bean);
   }
 
   @Override
   protected final void renderRangePagingControl(
     FacesContext          context,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    UIComponent           table)
-    throws IOException
+    UIComponent           table
+    ) throws IOException
   {
     UIXHierarchy comp = (UIXHierarchy) table;
     Object focusKey = comp.getFocusRowKey();
@@ -226,7 +237,7 @@
     {
       // set the collection that is being displayed:
       comp.setRowKey(focusKey);
-      super.renderRangePagingControl(context, arc, tContext, table);
+      super.renderRangePagingControl(context, rc, tContext, table);
     }
     finally
     {
@@ -236,28 +247,30 @@
 
   @Override
   protected boolean hasControlBarLinks(
-    FacesContext context,
-    RenderingContext arc,
+    FacesContext          context,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    UIComponent component) throws IOException
+    UIComponent           component
+    ) throws IOException
   {
     return
-      super.hasControlBarLinks(context, arc, tContext, component) ||
+      super.hasControlBarLinks(context, rc, tContext, component) ||
       isExpandAllEnabled(component);
   }
 
   @Override
   protected void renderControlBarLinks(
-    FacesContext context,
-    RenderingContext arc,
+    FacesContext          context,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    UIComponent component,
-    boolean useDivider) throws IOException
+    UIComponent           component,
+    boolean               useDivider
+    ) throws IOException
   {
     boolean hasExpandAll = isExpandAllEnabled(component);
-    super.renderControlBarLinks(context, arc, tContext, component,
+    super.renderControlBarLinks(context, rc, tContext, component,
                                 hasExpandAll || useDivider);
-    if (hasExpandAll && supportsScripting(arc)) //not in printable mode
+    if (hasExpandAll && supportsScripting(rc)) //not in printable mode
     {
       // must render these IDs so that PPR can restore the focus correctly:
       String preId = component.getClientId(context) + NamingContainer.SEPARATOR_CHAR;
@@ -266,42 +279,42 @@
             TreeUtils.callJSExpandAll(hContext.getUIXTreeTable(),
                                       tContext.getJSVarName(),
                                       true /*isExpand*/);
-       renderControlBarLink(context, arc, onclick, _EXPAND_ALL_TEXT_KEY,
-                           arc.getIcon(SkinSelectors.AF_TREE_TABLE_EXPAND_ALL_ICON_NAME),
+       renderControlBarLink(context, rc, onclick, _EXPAND_ALL_TEXT_KEY,
+                           rc.getIcon(SkinSelectors.AF_TREE_TABLE_EXPAND_ALL_ICON_NAME),
                             preId+"eAll", true);
       onclick =
             TreeUtils.callJSExpandAll(hContext.getUIXTreeTable(),
                                       tContext.getJSVarName(),
                                       false /*isExpand*/);
-       renderControlBarLink(context, arc, onclick, _COLLAPSE_ALL_TEXT_KEY,
-                           arc.getIcon(SkinSelectors.AF_TREE_TABLE_COLLAPSE_ALL_ICON_NAME),
+       renderControlBarLink(context, rc, onclick, _COLLAPSE_ALL_TEXT_KEY,
+                           rc.getIcon(SkinSelectors.AF_TREE_TABLE_COLLAPSE_ALL_ICON_NAME),
                             preId+"cAll", useDivider);
     }
   }
 
   protected void renderControlBarLink(
-      FacesContext context,
-      RenderingContext arc,
-      String onclick,
-      String translationKey,
-      Icon icon,
-      String id,
-      boolean hasDivider
-  ) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    String           onclick,
+    String           translationKey,
+    Icon             icon,
+    String           id,
+    boolean          hasDivider
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
     writer.startElement("a", null);
     writer.writeAttribute(XhtmlConstants.ID_ATTRIBUTE, id, null);
-    renderStyleClass(context, arc, SkinSelectors.NAV_BAR_ALINK_STYLE_CLASS);
+    renderStyleClass(context, rc, SkinSelectors.NAV_BAR_ALINK_STYLE_CLASS);
     writer.writeAttribute("onclick", onclick, null);
     writer.writeURIAttribute("href", "#", null);
     if (icon != null)
     {
-      OutputUtils.renderIcon(context, arc, icon, arc.getTranslatedString(translationKey),
+      OutputUtils.renderIcon(context, rc, icon, rc.getTranslatedString(translationKey),
                              null);
     } else
     {
-      writer.writeText(arc.getTranslatedString(translationKey), null);
+      writer.writeText(rc.getTranslatedString(translationKey), null);
     }
 
     writer.endElement("a");
@@ -310,7 +323,8 @@
       writer.writeText(LINKS_DIVIDER_TEXT, null);
   }
 
-  protected boolean isExpandAllEnabled(UIComponent component)
+  protected boolean isExpandAllEnabled(
+    UIComponent component)
   {
     FacesBean bean = getFacesBean(component);
     Object bool =
@@ -328,17 +342,17 @@
   @Override
   protected int renderSpecialColumns(
     FacesContext          context,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext tContext,
     UIComponent           component,
-    int                   physicalColumnIndex)
-    throws IOException
+    int                   physicalColumnIndex
+    ) throws IOException
   {
     // This renders a whole bunch of <TH>..</TH> elements or <TD>..</TD>
     // elements depending on the RenderStage
 
     physicalColumnIndex = super.renderSpecialColumns(context,
-                                                     arc,
+                                                     rc,
                                                      tContext,
                                                      component,
                                                      physicalColumnIndex);
@@ -350,7 +364,7 @@
                              ColumnData.SPECIAL_COLUMN_INDEX);
       SpecialColumnRenderer focusRenderer = getFocusColumnRenderer();
       UIComponent column = focusRenderer.getSpecialColumn();
-      delegateRenderer(context, arc, column,
+      delegateRenderer(context, rc, column,
                        getFacesBean(column), focusRenderer);
     }
 
@@ -358,7 +372,7 @@
     colData.setColumnIndex(physicalColumnIndex++,
                            ColumnData.SPECIAL_COLUMN_INDEX);
     UIComponent treeNodeColumn = ttrc.getTreeNodeStamp();
-    delegateRenderer(context, arc, treeNodeColumn,
+    delegateRenderer(context, rc, treeNodeColumn,
                      getFacesBean(treeNodeColumn), _TREE_NODE);
 
     return physicalColumnIndex;
@@ -370,10 +384,11 @@
   @Override
   protected void renderTableRows(
     FacesContext          context,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext trc,
     UIComponent           component,
-    FacesBean bean) throws IOException
+    FacesBean             bean
+    ) throws IOException
   {
     TreeTableRenderingContext ttrc = (TreeTableRenderingContext) trc;
     final RowData rowData = trc.getRowData();
@@ -381,12 +396,12 @@
 
     // render all the table content rows
     if (isEmptyTable)
-      _renderEmptyTableRow(context, arc, ttrc);
+      _renderEmptyTableRow(context, rc, ttrc);
     else
-      _renderTableRows(context, arc, ttrc, bean);
+      _renderTableRows(context, rc, ttrc, component, bean);
 
     // render the footer
-    renderFooter(context, arc, trc, component);
+    renderFooter(context, rc, trc, component);
 
     // on an HGrid the number of rows depends on whether child nodes are
     // expanded or not.
@@ -398,7 +413,9 @@
     return _FOCUS;
   }
 
-  protected boolean isRootNodeRendered(FacesBean bean)
+  protected boolean isRootNodeRendered(
+    UIComponent component,
+    FacesBean   bean)
   {
     if (_rootNodeRendered == null)
       return true;
@@ -412,33 +429,34 @@
 
   // Renders the hGridLocator Icon
   private void _renderLocatorIcon(
-    FacesContext          fc,
-    RenderingContext   arc)
-    throws IOException
+    FacesContext     fc,
+    RenderingContext rc
+    ) throws IOException
   {
-    Icon icon = arc.getIcon(SkinSelectors.AF_TREE_TABLE_LOCATOR_ICON_NAME);
+    Icon icon = rc.getIcon(SkinSelectors.AF_TREE_TABLE_LOCATOR_ICON_NAME);
 
     if (icon != null)
     {
-      Object altText = arc.getTranslatedString(_BREADCRUMBS_START_KEY);
+      Object altText = rc.getTranslatedString(_BREADCRUMBS_START_KEY);
 
       // Use "middle" alignment to center the icon with text
-      Object align = OutputUtils.getMiddleIconAlignment(arc);
+      Object align = OutputUtils.getMiddleIconAlignment(rc);
 
       // We don't bother specifying the style class.  This can
       // be specified by the Icon itself, since we aren't rendering
       // the Icon within a link (and thus we don't need to render
       // the style class ourselves.)
-      OutputUtils.renderIcon(fc, arc, icon, altText, align);
+      OutputUtils.renderIcon(fc, rc, icon, altText, align);
     }
   }
 
   private void _renderBreadCrumbs(
     FacesContext          fc,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext context,
-    UIComponent tree,
-    FacesBean bean) throws IOException
+    UIComponent           tree,
+    FacesBean             bean
+    ) throws IOException
   {
     // this renders <TR><TD><[crumbs]></TD></TR>
 
@@ -457,7 +475,7 @@
                                                    true,  //left
                                                    false, //bottom
                                                    true); //right
-      renderStyleClasses(fc, arc, new String[] {
+      renderStyleClasses(fc, rc, new String[] {
                                 SkinSelectors.HGRID_LOCATOR_HEADER_STYLE,
                                 borderStyleClass}
                         );
@@ -466,11 +484,11 @@
       writer.writeAttribute("colspan", IntegerUtils.getString(colspan), null);
 
       // The locator icon hits the left border if not for this spacer
-      renderSpacer(fc, arc, "0", "2");
+      renderSpacer(fc, rc, "0", "2");
 
-      _renderLocatorIcon(fc, arc);
+      _renderLocatorIcon(fc, rc);
 
-      delegateRenderer(fc, arc, tree, bean, _CRUMBS);
+      delegateRenderer(fc, rc, tree, bean, _CRUMBS);
 
       writer.endElement(XhtmlConstants.TABLE_DATA_ELEMENT);
       // end the <tr> containing the bread crumbs
@@ -480,17 +498,18 @@
 
   @SuppressWarnings("unchecked")
   private void _renderTableRows(
-    FacesContext          context,
-    final RenderingContext   arc,
+    FacesContext                    context,
+    final RenderingContext          rc,
     final TreeTableRenderingContext ttrc,
-    final FacesBean bean)
-    throws IOException
+    final UIComponent               component,
+    final FacesBean                 bean
+    ) throws IOException
   {
     final UIXTreeTable treeTableBase = ttrc.getUIXTreeTable();
     final ResponseWriter writer = context.getResponseWriter();
     final RowKeySet treeState = treeTableBase.getDisclosedRowKeys();
     final int specialColCount = _getSpecialColCount(ttrc);
-    final boolean rootNodeRendered = isRootNodeRendered(bean);
+    final boolean rootNodeRendered = isRootNodeRendered(component, bean);
 
     TableUtils.RowLoop loop = new TableUtils.RowLoop()
     {
@@ -510,7 +529,7 @@
         if (rootNodeRendered || treeTableBase.getDepth() > 0)
         {
           writer.startElement(XhtmlConstants.TABLE_ROW_ELEMENT, null);
-          renderSingleRow(context, arc, ttrc, treeTableBase);
+          renderSingleRow(context, rc, ttrc, treeTableBase);
           writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
         }
 
@@ -531,12 +550,12 @@
               ((rowCount < 0) || (rowCount > rows));
             if (renderNavRow)
             {
-              renderEmptyTableRow(context, arc, ttrc, specialColCount, _NAV_TOP);
+              renderEmptyTableRow(context, rc, ttrc, specialColCount, _NAV_TOP);
             }
             super.loop(context, treeTable);
             if (renderNavRow)
             {
-              renderEmptyTableRow(context, arc, ttrc, specialColCount, _NAV_BOTTOM);
+              renderEmptyTableRow(context, rc, ttrc, specialColCount, _NAV_BOTTOM);
             }
             treeTableBase.exitContainer();
           }
@@ -556,14 +575,15 @@
    * @return zero (the number of rows in this table).
    */
   private int _renderEmptyTableRow(
-    FacesContext          context,
-    RenderingContext   arc,
-    TreeTableRenderingContext ttrc) throws IOException
+    FacesContext              context,
+    RenderingContext          rc,
+    TreeTableRenderingContext ttrc
+    ) throws IOException
   {
     // we do not include the object hierarchy column in the specialCols
     // count. This is because we want the emptyText to appear in the
     // hierarchy column.
-    renderEmptyTableRow(context, arc, ttrc, _getSpecialColCount(ttrc));
+    renderEmptyTableRow(context, rc, ttrc, _getSpecialColCount(ttrc));
     return 0;
   }
 
@@ -593,15 +613,17 @@
   private static final CoreRenderer _TREE_NODE = new TreeNodeColumnRenderer();
   private static final CoreRenderer _CRUMBS = new BreadCrumbsRenderer();
 
-  private static final class BreadCrumbsRenderer extends org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BreadCrumbsRenderer
+  private static final class BreadCrumbsRenderer
+    extends org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BreadCrumbsRenderer
   {
     @Override
     protected void renderLink(
-      FacesContext context,
-      RenderingContext arc,
-      UIComponent child,
-      int renderedCount,
-      boolean isLastChild) throws IOException
+      FacesContext     context,
+      RenderingContext rc,
+      UIComponent      child,
+      int              renderedCount,
+      boolean          isLastChild
+      ) throws IOException
     {
       TreeTableRenderingContext ttrc = TreeTableRenderingContext.getInstance();
       UIXTreeTable tree = ttrc.getUIXTreeTable();
@@ -612,13 +634,13 @@
       if (isLastChild)
       {
         renderStyleClass(
-          context, arc,
+          context, rc,
           SkinSelectors.AF_TREE_TABLE_MP_SELECTED_STYLE_CLASS);
       }
       else
       {
         renderStyleClass(
-          context, arc,
+          context, rc,
           SkinSelectors.AF_TREE_TABLE_MP_STEP_STYLE_CLASS);
       }
       Object oldPath = tree.getRowKey();
@@ -633,7 +655,7 @@
         String onclick =
           TreeUtils.callJSFocusNode(tree, ttrc.getJSVarName());
         out.writeAttribute("onclick", onclick , null);
-        super.renderLink(context, arc, child, renderedCount, isLastChild);
+        super.renderLink(context, rc, child, renderedCount, isLastChild);
       }
       finally
       {
@@ -643,7 +665,8 @@
     }
 
     @Override
-    protected boolean hasChildren(UIComponent component)
+    protected boolean hasChildren(
+      UIComponent component)
     {
       return false; // do not render the columns. only the pathStamp
     }
@@ -660,10 +683,10 @@
 
     @Override
     protected UIComponent getStamp(
-      FacesContext        context,
-      RenderingContext arc,
-      UIXHierarchy        component,
-      FacesBean           bean
+      FacesContext     context,
+      RenderingContext rc,
+      UIXHierarchy     component,
+      FacesBean        bean
       )
     {
       UIComponent stamp = component.getFacet("pathStamp");
@@ -710,4 +733,4 @@
 
   private static final Object _JS_LIBS_KEY = new Object();
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(TreeTableRenderer.class);
- }
+}
\ No newline at end of file

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/FrameRenderer.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/pda/FrameRenderer.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/pda/FrameRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/FrameRenderer.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
@@ -26,13 +26,13 @@
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.bean.PropertyKey;
-import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.component.html.HtmlFrame;
 import org.apache.myfaces.trinidad.component.html.HtmlFrameBorderLayout;
-
 import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer;
 
+
 /**
  * Renders a frame.
  * <p>
@@ -57,7 +57,7 @@
 
     _sourceKey = type.findKey("source");
   }
-  
+
   @Override
   public boolean getRendersChildren()
   {
@@ -67,10 +67,11 @@
 
   @Override
   protected final void encodeAll(
-    FacesContext        context,
-    RenderingContext    rc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
     UIComponent parent = component.getParent();
 
@@ -85,12 +86,12 @@
     else
     {
       ResponseWriter writer = context.getResponseWriter();
-  
+
       writer.startElement("a", component);
       renderId(context, component);
-      
+
       String source = toResourceUri(context, bean.getProperty(_sourceKey));
-      String shortDesc = getShortDesc(bean);
+      String shortDesc = getShortDesc(component, bean);
 
       // =-=Adam Winer: OraLink is obviously not a good style class
       // here - substitute something like trh|frame in a PDA css

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PanelButtonBarRenderer.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/pda/PanelButtonBarRenderer.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/pda/PanelButtonBarRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PanelButtonBarRenderer.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
@@ -25,10 +25,10 @@
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.layout.CorePanelButtonBar;
-
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelGroupLayoutRenderer;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlConstants;
 
+
 /**
  * On PDA, just render the buttons consecutively with non-breaking spaces.
  */
@@ -40,7 +40,9 @@
   }
 
   @Override
-  protected Object getLayout(FacesBean bean)
+  protected Object getLayout(
+    UIComponent component,
+    FacesBean   bean)
   {
     return null;
   }
@@ -52,9 +54,9 @@
   protected void encodeSeparator(
     FacesContext context,
     UIComponent  separator,
-    boolean      isHorizontal) throws IOException
+    boolean      isHorizontal
+    ) throws IOException
   {
     context.getResponseWriter().writeText(XhtmlConstants.NBSP_STRING, null);
   }
-
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaCommandLinkRenderer.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/pda/PdaCommandLinkRenderer.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/pda/PdaCommandLinkRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaCommandLinkRenderer.java Thu Dec 17 02:33:05 2009
@@ -20,9 +20,6 @@
 
 import java.io.IOException;
 
-import java.util.Collections;
-import java.util.List;
-
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
@@ -30,15 +27,14 @@
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.nav.CoreCommandLink;
 import org.apache.myfaces.trinidad.context.RenderingContext;
-
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.CommandLinkRenderer;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
-import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.OutputUtils;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlConstants;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlUtils;
 
+
 /**
- * On PDA,just render as input element of submit type if the browser 
+ * On PDA,just render as input element of submit type if the browser
  * doesn't support javascript.
  */
 
@@ -57,30 +53,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
   {
-    if (supportsScripting(arc))
+    if (supportsScripting(rc))
     {
-      encodeBegin(context, arc, component, bean);
+      encodeBegin(context, rc, component, bean);
       encodeAllChildren(context, component);
-      encodeEnd(context, arc, component, bean);
+      encodeEnd(context, rc, component, bean);
       return;
     }
 
-   
+
      // For Non-JavaScript browsers render the commandLink as
      // input submit element
-     
+
     String clientId = getClientId(context, component);
-    if (canSkipRendering(arc, clientId))
+    if (canSkipRendering(rc, clientId))
       return;
 
     // Set client ID
-    assert(arc.getCurrentClientId() == null);
-    arc.setCurrentClientId(clientId);
+    assert(rc.getCurrentClientId() == null);
+    rc.setCurrentClientId(clientId);
 
     ResponseWriter rw = context.getResponseWriter();
     String element = "input";
@@ -88,24 +85,24 @@
     renderId(context, component);
 
     // Write the text and access key
-    String text = getText(bean);
+    String text = getText(component, bean);
     rw.writeAttribute("type", "submit", null);
-    
-    if (getDisabled(bean))
+
+    if (getDisabled(component, bean))
     {
       rw.writeAttribute("disabled", Boolean.TRUE, "disabled");
       // Skip over event attributes when disabled
-      renderStyleAttributes(context, arc, bean);
+      renderStyleAttributes(context, rc, component, bean);
     }
     else
     {
-      renderAllAttributes(context, arc, bean);
+      renderAllAttributes(context, rc, component, bean);
     }
 
     char accessKey;
-    if (supportsAccessKeys(arc))
+    if (supportsAccessKeys(rc))
     {
-      accessKey = getAccessKey(bean);
+      accessKey = getAccessKey(component, bean);
       if (accessKey != CHAR_UNDEFINED)
       {
         rw.writeAttribute("accesskey",
@@ -123,17 +120,17 @@
 
     rw.writeAttribute("id", clientId , "id");
     rw.writeAttribute("value", text, "text");
-    renderStyleClass(context, arc, 
+    renderStyleClass(context, rc,
                   SkinSelectors.AF_COMMAND_BUTTON_STYLE_CLASS);
-    String style = getInlineStyle(bean);
-        
+    String style = getInlineStyle(component, bean);
+
     // Append an inlineStyle that makes an input element appear as a link
     _writeInlineStyles(rw, style,
             "border:none;background:inherit;text-decoration:underline;");
     rw.endElement(element);
-    arc.setCurrentClientId(null);
+    rc.setCurrentClientId(null);
   }
-  
+
   /**
    * Renders the client ID as both "id" and "name"
    * @param context the FacesContext object
@@ -143,44 +140,47 @@
   @Override
   protected void renderId(
     FacesContext context,
-    UIComponent  component) throws IOException
-  { 
+    UIComponent  component
+    ) throws IOException
+  {
     if (shouldRenderId(context, component))
     {
       String clientId = getClientId(context, component);
       context.getResponseWriter().writeURIAttribute("id", clientId, "id");
       RenderingContext arc = RenderingContext.getCurrentInstance();
-      // For Non-JavaScript browsers, name attribute is handled separately 
+      // For Non-JavaScript browsers, name attribute is handled separately
       // so skip it here
       if (supportsScripting(arc))
       {
         context.getResponseWriter().writeURIAttribute("name", clientId, "id");
       }
-    } 
+    }
   }
 
-  
+
   /**
    * This method renders the stylesClass attribute
-   * @param FacesContext - FacesContext for this request
-   * @param arc - RenderingContext for this request
+   * @param context - FacesContext for this request
+   * @param rc - RenderingContext for this request
    * @param bean - FacesBean of the component to render
-   * @param defaultStyleClass - default styleClass of the component  
+   * @param defaultStyleClass - default styleClass of the component
    */
   @Override
   protected void renderStyleAttributes(
-    FacesContext        context,
-    RenderingContext    arc,
-    FacesBean           bean,
-    String              defaultStyleClass) throws IOException
-  { 
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    String           defaultStyleClass
+    ) throws IOException
+  {
     // Skip for HTML basic browsers since it is already handled
-    if (supportsScripting(arc))
+    if (supportsScripting(rc))
     {
-      super.renderStyleAttributes(context, arc, bean, defaultStyleClass);
+      super.renderStyleAttributes(context, rc, component, bean, defaultStyleClass);
     }
-  } 
-  
+  }
+
   /**
    * This method renders the inlineStyle attribute
    * @param rw - the response writer
@@ -189,8 +189,9 @@
    */
   private void _writeInlineStyles(
     ResponseWriter rw,
-    String userInlineStyle,
-    String appendedInlineStyle ) throws IOException
+    String         userInlineStyle,
+    String         appendedInlineStyle
+    ) throws IOException
   {
     if (userInlineStyle == null)
     {
@@ -204,5 +205,4 @@
       rw.writeAttribute("style", linkInlineStyle.toString(), "inlineStyle");
     }
   }
-  
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaFrameBorderLayoutRenderer.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/pda/PdaFrameBorderLayoutRenderer.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/pda/PdaFrameBorderLayoutRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaFrameBorderLayoutRenderer.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,16 +19,17 @@
 package org.apache.myfaces.trinidadinternal.renderkit.core.pda;
 
 import java.io.IOException;
+
 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.html.HtmlFrameBorderLayout;
-
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer;
 
+
 /**
  * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/laf/base/xhtml/FrameBorderLayoutRenderer.java#0 $) $Date: 10-nov-2005.18:53:53 $
  */
@@ -39,11 +40,12 @@
     this(HtmlFrameBorderLayout.TYPE);
   }
 
-  protected PdaFrameBorderLayoutRenderer(FacesBean.Type type)
+  protected PdaFrameBorderLayoutRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
-  
+
   @Override
   public boolean getRendersChildren()
   {
@@ -52,27 +54,30 @@
 
   @Override
   protected void renderAllAttributes(
-      FacesContext        context,
-      RenderingContext arc,
-      FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    renderShortDescAttribute(context, arc, bean);
-    renderStyleAttributes(context, arc, bean);
+    renderShortDescAttribute(context, rc, component, bean);
+    renderStyleAttributes(context, rc, component, bean);
   }
 
   @Override
   protected final 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();
 
     writer.startElement("div", component);
     renderId(context, component);
-    renderAllAttributes(context, arc, bean);
-    
+    renderAllAttributes(context, rc, component, bean);
+
     String leftName       = HtmlFrameBorderLayout.LEFT_FACET;
     String innerLeftName  = HtmlFrameBorderLayout.INNER_LEFT_FACET;
     String rightName      = HtmlFrameBorderLayout.RIGHT_FACET;
@@ -86,7 +91,7 @@
     UIComponent innerLeft   = getFacet(component, innerLeftName);
     UIComponent innerRight  = getFacet(component, innerRightName);
 
-    boolean r2l = arc.getLocaleContext().isRightToLeft();
+    boolean r2l = rc.getLocaleContext().isRightToLeft();
 
     if (left == null)
     {
@@ -119,12 +124,14 @@
     _encodeFacet(context, innerRight);
     _encodeFacet(context, right);
     _encodeFacet(context, bottom);
-    
+
     writer.endElement("div");
   }
 
-  private void _encodeFacet(FacesContext context,
-                            UIComponent component) throws IOException
+  private void _encodeFacet(
+    FacesContext context,
+    UIComponent  component
+    ) throws IOException
   {
     if (component != null)
     {

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaMessageBoxRenderer.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/pda/PdaMessageBoxRenderer.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/pda/PdaMessageBoxRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaMessageBoxRenderer.java Thu Dec 17 02:33:05 2009
@@ -21,16 +21,15 @@
 import java.io.IOException;
 
 import javax.faces.component.UIComponent;
-
 import javax.faces.context.FacesContext;
 
 import org.apache.myfaces.trinidad.bean.FacesBean;
 import org.apache.myfaces.trinidad.component.core.output.CoreMessages;
 import org.apache.myfaces.trinidad.context.Agent;
 import org.apache.myfaces.trinidad.context.RenderingContext;
-
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MessageBoxRenderer;
 
+
 /**
  * Renderer for org.apache.myfaces.trinidad.Messages, family org.apache.myfaces.trinidad.Messages.
  *
@@ -42,19 +41,24 @@
     this(CoreMessages.TYPE);
   }
 
-  protected PdaMessageBoxRenderer(FacesBean.Type type)
+  protected PdaMessageBoxRenderer(
+    FacesBean.Type type)
   {
     super(type);
   }
 
-  protected void encodeAll(FacesContext context, RenderingContext arc,
-      UIComponent component, FacesBean bean) throws IOException
+  protected void encodeAll(
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    Agent agent = arc.getAgent();
+    Agent agent = rc.getAgent();
 
-    // BlackBerry and many pda browsers don't support inline style of 
-    // display:none. Thus, it is necessary to slip rendering entire 
-    // element if there is no message to display. 
+    // BlackBerry and many pda browsers don't support inline style of
+    // display:none. Thus, it is necessary to slip rendering entire
+    // element if there is no message to display.
     // This method checks for the condition and returns true.
 
     if (agent != null &&
@@ -68,6 +72,6 @@
         return;
       }
     }
-    super.encodeAll(context, arc, component, bean);
+    super.encodeAll(context, rc, component, bean);
   }
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaNavigationPaneRenderer.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/pda/PdaNavigationPaneRenderer.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/pda/PdaNavigationPaneRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaNavigationPaneRenderer.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
@@ -30,65 +30,66 @@
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.OutputUtils;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
 
+
 /**
- * On PDA, do not render NavigationPane children in a table. Instead, render 
+ * On PDA, do not render NavigationPane children in a table. Instead, render
  * them consecutively with non-breaking spaces. Also, renderTabItems as buttons
  */
 public class PdaNavigationPaneRenderer extends NavigationPaneRenderer
 {
-  public PdaNavigationPaneRenderer() 
+  public PdaNavigationPaneRenderer()
   {
-    super();        
+    super();
   }
-  
+
   @Override
   protected void renderTabItem(
-    FacesContext context,
-    RenderingContext arc,
-    ResponseWriter rw,
+    FacesContext        context,
+    RenderingContext    rc,
+    ResponseWriter      rw,
     Map<String, Object> itemData,
-    boolean isRtl
-    )throws IOException
+    boolean             isRtl
+    ) throws IOException
   {
-    renderNonOverlappingItem(context, arc, rw, itemData, isRtl, false, false);
+    renderNonOverlappingItem(context, rc, rw, itemData, isRtl, false, false);
   }
-    
+
   @Override
   protected void renderNonOverlappingItem(
-    FacesContext context,
-    RenderingContext arc,
-    ResponseWriter rw,
+    FacesContext        context,
+    RenderingContext    rc,
+    ResponseWriter      rw,
     Map<String, Object> itemData,
-    boolean isRtl,
-    boolean isBar,
-    boolean isList
+    boolean             isRtl,
+    boolean             isBar,
+    boolean             isList
     ) throws IOException
   {
     //Pocket IE, IE Mobile and BlackBerry browsers do not support
     //style="display:inine" attribute. Therefore, instead of putting content in
     //columns of a table, render it inside a span with appropriate styling.
-    if (!isList) 
+    if (!isList)
     {
         rw.startElement("span", null);
         StringBuilder itemStyleClass = new StringBuilder();
-        String userStyleClass = 
+        String userStyleClass =
              toString(itemData.get("styleClass"));
-        if (userStyleClass != null) 
+        if (userStyleClass != null)
         {
           itemStyleClass.append(userStyleClass);
           itemStyleClass.append(" "); // more style classes are appended below
         }
 
         // Assign the event handlers:
-        boolean isDisabled = 
+        boolean isDisabled =
            getBooleanFromProperty(itemData.get("isDisabled"));
-        boolean isActive = 
+        boolean isActive =
              getBooleanFromProperty(itemData.get("isActive"));
-        if (isActive) 
+        if (isActive)
         {
-          if (isDisabled) 
+          if (isDisabled)
           {
-            if (isBar) 
+            if (isBar)
             {
               itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BAR_ACTIVE_DISABLED_STYLE_CLASS);
             }
@@ -99,24 +100,24 @@
           }
           else
           {
-            if (isBar) 
+            if (isBar)
             {
               itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BAR_ACTIVE_ENABLED_STYLE_CLASS);
-            } 
+            }
             else
             {
               itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_ACTIVE_ENABLED_STYLE_CLASS);
             }
           }
         }
-        else 
+        else
         {
-          if (isDisabled) 
+          if (isDisabled)
           {
-            if (isBar) 
-            {  
+            if (isBar)
+            {
               itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BAR_INACTIVE_DISABLED_STYLE_CLASS);
-            } 
+            }
             else
             {
               itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_INACTIVE_DISABLED_STYLE_CLASS);
@@ -124,7 +125,7 @@
           }
           else
           {
-            if (isBar) 
+            if (isBar)
             {
               itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BAR_INACTIVE_ENABLED_STYLE_CLASS);
             }
@@ -132,72 +133,72 @@
             {
               itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_INACTIVE_ENABLED_STYLE_CLASS);
             }
-          }    
-        }  
-        renderStyleClass(context, arc, itemStyleClass.toString());
-        
+          }
+        }
+        renderStyleClass(context, rc, itemStyleClass.toString());
+
         rw.startElement("span", null); // centerContent
-        if (isList) 
+        if (isList)
         {
-          renderStyleClass(context, arc, 
+          renderStyleClass(context, rc,
                              SkinSelectors.AF_NAVIGATION_LEVEL_LIST_CONTENT_STYLE_CLASS);
         }
         else if (isBar)
         {
-          renderStyleClass(context, arc, 
+          renderStyleClass(context, rc,
                            SkinSelectors.AF_NAVIGATION_LEVEL_BAR_CONTENT_STYLE_CLASS);
         }
         else
         {
-          renderStyleClass(context, arc, 
+          renderStyleClass(context, rc,
                            SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_CONTENT_STYLE_CLASS);
         }
-        
+
         writeInlineStyles(rw, toString(itemData.get("inlineStyle")), null);
-        appendIconAndText(context, arc, rw, 
-                           toString(itemData.get("icon")), 
+        appendIconAndText(context, rc, rw,
+                           toString(itemData.get("icon")),
                            itemData, isDisabled, isRtl);
         rw.endElement("span"); // centerContent
-        
-        boolean narrowScreen = supportsNarrowScreen(arc);
-        
-        if (!getBooleanFromProperty(itemData.get("isLast"))) 
+
+        boolean narrowScreen = supportsNarrowScreen(rc);
+
+        if (!getBooleanFromProperty(itemData.get("isLast")))
         {
           rw.startElement("span", null); // rightContent
-          if (isBar) 
+          if (isBar)
           {
-            renderStyleClass(context, arc, 
+            renderStyleClass(context, rc,
                              SkinSelectors.AF_NAVIGATION_LEVEL_BAR_SEPARATOR_STYLE_CLASS);
-          } 
+          }
           else
           {
-            renderStyleClass(context, arc, 
+            renderStyleClass(context, rc,
                                 SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_SEPARATOR_STYLE_CLASS);
           }
-          
-          // Narrow-screen PDAs don't need"|", since navigation items 
+
+          // Narrow-screen PDAs don't need"|", since navigation items
           // are rendered vertically for narrow-screen PDAs.
           if (!narrowScreen)
           {
             rw.write("|");
           }
-          
+
           rw.endElement("span"); // rightContent
-        }  
+        }
         rw.endElement("span"); // rightContent
-        
+
         // render vertically for narrow-screen PDAs
         if (narrowScreen)
-        { 
+        {
           rw.startElement("br", null);
           rw.endElement("br");
         }
       }
       // Render as List
-      else 
+      else
       {
          rw.startElement("table", null);
-         OutputUtils.renderLayoutTableAttributes(context, arc, "0", null);
+         OutputUtils.renderLayoutTableAttributes(context, rc, "0", null);
          String appendedStyle = null;
          writeInlineStyles(rw, toString(itemData.get("inlineStyle")),
            appendedStyle); // user's style + what we must have on top of it
@@ -224,12 +225,12 @@
            {
              itemStyleClass.append(
                  SkinSelectors.AF_NAVIGATION_LEVEL_LIST_ACTIVE_ENABLED_STYLE_CLASS);
-           }                      
-         }  
+           }
+         }
          else
          {
            if (isDisabled)
-           {         
+           {
              itemStyleClass.append(
                  SkinSelectors.AF_NAVIGATION_LEVEL_LIST_INACTIVE_DISABLED_STYLE_CLASS);
            }
@@ -238,14 +239,14 @@
              itemStyleClass.append(
                  SkinSelectors.AF_NAVIGATION_LEVEL_LIST_INACTIVE_ENABLED_STYLE_CLASS);
            }
-         }  
-         renderStyleClass(context, arc, itemStyleClass.toString());
+         }
+         renderStyleClass(context, rc, itemStyleClass.toString());
          rw.startElement("tbody", null);
          rw.startElement("tr", null);
          rw.startElement("td", null); // bulletCell
          renderStyleClass(
             context,
-            arc,
+            rc,
             SkinSelectors.AF_NAVIGATION_LEVEL_LIST_BULLET_STYLE_CLASS);
          rw.startElement("div", null); // bulletContent
          rw.write(" ");
@@ -253,12 +254,12 @@
          rw.endElement("td"); // bulletCell
          rw.startElement("td", null); // centerCell
          rw.startElement("div", null); // centerContent
-         renderStyleClass(context, arc,
+         renderStyleClass(context, rc,
            SkinSelectors.AF_NAVIGATION_LEVEL_LIST_CONTENT_STYLE_CLASS);
-      
+
          appendIconAndText(
             context,
-            arc,
+            rc,
             rw,
             toString(itemData.get("icon")),
             itemData,
@@ -268,7 +269,7 @@
          rw.endElement("td"); // centerCell
          rw.endElement("tr");
          rw.endElement("tbody");
-         rw.endElement("table");   
-      }   
-  }        
+         rw.endElement("table");
+      }
+  }
 }

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.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/pda/PdaTableRenderer.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/pda/PdaTableRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.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.pda;
 
 import java.io.IOException;
+
 import java.util.List;
 
 import javax.faces.component.UIComponent;
@@ -32,7 +33,7 @@
 import org.apache.myfaces.trinidad.component.core.data.CoreColumn;
 import org.apache.myfaces.trinidad.component.core.data.CoreTable;
 import org.apache.myfaces.trinidad.context.RenderingContext;
-
+import org.apache.myfaces.trinidad.util.IntegerUtils;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.OutputUtils;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.TableRenderer;
@@ -43,7 +44,7 @@
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.RowData;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableRenderingContext;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.TableUtils;
-import org.apache.myfaces.trinidad.util.IntegerUtils;
+
 
 public class PdaTableRenderer extends TableRenderer
 {
@@ -53,7 +54,6 @@
   {
     super(CoreTable.TYPE);
   }
-  
 
   /**
    * renders attributes on the outermost table element.
@@ -61,15 +61,15 @@
    */
   @Override
   protected void renderTableAttributes(
-    FacesContext        context,
-    RenderingContext arc,
-    UIComponent  component,
-    FacesBean    bean,
-    Object       cellPadding,
-    Object       border
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean,
+    Object           cellPadding,
+    Object           border
     ) throws IOException
   {
-    Object width = getWidth(bean);
+    Object width = getWidth(component, bean);
 
     // On mobile devices, table width is set to full browser width unless
     // the width is specified.
@@ -80,7 +80,7 @@
 
 
     OutputUtils.renderLayoutTableAttributes(context,
-                                            arc,
+                                            rc,
                                             cellPadding,
                                             "0",    // cell spacing
                                             border,
@@ -90,10 +90,10 @@
   @Override
   protected final void renderControlBar(
     FacesContext          context,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    UIComponent           component)
-    throws IOException
+    UIComponent           component
+    ) throws IOException
   {
     UIComponent action = getFacet(component, CoreTable.ACTIONS_FACET);
     boolean tableNotEmpty = !tContext.getRowData().isEmptyTable();
@@ -107,7 +107,7 @@
       writer.startElement("tr", null);
       // start control bar
       writer.startElement("td", null);
-      renderStyleClass(context, arc,
+      renderStyleClass(context, rc,
                        SkinSelectors.AF_TABLE_CONTROL_BAR_TOP_STYLE);
 
       if (action != null)
@@ -117,7 +117,7 @@
         writer.endElement("tr");
         writer.startElement("tr", null);
         writer.startElement("td", null);
-        renderStyleClass(context, arc,
+        renderStyleClass(context, rc,
             SkinSelectors.AF_TABLE_CONTROL_BAR_TOP_STYLE);
       }
 
@@ -132,46 +132,48 @@
         */
         // =-=AEW Is "valign" even a real attr for divs???
         writer.writeAttribute("valign", "middle", null);
-        delegateRenderer(context, arc, component,
+        delegateRenderer(context, rc, component,
                          getFacesBean(component), getSharedNavBarRenderer());
-        
+
         writer.endElement("div");
       }
 
       // end control bar row
       writer.endElement("td");
       writer.endElement("tr");
-      
+
     }
   }
 
   @Override
   protected void renderSubControlBar(
-    FacesContext context,
-    RenderingContext arc,
+    FacesContext          context,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    UIComponent component,
-    boolean isUpper) throws IOException
+    UIComponent           component,
+    boolean               isUpper
+    ) throws IOException
   {
     // No-op.
   }
 
   private void _renderEmptyCell(
-    FacesContext        context,
-    RenderingContext arc,
+    FacesContext          context,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    boolean             isSelect,
-    Object              emptyText) throws IOException
+    boolean               isSelect,
+    Object                emptyText
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
     writer.startElement("td", null);
     String cellClass = _getCellFormat(tContext, isSelect);
-    renderStyleClass(context, arc, cellClass);
+    renderStyleClass(context, rc, cellClass);
 
     if (emptyText == null)
       emptyText = XhtmlConstants.NBSP_STRING;
     writer.writeText(emptyText, null);
-    
+
     // end the cell
     writer.endElement("td");
   }
@@ -179,10 +181,11 @@
   // render the actual table content, with headers
   @Override
   protected void renderTableContent(
-    FacesContext context,
-    final RenderingContext arc,
+    FacesContext                context,
+    final RenderingContext      rc,
     final TableRenderingContext tContext,
-    final UIComponent component) throws IOException
+    final UIComponent           component
+    ) throws IOException
   {
     ResponseWriter writer = context.getResponseWriter();
     FacesBean bean = getFacesBean(component);
@@ -192,24 +195,24 @@
     //
     writer.endElement("table");
 
-    
+
     //
     // start the content table with the same attributes as the title table
     //
     writer.startElement("table", component);
-    renderTableAttributes(context, arc, component, bean,
+    renderTableAttributes(context, rc, component, bean,
                           "2", "1");
 
     //
     // write out the grid color as the border color for the grid lines
     // and border of the table
     //
-    renderStyleClass(context, arc, SkinSelectors.AF_TABLE_CONTENT_STYLE);
+    renderStyleClass(context, rc, SkinSelectors.AF_TABLE_CONTENT_STYLE);
 
     //
     // 1. Gather all the data we need to render
     //
-    
+
     final RowData rowData = tContext.getRowData();
     boolean isEmptyTable      = rowData.isEmptyTable();
     final UIComponent detail = tContext.getDetail();
@@ -217,61 +220,61 @@
     //
     // 2. Render the top / column header
     //
-    _renderTableHeader(context, arc, tContext, component);
-      
+    _renderTableHeader(context, rc, tContext, component);
+
     // render the column header
     if (tContext.hasColumnHeaders())
-      _renderColumnHeader(context, arc, tContext, component);
+      _renderColumnHeader(context, rc, tContext, component);
 
     //
     // 3. Render each row
     //
-    
+
     ColumnData colData = tContext.getColumnData();
     final RenderStage renderStage = tContext.getRenderStage();
-    
+
     renderStage.setStage(RenderStage.DATA_STAGE);
-    
-    
+
+
     // use the special response writer in our data section that
     // defaults data cells with no data to <br>
     //tContext.setDataResponseWriterUsed(true);
     int physicalCol = 0;
-    
+
     if (isEmptyTable)
     {
       writer.startElement("tr", null);
       if (tContext.hasSelection())
       {
         colData.setColumnIndex(physicalCol++, ColumnData.SPECIAL_COLUMN_INDEX);
-        _renderEmptyCell(context, arc, tContext, true, null);
+        _renderEmptyCell(context, rc, tContext, true, null);
       }
-      
+
       // render detail control (hide/show for the row)
       if (detail != null)
       {
         colData.setColumnIndex(physicalCol++, ColumnData.SPECIAL_COLUMN_INDEX);
-        _renderEmptyCell(context, arc, tContext, true, null);
+        _renderEmptyCell(context, rc, tContext, true, null);
       }
-      
+
       int objectNameColumnIndex = colData.getObjectNameColumnIndex();
       if (objectNameColumnIndex < physicalCol)
         objectNameColumnIndex = physicalCol;
       for (int columns = colData.getColumnCount(); physicalCol < columns;)
       {
         colData.setColumnIndex(physicalCol, ColumnData.SPECIAL_COLUMN_INDEX);
-        
+
         final Object emptyText;
         if (objectNameColumnIndex == physicalCol)
         {
-          emptyText = getEmptyText(bean);
+          emptyText = getEmptyText(component, bean);
         }
         else
         {
           emptyText =  null;
         }
-        
-        _renderEmptyCell(context, arc, tContext, false, //isSelect
+
+        _renderEmptyCell(context, rc, tContext, false, //isSelect
                          emptyText);
         physicalCol++;
       }
@@ -289,118 +292,124 @@
             // compute all the rowSpans for the current row:
             rowData.setCurrentRowSpan(-1); //reset
             renderStage.setStage(RenderStage.START_ROW_STAGE);
-            renderSingleRow(fc, arc, tContext, component);
+            renderSingleRow(fc, rc, tContext, component);
             renderStage.setStage(RenderStage.DATA_STAGE);
             // render each of the individual rows in the rowSpan:
             for(int i=0, sz=rowData.getCurrentRowSpan(); i<sz; i++)
             {
               // start the row
               rw.startElement("tr", null);
-              renderSingleRow(fc, arc, tContext, component);
+              renderSingleRow(fc, rc, tContext, component);
               rowData.incCurrentSubRow();
               // end the row
               rw.endElement("tr");
             }
-            
+
             // if necessary, render a detail row
             if ((detail != null) &&
                 ((UIXTable) tableBase).getDisclosedRowKeys().isContained())
             {
               renderStage.setStage(RenderStage.DETAIL_ROW_STAGE);
-              
+
               rw.startElement("tr", null);
               rw.startElement("td", null);
               rw.writeAttribute("colspan",
                                 IntegerUtils.getString(tContext.getActualColumnCount()),
                                 null);
-              
+
               // out.writeAttribute(CLASS_ATTRIBUTE, TABLE_DETAIL_STYLE);
-              
+
               encodeChild(fc, detail);
-              
+
               rw.endElement("td");
               rw.endElement("tr");
-              
+
               // restore the data stage
               renderStage.setStage(RenderStage.DATA_STAGE);
             }
-            
+
           }
         };
       loop.run(context, tContext.getCollectionComponent());
     }
     // render the column footer
-    _renderColumnFooter(context,arc,tContext,component);
-    
+    _renderColumnFooter(context,rc,tContext,component);
+
     // we're done with the defaulting data response writer
     //context.setDataResponseWriterUsed(false);
   }
-  
-     @SuppressWarnings("unchecked")
-    private void _renderColumnFooter(
-       FacesContext          context,
-       RenderingContext   arc,
-       TableRenderingContext tContext,
-       UIComponent           component) throws IOException
 
+  @SuppressWarnings("unchecked")
+  private void _renderColumnFooter(
+    FacesContext          context,
+    RenderingContext      rc,
+    TableRenderingContext tContext,
+    UIComponent           component
+    ) throws IOException
+  {
+    tContext.getRenderStage().setStage(RenderStage.COLUMN_FOOTER_STAGE);
+    final ColumnData colData = tContext.getColumnData();
+    UIComponent footer = getFacet(component, CoreTable.FOOTER_FACET);
+    if (footer != null)
+    {
+      ResponseWriter writer = context.getResponseWriter();
+      writer.startElement(XhtmlConstants.TABLE_ROW_ELEMENT, null);
+      /*  boolean useScroll = (getHeight(getFacesBean(component)) != null) && isIE(arc);
+     if (useScroll)
      {
-       tContext.getRenderStage().setStage(RenderStage.COLUMN_FOOTER_STAGE);
-       final ColumnData colData = tContext.getColumnData();
-       UIComponent footer = getFacet(component, CoreTable.FOOTER_FACET);
-       if (footer != null)
-       {
-         ResponseWriter writer = context.getResponseWriter();
-         writer.startElement(XhtmlConstants.TABLE_ROW_ELEMENT, null);
-       /*  boolean useScroll = (getHeight(getFacesBean(component)) != null) && isIE(arc);
-         if (useScroll)
-         {
-           writer.writeAttribute("style", "position:relative;"+
-                                          "bottom:expression("+
-                                           "this.offsetParent.scrollHeight-this.offsetParent.scrollTop-"+
-                                           "this.offsetParent.clientHeight+1);" +
-                                          "left:-1px", null);
-         }
-*/
-         writer.startElement(XhtmlConstants.TABLE_HEADER_ELEMENT, null);
-         // total rows may need an ID. see bug 3211593:
-         /* Need new scheme for generateUniqueId()?
-         String rowID = XhtmlLafUtils.generateUniqueID(tContext);
-         writer.writeAttribute(XhtmlLafConstants.ID_ATTRIBUTE, rowID, null);
-         tContext.getRowData().setCurrentRowHeaderID(rowID);
-         */
-         final int firstFooterPhysicalIndex = colData.getPhysicalIndexOfFirstFooter();
-         final int colSpan = (firstFooterPhysicalIndex > 0)?  firstFooterPhysicalIndex: tContext.getActualColumnCount();
-         writer.writeAttribute(XhtmlConstants.COLSPAN_ATTRIBUTE, IntegerUtils.getString(colSpan), null);
-         renderStyleClass(context, arc, SkinSelectors.AF_TABLE_COLUMN_FOOTER_STYLE);
-         encodeChild(context, footer);
-         writer.endElement(XhtmlConstants.TABLE_HEADER_ELEMENT);
-         if (firstFooterPhysicalIndex > 0)
-         {
-           colData.setColumnIndex(tContext.getSpecialColumnCount(),
-                                  0/*logicalColumnIndex*/);
-
-           for(UIComponent child : (List<UIComponent>)component.getChildren())
-           {
-             if (child.isRendered())
-             {
-               encodeChild(context, child);
-             }
-           }
-         }
-         writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
-       }
+       writer.writeAttribute("style", "position:relative;"+
+                                      "bottom:expression("+
+                                       "this.offsetParent.scrollHeight-this.offsetParent.scrollTop-"+
+                                       "this.offsetParent.clientHeight+1);" +
+                                      "left:-1px", null);
      }
+  */
+      writer.startElement(XhtmlConstants.TABLE_HEADER_ELEMENT, null);
+      // total rows may need an ID. see bug 3211593:
+      /* Need new scheme for generateUniqueId()?
+     String rowID = XhtmlLafUtils.generateUniqueID(tContext);
+     writer.writeAttribute(XhtmlLafConstants.ID_ATTRIBUTE, rowID, null);
+     tContext.getRowData().setCurrentRowHeaderID(rowID);
+     */
+      final int firstFooterPhysicalIndex =
+        colData.getPhysicalIndexOfFirstFooter();
+      final int colSpan =
+        (firstFooterPhysicalIndex > 0)? firstFooterPhysicalIndex:
+        tContext.getActualColumnCount();
+      writer.writeAttribute(XhtmlConstants.COLSPAN_ATTRIBUTE,
+          IntegerUtils.getString(colSpan), null);
+      renderStyleClass(context, rc,
+          SkinSelectors.AF_TABLE_COLUMN_FOOTER_STYLE);
+      encodeChild(context, footer);
+      writer.endElement(XhtmlConstants.TABLE_HEADER_ELEMENT);
+      if (firstFooterPhysicalIndex > 0)
+      {
+        colData.setColumnIndex(tContext.getSpecialColumnCount(),
+            0) /*logicalColumnIndex*/;
 
+        for (UIComponent child:
+          (List<UIComponent>) component.getChildren())
+        {
+          if (child.isRendered())
+          {
+            encodeChild(context, child);
+          }
+        }
+      }
+      writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
+    }
+  }
 
   @Override
   protected final void renderSingleRow(
     FacesContext          context,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    UIComponent           component) throws IOException
+    UIComponent           component
+    ) throws IOException
   {
     int stage = tContext.getRenderStage().getStage();
-    
+
     switch(stage)
     {
       case RenderStage.COLUMN_HEADER_STAGE:
@@ -413,23 +422,23 @@
       default:
         throw new AssertionError("Bad renderStage:"+stage);
     }
-    
+
     ColumnData colData = tContext.getColumnData();
     int[] hidden = tContext.getHiddenColumns();
     int columns = tContext.getColumnCount();
-    
+
     // render the special columns, such as selection and details:
     int physicalColumn = renderSpecialColumns(context,
-                                              arc,
+                                              rc,
                                               tContext,
                                               component,
                                               0);
-    
+
     for (int currCol = 0; currCol < columns; currCol++)
     {
       if (hidden[currCol] == TableRenderingContext.NORMAL_COLUMN)
       {
-        UIComponent child = 
+        UIComponent child =
           (UIComponent) component.getChildren().get(currCol);
         if (!(child instanceof UIXColumn))
           continue;
@@ -449,26 +458,25 @@
         }
       }
     }
-    
-  }
-  
 
+  }
 
   // render the complete column header
   private void _renderColumnHeader(
     FacesContext          context,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    UIComponent           component) throws IOException
+    UIComponent           component
+    ) throws IOException
   {
     tContext.getRenderStage().setStage(RenderStage.COLUMN_HEADER_STAGE);
-    
+
     ResponseWriter writer = context.getResponseWriter();
     ColumnData colData = tContext.getColumnData();
     colData.setRowIndex(0);
     writer.startElement("tr", null);
 
-    int physicalCol = renderSpecialColumns(context, arc, tContext, component, 0);
+    int physicalCol = renderSpecialColumns(context, rc, tContext, component, 0);
     int[] hidden = tContext.getHiddenColumns();
     int colCount = component.getChildCount();
 
@@ -476,7 +484,7 @@
     {
       if (hidden[j] != TableRenderingContext.NORMAL_COLUMN)
         continue;
-      UIComponent child = 
+      UIComponent child =
         (UIComponent) component.getChildren().get(j);
       if (!(child instanceof UIXColumn))
         continue;
@@ -495,12 +503,12 @@
         physicalCol = colData.getPhysicalColumnIndex();
       }
     }
-    
+
     colData.setRowIndex(-1);
-    
+
     writer.endElement("tr");
   }
-  
+
   // get the style class for the current cell
   private String _getCellFormat(
     TableRenderingContext tContext,
@@ -512,7 +520,7 @@
     int row = rowData.getRangeIndex();
     int physicalColumn = colData.getPhysicalColumnIndex();
     int logicalColumn = colData.getLogicalColumnIndex();
-    
+
     BandingData bandingData = tContext.getBanding();
     boolean band = bandingData.getBand(tContext, row,
                                        physicalColumn,
@@ -545,19 +553,19 @@
                              SkinSelectors.AF_COLUMN_CELL_ICON_FORMAT_STYLE);
       }
     }
-    
+
     return cellClass;
   }
-    
+
   /**
    * @todo Reconsider our choice of style for this element!
    */
   private void _renderTableHeader(
     FacesContext          context,
-    RenderingContext   arc,
+    RenderingContext      rc,
     TableRenderingContext tContext,
-    UIComponent           component)
-    throws IOException
+    UIComponent           component
+    ) throws IOException
   {
     // implement header facet on table: see bug 3788610
     ResponseWriter writer = context.getResponseWriter();
@@ -569,7 +577,7 @@
       writer.startElement(XhtmlConstants.TABLE_DATA_ELEMENT, null);
       writer.writeAttribute(XhtmlConstants.COLSPAN_ATTRIBUTE,
         tContext.getActualColumnCount(), null);
-      renderStyleClass(context, arc, SkinSelectors.AF_COLUMN_SORTABLE_HEADER_ICON_STYLE_CLASS);
+      renderStyleClass(context, rc, SkinSelectors.AF_COLUMN_SORTABLE_HEADER_ICON_STYLE_CLASS);
 
       encodeChild(context, header);
 
@@ -577,5 +585,5 @@
       writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
       writer.endElement("thead");
     }
-  }    
-}
+  }
+}
\ No newline at end of file

Modified: myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/TrainRenderer.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/pda/TrainRenderer.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/pda/TrainRenderer.java (original)
+++ myfaces/trinidad/branches/trinidad-2.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/TrainRenderer.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
@@ -30,15 +30,14 @@
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 import org.apache.myfaces.trinidad.util.IntegerUtils;
-
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlConstants;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlUtils;
 
+
 public class TrainRenderer
   extends XhtmlRenderer
 {
-
   /**
    * Constructor.
    */
@@ -49,52 +48,53 @@
 
   @Override
   protected void encodeAll(
-    FacesContext        context,
-    RenderingContext    arc,
-    UIComponent         component,
-    FacesBean           bean) throws IOException
+    FacesContext     context,
+    RenderingContext rc,
+    UIComponent      component,
+    FacesBean        bean
+    ) throws IOException
   {
-    if (arc.getFormData() == null)
+    if (rc.getFormData() == null)
     {
       _LOG.warning("TRAIN_MUST_INSIDE_FORM");
       return;
     }
 
-    UIXProcess process = (UIXProcess) component;          
+    UIXProcess process = (UIXProcess) component;
     UIComponent stamp = process.getNodeStamp();
-    
+
     if(stamp != null)
-    { 
-      Object oldPath = process.getRowKey();      
+    {
+      Object oldPath = process.getRowKey();
       boolean isNewPath = _setNewPath(process);
       if (isNewPath)
       {
         int selectedIndex = process.getRowIndex();
-        int length = process.getRowCount();      
+        int length = process.getRowCount();
         String pattern;
         String[] parameters;
-        
-        selectedIndex++; 
-        
+
+        selectedIndex++;
+
         if (length == XhtmlConstants.MAX_VALUE_UNKNOWN)
         {
-          pattern = arc.getTranslatedString(
+          pattern = rc.getTranslatedString(
             _SINGLE_RANGE_FORMAT_NO_TOTAL_STRING);
-    
+
           parameters = new String[]
           {
-            arc.getTranslatedString(_STEP_TEXT_KEY),
+            rc.getTranslatedString(_STEP_TEXT_KEY),
             IntegerUtils.getString(selectedIndex)
           };
-          
+
         }
         else
         {
-          pattern = arc.getTranslatedString(_SINGLE_RANGE_FORMAT_TOTAL_STRING);
-    
+          pattern = rc.getTranslatedString(_SINGLE_RANGE_FORMAT_TOTAL_STRING);
+
           parameters = new String[]
           {
-            arc.getTranslatedString(_STEP_TEXT_KEY),
+            rc.getTranslatedString(_STEP_TEXT_KEY),
             IntegerUtils.getString(selectedIndex),
             IntegerUtils.getString(length)
           };
@@ -102,8 +102,8 @@
 
         ResponseWriter writer = context.getResponseWriter();
         writer.startElement("span", null);
-        renderInlineStyle(context, arc, bean);
-        String outputText = XhtmlUtils.getFormattedString(pattern, parameters); 
+        renderInlineStyle(context, rc, component, bean);
+        String outputText = XhtmlUtils.getFormattedString(pattern, parameters);
         writer.writeText(outputText, null);
         writer.endElement("span");
         process.setRowKey(oldPath);
@@ -116,7 +116,7 @@
   {
     return true;
   }
-  
+
   private boolean _setNewPath(
     UIXProcess component)
   {
@@ -124,15 +124,14 @@
     component.setRowKey(focusPath);
     return true;
   }
-  
-  static private final String _STEP_TEXT_KEY = 
+
+  static private final String _STEP_TEXT_KEY =
     "af_train.STEP";
   static private final String _SINGLE_RANGE_FORMAT_TOTAL_STRING =
     "af_train.FORMAT_TOTAL";
   static private final String _SINGLE_RANGE_FORMAT_NO_TOTAL_STRING =
     "af_train.FORMAT_NO_TOTAL";
 
-  private static final TrinidadLogger _LOG = 
+  private static final TrinidadLogger _LOG =
     TrinidadLogger.createTrinidadLogger(TrainRenderer.class);
-  
 }



Mime
View raw message