incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r468204 [1/6] - in /incubator/adffaces/trunk/trinidad/trinidad-impl/src: main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/ main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ test/resources/org/apache/myfaces...
Date Fri, 27 Oct 2006 00:24:14 GMT
Author: awiner
Date: Thu Oct 26 17:24:13 2006
New Revision: 468204

URL: http://svn.apache.org/viewvc?view=rev&rev=468204
Log:
ADFFACES-228: fix navigationPane on PDAs.  Apply modified version of patch from Piyush Hari

Added:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaNavigationPaneRenderer.java
Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/navigationPaneBar-minimalPPC-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/navigationPaneButtons-minimalPPC-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/navigationPaneTabs-minimalPPC-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelPage-facets-minimalPPC-golden.xml
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/resources/org/apache/myfaces/trinidadinternal/renderkit/golden/panelPageHeader-minimalPPC-golden.xml

Added: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaNavigationPaneRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaNavigationPaneRenderer.java?view=auto&rev=468204
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaNavigationPaneRenderer.java
(added)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaNavigationPaneRenderer.java
Thu Oct 26 17:24:13 2006
@@ -0,0 +1,253 @@
+/*
+ * Copyright  2006,2006 The Apache Software Foundation.
+ * 
+ * Licensed 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 KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.trinidadinternal.renderkit.core.pda;
+
+import java.io.IOException;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
+import org.apache.myfaces.trinidad.context.RenderingContext;
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.NavigationPaneRenderer;
+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 
+ * them consecutively with non-breaking spaces. Also, renderTabItems as buttons
+ */
+public class PdaNavigationPaneRenderer extends NavigationPaneRenderer
+{
+  public PdaNavigationPaneRenderer() 
+  {
+    super();        
+  }
+  
+  @Override
+  protected void renderTabItem(
+    FacesContext context,
+    RenderingContext arc,
+    ResponseWriter rw,
+    Map<String, Object> itemData,
+    boolean isRtl
+    )throws IOException
+  {
+    renderNonOverlappingItem(context, arc, rw, itemData, isRtl, false, false);
+  }
+    
+  @Override
+  protected void renderNonOverlappingItem(
+    FacesContext context,
+    RenderingContext arc,
+    ResponseWriter rw,
+    Map<String, Object> itemData,
+    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) 
+    {
+        rw.startElement("span", null);
+        StringBuilder itemStyleClass = new StringBuilder();
+        String userStyleClass = 
+             toString(itemData.get("styleClass"));
+        if (userStyleClass != null) 
+        {
+          itemStyleClass.append(userStyleClass);
+          itemStyleClass.append(" "); // more style classes are appended below
+        }
+
+        // Assign the event handlers:
+        boolean isDisabled = 
+           getBooleanFromProperty(itemData.get("isDisabled"));
+        boolean isActive = 
+             getBooleanFromProperty(itemData.get("isActive"));
+        if (isActive) 
+        {
+          if (isDisabled) 
+          {
+            if (isBar) 
+            {
+              itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BAR_ACTIVE_DISABLED_STYLE_CLASS);
+            }
+            else
+            {
+              itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_ACTIVE_DISABLED_STYLE_CLASS);
+            }
+          }
+          else
+          {
+            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 
+        {
+          if (isDisabled) 
+          {
+            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);
+            }
+          }
+          else
+          {
+            if (isBar) 
+            {
+              itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BAR_INACTIVE_ENABLED_STYLE_CLASS);
+            }
+            else
+            {
+              itemStyleClass.append(SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_INACTIVE_ENABLED_STYLE_CLASS);
+            }
+          }    
+        }  
+        renderStyleClass(context, arc, itemStyleClass.toString());
+        
+        rw.startElement("span", null); // centerContent
+        if (isList) 
+        {
+          renderStyleClass(context, arc, 
+                             SkinSelectors.AF_NAVIGATION_LEVEL_LIST_CONTENT_STYLE_CLASS);
+        }
+        else if (isBar)
+        {
+          renderStyleClass(context, arc, 
+                           SkinSelectors.AF_NAVIGATION_LEVEL_BAR_CONTENT_STYLE_CLASS);
+        }
+        else
+        {
+          renderStyleClass(context, arc, 
+                           SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_CONTENT_STYLE_CLASS);
+        }
+        appendIconAndText(context, arc, rw, 
+                           toString(itemData.get("icon")), 
+                           itemData, isDisabled, isRtl);
+        rw.endElement("span"); // centerContent
+
+        if (!getBooleanFromProperty(itemData.get("isLast"))) 
+        {
+          rw.startElement("span", null); // rightContent
+          if (isBar) 
+          {
+            renderStyleClass(context, arc, 
+                             SkinSelectors.AF_NAVIGATION_LEVEL_BAR_SEPARATOR_STYLE_CLASS);
+          } 
+          else
+          {
+            renderStyleClass(context, arc, 
+                                SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_SEPARATOR_STYLE_CLASS);
+          }
+          rw.write("|");
+          rw.endElement("span"); // rightContent
+        }  
+        rw.endElement("span"); // rightContent
+      }
+      // Render as List
+      else 
+      {
+         rw.startElement("table", null);
+         OutputUtils.renderLayoutTableAttributes(context, arc, "0", null);
+         String appendedStyle = null;
+         writeInlineStyles(rw, toString(itemData.get("inlineStyle")),
+           appendedStyle); // user's style + what we must have on top of it
+         rw.writeAttribute("title", itemData.get("shortDesc"), null);
+         StringBuilder itemStyleClass = new StringBuilder();
+         String userStyleClass = toString(itemData.get("styleClass"));
+         if (userStyleClass != null)
+         {
+           itemStyleClass.append(userStyleClass);
+           itemStyleClass.append(" "); // more style classes are appended below
+         }
+
+         // Assign the event handlers:
+         boolean isDisabled = getBooleanFromProperty(itemData.get("isDisabled"));
+         boolean isActive = getBooleanFromProperty(itemData.get("isActive"));
+         if (isActive)
+         {
+           if (isDisabled)
+           {
+             itemStyleClass.append(
+                                   SkinSelectors.AF_NAVIGATION_LEVEL_LIST_ACTIVE_DISABLED_STYLE_CLASS);
+           }
+           else
+           {
+             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);
+           }
+           else
+           {
+             itemStyleClass.append(
+                 SkinSelectors.AF_NAVIGATION_LEVEL_LIST_INACTIVE_ENABLED_STYLE_CLASS);
+           }
+         }  
+         renderStyleClass(context, arc, itemStyleClass.toString());
+         rw.startElement("tbody", null);
+         rw.startElement("tr", null);
+         rw.startElement("td", null); // bulletCell
+         renderStyleClass(
+            context,
+            arc,
+            SkinSelectors.AF_NAVIGATION_LEVEL_LIST_BULLET_STYLE_CLASS);
+         rw.startElement("div", null); // bulletContent
+         rw.write(" ");
+         rw.endElement("div"); // bulletContent
+         rw.endElement("td"); // bulletCell
+         rw.startElement("td", null); // centerCell
+         rw.startElement("div", null); // centerContent
+         renderStyleClass(context, arc,
+           SkinSelectors.AF_NAVIGATION_LEVEL_LIST_CONTENT_STYLE_CLASS);
+      
+         appendIconAndText(
+            context,
+            arc,
+            rw,
+            toString(itemData.get("icon")),
+            itemData,
+            isDisabled,
+            isRtl);
+         rw.endElement("div"); // centerContent
+         rw.endElement("td"); // centerCell
+         rw.endElement("tr");
+         rw.endElement("tbody");
+         rw.endElement("table");   
+      }   
+  }        
+}

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java?view=diff&rev=468204&r1=468203&r2=468204
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaRenderKit.java
Thu Oct 26 17:24:13 2006
@@ -37,6 +37,10 @@
     addRenderer("org.apache.myfaces.trinidad.Panel",
                 "org.apache.myfaces.trinidad.ButtonBar",
                 new PanelButtonBarRenderer());
+    //PH:
+    addRenderer("org.apache.myfaces.trinidad.NavigationLevel",
+                "org.apache.myfaces.trinidad.Pane",
+                new PdaNavigationPaneRenderer());
   }
 
   @Override

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java?view=diff&rev=468204&r1=468203&r2=468204
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java
Thu Oct 26 17:24:13 2006
@@ -221,7 +221,7 @@
           currentItemData,
           renderingHint,
           isRtl);
-        previousActive = _getBooleanFromProperty(currentItemData.get("isActive"));
+        previousActive = getBooleanFromProperty(currentItemData.get("isActive"));
       }
 
       // Close up any opened choice tags:
@@ -249,7 +249,7 @@
    * renderStyleAttributes - use the NavigationLevel style class as the default
    * styleClass
    */
-  protected void _renderStyleAttributes(
+  private void _renderStyleAttributes(
     FacesContext        context,
     RenderingContext arc,
     FacesBean           bean) throws IOException
@@ -303,7 +303,7 @@
   /**
    * Renders the client ID as both "id" and "name"
    */
-  protected void _renderCommandChildId(
+  private void _renderCommandChildId(
     FacesContext context,
     UIXCommand   component
     ) throws IOException
@@ -340,7 +340,7 @@
     UIXCommand commandChild)
   {
     int itemDataIndex = navItemData.getItemCount();
-    boolean isActive = _getBooleanFromProperty(_getCommandChildProperty(commandChild, "selected"));
+    boolean isActive = getBooleanFromProperty(_getCommandChildProperty(commandChild, "selected"));
     if (isActive)
     {
       if (navItemData.getEffectiveActiveIndex() == -1)
@@ -370,23 +370,16 @@
     navItemData.addItemData(itemDataMap);
   }
 
-  private boolean _getBooleanFromProperty(Object value)
+  protected boolean getBooleanFromProperty(Object value)
   {
     if (value == null)
     {
       return false;
     }
+
     return ("true".equals(value.toString()));
   }
 
-  private String _getPossiblyNullString(Object value)
-  {
-    if (value == null)
-    {
-      return null;
-    }
-    return value.toString();
-  }
 
   private Object _getCommandChildProperty(
     UIXCommand commandChild,
@@ -423,11 +416,11 @@
   {
     if (_HINT_BAR.equals(renderingHint))
     {
-      _renderNonOverlappingItem(context, arc, rw, itemData, isRtl, true, false);
+      renderNonOverlappingItem(context, arc, rw, itemData, isRtl, true, false);
     }
     else if (_HINT_BUTTONS.equals(renderingHint))
     {
-      _renderNonOverlappingItem(context, arc, rw, itemData, isRtl, false, false);
+      renderNonOverlappingItem(context, arc, rw, itemData, isRtl, false, false);
     }
     else if (_HINT_CHOICE.equals(renderingHint))
     {
@@ -435,15 +428,15 @@
     }
     else if (_HINT_LIST.equals(renderingHint))
     {
-      _renderNonOverlappingItem(context, arc, rw, itemData, isRtl, false, true);
+      renderNonOverlappingItem(context, arc, rw, itemData, isRtl, false, true);
     }
     else // _HINT_TABS
     {
-      _renderTabItem(context, arc, rw, itemData, isRtl);
+      renderTabItem(context, arc, rw, itemData, isRtl);
     }
   }
 
-  private void _writeInlineStyles(
+  protected void writeInlineStyles(
     ResponseWriter rw,
     Object userInlineStyle,
     String appendedInlineStyle
@@ -455,7 +448,7 @@
     }
     else
     {
-      String userInlineStyleString = _getPossiblyNullString(userInlineStyle).trim();
+      String userInlineStyleString = toString(userInlineStyle).trim();
       boolean needSemicolon = false;
       int lastIndex = userInlineStyleString.length()-1;
       if ( (lastIndex > 0) && (userInlineStyleString.charAt(lastIndex) != ';')
)
@@ -489,7 +482,7 @@
     }
   }
 
-  private void _appendIconAndText(
+  protected void appendIconAndText(
     FacesContext context,
     RenderingContext arc,
     ResponseWriter rw,
@@ -545,19 +538,19 @@
   {
     if (isDisabled)
     {
-      rw.write(_getPossiblyNullString(itemData.get("text")));
+      rw.write(toString(itemData.get("text")));
       return;
     }
 
     UIXCommand commandChild = (UIXCommand)itemData.get("component");
-    String destination = _getPossiblyNullString(itemData.get("destination"));
+    String destination = toString(itemData.get("destination"));
     boolean immediate = false;
     boolean partialSubmit = false;
     Object old = null;
     if (destination == null)
     {
-      immediate = _getBooleanFromProperty(itemData.get("immediate"));
-      partialSubmit = _getBooleanFromProperty(itemData.get("partialSubmit"));
+      immediate = getBooleanFromProperty(itemData.get("immediate"));
+      partialSubmit = getBooleanFromProperty(itemData.get("partialSubmit"));
       if (partialSubmit)
       {
         AutoSubmitUtils.writeDependencies(context, arc);
@@ -583,7 +576,7 @@
     else
     {
       renderEncodedActionURI(context, "href", destination);
-      String targetFrame = _getPossiblyNullString(itemData.get("targetFrame"));
+      String targetFrame = toString(itemData.get("targetFrame"));
       if ( (targetFrame != null) && !Boolean.FALSE.equals(
         arc.getAgent().getCapabilities().get(TrinidadAgent.CAP_TARGET)) )
       {
@@ -610,12 +603,12 @@
     _writeCommandChildProperty(rw, commandChild, "onmouseover");
     _writeCommandChildProperty(rw, commandChild, "onmouseup");
 
-    String accessKey = _getPossiblyNullString(itemData.get("accessKey"));
+    String accessKey = toString(itemData.get("accessKey"));
     if ( !isDisabled && (accessKey != null) )
     {
       rw.writeAttribute("accessKey", accessKey, null);
     }
-    rw.write(_getPossiblyNullString(itemData.get("text")));
+    rw.write(toString(itemData.get("text")));
     rw.endElement("a"); // linkElement
 
     if (destination == null)
@@ -692,7 +685,7 @@
     return script;
   }
 
-  private void _renderNonOverlappingItem(
+  protected void renderNonOverlappingItem(
     FacesContext context,
     RenderingContext arc,
     ResponseWriter rw,
@@ -709,11 +702,11 @@
     {
       appendedStyle = "display: inline;"; // style to make the table inline
     }
-    _writeInlineStyles(rw, _getPossiblyNullString(itemData.get("inlineStyle")),
+    writeInlineStyles(rw, toString(itemData.get("inlineStyle")),
       appendedStyle); // user's style + what we must have on top of it
     rw.writeAttribute("title", itemData.get("shortDesc"), null);
     StringBuilder itemStyleClass = new StringBuilder();
-    String userStyleClass = _getPossiblyNullString(itemData.get("styleClass"));
+    String userStyleClass = toString(itemData.get("styleClass"));
     if (userStyleClass != null)
     {
       itemStyleClass.append(userStyleClass);
@@ -721,8 +714,8 @@
     }
 
     // Assign the event handlers:
-    boolean isDisabled = _getBooleanFromProperty(itemData.get("isDisabled"));
-    boolean isActive = _getBooleanFromProperty(itemData.get("isActive"));
+    boolean isDisabled = getBooleanFromProperty(itemData.get("isDisabled"));
+    boolean isActive = getBooleanFromProperty(itemData.get("isActive"));
     if (isActive)
     {
       if (isDisabled)
@@ -839,18 +832,18 @@
       renderStyleClass(context, arc,
         SkinSelectors.AF_NAVIGATION_LEVEL_BUTTONS_CONTENT_STYLE_CLASS);
     }
-    _appendIconAndText(
+    appendIconAndText(
       context,
       arc,
       rw,
-      _getPossiblyNullString(itemData.get("icon")),
+      toString(itemData.get("icon")),
       itemData,
       isDisabled,
       isRtl);
     rw.endElement("div"); // centerContent
     rw.endElement("td"); // centerCell
 
-    if ( !isList && !_getBooleanFromProperty(itemData.get("isLast")) )
+    if ( !isList && !getBooleanFromProperty(itemData.get("isLast")) )
     {
       rw.startElement("td", null); // rightCell
       rw.startElement("div", null); // rightContent
@@ -882,14 +875,14 @@
     ) throws IOException
   {
     // Choice items do not support icons at this time.
-    boolean isDisabled = _getBooleanFromProperty(itemData.get("isDisabled"));
+    boolean isDisabled = getBooleanFromProperty(itemData.get("isDisabled"));
     // If the agent, doesn't support disabled options, don't render anything
     // for such options
     if ( !isDisabled || 
          Boolean.TRUE.equals(arc.getAgent().getCapabilities().get(
                 TrinidadAgent.CAP_SUPPORTS_DISABLED_OPTIONS)))
     {
-      boolean isActive = _getBooleanFromProperty(itemData.get("isActive"));
+      boolean isActive = getBooleanFromProperty(itemData.get("isActive"));
       rw.startElement("option", null);
       if (isActive)
       {
@@ -902,14 +895,14 @@
       {
         // Write the script to evaluate once the item is selected
         UIXCommand commandChild = (UIXCommand)itemData.get("component");
-        String destination = _getPossiblyNullString(itemData.get("destination"));
+        String destination = toString(itemData.get("destination"));
         boolean immediate = false;
         boolean partialSubmit = false;
         Object old = null;
         if (destination == null)
         {
-          immediate = _getBooleanFromProperty(itemData.get("immediate"));
-          partialSubmit = _getBooleanFromProperty(itemData.get("partialSubmit"));
+          immediate = getBooleanFromProperty(itemData.get("immediate"));
+          partialSubmit = getBooleanFromProperty(itemData.get("partialSubmit"));
           if (partialSubmit)
           {
             AutoSubmitUtils.writeDependencies(context, arc);
@@ -939,7 +932,7 @@
         {
           String encodedDestination =
             context.getExternalContext().encodeActionURL(destination.toString());
-          String targetFrame = _getPossiblyNullString(itemData.get("targetFrame"));
+          String targetFrame = toString(itemData.get("targetFrame"));
           StringBuilder sb = new StringBuilder();
           if ( (targetFrame != null) && !Boolean.FALSE.equals(
             arc.getAgent().getCapabilities().get(TrinidadAgent.CAP_TARGET)) )
@@ -961,7 +954,7 @@
         rw.writeAttribute("value", selectionScript, null);
       }
 
-      rw.write(_getPossiblyNullString(itemData.get("text")));
+      rw.write(toString(itemData.get("text")));
       rw.endElement("option");
     }
   }
@@ -1059,7 +1052,7 @@
     rw.endElement("span");
   }
 
-  private void _renderTabItem(
+  protected void renderTabItem(
     FacesContext context,
     RenderingContext arc,
     ResponseWriter rw,
@@ -1069,11 +1062,11 @@
   {
     rw.startElement("table", null);
     OutputUtils.renderLayoutTableAttributes(context, arc, "0", null);
-    _writeInlineStyles(rw, _getPossiblyNullString(itemData.get("inlineStyle")),
+    writeInlineStyles(rw, toString(itemData.get("inlineStyle")),
       "display: inline;"); // user's style + what we must have on top of it
     rw.writeAttribute("title", itemData.get("shortDesc"), null);
     StringBuilder itemStyleClass = new StringBuilder();
-    String userStyleClass = _getPossiblyNullString(itemData.get("styleClass"));
+    String userStyleClass = toString(itemData.get("styleClass"));
     if (userStyleClass != null)
     {
       itemStyleClass.append(userStyleClass);
@@ -1081,8 +1074,8 @@
     }
 
     // Assign the event handlers:
-    boolean isDisabled = _getBooleanFromProperty(itemData.get("isDisabled"));
-    boolean isActive = _getBooleanFromProperty(itemData.get("isActive"));
+    boolean isDisabled = getBooleanFromProperty(itemData.get("isDisabled"));
+    boolean isActive = getBooleanFromProperty(itemData.get("isActive"));
     String sectionStyleClass1;
     String sectionStyleClass2 = null;
     if (isActive)
@@ -1108,9 +1101,9 @@
     _writeInlineTbodyStyles(arc, rw);
     rw.startElement("tr", null);
 
-    boolean isFirst = _getBooleanFromProperty(itemData.get("isFirst"));
-    boolean isLast = _getBooleanFromProperty(itemData.get("isLast"));
-    boolean previousActive = _getBooleanFromProperty(itemData.get("previousActive"));
+    boolean isFirst = getBooleanFromProperty(itemData.get("isFirst"));
+    boolean isLast = getBooleanFromProperty(itemData.get("isLast"));
+    boolean previousActive = getBooleanFromProperty(itemData.get("previousActive"));
 
     // start portion of tab:
     if (isFirst)
@@ -1220,7 +1213,7 @@
         isRtl);
       rw.endElement("td");
     }
-    else if ( isActive ||  (!_getBooleanFromProperty(itemData.get("nextActive"))) )
+    else if ( isActive ||  (!getBooleanFromProperty(itemData.get("nextActive"))) )
     {
       // end-join-selected-to-deselected or end-join-deselected-to-deselected
       rw.startElement("td", null);
@@ -1275,11 +1268,11 @@
     renderStyleClass(context, arc, topStyleClass);
     if (itemData != null)
     {
-      _appendIconAndText(
+      appendIconAndText(
         context,
         arc,
         rw,
-        _getPossiblyNullString(itemData.get("icon")),
+        toString(itemData.get("icon")),
         itemData,
         isDisabled,
         isRtl);



Mime
View raw message