You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2006/09/23 12:44:29 UTC

svn commit: r449215 [2/3] - in /myfaces/tobago/trunk/theme: scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/mozilla_4_7/tag/ scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/ scarbor...

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PopupRenderer.java Sat Sep 23 03:44:27 2006
@@ -31,6 +31,8 @@
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -76,30 +78,30 @@
     contentStyle.append(top != null ? top : "50");
     contentStyle.append("; ");
 
-    writer.startElement("div", component);
+    writer.startElement(HtmlConstants.DIV, component);
     writer.writeIdAttribute(clientId);
     writer.writeComponentClass();
-    writer.writeAttribute("onclick", "Tobago.popupBlink('" + clientId + "')", null);
+    writer.writeAttribute(HtmlAttributes.ONCLICK, "Tobago.popupBlink('" + clientId + "')", null);
     if (ClientProperties.getInstance(facesContext).getUserAgent().isMsie()) {
       String bgImage = ResourceManagerUtil.getImageWithPath(facesContext, "image/popupBg.png");
-      writer.writeAttribute("style", "background: none; "
+      writer.writeAttribute(HtmlAttributes.STYLE, "background: none; "
           + "filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"
           + bgImage + "', sizingMethod='scale');", null);    }
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
     if (ClientProperties.getInstance(facesContext).getUserAgent().isMsie()) {
-      writer.startElement("iframe", component);
-      writer.writeIdAttribute(clientId + SUBCOMPONENT_SEP + "iframe");
+      writer.startElement(HtmlConstants.IFRAME, component);
+      writer.writeIdAttribute(clientId + SUBCOMPONENT_SEP + HtmlConstants.IFRAME);
       writer.writeClassAttribute("tobago-popup-iframe");
-      writer.writeAttribute("style", contentStyle.toString(), null);
-      writer.writeAttribute("src", "javascript:false;", null);
-      writer.endElement("iframe");
+      writer.writeAttribute(HtmlAttributes.STYLE, contentStyle.toString(), null);
+      writer.writeAttribute(HtmlAttributes.SRC, "javascript:false;", null);
+      writer.endElement(HtmlConstants.IFRAME);
     }
-    writer.startElement("div", component);
+    writer.startElement(HtmlConstants.DIV, component);
     writer.writeIdAttribute(contentDivId);
     writer.writeClassAttribute("tobago-popup-content");
 
 
-    writer.writeAttribute("style", contentStyle.toString(), null);
+    writer.writeAttribute(HtmlAttributes.STYLE, contentStyle.toString(), null);
   }
 
   public void encodeEndTobago(FacesContext facesContext,
@@ -108,7 +110,7 @@
     UIPopup component = (UIPopup) uiComponent;
     final String clientId = component.getClientId(facesContext);
 
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
 
     String setupScript = "Tobago.setupPopup('" + clientId + "', '"
         + component.getLeft() + "', '" + component.getTop() + "');";

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java Sat Sep 23 03:44:27 2006
@@ -26,6 +26,8 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -67,28 +69,28 @@
 
     TobagoResponseWriter writer = (TobagoResponseWriter) facesContext.getResponseWriter();
 
-    writer.startElement("span", null);
+    writer.startElement(HtmlConstants.SPAN, null);
     // TODO: use tobago standard class names
     writer.writeClassAttribute("tobago-progress");
-    writer.writeAttribute("title", title, null);
+    writer.writeAttribute(HtmlAttributes.TITLE, title, null);
 
-    writer.startElement("img", null);
+    writer.startElement(HtmlConstants.IMG, null);
     writer.writeClassAttribute("tobago-progress-color1");
-    writer.writeAttribute("src", image, null);
-    writer.writeAttribute("alt", title, null);
-    writer.writeAttribute("width", value1, null);
-    writer.writeAttribute("border", "0", null);
-    writer.endElement("img");
+    writer.writeAttribute(HtmlAttributes.SRC, image, null);
+    writer.writeAttribute(HtmlAttributes.ALT, title, null);
+    writer.writeAttribute(HtmlAttributes.WIDTH, value1, null);
+    writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
+    writer.endElement(HtmlConstants.IMG);
 
-    writer.startElement("img", null);
+    writer.startElement(HtmlConstants.IMG, null);
     writer.writeClassAttribute("tobago-progress-color2");
-    writer.writeAttribute("src", image, null);
-    writer.writeAttribute("alt", title, null);
-    writer.writeAttribute("width", value2, null);
-    writer.writeAttribute("border", "0", null);
-    writer.endElement("img");
+    writer.writeAttribute(HtmlAttributes.SRC, image, null);
+    writer.writeAttribute(HtmlAttributes.ALT, title, null);
+    writer.writeAttribute(HtmlAttributes.WIDTH, value2, null);
+    writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
+    writer.endElement(HtmlConstants.IMG);
 
-    writer.endElement("span");
+    writer.endElement(HtmlConstants.SPAN);
   }
 
 }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java Sat Sep 23 03:44:27 2006
@@ -45,6 +45,8 @@
 import org.apache.myfaces.tobago.renderkit.InputRendererBase;
 import org.apache.myfaces.tobago.renderkit.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.taglib.component.ToolBarTag;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
@@ -111,9 +113,9 @@
     String classes
         = (String) component.getAttributes().get(ATTR_STYLE_CLASS);
 
-    writer.startElement("div", component);
+    writer.startElement(HtmlConstants.DIV, component);
     writer.writeClassAttribute(classes + " tobago-richTextEditor-container");
-    writer.writeAttribute("style", null, ATTR_STYLE);
+    writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE);
     // class, stly.width, style.height
 
     UIComponent toolbar = component.getFacet(FACET_TOOL_BAR);
@@ -130,39 +132,39 @@
     String content = getCurrentValue(facesContext, component);
 
     if (previewState) {
-      writer.startElement("input", component);
-      writer.writeAttribute("type", "hidden", null);
+      writer.startElement(HtmlConstants.INPUT, component);
+      writer.writeAttribute(HtmlAttributes.TYPE, "hidden", null);
       writer.writeNameAttribute(clientId);
-      writer.writeAttribute("value", content, null);
-      writer.endElement("input");
+      writer.writeAttribute(HtmlAttributes.VALUE, content, null);
+      writer.endElement(HtmlConstants.INPUT);
 
-      writer.startElement("div", component);
+      writer.startElement(HtmlConstants.DIV, component);
       writer.writeClassAttribute(classes + " tobago-richTextEditor-body");
       writer.writeIdAttribute(clientId);
 
-      writer.writeAttribute("style", null, ATTR_STYLE_BODY);
+      writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE_BODY);
 
       writer.write(RichTextEditorRenderer.contentToHtml(content));
 
-      writer.endElement("div");
+      writer.endElement(HtmlConstants.DIV);
     } else {
-      writer.startElement("textarea", component);
+      writer.startElement(HtmlConstants.TEXTAREA, component);
       writer.writeClassAttribute(classes + " tobago-richTextEditor-body");
       writer.writeNameAttribute(clientId);
       writer.writeIdAttribute(clientId);
-      writer.writeAttribute("style", null, ATTR_STYLE_BODY);
+      writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE_BODY);
       String onchange = HtmlUtils.generateOnchange(component, facesContext);
       if (null != onchange) {
-        writer.writeAttribute("onchange", onchange, null);
+        writer.writeAttribute(HtmlAttributes.ONCHANGE, onchange, null);
       }
 
       if (content != null) {
         writer.writeText(content, null);
       }
 
-      writer.endElement("textarea");
+      writer.endElement(HtmlConstants.TEXTAREA);
     }
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
   }
 
   private UIComponent createToolbar(FacesContext facesContext, UIInput component) {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectBooleanCheckboxRenderer.java Sat Sep 23 03:44:27 2006
@@ -27,6 +27,8 @@
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.renderkit.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -70,35 +72,35 @@
 
     if (label != null && !inline) {
 
-      writer.startElement("table", component);
-      writer.writeAttribute("border", "0", null);
-      writer.writeAttribute("cellspacing", "0", null);
-      writer.writeAttribute("cellpadding", "0", null);
-      writer.writeAttribute("summary", "", null);
-      writer.writeAttribute("title", null, ATTR_TIP);
+      writer.startElement(HtmlConstants.TABLE, component);
+      writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
+      writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", null);
+      writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", null);
+      writer.writeAttribute(HtmlAttributes.SUMMARY, "", null);
+      writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
 
-      writer.startElement("tr", null);
-      writer.startElement("td", null);
+      writer.startElement(HtmlConstants.TR, null);
+      writer.startElement(HtmlConstants.TD, null);
     }
 
     Boolean currentValue = (Boolean) component.getValue();
     boolean checked = currentValue != null && currentValue.booleanValue();
 
-    writer.startElement("input", component);
-    writer.writeAttribute("type", "checkbox", null);
-    writer.writeAttribute("value", "true", null);
-    writer.writeAttribute("checked", checked);
+    writer.startElement(HtmlConstants.INPUT, component);
+    writer.writeAttribute(HtmlAttributes.TYPE, "checkbox", null);
+    writer.writeAttribute(HtmlAttributes.VALUE, "true", null);
+    writer.writeAttribute(HtmlAttributes.CHECKED, checked);
     writer.writeNameAttribute(component.getClientId(facesContext));
     writer.writeComponentClass();
     writer.writeIdAttribute(component.getClientId(facesContext));
-    writer.writeAttribute("disabled",
+    writer.writeAttribute(HtmlAttributes.DISABLED,
         ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED));
-    writer.writeAttribute("title", null, ATTR_TIP);
-    writer.endElement("input");
+    writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
+    writer.endElement(HtmlConstants.INPUT);
 
     if (label != null && !inline) {
-      writer.endElement("td");
-      writer.startElement("td", null);
+      writer.endElement(HtmlConstants.TD);
+      writer.startElement(HtmlConstants.TD, null);
       writer.writeText("", null);
     }
 
@@ -107,9 +109,9 @@
     }
 
     if (label != null && !inline) {
-      writer.endElement("td");
-      writer.endElement("tr");
-      writer.endElement("table");
+      writer.endElement(HtmlConstants.TD);
+      writer.endElement(HtmlConstants.TR);
+      writer.endElement(HtmlConstants.TABLE);
     }
     checkForCommandFacet(component, facesContext, writer);
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyCheckboxRenderer.java Sat Sep 23 03:44:27 2006
@@ -28,6 +28,7 @@
 import org.apache.myfaces.tobago.renderkit.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.SelectManyRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.NamingContainer;
@@ -61,43 +62,43 @@
     }
     String id = component.getClientId(facesContext);
 
-    writer.startElement("table", null);
-    writer.writeAttribute("border", "0", null);
-    writer.writeAttribute("cellspacing", "0", null);
-    writer.writeAttribute("cellpadding", "0", null);
-    writer.writeAttribute("summary", "", null);
+    writer.startElement(HtmlConstants.TABLE, null);
+    writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
+    writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", null);
+    writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", null);
+    writer.writeAttribute(HtmlAttributes.SUMMARY, "", null);
     List clientIds = new ArrayList();
     for (SelectItem item : items) {
 
-      writer.startElement("tr", null);
-      writer.startElement("td", null);
+      writer.startElement(HtmlConstants.TR, null);
+      writer.startElement(HtmlConstants.TD, null);
 
       String itemId = id
           + NamingContainer.SEPARATOR_CHAR + NamingContainer.SEPARATOR_CHAR
           + item.getValue().toString();
       clientIds.add(itemId);
-      writer.startElement("input", component);
-      writer.writeAttribute("type", "checkbox", null);
+      writer.startElement(HtmlConstants.INPUT, component);
+      writer.writeAttribute(HtmlAttributes.TYPE, "checkbox", null);
 
       writer.writeComponentClass();
-      writer.writeAttribute("checked",
+      writer.writeAttribute(HtmlAttributes.CHECKED,
           RenderUtil.contains(values, item.getValue()));
       writer.writeNameAttribute(id);
       writer.writeIdAttribute(itemId);
       String formattedValue
           = getFormattedValue(facesContext, component, item.getValue());
-      writer.writeAttribute("value", formattedValue, null);
-      writer.writeAttribute("disabled",
+      writer.writeAttribute(HtmlAttributes.VALUE, formattedValue, null);
+      writer.writeAttribute(HtmlAttributes.DISABLED,
           ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED));
-      writer.endElement("input");
+      writer.endElement(HtmlConstants.INPUT);
 
       if (LOG.isDebugEnabled()) {
         LOG.debug("item.getLabel() = " + item.getLabel());
       }
       if (item.getLabel() != null) {
 
-        writer.endElement("td");
-        writer.startElement("td", null);
+        writer.endElement(HtmlConstants.TD);
+        writer.startElement(HtmlConstants.TD, null);
 
 
 
@@ -105,7 +106,7 @@
         // FIXME: see outcommented part
         writer.startElement(HtmlConstants.LABEL, null);
         writer.writeClassAttribute("tobago-label-default");
-        writer.writeAttribute("for", itemId, null);
+        writer.writeAttribute(HtmlAttributes.FOR, itemId, null);
         writer.writeText(item.getLabel(), null);
         writer.endElement(HtmlConstants.LABEL);
 //        Application application = tobagoContext.getApplication();
@@ -119,11 +120,11 @@
 //        RenderUtil.encode(label);
       }
 
-      writer.endElement("td");
-      writer.endElement("tr");
+      writer.endElement(HtmlConstants.TD);
+      writer.endElement(HtmlConstants.TR);
 
     }
-    writer.endElement("table");
+    writer.endElement(HtmlConstants.TABLE);
     checkForCommandFacet(component, clientIds, facesContext, writer);
   }
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyListboxRenderer.java Sat Sep 23 03:44:27 2006
@@ -25,10 +25,13 @@
 import org.apache.commons.logging.LogFactory;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HEIGHT;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STYLE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.renderkit.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.SelectManyRendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -85,16 +88,16 @@
     TobagoResponseWriter writer
         = (TobagoResponseWriter) facesContext.getResponseWriter();
 
-    writer.startElement("select", component);
+    writer.startElement(HtmlConstants.SELECT, component);
     String clientId = component.getClientId(facesContext);
     writer.writeNameAttribute(clientId);
     writer.writeIdAttribute(clientId);
-    writer.writeAttribute("disabled",
+    writer.writeAttribute(HtmlAttributes.DISABLED,
         ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED));
-    writer.writeAttribute("style", null, "style");
+    writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE);
     writer.writeComponentClass();
-    writer.writeAttribute("multiple", "multiple", null);
-    writer.writeAttribute("title", null, ATTR_TIP);
+    writer.writeAttribute(HtmlAttributes.MULTIPLE, "multiple", null);
+    writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
 
     Object[] values = component.getSelectedValues();
     if (LOG.isDebugEnabled()) {
@@ -102,20 +105,20 @@
     }
     for (SelectItem item : items) {
 
-      writer.startElement("option", null);
+      writer.startElement(HtmlConstants.OPTION, null);
       String formattedValue
           = getFormattedValue(facesContext, component, item.getValue());
-      writer.writeAttribute("value", formattedValue, null);
+      writer.writeAttribute(HtmlAttributes.VALUE, formattedValue, null);
       if (RenderUtil.contains(values, item.getValue())) {
-        writer.writeAttribute("selected", "selected", null);
+        writer.writeAttribute(HtmlAttributes.SELECTED, "selected", null);
       }
       writer.writeText(item.getLabel(), null);
-      writer.endElement("option");
+      writer.endElement(HtmlConstants.OPTION);
 //    LOG.debug("item-value" + item.getValue());
     }
 
 
-    writer.endElement("select");
+    writer.endElement(HtmlConstants.SELECT);
     checkForCommandFacet(component, facesContext, writer);
   }
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneChoiceRenderer.java Sat Sep 23 03:44:27 2006
@@ -30,6 +30,8 @@
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.renderkit.HtmlUtils;
 import org.apache.myfaces.tobago.renderkit.SelectOneRendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -60,32 +62,32 @@
         || ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED)
         || ComponentUtil.getBooleanAttribute(component, ATTR_READONLY);
 
-    writer.startElement("select", component);
+    writer.startElement(HtmlConstants.SELECT, component);
     writer.writeNameAttribute(component.getClientId(facesContext));
     writer.writeIdAttribute(component.getClientId(facesContext));
-    writer.writeAttribute("disabled", disabled);
-    writer.writeAttribute("style", null, ATTR_STYLE);
+    writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
+    writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE);
     writer.writeComponentClass();
-    writer.writeAttribute("title", null, ATTR_TIP);
+    writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
     String onchange = HtmlUtils.generateOnchange(component, facesContext);
     if (onchange != null) {
-      writer.writeAttribute("onchange", onchange, null);
+      writer.writeAttribute(HtmlAttributes.ONCHANGE, onchange, null);
     }
 
     Object value = component.getValue();
     for (SelectItem item : items) {
       final Object itemValue = item.getValue();
-      writer.startElement("option", null);
+      writer.startElement(HtmlConstants.OPTION, null);
       String formattedValue
           = getFormattedValue(facesContext, component, itemValue);
-      writer.writeAttribute("value", formattedValue, null);
+      writer.writeAttribute(HtmlAttributes.VALUE, formattedValue, null);
       if (itemValue.equals(value)) {
-        writer.writeAttribute("selected", "selected", null);
+        writer.writeAttribute(HtmlAttributes.SELECTED, "selected", null);
       }
       writer.writeText(item.getLabel(), null);
-      writer.endElement("option");
+      writer.endElement(HtmlConstants.OPTION);
     }
-    writer.endElement("select");
+    writer.endElement(HtmlConstants.SELECT);
     super.encodeEndTobago(facesContext, component);
     checkForCommandFacet(component, facesContext, writer);
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneListboxRenderer.java Sat Sep 23 03:44:27 2006
@@ -29,6 +29,8 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.renderkit.SelectOneRendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -73,19 +75,19 @@
     UISelectOne component = (UISelectOne) input;
     List<SelectItem> items = ComponentUtil.getSelectItems(component);
 
-    writer.startElement("select", component);
+    writer.startElement(HtmlConstants.SELECT, component);
     String clientId = component.getClientId(facesContext);
     writer.writeNameAttribute(clientId);
     writer.writeIdAttribute(clientId);
-    writer.writeAttribute("disabled",
+    writer.writeAttribute(HtmlAttributes.DISABLED,
         ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED));
-    writer.writeAttribute("style", null, "style");
+    writer.writeAttribute(HtmlAttributes.STYLE, null, "style");
     writer.writeComponentClass();
-    writer.writeAttribute("title", null, ATTR_TIP);
-    writer.writeAttribute("size", 2, null); // should be greater 1
+    writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
+    writer.writeAttribute(HtmlAttributes.SIZE, 2, null); // should be greater 1
     if (!ComponentUtil.getBooleanAttribute(component, ATTR_REQUIRED)) {
-      writer.writeAttribute("onchange", "Tobago.selectOneListboxChange(this)", null);
-      writer.writeAttribute("onclick", "Tobago.selectOneListboxClick(this)", null);
+      writer.writeAttribute(HtmlAttributes.ONCHANGE, "Tobago.selectOneListboxChange(this)", null);
+      writer.writeAttribute(HtmlAttributes.ONCLICK, "Tobago.selectOneListboxClick(this)", null);
     }
 
     Object value = component.getValue();
@@ -94,21 +96,21 @@
     }
     for (SelectItem item : items) {
 
-      writer.startElement("option", null);
+      writer.startElement(HtmlConstants.OPTION, null);
       final Object itemValue = item.getValue();
       String formattedValue
           = getFormattedValue(facesContext, component, itemValue);
-      writer.writeAttribute("value", formattedValue, null);
+      writer.writeAttribute(HtmlAttributes.VALUE, formattedValue, null);
       if (itemValue.equals(value)) {
-        writer.writeAttribute("selected", "selected", null);
+        writer.writeAttribute(HtmlAttributes.SELECTED, "selected", null);
       }
       writer.writeText(item.getLabel(), null);
-      writer.endElement("option");
+      writer.endElement(HtmlConstants.OPTION);
 //    LOG.debug("item-value" + itemValue);
     }
 
 
-    writer.endElement("select");
+    writer.endElement(HtmlConstants.SELECT);
     super.encodeEndTobago(facesContext, component);
     checkForCommandFacet(component, facesContext, writer);
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectOneRadioRenderer.java Sat Sep 23 03:44:27 2006
@@ -30,6 +30,7 @@
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.renderkit.SelectOneRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.NamingContainer;
@@ -76,12 +77,12 @@
         = (TobagoResponseWriter) facesContext.getResponseWriter();
 
     if (!inline) {
-      writer.startElement("table", component);
-      writer.writeAttribute("border", "0", null);
-      writer.writeAttribute("cellspacing", "0", null);
-      writer.writeAttribute("cellpadding", "0", null);
-      writer.writeAttribute("summary", "", null);
-      writer.writeAttribute("title", null, ATTR_TIP);
+      writer.startElement(HtmlConstants.TABLE, component);
+      writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
+      writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", null);
+      writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", null);
+      writer.writeAttribute(HtmlAttributes.SUMMARY, "", null);
+      writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
     }
 
     Object value = component.getValue();
@@ -89,46 +90,46 @@
     for (SelectItem item : items) {
 
       if (!inline) {
-        writer.startElement("tr", null);
-        writer.startElement("td", null);
+        writer.startElement(HtmlConstants.TR, null);
+        writer.startElement(HtmlConstants.TD, null);
       }
 
       String id = clientId + NamingContainer.SEPARATOR_CHAR
           + NamingContainer.SEPARATOR_CHAR + item.getValue().toString();
       clientIds.add(id);
-      writer.startElement("input", component);
-      writer.writeAttribute("type", "radio", null);
+      writer.startElement(HtmlConstants.INPUT, component);
+      writer.writeAttribute(HtmlAttributes.TYPE, "radio", null);
       writer.writeComponentClass();
       if (item.getValue().equals(value)) {
-        writer.writeAttribute("checked", "checked", null);
+        writer.writeAttribute(HtmlAttributes.CHECKED, "checked", null);
       }
       writer.writeNameAttribute(clientId);
 
       writer.writeIdAttribute(id);
       String formattedValue
           = getFormattedValue(facesContext, component, item.getValue());
-      writer.writeAttribute("value", formattedValue, null);
-      writer.writeAttribute("disabled",
+      writer.writeAttribute(HtmlAttributes.VALUE, formattedValue, null);
+      writer.writeAttribute(HtmlAttributes.DISABLED,
           ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED));
-      writer.writeAttribute("title", null, ATTR_TIP);
+      writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
       if (!ComponentUtil.getBooleanAttribute(component, ATTR_REQUIRED)) {
-        writer.writeAttribute("onclick", "Tobago.selectOneRadioClick(this, '" + clientId + "')", null);
+        writer.writeAttribute(HtmlAttributes.ONCLICK, "Tobago.selectOneRadioClick(this, '" + clientId + "')", null);
       }
-      writer.endElement("input");
+      writer.endElement(HtmlConstants.INPUT);
 
       if (item.getLabel() != null) {
 
 
         if (!inline) {
-          writer.endElement("td");
-          writer.startElement("td", null);
+          writer.endElement(HtmlConstants.TD);
+          writer.startElement(HtmlConstants.TD, null);
         }
 
         // FIXME: use created UIOutput Label
         // FIXME: see outcommented part
         writer.startElement(HtmlConstants.LABEL, null);
         writer.writeClassAttribute("tobago-label-default");
-        writer.writeAttribute("for", id, null);
+        writer.writeAttribute(HtmlAttributes.FOR, id, null);
         writer.writeText(item.getLabel(), null);
         writer.endElement(HtmlConstants.LABEL);
 //        Application application = tobagoContext.getApplication();
@@ -143,12 +144,12 @@
 
       }
       if (!inline) {
-        writer.endElement("td");
-        writer.endElement("tr");
+        writer.endElement(HtmlConstants.TD);
+        writer.endElement(HtmlConstants.TR);
       }
     }
     if (!inline) {
-      writer.endElement("table");
+      writer.endElement(HtmlConstants.TABLE);
     }
 
     checkForCommandFacet(component, clientIds, facesContext, writer);

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Sat Sep 23 03:44:27 2006
@@ -73,6 +73,8 @@
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.SheetRendererWorkaround;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import static org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.SheetPageCommandRenderer.PAGE_RENDERER_TYPE;
 import org.apache.myfaces.tobago.util.StringUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
@@ -118,14 +120,14 @@
         = (TobagoResponseWriter) facesContext.getResponseWriter();
 
     // Outher sheet div
-    writer.startElement("div", null);
+    writer.startElement(HtmlConstants.DIV, null);
     writer.writeIdAttribute(sheetId + "_outer_div");
     writer.writeClassAttribute("tobago-sheet-outer-div");
-    writer.writeAttribute("style", sheetStyle, null);
+    writer.writeAttribute(HtmlAttributes.STYLE, sheetStyle, null);
 
     renderSheet(facesContext, data);
 
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
 
     ResourceManager resourceManager
         = ResourceManagerFactory.getResourceManager(facesContext);
@@ -211,30 +213,30 @@
     List<UIColumn> columnList = data.getRendererdColumns();
 
 
-    writer.startElement("input", null);
+    writer.startElement(HtmlConstants.INPUT, null);
     writer.writeIdAttribute(sheetId + WIDTHS_POSTFIX);
     writer.writeNameAttribute(sheetId + WIDTHS_POSTFIX);
-    writer.writeAttribute("type", "hidden", null);
-    writer.writeAttribute("value", "", null);
-    writer.endElement("input");
+    writer.writeAttribute(HtmlAttributes.TYPE, "hidden", null);
+    writer.writeAttribute(HtmlAttributes.VALUE, "", null);
+    writer.endElement(HtmlConstants.INPUT);
 
     if (!NONE.equals(selectable)) {
-      writer.startElement("input", null);
+      writer.startElement(HtmlConstants.INPUT, null);
       writer.writeIdAttribute(sheetId + SELECTED_POSTFIX);
       writer.writeNameAttribute(sheetId + SELECTED_POSTFIX);
-      writer.writeAttribute("type", "hidden", null);
-      writer.writeAttribute("value", selectedRows, null);
-      writer.endElement("input");
+      writer.writeAttribute(HtmlAttributes.TYPE, "hidden", null);
+      writer.writeAttribute(HtmlAttributes.VALUE, selectedRows, null);
+      writer.endElement(HtmlConstants.INPUT);
     }
 
 
     final boolean showHeader = data.isShowHeader();
     if (showHeader) {
       // begin rendering header
-      writer.startElement("div", null);
+      writer.startElement(HtmlConstants.DIV, null);
       writer.writeIdAttribute(sheetId + "_header_div");
       writer.writeClassAttribute("tobago-sheet-header-div");
-      writer.writeAttribute("style", headerStyle, null);
+      writer.writeAttribute(HtmlAttributes.STYLE, headerStyle, null);
 
       int columnCount = 0;
       final int sortMarkerWidth = getAscendingMarkerWidth(facesContext, data);
@@ -243,18 +245,18 @@
             ascending, descending, image1x1, sortMarkerWidth);
         columnCount++;
       }
-      writer.startElement("div", null);
+      writer.startElement(HtmlConstants.DIV, null);
       writer.writeIdAttribute(sheetId + "_header_box_filler");
       writer.writeClassAttribute("tobago-sheet-header-box");
-      writer.writeAttribute("style", "width: 0px", null);
+      writer.writeAttribute(HtmlAttributes.STYLE, "width: 0px", null);
 
-      writer.startElement("div", null);
+      writer.startElement(HtmlConstants.DIV, null);
       writer.writeClassAttribute("tobago-sheet-header");
       writer.write("&nbsp;");
-      writer.endElement("div");
+      writer.endElement(HtmlConstants.DIV);
 
-      writer.endElement("div");
-      writer.endElement("div");
+      writer.endElement(HtmlConstants.DIV);
+      writer.endElement(HtmlConstants.DIV);
       // end rendering header
     }
 
@@ -281,26 +283,26 @@
       bodyStyle += " padding-top: 0px;";
     }
 
-    writer.startElement("div", null);
+    writer.startElement(HtmlConstants.DIV, null);
     writer.writeIdAttribute(sheetId + "_data_div");
     writer.writeClassAttribute("tobago-sheet-body-div ");
-    writer.writeAttribute("style", bodyStyle, null);
+    writer.writeAttribute(HtmlAttributes.STYLE, bodyStyle, null);
 
-    writer.startElement("table", null);
-    writer.writeAttribute("cellspacing", "0", null);
-    writer.writeAttribute("cellpadding", "0", null);
-    writer.writeAttribute("summary", "", null);
+    writer.startElement(HtmlConstants.TABLE, null);
+    writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", null);
+    writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", null);
+    writer.writeAttribute(HtmlAttributes.SUMMARY, "", null);
     writer.writeClassAttribute("tobago-sheet-body-table");
-    writer.writeAttribute("style", sheetBodyStyle, null);
+    writer.writeAttribute(HtmlAttributes.STYLE, sheetBodyStyle, null);
 
     if (columnWidths != null) {
-      writer.startElement("colgroup", null);
+      writer.startElement(HtmlConstants.COLGROUP, null);
       for (Integer columnWidth : columnWidths) {
-        writer.startElement("col", null);
-        writer.writeAttribute("width", columnWidth, null);
-        writer.endElement("col");
+        writer.startElement(HtmlConstants.COL, null);
+        writer.writeAttribute(HtmlAttributes.WIDTH, columnWidth, null);
+        writer.endElement(HtmlConstants.COL);
       }
-      writer.endElement("colgroup");
+      writer.endElement(HtmlConstants.COLGROUP);
     }
 
     // Print the Content
@@ -337,7 +339,7 @@
 
       //requestMap.put(var, value);
 
-      writer.startElement("tr", null);
+      writer.startElement(HtmlConstants.TR, null);
       writer.writeClassAttribute(rowClass);
       writer.writeIdAttribute(sheetId + "_data_tr_" + rowIndex);
       writer.writeText("", null);
@@ -360,33 +362,33 @@
             + (cellClass != null ? cellClass : "");
 
 
-        writer.startElement("td", column);
+        writer.startElement(HtmlConstants.TD, column);
 
         writer.writeClassAttribute(tdClass);
-        writer.writeAttribute("style", tdStyle, null);
+        writer.writeAttribute(HtmlAttributes.STYLE, tdStyle, null);
 
-        writer.startElement("div", null);
+        writer.startElement(HtmlConstants.DIV, null);
         writer.writeIdAttribute(
             sheetId + "_data_row_" + visibleIndex + "_column" + columnIndex);
         writer.writeClassAttribute("tobago-sheet-cell-outer");
-        writer.writeAttribute("style", style, null);
+        writer.writeAttribute(HtmlAttributes.STYLE, style, null);
 
-        writer.startElement("div", null);
+        writer.startElement(HtmlConstants.DIV, null);
         writer.writeClassAttribute("tobago-sheet-cell-inner");
         writer.writeText("", null);
 
         if (column instanceof UIColumnSelector) {
           final boolean disabled
               = ComponentUtil.getBooleanAttribute(column, ATTR_DISABLED);
-          writer.startElement("img", null);
+          writer.startElement(HtmlConstants.IMG, null);
           if (disabled) {
-            writer.writeAttribute("src", selectorDisabled, null);
+            writer.writeAttribute(HtmlAttributes.SRC, selectorDisabled, null);
           } else {
-            writer.writeAttribute("src", unchecked, null);
+            writer.writeAttribute(HtmlAttributes.SRC, unchecked, null);
           }
           writer.writeIdAttribute(sheetId + "_data_row_selector_" + rowIndex);
           writer.writeClassAttribute("tobago-sheet-column-selector");
-          writer.endElement("img");
+          writer.endElement(HtmlConstants.IMG);
         } else {
           for (UIComponent grandkid : data.getRenderedChildrenOf(column)) {
             // set height to 0 to prevent use of layoutheight from parent
@@ -395,34 +397,34 @@
           }
         }
 
-        writer.endElement("div");
-        writer.endElement("div");
-        writer.endElement("td");
+        writer.endElement(HtmlConstants.DIV);
+        writer.endElement(HtmlConstants.DIV);
+        writer.endElement(HtmlConstants.TD);
       }
 
-      writer.startElement("td", null);
+      writer.startElement(HtmlConstants.TD, null);
       writer.writeClassAttribute("tobago-sheet-cell-td");
 
-      writer.startElement("div", null);
+      writer.startElement(HtmlConstants.DIV, null);
       writer.writeIdAttribute(
           sheetId + "_data_row_" + visibleIndex + "_column_filler");
       writer.writeClassAttribute("tobago-sheet-cell-outer");
-      writer.writeAttribute("style", "width: 0px;", null);
+      writer.writeAttribute(HtmlAttributes.STYLE, "width: 0px;", null);
 
       writer.write("&nbsp;");
 
-      writer.endElement("div");
-      writer.endElement("td");
+      writer.endElement(HtmlConstants.DIV);
+      writer.endElement(HtmlConstants.TD);
 
-      writer.endElement("tr");
+      writer.endElement(HtmlConstants.TR);
     }
 
     data.setRowIndex(-1);
 
     //requestMap.remove(var);
 
-    writer.endElement("table");
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.TABLE);
+    writer.endElement(HtmlConstants.DIV);
 
 // END RENDER BODY CONTENT
 
@@ -441,9 +443,9 @@
           "height", footerHeight + "px")
           + " top: " + (sheetHeight - footerHeight) + "px;";
 
-      writer.startElement("div", data);
+      writer.startElement(HtmlConstants.DIV, data);
       writer.writeClassAttribute("tobago-sheet-footer");
-      writer.writeAttribute("style", footerStyle, null);
+      writer.writeAttribute(HtmlAttributes.STYLE, footerStyle, null);
 
 
       if (isValidPagingValue(showRowRange)) {
@@ -462,15 +464,15 @@
         final String className = "tobago-sheet-paging-rows-span"
             + " tobago-sheet-paging-span-" + showRowRange;
 
-        writer.startElement("span", null);
-        writer.writeAttribute("onclick", "tobagoSheetEditPagingRow(this, '"
+        writer.startElement(HtmlConstants.SPAN, null);
+        writer.writeAttribute(HtmlAttributes.ONCLICK, "tobagoSheetEditPagingRow(this, '"
             + pagerCommandId + "', '" + pagingOnClick + "')", null);
         writer.writeClassAttribute(className);
-        writer.writeAttribute("title", ResourceManagerUtil.getPropertyNotNull(
+        writer.writeAttribute(HtmlAttributes.TITLE, ResourceManagerUtil.getPropertyNotNull(
             facesContext, "tobago", "sheetPagingInfoRowPagingTip"), null);
         writer.write(createSheetPagingInfo(data, facesContext,
             pagerCommandId, true));
-        writer.endElement("span");
+        writer.endElement(HtmlConstants.SPAN);
       }
 
 
@@ -478,11 +480,11 @@
         final String className = "tobago-sheet-paging-links-span"
             + " tobago-sheet-paging-span-" + showDirectLinks;
 
-        writer.startElement("span", null);
+        writer.startElement(HtmlConstants.SPAN, null);
         writer.writeClassAttribute(className);
         writer.writeIdAttribute(sheetId + SUBCOMPONENT_SEP + "pagingLinks");
         writeDirectPagingLinks(writer, facesContext, application, data);
-        writer.endElement("span");
+        writer.endElement(HtmlConstants.SPAN);
       }
 
       if (isValidPagingValue(showPageRange)) {
@@ -502,7 +504,7 @@
             + " tobago-sheet-paging-span-" + showPageRange;
 
 
-        writer.startElement("span", null);
+        writer.startElement(HtmlConstants.SPAN, null);
         writer.writeClassAttribute(className);
         writer.writeIdAttribute(sheetId + SUBCOMPONENT_SEP + "pagingPages");
         writer.writeText("", null);
@@ -510,22 +512,22 @@
         boolean atBeginning = data.isAtBeginning();
         link(facesContext, application, atBeginning, PageAction.FIRST, data);
         link(facesContext, application, atBeginning, PageAction.PREV, data);
-        writer.startElement("span", null);
+        writer.startElement(HtmlConstants.SPAN, null);
         writer.writeClassAttribute("tobago-sheet-paging-pages-text");
-        writer.writeAttribute("onclick", "tobagoSheetEditPagingRow(this, '"
+        writer.writeAttribute(HtmlAttributes.ONCLICK, "tobagoSheetEditPagingRow(this, '"
             + pagerCommandId + "', '" + pagingOnClick + "')", null);
-        writer.writeAttribute("title", ResourceManagerUtil.getPropertyNotNull(
+        writer.writeAttribute(HtmlAttributes.TITLE, ResourceManagerUtil.getPropertyNotNull(
             facesContext, "tobago", "sheetPagingInfoPagePagingTip"), null);
         writer.write(createSheetPagingInfo(
             data, facesContext, pagerCommandId, false));
-        writer.endElement("span");
+        writer.endElement(HtmlConstants.SPAN);
         boolean atEnd = data.isAtEnd();
         link(facesContext, application, atEnd, PageAction.NEXT, data);
         link(facesContext, application, atEnd||!data.hasRowCount(), PageAction.LAST, data);
-        writer.endElement("span");
+        writer.endElement(HtmlConstants.SPAN);
       }
 
-      writer.endElement("div");
+      writer.endElement(HtmlConstants.DIV);
     }
   }
 
@@ -730,18 +732,18 @@
         "image/sheet" + command.getToken() + (disabled ? "Disabled" : "") + ".gif");
 
     TobagoResponseWriter writer = (TobagoResponseWriter) facesContext.getResponseWriter();
-    writer.startElement("img", null);
+    writer.startElement(HtmlConstants.IMG, null);
     writer.writeIdAttribute(data.getClientId(facesContext)
         + SUBCOMPONENT_SEP + "pagingPages" + SUBCOMPONENT_SEP + command.getToken());
     writer.writeClassAttribute("tobago-sheet-footer-pager-button"
         + (disabled ? " tobago-sheet-footer-pager-button-disabled" : ""));
-    writer.writeAttribute("src", image, null);
-    writer.writeAttribute("title", tip, null);
+    writer.writeAttribute(HtmlAttributes.SRC, image, null);
+    writer.writeAttribute(HtmlAttributes.TITLE, tip, null);
     if (!disabled) {
       String onClick = ButtonRenderer.createOnClick(facesContext, link);
-      writer.writeAttribute("onclick", onClick, null);
+      writer.writeAttribute(HtmlAttributes.ONCLICK, onClick, null);
     }
-    writer.endElement("img");
+    writer.endElement(HtmlConstants.IMG);
   }
 
   private void renderColumnHeader(FacesContext facesContext,
@@ -756,10 +758,10 @@
     String divWidth = "width: " + columnWidths.get(columnCount) + "px;";
 
 
-    writer.startElement("div", null);
+    writer.startElement(HtmlConstants.DIV, null);
     writer.writeIdAttribute(sheetId + "_header_box_" + columnCount);
     writer.writeClassAttribute("tobago-sheet-header-box");
-    writer.writeAttribute("style", divWidth, null);
+    writer.writeAttribute(HtmlAttributes.STYLE, divWidth, null);
 
 // ############################################
 // ############################################
@@ -785,9 +787,9 @@
 
       String onclick = "Tobago.submitAction('"
           + sortCommand.getClientId(facesContext) + "')";
-      writer.writeAttribute("onclick", onclick, null);
+      writer.writeAttribute(HtmlAttributes.ONCLICK, onclick, null);
 
-      writer.writeAttribute("title",
+      writer.writeAttribute(HtmlAttributes.TITLE,
           ResourceManagerUtil.getPropertyNotNull(facesContext, "tobago",
               "sheetTipSorting"),
           null);
@@ -813,11 +815,11 @@
     String align
         = (String) column.getAttributes().get(ATTR_ALIGN);
 
-    writer.startElement("div", null);
+    writer.startElement(HtmlConstants.DIV, null);
     writer.writeIdAttribute(sheetId + "_header_outer_" + columnCount);
     writer.writeClassAttribute("tobago-sheet-header" + sorterClass);
     if (align != null) {
-      writer.writeAttribute("style", "text-align: " + align + ";", null);
+      writer.writeAttribute(HtmlAttributes.STYLE, "text-align: " + align + ";", null);
     }
 
     String resizerClass;
@@ -830,33 +832,33 @@
       renderColumnHeaderLabel(facesContext, writer, column, sortMarkerWidth, align,
           image1x1);
     }
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
 
-    writer.startElement("div", null);
+    writer.startElement(HtmlConstants.DIV, null);
     writer.writeIdAttribute(sheetId + "_header_resizer_" + columnCount);
     writer.writeClassAttribute(resizerClass);
     writer.write("&nbsp;");
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
 
 // ############################################
 // ############################################
     if (sorterImage != null) {
-      writer.startElement("div", null);
+      writer.startElement(HtmlConstants.DIV, null);
       writer.writeClassAttribute("tobago-sheet-header-sort-div");
-      writer.writeAttribute("title", sortTitle, null);
+      writer.writeAttribute(HtmlAttributes.TITLE, sortTitle, null);
 
-      writer.startElement("img", null);
-      writer.writeAttribute("src", sorterImage, null);
-      writer.writeAttribute("alt", "", null);
-      writer.writeAttribute("title", sortTitle, null);
-      writer.endElement("img");
+      writer.startElement(HtmlConstants.IMG, null);
+      writer.writeAttribute(HtmlAttributes.SRC, sorterImage, null);
+      writer.writeAttribute(HtmlAttributes.ALT, "", null);
+      writer.writeAttribute(HtmlAttributes.TITLE, sortTitle, null);
+      writer.endElement(HtmlConstants.IMG);
 
-      writer.endElement("div");
+      writer.endElement(HtmlConstants.DIV);
     }
 // ############################################
 // ############################################
 
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
   }
 
 
@@ -895,10 +897,10 @@
       menu.getChildren().add(menuItem);
     }
 
-    writer.startElement("div", null);
+    writer.startElement(HtmlConstants.DIV, null);
     writer.writeIdAttribute(column.getClientId(facesContext));
     writer.writeClassAttribute("tobago-sheet-selector-menu");
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
     RenderUtil.encode(facesContext, menu);
   }
 
@@ -924,18 +926,18 @@
           = ((UIData) column.getParent()).getSheetState(facesContext);
       if (column.getId().equals(sheetState.getSortedColumnId())
           && "right".equals(align)) {
-        writer.startElement("img", null);
-        writer.writeAttribute("src", image1x1, null);
-        writer.writeAttribute("alt", "", null);
-        writer.writeAttribute("width", Integer.toString(sortMarkerWidth), null);
-        writer.writeAttribute("height", "1", null);
-        writer.endElement("img");
+        writer.startElement(HtmlConstants.IMG, null);
+        writer.writeAttribute(HtmlAttributes.SRC, image1x1, null);
+        writer.writeAttribute(HtmlAttributes.ALT, "", null);
+        writer.writeAttribute(HtmlAttributes.WIDTH, Integer.toString(sortMarkerWidth), null);
+        writer.writeAttribute(HtmlAttributes.HEIGHT, "1", null);
+        writer.endElement(HtmlConstants.IMG);
       }
     } else {
-      writer.startElement("img", null);
-      writer.writeAttribute("src", image1x1, null);
-      writer.writeAttribute("alt", "", null);
-      writer.endElement("img");
+      writer.startElement(HtmlConstants.IMG, null);
+      writer.writeAttribute(HtmlAttributes.SRC, image1x1, null);
+      writer.writeAttribute(HtmlAttributes.ALT, "", null);
+      writer.endElement(HtmlConstants.IMG);
     }
   }
 
@@ -1050,12 +1052,12 @@
   private void writeLinkElement(TobagoResponseWriter writer, String str, String skip,
       String id, String hrefPostfix, boolean makeLink)
       throws IOException {
-    String type = makeLink ? "a" : "span";
+    String type = makeLink ? HtmlConstants.A : HtmlConstants.SPAN;
     writer.startElement(type, null);
     writer.writeClassAttribute("tobago-sheet-paging-links-link");
     if (makeLink) {
       writer.writeIdAttribute(id + SUBCOMPONENT_SEP + "link_" + skip);
-      writer.writeAttribute("href", "javascript: tobagoSheetSetPagerPage('"
+      writer.writeAttribute(HtmlAttributes.HREF, "javascript: tobagoSheetSetPagerPage('"
           + id + "', '" + skip + hrefPostfix, null);
     }
     writer.write(str);

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TabGroupRenderer.java Sat Sep 23 03:44:27 2006
@@ -48,6 +48,8 @@
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.StyleAttribute;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.util.AccessKeyMap;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
@@ -123,12 +125,12 @@
     TobagoResponseWriter writer
         = (TobagoResponseWriter) facesContext.getResponseWriter();
 
-    writer.startElement("input", null);
-    writer.writeAttribute("type", "hidden", null);
-    writer.writeAttribute("value", Integer.toString(activeIndex), null);
+    writer.startElement(HtmlConstants.INPUT, null);
+    writer.writeAttribute(HtmlAttributes.TYPE, "hidden", null);
+    writer.writeAttribute(HtmlAttributes.VALUE, Integer.toString(activeIndex), null);
     writer.writeNameAttribute(hiddenId);
     writer.writeIdAttribute(hiddenId);
-    writer.endElement("input");
+    writer.endElement(HtmlConstants.INPUT);
 
     // if a outer uiPage is presend, the virtual tab will go over all
     // tabs and render it as they are selected, and it will
@@ -143,15 +145,15 @@
         if (virtualTab != activeIndex) {
           oStyle.add("display", "none");
         }
-        writer.startElement("div", null);
+        writer.startElement(HtmlConstants.DIV, null);
         writer.writeComment("empty div fix problem with mozilla and fieldset");
-        writer.endElement("div");
+        writer.endElement(HtmlConstants.DIV);
 
-        writer.startElement("div", null);
+        writer.startElement(HtmlConstants.DIV, null);
         writer.writeIdAttribute(clientId);
         renderTabGroupView(facesContext, writer, component, virtualTab, oStyle,
             switchType, image1x1);
-        writer.endElement("div");
+        writer.endElement(HtmlConstants.DIV);
 
         if (TobagoConfig.getInstance(facesContext).isAjaxEnabled()
             && SWITCH_TYPE_RELOAD_TAB.equals(switchType)) {
@@ -177,29 +179,29 @@
       int virtualTab, StyleAttribute oStyle, String switchType, String image1x1)
       throws IOException {
     UIPanel[] tabs = component.getTabs();
-    writer.startElement("table", null);
-    writer.writeAttribute("border", "0", null);
-    writer.writeAttribute("cellpadding", "0", null);
-    writer.writeAttribute("cellspacing", "0", null);
-    writer.writeAttribute("summary", "", null);
+    writer.startElement(HtmlConstants.TABLE, null);
+    writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
+    writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", null);
+    writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", null);
+    writer.writeAttribute(HtmlAttributes.SUMMARY, "", null);
     final String clientId = component.getClientId(facesContext);
     writer.writeIdAttribute(clientId + '.' + virtualTab);
-    writer.writeAttribute("style", oStyle.toString(), null);
+    writer.writeAttribute(HtmlAttributes.STYLE, oStyle.toString(), null);
 
-    writer.startElement("tr", null);
-    writer.writeAttribute("valign", "bottom", null);
+    writer.startElement(HtmlConstants.TR, null);
+    writer.writeAttribute(HtmlAttributes.VALIGN, "bottom", null);
 
-    writer.startElement("td", null);
+    writer.startElement(HtmlConstants.TD, null);
 
-    writer.startElement("table", component);
-    writer.writeAttribute("border", "0", null);
-    writer.writeAttribute("cellpadding", "0", null);
-    writer.writeAttribute("cellspacing", "0", null);
-    writer.writeAttribute("summary", "", null);
-    writer.writeAttribute("style", null, ATTR_STYLE_HEADER);
+    writer.startElement(HtmlConstants.TABLE, component);
+    writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
+    writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", null);
+    writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", null);
+    writer.writeAttribute(HtmlAttributes.SUMMARY, "", null);
+    writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE_HEADER);
 
-    writer.startElement("tr", null);
-    writer.writeAttribute("valign", "bottom", null);
+    writer.startElement(HtmlConstants.TR, null);
+    writer.writeAttribute(HtmlAttributes.VALIGN, "bottom", null);
 
     UIPanel activeTab = null;
 
@@ -235,28 +237,28 @@
         innerClass = "tobago-tab-unselected-inner";
       }
 
-      writer.startElement("td", tab);
-      writer.writeAttribute("title", null, ATTR_TIP);
+      writer.startElement(HtmlConstants.TD, tab);
+      writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
 
-      writer.startElement("div", null);
+      writer.startElement(HtmlConstants.DIV, null);
       writer.writeClassAttribute(outerClass);
 
-      writer.startElement("div", null);
+      writer.startElement(HtmlConstants.DIV, null);
       writer.writeClassAttribute(innerClass);
 
-      writer.startElement("span", null);
+      writer.startElement(HtmlConstants.SPAN, null);
       writer.writeClassAttribute("tobago-tab-link");
       String tabId = clientId + "." + virtualTab + SUBCOMPONENT_SEP + i;
       writer.writeIdAttribute(tabId);
       if (onclick != null) {
-        writer.writeAttribute("onclick", onclick, null);
+        writer.writeAttribute(HtmlAttributes.ONCLICK, onclick, null);
       }
       if (label.getText() != null) {
         HtmlRendererUtil.writeLabelWithAccessKey(writer, label);
       } else {
         writer.writeText(Integer.toString(i+1), null);
       }
-      writer.endElement("span");
+      writer.endElement(HtmlConstants.SPAN);
 
       if (label.getAccessKey() != null) {
         if (LOG.isWarnEnabled()
@@ -266,34 +268,34 @@
       HtmlRendererUtil.addClickAcceleratorKey(
           facesContext, tabId, label.getAccessKey());
       }
-      writer.endElement("div");
-      writer.endElement("div");
-      writer.endElement("td");
+      writer.endElement(HtmlConstants.DIV);
+      writer.endElement(HtmlConstants.DIV);
+      writer.endElement(HtmlConstants.TD);
 
     }
 
-    writer.startElement("td", null);
-    writer.writeAttribute("width", "100%", null);
+    writer.startElement(HtmlConstants.TD, null);
+    writer.writeAttribute(HtmlAttributes.WIDTH, "100%", null);
 
-    writer.startElement("div", null);
+    writer.startElement(HtmlConstants.DIV, null);
     writer.writeClassAttribute("tobago-tab-fulfill");
 
-    writer.startElement("img", null);
-    writer.writeAttribute("src", image1x1, null);
-    writer.writeAttribute("alt", "", null);
-    writer.endElement("img");
-
-    writer.endElement("div");
-    writer.endElement("td");
-    writer.endElement("tr");
-    writer.endElement("table");
+    writer.startElement(HtmlConstants.IMG, null);
+    writer.writeAttribute(HtmlAttributes.SRC, image1x1, null);
+    writer.writeAttribute(HtmlAttributes.ALT, "", null);
+    writer.endElement(HtmlConstants.IMG);
+
+    writer.endElement(HtmlConstants.DIV);
+    writer.endElement(HtmlConstants.TD);
+    writer.endElement(HtmlConstants.TR);
+    writer.endElement(HtmlConstants.TABLE);
 
-    writer.endElement("td");
-    writer.endElement("tr");
+    writer.endElement(HtmlConstants.TD);
+    writer.endElement(HtmlConstants.TR);
 
     encodeContent(writer, facesContext, activeTab);
 
-    writer.endElement("table");
+    writer.endElement(HtmlConstants.TABLE);
   }
 
   protected void encodeContent(TobagoResponseWriter writer,
@@ -301,14 +303,14 @@
 
     String bodyStyle = (String)
         activeTab.getParent().getAttributes().get(ATTR_STYLE_BODY);
-    writer.startElement("tr", null);
-    writer.startElement("td", null);
+    writer.startElement(HtmlConstants.TR, null);
+    writer.startElement(HtmlConstants.TD, null);
     writer.writeClassAttribute("tobago-tab-content");
-    writer.writeAttribute("style", bodyStyle, null);
+    writer.writeAttribute(HtmlAttributes.STYLE, bodyStyle, null);
     writer.writeText("", null);
     RenderUtil.encodeChildren(facesContext, activeTab);
-    writer.endElement("td");
-    writer.endElement("tr");
+    writer.endElement(HtmlConstants.TD);
+    writer.endElement(HtmlConstants.TR);
   }
 
   public void encodeAjax(FacesContext context, UIComponent component) throws IOException {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextAreaRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextAreaRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextAreaRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TextAreaRenderer.java Sat Sep 23 03:44:27 2006
@@ -30,6 +30,8 @@
 import org.apache.myfaces.tobago.renderkit.HtmlUtils;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
 import org.apache.myfaces.tobago.renderkit.html.InRendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.application.FacesMessage;
@@ -68,21 +70,21 @@
     TobagoResponseWriter writer
         = (TobagoResponseWriter) facesContext.getResponseWriter();
 
-    writer.startElement("textarea", input);
+    writer.startElement(HtmlConstants.TEXTAREA, input);
     writer.writeNameAttribute(clientId);
     writer.writeIdAttribute(clientId);
-    writer.writeAttribute("rows", null, ATTR_ROWS);
+    writer.writeAttribute(HtmlAttributes.ROWS, null, ATTR_ROWS);
     if (title != null) {
-      writer.writeAttribute("title", title, null);
+      writer.writeAttribute(HtmlAttributes.TITLE, title, null);
     }
-    writer.writeAttribute("readonly", 
+    writer.writeAttribute(HtmlAttributes.READONLY,
         ComponentUtil.getBooleanAttribute(input, ATTR_READONLY));
-    writer.writeAttribute("disabled",
+    writer.writeAttribute(HtmlAttributes.DISABLED,
         ComponentUtil.getBooleanAttribute(input, ATTR_DISABLED));
-    writer.writeAttribute("style", null, ATTR_STYLE);
+    writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE);
     writer.writeComponentClass();
     if (onchange != null) {
-      writer.writeAttribute("onchange", onchange, null);
+      writer.writeAttribute(HtmlAttributes.ONCHANGE, onchange, null);
     }
     String currentValue = ComponentUtil.currentValue(input);
     if (currentValue != null) {
@@ -96,7 +98,7 @@
       }
       writer.writeText(currentValue, null);
     }
-    writer.endElement("textarea");
+    writer.endElement(HtmlConstants.TEXTAREA);
   }
 }
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TimeRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TimeRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TimeRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TimeRenderer.java Sat Sep 23 03:44:27 2006
@@ -32,6 +32,8 @@
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
 import org.apache.myfaces.tobago.renderkit.html.InRendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.application.FacesMessage;
@@ -114,11 +116,11 @@
     final String idPrefix = id + SUBCOMPONENT_SEP;
     TobagoResponseWriter writer
         = (TobagoResponseWriter) facesContext.getResponseWriter();
-    writer.startElement("div", input);
+    writer.startElement(HtmlConstants.DIV, input);
     writer.writeComponentClass();
 
-    writer.startElement("div", input);
-    writer.writeAttribute("id", idPrefix + "borderDiv", null);
+    writer.startElement(HtmlConstants.DIV, input);
+    writer.writeAttribute(HtmlAttributes.ID, idPrefix + "borderDiv", null);
     writer.writeClassAttribute("tobago-time-borderDiv"
         + (hasSeconds ? " tobago-time-borderDiv-seconds" : ""));
 
@@ -130,60 +132,60 @@
       writeInput(writer, idPrefix + "second", second, false);
     }
 
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
 
     String imageId = idPrefix + "inc";
     String imageSrc = "image/timeIncrement.gif";
     HtmlRendererUtil.addImageSources(facesContext, writer, imageSrc, imageId);
-    writer.startElement("img");
+    writer.startElement(HtmlConstants.IMG);
     writer.writeIdAttribute(imageId);
-    writer.writeAttribute("onclick", "tbgIncTime(this)", false);
+    writer.writeAttribute(HtmlAttributes.ONCLICK, "tbgIncTime(this)", false);
     writer.writeClassAttribute("tobago-time-inc-image"
         + (hasSeconds ? " tobago-time-image-seconds" : ""));
-    writer.writeAttribute("src", ResourceManagerUtil.getImageWithPath(facesContext, imageSrc), true);
-    writer.writeAttribute("alt", "", false); // TODO: tip
+    writer.writeAttribute(HtmlAttributes.SRC, ResourceManagerUtil.getImageWithPath(facesContext, imageSrc), true);
+    writer.writeAttribute(HtmlAttributes.ALT, "", false); // TODO: tip
 
     if (!ComponentUtil.getBooleanAttribute(input, ATTR_DISABLED)) {
-      writer.writeAttribute("onmouseover",
+      writer.writeAttribute(HtmlAttributes.ONMOUSEOVER,
           "Tobago.imageMouseover('" + imageId + "')", null);
-      writer.writeAttribute("onmouseout",
+      writer.writeAttribute(HtmlAttributes.ONMOUSEOUT,
           "Tobago.imageMouseout('" + imageId + "')", null);
     }
-    writer.endElement("img");
+    writer.endElement(HtmlConstants.IMG);
 
     imageId = idPrefix + "dec";
     imageSrc = "image/timeDecrement.gif";
     HtmlRendererUtil.addImageSources(facesContext, writer, imageSrc, imageId);
-    writer.startElement("img");
+    writer.startElement(HtmlConstants.IMG);
     writer.writeIdAttribute(imageId);
-    writer.writeAttribute("onclick", "tbgDecTime(this)", false);
+    writer.writeAttribute(HtmlAttributes.ONCLICK, "tbgDecTime(this)", false);
     writer.writeClassAttribute("tobago-time-dec-image"
         + (hasSeconds ? " tobago-time-image-seconds" : ""));
-    writer.writeAttribute("src", ResourceManagerUtil.getImageWithPath(facesContext, imageSrc), true);
-    writer.writeAttribute("alt", "", false); // TODO: tip
+    writer.writeAttribute(HtmlAttributes.SRC, ResourceManagerUtil.getImageWithPath(facesContext, imageSrc), true);
+    writer.writeAttribute(HtmlAttributes.ALT, "", false); // TODO: tip
     if (!ComponentUtil.getBooleanAttribute(input, ATTR_DISABLED)) {
-      writer.writeAttribute("onmouseover",
+      writer.writeAttribute(HtmlAttributes.ONMOUSEOVER,
           "Tobago.imageMouseover('" + imageId + "')", null);
-      writer.writeAttribute("onmouseout",
+      writer.writeAttribute(HtmlAttributes.ONMOUSEOUT,
           "Tobago.imageMouseout('" + imageId + "')", null);
     }
-    writer.endElement("img");
+    writer.endElement(HtmlConstants.IMG);
 
 
 
-    writer.startElement("input", input);
-    writer.writeAttribute("type", "hidden", false);
+    writer.startElement(HtmlConstants.INPUT, input);
+    writer.writeAttribute(HtmlAttributes.TYPE, "hidden", false);
     writer.writeIdAttribute(id + ":converterPattern");
-    writer.writeAttribute("value", converterPattern, null);
-    writer.endElement("input");
+    writer.writeAttribute(HtmlAttributes.VALUE, converterPattern, null);
+    writer.endElement(HtmlConstants.INPUT);
 
 
-    writer.startElement("input", input);
-    writer.writeAttribute("type", "hidden", false);
+    writer.startElement(HtmlConstants.INPUT, input);
+    writer.writeAttribute(HtmlAttributes.TYPE, "hidden", false);
     writer.writeIdAttribute(id);
     writer.writeNameAttribute(id);
-    writer.writeAttribute("value", hour + ":" + minute + ":" + second, false);
-    writer.endElement("input");
+    writer.writeAttribute(HtmlAttributes.VALUE, hour + ":" + minute + ":" + second, false);
+    writer.endElement(HtmlConstants.INPUT);
 
 
     String dateTextBoxId = (String) input.getAttributes().get(ATTR_CALENDAR_DATE_INPUT_ID);
@@ -195,27 +197,27 @@
       HtmlRendererUtil.endJavascript(writer);
     }
 
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.DIV);
   }
 
   private void writeInputSeparator(TobagoResponseWriter writer, String sep) throws IOException {
-    writer.startElement("span");
+    writer.startElement(HtmlConstants.SPAN);
     writer.writeClassAttribute("tobago-time-sep");
     writer.writeText(sep, null);
-    writer.endElement("span");
+    writer.endElement(HtmlConstants.SPAN);
   }
 
   private void writeInput(TobagoResponseWriter writer, String id, String hour, boolean hourMode)
   throws IOException {
-    writer.startElement("input");
-    writer.writeAttribute("type", "text", false);
+    writer.startElement(HtmlConstants.INPUT);
+    writer.writeAttribute(HtmlAttributes.TYPE, "text", false);
     writer.writeIdAttribute(id);
     writer.writeClassAttribute("tobago-time-input");
-    writer.writeAttribute("onfocus", "tbgTimerInputFocus(this, " + hourMode + ")", false);
-    writer.writeAttribute("onblur", "tbgTimerInputBlur(this)", false);
-    writer.writeAttribute("onkeyup", "tbgTimerKeyUp(this, event)", false);
-    writer.writeAttribute("value", hour, true);
-    writer.endElement("input");
+    writer.writeAttribute(HtmlAttributes.ONFOCUS, "tbgTimerInputFocus(this, " + hourMode + ")", false);
+    writer.writeAttribute(HtmlAttributes.ONBLUR, "tbgTimerInputBlur(this)", false);
+    writer.writeAttribute(HtmlAttributes.ONKEYUP, "tbgTimerKeyUp(this, event)", false);
+    writer.writeAttribute(HtmlAttributes.VALUE, hour, true);
+    writer.endElement(HtmlConstants.INPUT);
   }
 }
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ToolBarRenderer.java Sat Sep 23 03:44:27 2006
@@ -52,6 +52,8 @@
 import org.apache.myfaces.tobago.renderkit.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.taglib.component.ToolBarTag;
 import org.apache.myfaces.tobago.util.AccessKeyMap;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
@@ -86,11 +88,11 @@
     if (!suppressContainer) {
       setToolBarHeight(facesContext, uiComponent);
 
-      writer.startElement("div", toolbar);
+      writer.startElement(HtmlConstants.DIV, toolbar);
       writer.writeIdAttribute(toolbar.getClientId(facesContext));
       writer.writeComponentClass();
-      writer.writeAttribute("style", null, ATTR_STYLE);
-      writer.startElement("div", toolbar);
+      writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE);
+      writer.startElement(HtmlConstants.DIV, toolbar);
       writer.writeClassAttribute("tobago-toolbar-div-inner");
     }
 
@@ -112,8 +114,8 @@
     }
 
     if (!suppressContainer) {
-      writer.endElement("div");
-      writer.endElement("div");
+      writer.endElement(HtmlConstants.DIV);
+      writer.endElement(HtmlConstants.DIV);
     }
   }
 
@@ -302,20 +304,20 @@
     final String mouseOverScript = "Tobago.toolbarMousesover(" + args + ");";
     final String mouseOutScript = "Tobago.toolbarMousesout(" + args + ");";
 
-    writer.startElement("div", null);
+    writer.startElement(HtmlConstants.DIV, null);
     writer.writeClassAttribute(divClasses);
     if (!disabled) {
-      writer.writeAttribute("onmouseover", mouseOverScript, null);
-      writer.writeAttribute("onmouseout", mouseOutScript, null);
-      writer.writeAttribute("onclick", onClick, null);
-    }
-    writer.startElement("table", null);
-    writer.writeAttribute("cellpadding", "0", null);
-    writer.writeAttribute("cellspacing", "0", null);
-    writer.writeAttribute("summary", "", null);
-    writer.writeAttribute("border", "0", null);
+      writer.writeAttribute(HtmlAttributes.ONMOUSEOVER, mouseOverScript, null);
+      writer.writeAttribute(HtmlAttributes.ONMOUSEOUT, mouseOutScript, null);
+      writer.writeAttribute(HtmlAttributes.ONCLICK, onClick, null);
+    }
+    writer.startElement(HtmlConstants.TABLE, null);
+    writer.writeAttribute(HtmlAttributes.CELLPADDING, "0", null);
+    writer.writeAttribute(HtmlAttributes.CELLSPACING, "0", null);
+    writer.writeAttribute(HtmlAttributes.SUMMARY, "", null);
+    writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
     writer.writeClassAttribute(tableClasses);
-    writer.startElement("tr", null);
+    writer.startElement(HtmlConstants.TR, null);
 
     boolean anchorOnLabel =
         label.getText() != null && !ToolBarTag.LABEL_OFF.equals(labelPosition);
@@ -324,9 +326,9 @@
       HtmlRendererUtil.addImageSources(facesContext, writer,
           iconName != null ? iconName : "image/1x1.gif", graphicId);
 
-      writer.startElement("td", command);
-      writer.writeAttribute("align", "center", null);
-      writer.writeAttribute("title", null, ATTR_TIP);
+      writer.startElement(HtmlConstants.TD, command);
+      writer.writeAttribute(HtmlAttributes.ALIGN, "center", null);
+      writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
 
       boolean render1pxImage
           = (iconName == null && (!ToolBarTag.LABEL_BOTTOM.equals(
@@ -338,7 +340,7 @@
             && label.getText() != null)
            || popupMenu != null)
           && !render1pxImage) {
-        writer.writeAttribute("style", "padding-right: 3px;", null);
+        writer.writeAttribute(HtmlAttributes.STYLE, "padding-right: 3px;", null);
         // TODO: make this '3px' configurable
       }
 
@@ -348,22 +350,22 @@
       if (!anchorOnLabel) {
         renderAnchorBegin(facesContext, writer, command, label, disabled);
       }
-      writer.startElement("img", command);
+      writer.startElement(HtmlConstants.IMG, command);
       writer.writeIdAttribute(graphicId);
-      writer.writeAttribute("src", image, null);
-      writer.writeAttribute("alt", "", null);
-      writer.writeAttribute("title", null, ATTR_TIP);
-      writer.writeAttribute("border", "0", null);
+      writer.writeAttribute(HtmlAttributes.SRC, image, null);
+      writer.writeAttribute(HtmlAttributes.ALT, "", null);
+      writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
+      writer.writeAttribute(HtmlAttributes.BORDER, "0", null);
       writer.writeClassAttribute(className);
       if (render1pxImage) {
-        writer.writeAttribute("style", "width: 1px;", null);
+        writer.writeAttribute(HtmlAttributes.STYLE, "width: 1px;", null);
       }
 
-      writer.endElement("img");
+      writer.endElement(HtmlConstants.IMG);
       if (!anchorOnLabel) {
-        writer.endElement("a");
+        writer.endElement(HtmlConstants.A);
       }
-      writer.endElement("td");
+      writer.endElement(HtmlConstants.TD);
     }
 
     boolean popupOn2 = ToolBarTag.LABEL_BOTTOM.equals(labelPosition)
@@ -373,33 +375,33 @@
         renderPopupTd(facesContext, writer, command, popupMenu,
             true);
       }
-      writer.endElement("tr");
-      writer.startElement("tr", null);
+      writer.endElement(HtmlConstants.TR);
+      writer.startElement(HtmlConstants.TR, null);
     }
 
     if (!ToolBarTag.LABEL_OFF.equals(labelPosition)) {
-      writer.startElement("td", null);
+      writer.startElement(HtmlConstants.TD, null);
       writer.writeClassAttribute("tobago-toolbar-label-td");
-      writer.writeAttribute("align", "center", null);
+      writer.writeAttribute(HtmlAttributes.ALIGN, "center", null);
       if (popupMenu != null) {
-        writer.writeAttribute("style", "padding-right: 3px;", null);
+        writer.writeAttribute(HtmlAttributes.STYLE, "padding-right: 3px;", null);
         // TODO: make this '3px' configurable
       }
       if (label.getText() != null) {
         renderAnchorBegin(facesContext, writer, command, label, disabled);
         HtmlRendererUtil.writeLabelWithAccessKey(writer, label);
-        writer.endElement("a");
+        writer.endElement(HtmlConstants.A);
       }
-      writer.endElement("td");
+      writer.endElement(HtmlConstants.TD);
     }
     if (!popupOn2 && popupMenu != null) {
       renderPopupTd(facesContext, writer, command, popupMenu,
           false);
     }
 
-    writer.endElement("tr");
-    writer.endElement("table");
-    writer.endElement("div");
+    writer.endElement(HtmlConstants.TR);
+    writer.endElement(HtmlConstants.TABLE);
+    writer.endElement(HtmlConstants.DIV);
   }
 
   private String createOnClick(FacesContext facesContext,
@@ -477,12 +479,12 @@
       TobagoResponseWriter writer, final UICommand command,
       final LabelWithAccessKey label, final boolean disabled)
       throws IOException {
-    writer.startElement("a", command);
+    writer.startElement(HtmlConstants.A, command);
     writer.writeClassAttribute("tobago-toolBar-button-link" + (disabled ? "tobago-toolBar-button-link-disabled" : ""));
-    writer.writeAttribute("title", null, ATTR_TIP);
+    writer.writeAttribute(HtmlAttributes.TITLE, null, ATTR_TIP);
     if (!disabled) {
-      writer.writeAttribute("href", "#", null);
-      writer.writeAttribute("onfocus", "Tobago.toolbarFocus(this, event)", null);
+      writer.writeAttribute(HtmlAttributes.HREF, "#", null);
+      writer.writeAttribute(HtmlAttributes.ONFOCUS, "Tobago.toolbarFocus(this, event)", null);
       if (label.getAccessKey() != null) {
         if (LOG.isInfoEnabled()
                 && !AccessKeyMap.addAccessKey(facesContext, label.getAccessKey())) {
@@ -500,23 +502,23 @@
       TobagoResponseWriter writer, UIComponent command, UIComponent popupMenu,
       boolean labelBottom)
       throws IOException {
-    writer.startElement("td", null);
+    writer.startElement(HtmlConstants.TD, null);
     if (labelBottom) {
-      writer.writeAttribute("rowspan", "2", null);
+      writer.writeAttribute(HtmlAttributes.ROWSPAN, "2", null);
     }
 
     if (popupMenu != null) {
       String backgroundImage = ResourceManagerUtil.getImageWithPath(facesContext,
           "image/1x1.gif");
-      writer.startElement("div", null);
+      writer.startElement(HtmlConstants.DIV, null);
       writer.writeIdAttribute(
           command.getClientId(facesContext) + SUBCOMPONENT_SEP + "popup");
       writer.writeClassAttribute("tobago-toolBar-button-menu");
-      writer.startElement("img", null);
-      writer.writeAttribute("src", backgroundImage, null);
+      writer.startElement(HtmlConstants.IMG, null);
+      writer.writeAttribute(HtmlAttributes.SRC, backgroundImage, null);
       writer.writeClassAttribute("tobago-toolBar-button-menu-background-image");
-      writer.endElement("img");
-      writer.endElement("div");
+      writer.endElement(HtmlConstants.IMG);
+      writer.endElement(HtmlConstants.DIV);
       popupMenu.getAttributes().put(ATTR_MENU_POPUP, Boolean.TRUE);
       popupMenu.getAttributes().put(ATTR_MENU_POPUP_TYPE, "ToolBarButton");
       popupMenu.setRendererType(RENDERER_TYPE_MENUBAR);
@@ -525,7 +527,7 @@
       RenderUtil.encode(facesContext, popupMenu);
     }
 
-    writer.endElement("td");
+    writer.endElement(HtmlConstants.TD);
   }
 
   private void setToolBarHeight(FacesContext facesContext,

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxBoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxBoxRenderer.java?view=diff&rev=449215&r1=449214&r2=449215
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxBoxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxBoxRenderer.java Sat Sep 23 03:44:27 2006
@@ -26,6 +26,8 @@
 import org.apache.myfaces.tobago.component.UITreeListboxBox;
 import org.apache.myfaces.tobago.component.UITreeNode;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
+import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -65,17 +67,17 @@
     String listboxId = treeId + SUBCOMPONENT_SEP + "cont_" + level;
     String onChange = "tbgTreeListboxChange(this, '" + treeId + "')";
     String onClick  = "tbgTreeListboxClick(this, '" + treeId + "')";
-    writer.startElement("select", component);
+    writer.startElement(HtmlConstants.SELECT, component);
     writer.writeIdAttribute(listboxId);
     writer.writeClassAttribute(className);
-    writer.writeAttribute("style" , null, ATTR_STYLE);
-    writer.writeAttribute("size", "2", null);
+    writer.writeAttribute(HtmlAttributes.STYLE , null, ATTR_STYLE);
+    writer.writeAttribute(HtmlAttributes.SIZE, "2", null);
     if (siblingMode) {
-      writer.writeAttribute("onchange", onChange, null);
+      writer.writeAttribute(HtmlAttributes.ONCHANGE, onChange, null);
     } else {
-      writer.writeAttribute("onclick", onClick, null);
+      writer.writeAttribute(HtmlAttributes.ONCLICK, onClick, null);
     }
-    writer.writeAttribute("multiple", siblingMode);
+    writer.writeAttribute(HtmlAttributes.MULTIPLE, siblingMode);
 
 
     List nodes = ((UITreeListboxBox) component).getNodes();
@@ -84,21 +86,21 @@
       UITreeNode treeNode = (UITreeNode) nodes.get(i);
       DefaultMutableTreeNode node = treeNode.getTreeNode();
 
-      writer.startElement("option", null);
-//      writer.writeAttribute("onclick", "tbgTreeListboxClick(this, '" + treeId + "')", null);
-      writer.writeAttribute("value", Integer.toString(i), null);
+      writer.startElement(HtmlConstants.OPTION, null);
+//      writer.writeAttribute(HtmlAttributes.ONCLICK, "tbgTreeListboxClick(this, '" + treeId + "')", null);
+      writer.writeAttribute(HtmlAttributes.VALUE, Integer.toString(i), null);
       if (treeNode.equals(tree.getSelectedNode(level))
           || tree.isSelectedNode(node)) {
-        writer.writeAttribute("selected", true);
+        writer.writeAttribute(HtmlAttributes.SELECTED, true);
       }
 
       writer.writeText(treeNode.getAttributes().get(ATTR_NAME), null);
       if (node.getChildCount() > 0) {
         writer.writeText(" \u2192", null);
       }
-      writer.endElement("option");
+      writer.endElement(HtmlConstants.OPTION);
     }
-    writer.endElement("select");
+    writer.endElement(HtmlConstants.SELECT);
   }
 
 }