You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2008/10/24 21:16:41 UTC

svn commit: r707725 [3/5] - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/ core/src/main/java/org/apache/myfaces/tobago/ajax/api/ core/src/main/java/org/apache/myfaces/tobago/component/ core/src/main/java/org/apache/myfaces/tob...

Modified: myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/ButtonRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/ButtonRenderer.java Fri Oct 24 12:16:37 2008
@@ -26,9 +26,8 @@
 import org.apache.commons.collections.keyvalue.DefaultKeyValue;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ACTION_LINK;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ACTION_ONCLICK;
 import org.apache.myfaces.tobago.component.AbstractUIPage;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
@@ -53,10 +52,10 @@
 
     TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
     // TODO
-    //String action = (String) command.getAttributes().get(ATTR_ACTION);
+    //String action = (String) command.getAttributes().get(ACTION);
 
-    if (command.getAttributes().get(ATTR_ACTION_LINK) == null
-        && command.getAttributes().get(ATTR_ACTION_ONCLICK) == null) {
+    if (command.getAttributes().get(Attributes.LINK) == null
+        && command.getAttributes().get(Attributes.ONCLICK) == null) {
       ValueHolder labelComponent
           = (ValueHolder) command.getFacet(Facets.LABEL);
       String label = (String) labelComponent.getValue();

Modified: myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/InRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/InRenderer.java (original)
+++ myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/InRenderer.java Fri Oct 24 12:16:37 2008
@@ -23,8 +23,8 @@
  */
 
 import org.apache.commons.collections.keyvalue.DefaultKeyValue;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_PASSWORD;
 import org.apache.myfaces.tobago.component.AbstractUIPage;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
@@ -59,7 +59,7 @@
     String currentValue = RenderUtil.currentValue(component);
 
     String type = ComponentUtil.getBooleanAttribute(
-        component, ATTR_PASSWORD) ? "password" : "text";
+        component, Attributes.PASSWORD) ? "password" : "text";
 
     writer.startElement("input", component);
     writer.writeNameAttribute(clientId);

Modified: myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/PanelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/PanelRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/PanelRenderer.java (original)
+++ myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/PanelRenderer.java Fri Oct 24 12:16:37 2008
@@ -23,8 +23,8 @@
   */
 
 import org.apache.myfaces.tobago.component.UIPanel;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -52,7 +52,7 @@
 
     //UIPanel component = (UIPanel) uiComponent ;
     //BodyContentHandler bodyContentHandler = (BodyContentHandler)
-    //    component.getAttributes().get(ATTR_BODY_CONTENT);
+    //    component.getAttributes().get(BODY_CONTENT);
 
     //if (bodyContentHandler != null) {
     //  ResponseWriter writer = facesContext.getResponseWriter();

Modified: myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/SelectBooleanCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/SelectBooleanCheckboxRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/SelectBooleanCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/wml/standard/standard/tag/SelectBooleanCheckboxRenderer.java Fri Oct 24 12:16:37 2008
@@ -22,7 +22,7 @@
  * $Id:SelectBooleanCheckboxRenderer.java 472227 2006-11-07 21:05:00 +0100 (Tue, 07 Nov 2006) bommel $
  */
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_VALUE;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
@@ -42,7 +42,7 @@
 
     TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
 
-    boolean value = ComponentUtil.getBooleanAttribute(component, ATTR_VALUE);
+    boolean value = ComponentUtil.getBooleanAttribute(component, Attributes.VALUE);
 
     writer.startElement(HtmlConstants.SELECT, component);
     writer.writeNameAttribute(component.getClientId(facesContext));

Modified: myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/RichTextEditorTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/RichTextEditorTag.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/RichTextEditorTag.java (original)
+++ myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/taglib/sandbox/RichTextEditorTag.java Fri Oct 24 12:16:37 2008
@@ -17,7 +17,7 @@
  * limitations under the License.
  */
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STATE_PREVIEW;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.internal.taglib.TagUtils;
 import org.apache.myfaces.tobago.internal.taglib.TobagoTag;
@@ -43,7 +43,7 @@
 
   protected void setProperties(UIComponent component) {
     super.setProperties(component);
-    TagUtils.setBooleanProperty(component, ATTR_STATE_PREVIEW, statePreview);
+    TagUtils.setBooleanProperty(component, Attributes.STATE_PREVIEW, statePreview);
   }
 
   public void release() {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/mozilla/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/mozilla/tag/BoxRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/mozilla/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/mozilla/tag/BoxRenderer.java Fri Oct 24 12:16:37 2008
@@ -22,7 +22,7 @@
  * : $
  */
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STYLE_BODY;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
 
 import javax.faces.component.UIComponent;
@@ -39,7 +39,7 @@
   }
 
   protected String getAttrStyleKey() {
-    return ATTR_STYLE_BODY;
+    return Attributes.STYLE_BODY;
   }
 
 }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/mozilla_4_7/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/mozilla_4_7/tag/BoxRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/mozilla_4_7/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/mozilla_4_7/tag/BoxRenderer.java Fri Oct 24 12:16:37 2008
@@ -22,7 +22,7 @@
  * $Id$
  */
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.renderkit.BoxRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -43,7 +43,7 @@
       FacesContext facesContext, UIComponent component) throws IOException {
 
     UIComponent label = component.getFacet(Facets.LABEL);
-    String labelString = (String) component.getAttributes().get(ATTR_LABEL);
+    String labelString = (String) component.getAttributes().get(Attributes.LABEL);
 
     TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/MessageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/MessageRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/MessageRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/tag/MessageRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,14 +24,13 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_DETAIL;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_SUMMARY;
-import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.renderkit.MessageRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.application.FacesMessage;
@@ -83,8 +82,8 @@
 
     TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
 
-    boolean showSummary = ComponentUtil.getBooleanAttribute(component, ATTR_SHOW_SUMMARY);
-    boolean showDetail = ComponentUtil.getBooleanAttribute(component, ATTR_SHOW_DETAIL);
+    boolean showSummary = ComponentUtil.getBooleanAttribute(component, Attributes.SHOW_SUMMARY);
+    boolean showDetail = ComponentUtil.getBooleanAttribute(component, Attributes.SHOW_DETAIL);
 
     if (iterator.hasNext()) {
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/opera/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/opera/tag/BoxRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/opera/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/opera/tag/BoxRenderer.java Fri Oct 24 12:16:37 2008
@@ -22,7 +22,7 @@
  * : $
  */
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.context.UserAgent;
@@ -45,7 +45,7 @@
 
     UIComponent label = component.getFacet(Facets.LABEL);
     String labelString
-        = (String) component.getAttributes().get(ATTR_LABEL);
+        = (String) component.getAttributes().get(Attributes.LABEL);
 
     TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
 

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxRenderer.java Fri Oct 24 12:16:37 2008
@@ -23,8 +23,7 @@
  */
 
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STYLE;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.renderkit.BoxRendererBase;
@@ -50,7 +49,7 @@
 
     UIComponent label = component.getFacet(Facets.LABEL);
     String labelString
-        = (String) component.getAttributes().get(ATTR_LABEL);
+        = (String) component.getAttributes().get(Attributes.LABEL);
     UIPanel toolbar = (UIPanel) component.getFacet(Facets.TOOL_BAR);
     if (toolbar != null) {
       final int padding = getConfiguredValue(facesContext, component, "paddingTopWhenToolbar");
@@ -107,7 +106,7 @@
   }
 
   protected String getAttrStyleKey() {
-    return ATTR_STYLE;
+    return Attributes.STYLE;
   }
 
   public int getPaddingHeight(FacesContext facesContext, UIComponent component) {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxToolBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxToolBarRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxToolBarRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/BoxToolBarRenderer.java Fri Oct 24 12:16:37 2008
@@ -17,8 +17,7 @@
  * limitations under the License.
  */
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ICON_SIZE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL_POSITION;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UIToolBar;
 
 import javax.faces.component.UIComponent;
@@ -28,7 +27,7 @@
 
   @Override
   protected String getLabelPosition(UIComponent component) {
-    final String attribute = (String) component.getAttributes().get(ATTR_LABEL_POSITION);
+    final String attribute = (String) component.getAttributes().get(Attributes.LABEL_POSITION);
     if (UIToolBar.LABEL_BOTTOM.equals(attribute)) {
       return UIToolBar.LABEL_RIGHT;
     } else {
@@ -39,7 +38,7 @@
 
   @Override
   protected String getIconSize(UIComponent component) {
-    final String attribute = (String) component.getAttributes().get(ATTR_ICON_SIZE);
+    final String attribute = (String) component.getAttributes().get(Attributes.ICON_SIZE);
     if (UIToolBar.ICON_BIG.equals(attribute)) {
       return UIToolBar.ICON_SMALL;
     } else {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,19 +24,17 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DEFAULT_COMMAND;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_IMAGE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TRANSITION;
-import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UIButtonCommand;
 import org.apache.myfaces.tobago.renderkit.CommandRendererBase;
 import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
-import org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
 import org.apache.myfaces.tobago.util.AccessKeyMap;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UICommand;
@@ -91,7 +89,7 @@
     writer.flush(); // force closing the start tag
 
 
-    String imageName = (String) command.getAttributes().get(ATTR_IMAGE);
+    String imageName = (String) command.getAttributes().get(Attributes.IMAGE);
     if (imageName != null) {
       String image;
       if (imageName.startsWith("HTTP:") || imageName.startsWith("FTP:")
@@ -125,8 +123,8 @@
           facesContext, command.getClientId(facesContext), label.getAccessKey());
     }
 
-    if (ComponentUtil.getBooleanAttribute(component, ATTR_DEFAULT_COMMAND)) {
-      boolean transition = ComponentUtil.getBooleanAttribute(command, ATTR_TRANSITION);
+    if (ComponentUtil.getBooleanAttribute(component, Attributes.DEFAULT_COMMAND)) {
+      boolean transition = ComponentUtil.getBooleanAttribute(command, Attributes.TRANSITION);
       HtmlRendererUtil.setDefaultTransition(facesContext, transition);
 
       HtmlRendererUtil.writeScriptLoader(facesContext, null, new String[]{
@@ -135,13 +133,13 @@
   }
 
   private String createButtonType(UIComponent component) {
-    boolean defaultCommand = ComponentUtil.getBooleanAttribute(component, ATTR_DEFAULT_COMMAND);
+    boolean defaultCommand = ComponentUtil.getBooleanAttribute(component, Attributes.DEFAULT_COMMAND);
     return defaultCommand ? "submit" : "button";
   }
 
   public int getFixedWidth(FacesContext facesContext, UIComponent component) {
     int width = 0;
-    String imageName = (String) component.getAttributes().get(ATTR_IMAGE);
+    String imageName = (String) component.getAttributes().get(Attributes.IMAGE);
     if (imageName != null) {
       width = getConfiguredValue(facesContext, component, "imageWidth");
     }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/CalendarRenderer.java Fri Oct 24 12:16:37 2008
@@ -25,7 +25,7 @@
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_CALENDAR_DATE_INPUT_ID;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.context.TobagoFacesContext;
 import org.apache.myfaces.tobago.model.CalendarModel;
@@ -69,7 +69,7 @@
 
     String id = output.getClientId(facesContext);
 
-    String dateTextBoxId = (String) component.getAttributes().get(ATTR_CALENDAR_DATE_INPUT_ID);
+    String dateTextBoxId = (String) component.getAttributes().get(Attributes.DATE_INPUT_ID);
 
     if (LOG.isDebugEnabled()) {
       LOG.debug("dateTextBoxId = '" + dateTextBoxId + "'");

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/DatePickerRenderer.java Fri Oct 24 12:16:37 2008
@@ -19,15 +19,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.tobago.TobagoConstants;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ACTION_ONCLICK;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ALT;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_COLUMNS;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HEIGHT;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_WIDTH;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ROWS;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_WIDTH;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_BOX;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_BUTTON;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_CALENDAR;
@@ -39,6 +30,7 @@
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_TIME;
 import org.apache.myfaces.tobago.compat.FacesUtils;
 import org.apache.myfaces.tobago.component.AbstractUIPopup;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.CreateComponentUtils;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UIBox;
@@ -105,7 +97,7 @@
     } else {
       popup.setId(facesContext.getViewRoot().createUniqueId());
     }
-    popup.getAttributes().put(TobagoConstants.ATTR_ZINDEX, 10);
+    popup.getAttributes().put(Attributes.Z_INDEX, 10);
 
     link.getFacets().put(Facets.PICKER_POPUP, popup);
 
@@ -116,13 +108,13 @@
     popup.getChildren().add(box);
     box.setId("box");
     // TODO: set string resources in renderer
-    box.getAttributes().put(ATTR_LABEL, ResourceManagerUtil.getPropertyNotNull(
+    box.getAttributes().put(Attributes.LABEL, ResourceManagerUtil.getPropertyNotNull(
         facesContext, "tobago", "datePickerTitle"));
     UIComponent layout = CreateComponentUtils.createComponent(
         facesContext, UIGridLayout.COMPONENT_TYPE, RENDERER_TYPE_GRID_LAYOUT);
     box.getFacets().put(Facets.LAYOUT, layout);
     layout.setId("layout");
-    layout.getAttributes().put(ATTR_ROWS, "*;fixed;fixed");
+    layout.getAttributes().put(Attributes.ROWS, "*;fixed;fixed");
 
     final UIComponent calendar = CreateComponentUtils.createComponent(
         facesContext, javax.faces.component.UIOutput.COMPONENT_TYPE,
@@ -140,7 +132,7 @@
         facesContext, UIGridLayout.COMPONENT_TYPE, RENDERER_TYPE_GRID_LAYOUT);
     timePanel.getFacets().put(Facets.LAYOUT, layout);
     layout.setId("timePanelLayout");
-    layout.getAttributes().put(ATTR_COLUMNS, "1*;fixed;1*");
+    layout.getAttributes().put(Attributes.COLUMNS, "1*;fixed;1*");
     UIComponent cell = CreateComponentUtils.createComponent(
         facesContext, UIPanel.COMPONENT_TYPE, RENDERER_TYPE_PANEL);
     cell.setId("cell1");
@@ -166,8 +158,7 @@
         facesContext, UIGridLayout.COMPONENT_TYPE, RENDERER_TYPE_GRID_LAYOUT);
     layout.setId("buttonPanelLayout");
     buttonPanel.getFacets().put(Facets.LAYOUT, layout);
-    layout.getAttributes().put(ATTR_COLUMNS, "*;*");
-//    layout.getAttributes().put(TobagoConstants.ATTR_BORDER, "1");
+    layout.getAttributes().put(Attributes.COLUMNS, "*;*");
 
     box.getChildren().add(buttonPanel);
 
@@ -177,7 +168,7 @@
             RENDERER_TYPE_BUTTON);
     buttonPanel.getChildren().add(okButton);
     okButton.setId("ok" + CLOSE_POPUP);
-    okButton.getAttributes().put(ATTR_LABEL, ResourceManagerUtil.getPropertyNotNull(
+    okButton.getAttributes().put(Attributes.LABEL, ResourceManagerUtil.getPropertyNotNull(
         facesContext, "tobago", "datePickerOk"));
 
     final org.apache.myfaces.tobago.component.UICommand cancelButton =
@@ -186,7 +177,7 @@
             RENDERER_TYPE_BUTTON);
     buttonPanel.getChildren().add(cancelButton);
 
-    cancelButton.getAttributes().put(ATTR_LABEL, ResourceManagerUtil.getPropertyNotNull(
+    cancelButton.getAttributes().put(Attributes.LABEL, ResourceManagerUtil.getPropertyNotNull(
         facesContext, "tobago", "datePickerCancel"));
     cancelButton.setId(CLOSE_POPUP);
 
@@ -200,19 +191,19 @@
       image.setId(facesContext.getViewRoot().createUniqueId());
     }
     image.setValue("image/date.gif");
-    image.getAttributes().put(ATTR_ALT, ""); //TODO: i18n
+    image.getAttributes().put(Attributes.ALT, ""); //TODO: i18n
     StyleClasses.ensureStyleClasses(image).addFullQualifiedClass("tobago-input-picker"); // XXX not a standard name
     link.getChildren().add(image);
   }
 
 
   public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
-    component.getAttributes().put(ATTR_LAYOUT_WIDTH, getConfiguredValue(facesContext, component, "pickerWidth"));
+    component.getAttributes().put(Attributes.LAYOUT_WIDTH, getConfiguredValue(facesContext, component, "pickerWidth"));
     if (facesContext instanceof TobagoFacesContext) {
       UIPopup popup = (UIPopup) component.getFacets().get(Facets.PICKER_POPUP);
       if (popup != null) {
-        popup.getAttributes().put(ATTR_WIDTH, ThemeConfig.getValue(facesContext, component, "CalendarPopupWidth"));
-        popup.getAttributes().put(ATTR_HEIGHT, ThemeConfig.getValue(facesContext, component, "CalendarPopupHeight"));
+        popup.getAttributes().put(Attributes.WIDTH, ThemeConfig.getValue(facesContext, component, "CalendarPopupWidth"));
+        popup.getAttributes().put(Attributes.HEIGHT, ThemeConfig.getValue(facesContext, component, "CalendarPopupHeight"));
         ((TobagoFacesContext) facesContext).getPopups().add(popup);
       }
     }
@@ -228,13 +219,13 @@
       LOG.error("No required UIDateInput component found.");
       return;
     }
-    if (FacesUtils.hasValueBindingOrValueExpression(dateInput, TobagoConstants.ATTR_READONLY)) {
-      FacesUtils.copyValueBindingOrValueExpression(link, TobagoConstants.ATTR_DISABLED,
-          dateInput, TobagoConstants.ATTR_READONLY);
+    if (FacesUtils.hasValueBindingOrValueExpression(dateInput, Attributes.READONLY)) {
+      FacesUtils.copyValueBindingOrValueExpression(link, Attributes.DISABLED,
+          dateInput, Attributes.READONLY);
     } else {
-      if (FacesUtils.hasValueBindingOrValueExpression(dateInput, TobagoConstants.ATTR_DISABLED)) {
-        FacesUtils.copyValueBindingOrValueExpression(link, TobagoConstants.ATTR_DISABLED,
-            dateInput, TobagoConstants.ATTR_DISABLED);
+      if (FacesUtils.hasValueBindingOrValueExpression(dateInput, Attributes.DISABLED)) {
+        FacesUtils.copyValueBindingOrValueExpression(link, Attributes.DISABLED,
+            dateInput, Attributes.DISABLED);
       } else {
         link.setDisabled(dateInput.isReadonly() || dateInput.isDisabled());
       }
@@ -245,7 +236,7 @@
     UIComponent hidden = (UIComponent) link.getChildren().get(0);
     UIPopup popup = (UIPopup) link.getFacets().get(Facets.PICKER_POPUP);
 
-    attributes.put(ATTR_ACTION_ONCLICK, "Tobago.openPickerPopup(event, '"
+    attributes.put(Attributes.ONCLICK, "Tobago.openPickerPopup(event, '"
         + link.getClientId(facesContext) + "', '"
         + hidden.getClientId(facesContext) + "', '"
         + popup.getClientId(facesContext) + "')");
@@ -261,13 +252,13 @@
 
     UICommand okButton = (UICommand) popup.findComponent("ok" + CLOSE_POPUP);
     attributes = okButton.getAttributes();
-    attributes.put(ATTR_ACTION_ONCLICK, "var textBox = writeIntoField2(this);Tobago.closePopup(this);textBox.focus();");
-    attributes.put(TobagoConstants.ATTR_POPUP_CLOSE, "afterSubmit");
+    attributes.put(Attributes.ONCLICK, "var textBox = writeIntoField2(this);Tobago.closePopup(this);textBox.focus();");
+    attributes.put(Attributes.POPUP_CLOSE, "afterSubmit");
 
     UICommand cancelButton = (UICommand) popup.findComponent(CLOSE_POPUP);
     attributes = cancelButton.getAttributes();
-    attributes.put(ATTR_ACTION_ONCLICK, "var textBox = writeIntoField2(this);Tobago.closePopup(this);textBox.focus();");
-    attributes.put(TobagoConstants.ATTR_POPUP_CLOSE, "immediate");
+    attributes.put(Attributes.ONCLICK, "var textBox = writeIntoField2(this);Tobago.closePopup(this);textBox.focus();");
+    attributes.put(Attributes.POPUP_CLOSE, "immediate");
 
     applyConverterPattern(facesContext, popup, converterPattern);
 
@@ -282,9 +273,9 @@
     UIComponent timePanel = box.findComponent("timePanel");
     if (converterPattern != null && (converterPattern.indexOf('h') > -1 || converterPattern.indexOf('H') > -1)) {
       UIComponent time = timePanel.findComponent("time");
-      int popupHeight = ComponentUtil.getIntAttribute(popup, ATTR_HEIGHT);
+      int popupHeight = ComponentUtil.getIntAttribute(popup, Attributes.HEIGHT);
       popupHeight += ThemeConfig.getValue(FacesContext.getCurrentInstance(), time, "fixedHeight");
-      popup.getAttributes().put(ATTR_HEIGHT, popupHeight);
+      popup.getAttributes().put(Attributes.HEIGHT, popupHeight);
       DateTimeConverter dateTimeConverter
           = (DateTimeConverter) facesContext.getApplication().createConverter(CONVERTER_ID);
       if (converterPattern.indexOf('s') > -1) {

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/FileRenderer.java Fri Oct 24 12:16:37 2008
@@ -25,7 +25,7 @@
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UIFileInput;
 import org.apache.myfaces.tobago.context.ClientProperties;
@@ -135,7 +135,7 @@
     }
     writer.writeNameAttribute(clientId);
     writer.writeIdAttribute(clientId);
-    writer.writeAttribute(HtmlAttributes.READONLY, ComponentUtil.getBooleanAttribute(input, ATTR_DISABLED));
+    writer.writeAttribute(HtmlAttributes.READONLY, ComponentUtil.getBooleanAttribute(input, Attributes.DISABLED));
     Integer tabIndex = input.getTabIndex();
     if (tabIndex != null) {
       writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/GridLayoutRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,39 +24,31 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_BORDER;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_CELLSPACING;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INNER_HEIGHT;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INNER_WIDTH;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_HEIGHT;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LAYOUT_WIDTH;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SCROLLBARS;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STYLE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_WIDTH_LIST;
-import org.apache.myfaces.tobago.util.ComponentUtil;
-import org.apache.myfaces.tobago.layout.LayoutToken;
-import org.apache.myfaces.tobago.layout.LayoutTokens;
-import org.apache.myfaces.tobago.component.UICell;
 import org.apache.myfaces.tobago.component.AbstractUIForm;
+import org.apache.myfaces.tobago.component.AbstractUIGridLayout;
+import org.apache.myfaces.tobago.component.Attributes;
+import org.apache.myfaces.tobago.component.UICell;
 import org.apache.myfaces.tobago.component.UIGridLayout;
 import org.apache.myfaces.tobago.component.UILayout;
 import org.apache.myfaces.tobago.component.UIPage;
-import org.apache.myfaces.tobago.component.AbstractUIGridLayout;
+import org.apache.myfaces.tobago.layout.FixedLayoutToken;
+import org.apache.myfaces.tobago.layout.HideLayoutToken;
+import org.apache.myfaces.tobago.layout.LayoutToken;
+import org.apache.myfaces.tobago.layout.LayoutTokens;
+import org.apache.myfaces.tobago.layout.MinimumLayoutToken;
+import org.apache.myfaces.tobago.layout.PixelLayoutToken;
+import org.apache.myfaces.tobago.layout.RelativeLayoutToken;
 import org.apache.myfaces.tobago.renderkit.LayoutInformationProvider;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
-import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlStyleMap;
 import org.apache.myfaces.tobago.renderkit.html.StyleClasses;
+import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.util.LayoutInfo;
 import org.apache.myfaces.tobago.util.LayoutUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
-import org.apache.myfaces.tobago.layout.PixelLayoutToken;
-import org.apache.myfaces.tobago.layout.MinimumLayoutToken;
-import org.apache.myfaces.tobago.layout.FixedLayoutToken;
-import org.apache.myfaces.tobago.layout.RelativeLayoutToken;
-import org.apache.myfaces.tobago.layout.HideLayoutToken;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -265,12 +257,12 @@
     //layoutMargins(layout);
 
     final Map attributes = layout.getAttributes();
-    List columnWidths =  (List) attributes.get(ATTR_WIDTH_LIST);
+    List columnWidths =  (List) attributes.get(Attributes.WIDTH_LIST);
 
 
     TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
     writer.startElement(HtmlConstants.TABLE, layout);
-    writer.writeAttributeFromComponent(HtmlAttributes.BORDER, ATTR_BORDER);
+    writer.writeAttributeFromComponent(HtmlAttributes.BORDER, Attributes.BORDER);
     writer.writeClassAttribute();
     writer.writeStyleAttribute();
     writer.writeAttribute(HtmlAttributes.CELLSPACING, 0);
@@ -383,7 +375,7 @@
 
             writer.flush();
 
-            if (ComponentUtil.getAttribute(layout, ATTR_CELLSPACING) != null) {
+            if (ComponentUtil.getAttribute(layout, Attributes.CELLSPACING) != null) {
               cellStyle += " padding: " + getCellSpacing(facesContext, layout) + "px;";
             }
 
@@ -420,7 +412,7 @@
   private String getOverflow(UIComponent cell) {
     String overflow = "";
 
-    String scrollbars = (String) cell.getAttributes().get(ATTR_SCROLLBARS);
+    String scrollbars = (String) cell.getAttributes().get(Attributes.SCROLLBARS);
     if (scrollbars != null) {
       if (scrollbars.equals("false")) {
         overflow = " overflow: hidden;";
@@ -446,7 +438,7 @@
   private int getBorder(UIComponent component) {
     int border = 0;
     String borderWidth
-        = (String) component.getAttributes().get(ATTR_BORDER);
+        = (String) component.getAttributes().get(Attributes.BORDER);
     try {
       if (borderWidth != null) {
         border = Integer.parseInt(borderWidth);
@@ -483,7 +475,7 @@
   }
 
   private int getCellSpacing(FacesContext facesContext, UIComponent component) {
-    String cellspacing = (String) component.getAttributes().get(ATTR_CELLSPACING);
+    String cellspacing = (String) component.getAttributes().get(Attributes.CELLSPACING);
     if (cellspacing != null) {
       try {
         return Integer.parseInt(cellspacing);
@@ -508,7 +500,7 @@
 
     boolean needVerticalScroolbar = false;
     Integer innerHeight =
-          (Integer) attributes.get(ATTR_INNER_HEIGHT);
+          (Integer) attributes.get(Attributes.INNER_HEIGHT);
     if (innerHeight != null && innerHeight.intValue() > 0) {
       int value = innerHeight.intValue();
       int minimum = calculateLayoutHeight(facesContext, layout.getParent(), true);
@@ -521,7 +513,7 @@
 
 
     Integer innerWidth =
-          (Integer) attributes.get(ATTR_INNER_WIDTH);
+          (Integer) attributes.get(Attributes.INNER_WIDTH);
     if (innerWidth != null && innerWidth.intValue() != -1) {
       int value = innerWidth.intValue();
       if (needVerticalScroolbar) {
@@ -550,7 +542,7 @@
     //layoutTokens.ensureSize(columnCount, new RelativeLayoutToken(1));
 
     //LayoutInfo.createLayoutTokens((String)
-        //layout.getAttributes().get(ATTR_COLUMNS), columnCount);
+        //layout.getAttributes().get(COLUMNS), columnCount);
 
     int renderedColumnCount = 0;
     if (!rows.isEmpty()) {
@@ -583,7 +575,7 @@
         getCellSpacing(facesContext, layout));
 
     setColumnWidths(layout, layoutInfo, facesContext);
-    layout.getAttributes().put(ATTR_WIDTH_LIST,
+    layout.getAttributes().put(Attributes.WIDTH_LIST,
         layoutInfo.getSpaceList());
   }
 
@@ -600,7 +592,7 @@
     LayoutTokens layoutTokens = layout.getRowLayout();
     layoutTokens.ensureSize(rows.size(), rows.size() == 1 ? new RelativeLayoutToken(1) : new FixedLayoutToken());
         /*LayoutInfo.createLayoutTokens(
-        (String) layout.getAttributes().get(ATTR_ROWS),
+        (String) layout.getAttributes().get(ROWS),
         rows.size(), rows.size() == 1 ? "1*" : "fixed");*/
 
     int renderedRowCount = rows.size();
@@ -791,7 +783,7 @@
           }
           cellWidth += (spanX - 1) * getCellSpacing(facesContext, layout);
           LayoutUtil.maybeSetLayoutAttribute(cell,
-              ATTR_LAYOUT_WIDTH, Integer.valueOf(cellWidth));
+              Attributes.LAYOUT_WIDTH, Integer.valueOf(cellWidth));
         }
       }
     }
@@ -821,8 +813,8 @@
             LOG.debug("set height of " + cellHeight + "px to "
                 + cell.getRendererType() + " layoutInfo " + layoutInfo.toString());
           }
-          cell.getAttributes().put(ATTR_LAYOUT_HEIGHT, Integer.valueOf(cellHeight));
-          cell.getAttributes().remove(ATTR_INNER_HEIGHT);
+          cell.getAttributes().put(Attributes.LAYOUT_HEIGHT, Integer.valueOf(cellHeight));
+          cell.getAttributes().remove(Attributes.INNER_HEIGHT);
           if (cell instanceof UICell || cell instanceof AbstractUIForm) {
             List children = LayoutUtil.addChildren(new ArrayList<UIComponent>(), cell);
             for (Iterator childs = children.iterator(); childs.hasNext();) {
@@ -831,8 +823,8 @@
                 LOG.debug("set height of " + cellHeight + "px to "
                     + component.getRendererType());
               }
-              component.getAttributes().put(ATTR_LAYOUT_HEIGHT, Integer.valueOf(cellHeight));
-              component.getAttributes().remove(ATTR_INNER_HEIGHT);
+              component.getAttributes().put(Attributes.LAYOUT_HEIGHT, Integer.valueOf(cellHeight));
+              component.getAttributes().remove(Attributes.INNER_HEIGHT);
 
             }
           }
@@ -856,7 +848,7 @@
 
   private void layoutMargins(UIGridLayout layout) {
 
-    HtmlStyleMap style = (HtmlStyleMap) layout.getAttributes().get(ATTR_STYLE);
+    HtmlStyleMap style = (HtmlStyleMap) layout.getAttributes().get(Attributes.STYLE);
 
     if (style != null) {
       int marginTop = getMarginAsInt(layout.getMarginTop());

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ImageRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,16 +24,13 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ALT;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_BORDER;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HEIGHT;
-import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UICommand;
@@ -79,11 +76,11 @@
       }
     }
 
-    String border = (String) graphic.getAttributes().get(ATTR_BORDER);
+    String border = (String) graphic.getAttributes().get(Attributes.BORDER);
     if (border == null) {
       border = "0";
     }
-    String alt = (String) graphic.getAttributes().get(ATTR_ALT);
+    String alt = (String) graphic.getAttributes().get(Attributes.ALT);
     if (alt == null) {
       alt = "";
     }
@@ -103,7 +100,7 @@
     writer.writeAttribute(HtmlAttributes.ALT, alt, true);
     HtmlRendererUtil.renderTip(graphic, writer);
     writer.writeAttribute(HtmlAttributes.BORDER, border, false);
-    writer.writeAttributeFromComponent(HtmlAttributes.HEIGHT, ATTR_HEIGHT);
+    writer.writeAttributeFromComponent(HtmlAttributes.HEIGHT, Attributes.HEIGHT);
     writer.writeStyleAttribute();
     HtmlRendererUtil.renderDojoDndItem(component, writer, true);
     writer.writeClassAttribute();
@@ -124,10 +121,10 @@
 
   private boolean isDisabled(UIGraphic graphic) {
     boolean disabled = ComponentUtil.getBooleanAttribute(graphic,
-        ATTR_DISABLED);
+        Attributes.DISABLED);
     if (!disabled && graphic.getParent() instanceof UICommand) {
       disabled =
-          ComponentUtil.getBooleanAttribute(graphic.getParent(), ATTR_DISABLED);
+          ComponentUtil.getBooleanAttribute(graphic.getParent(), Attributes.DISABLED);
     }
     return disabled;
   }

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/InRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,23 +24,20 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_PASSWORD;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_READONLY;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_REQUIRED;
 import org.apache.myfaces.tobago.ajax.api.AjaxRenderer;
 import org.apache.myfaces.tobago.ajax.api.AjaxUtils;
-import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.component.AbstractUIPage;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UIInput;
 import org.apache.myfaces.tobago.component.UIInputBase;
+import org.apache.myfaces.tobago.context.TobagoFacesContext;
 import org.apache.myfaces.tobago.renderkit.InputRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
-import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
 import org.apache.myfaces.tobago.renderkit.html.StyleClasses;
+import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
-import org.apache.myfaces.tobago.context.TobagoFacesContext;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -48,9 +45,9 @@
 import javax.faces.validator.LengthValidator;
 import javax.faces.validator.Validator;
 import java.io.IOException;
+import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Arrays;
 
 public class InRenderer extends InputRendererBase implements AjaxRenderer {
   private static final Log LOG = LogFactory.getLog(InRenderer.class);
@@ -94,7 +91,7 @@
       LOG.debug("currentValue = '" + currentValue + "'");
     }
     String type = ComponentUtil.getBooleanAttribute(input,
-        ATTR_PASSWORD) ? "password" : "text";
+        Attributes.PASSWORD) ? "password" : "text";
 
     // Todo: check for valid binding
     boolean renderAjaxSuggest = false;
@@ -123,8 +120,8 @@
     if (maxLength > 0) {
       writer.writeAttribute(HtmlAttributes.MAXLENGTH, maxLength);
     }
-    writer.writeAttribute(HtmlAttributes.READONLY, ComponentUtil.getBooleanAttribute(input, ATTR_READONLY));
-    writer.writeAttribute(HtmlAttributes.DISABLED, ComponentUtil.getBooleanAttribute(input, ATTR_DISABLED));
+    writer.writeAttribute(HtmlAttributes.READONLY, ComponentUtil.getBooleanAttribute(input, Attributes.READONLY));
+    writer.writeAttribute(HtmlAttributes.DISABLED, ComponentUtil.getBooleanAttribute(input, Attributes.DISABLED));
     Integer tabIndex = input.getTabIndex();
     if (tabIndex != null) {
       writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
@@ -145,7 +142,7 @@
 
     HtmlRendererUtil.checkForCommandFacet(input, facesContext, writer);
 
-    boolean required = ComponentUtil.getBooleanAttribute(input, ATTR_REQUIRED);
+    boolean required = ComponentUtil.getBooleanAttribute(input, Attributes.REQUIRED);
     String rendererName = HtmlRendererUtil.getRendererName(facesContext, input);
     if (required && !renderAjaxSuggest) {
       final String[] cmds = {
@@ -179,7 +176,7 @@
 
   protected void applyExtraStyle(FacesContext facesContext, UIInputBase input, String currentValue) {
     if (currentValue != null && currentValue.length() > 0
-        && ComponentUtil.getBooleanAttribute(input, ATTR_REQUIRED)) {
+        && ComponentUtil.getBooleanAttribute(input, Attributes.REQUIRED)) {
       StyleClasses styleClasses = StyleClasses.ensureStyleClasses(input);
       String rendererName = HtmlRendererUtil.getRendererName(facesContext, input);
       styleClasses.removeAspectClass(rendererName, StyleClasses.Aspect.REQUIRED);

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LinkRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,18 +24,17 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_IMAGE;
-import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UICommand;
 import org.apache.myfaces.tobago.component.UILinkCommand;
 import org.apache.myfaces.tobago.renderkit.CommandRendererBase;
 import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
-import org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
+import org.apache.myfaces.tobago.renderkit.html.util.CommandRendererHelper;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
 import org.apache.myfaces.tobago.util.AccessKeyMap;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -88,7 +87,7 @@
     writer.flush();
 
 //  image
-    String image = (String) command.getAttributes().get(ATTR_IMAGE);
+    String image = (String) command.getAttributes().get(Attributes.IMAGE);
     if (image != null) {
       if (image.startsWith("HTTP:") || image.startsWith("FTP:") || image.startsWith("/")) {
         // absolute Path to image : nothing to do
@@ -129,7 +128,7 @@
     }
 
     ResponseWriter writer = facesContext.getResponseWriter();
-    if (ComponentUtil.getBooleanAttribute(component, ATTR_DISABLED)) {
+    if (ComponentUtil.getBooleanAttribute(component, Attributes.DISABLED)) {
       writer.endElement(HtmlConstants.SPAN);
     } else {
       writer.endElement(HtmlConstants.A);

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MenuBarRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,14 +24,9 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_IMAGE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MENU_POPUP;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MENU_POPUP_TYPE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_PAGE_MENU;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_VALUE;
 import static org.apache.myfaces.tobago.TobagoConstants.SUBCOMPONENT_SEP;
 import org.apache.myfaces.tobago.component.AbstractUIPage;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.CreateComponentUtils;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UIMenu;
@@ -82,7 +77,7 @@
     String clientId;
 
     Map attributes = component.getAttributes();
-    if (ComponentUtil.getBooleanAttribute(component, ATTR_MENU_POPUP)) {
+    if (ComponentUtil.getBooleanAttribute(component, Attributes.MENU_POPUP)) {
       clientId = component.getParent().getClientId(facesContext);
     } else {
       clientId = component.getClientId(facesContext);
@@ -92,7 +87,7 @@
       writer.writeIdAttribute(clientId);
       HtmlRendererUtil.renderDojoDndItem(component, writer, true);
       StyleClasses styleClasses = StyleClasses.ensureStyleClasses(component);
-      if (ComponentUtil.getBooleanAttribute(component, ATTR_PAGE_MENU)) {
+      if (ComponentUtil.getBooleanAttribute(component, Attributes.PAGE_MENU)) {
         styleClasses.addClass("menuBar", "page-facet"); // XXX not a standard compliant name
       } else {
         writer.writeStyleAttribute();
@@ -140,7 +135,7 @@
   public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
     super.prepareRender(facesContext, component);
     if (facesContext instanceof TobagoFacesContext) {
-      if (!ComponentUtil.getBooleanAttribute(component, ATTR_MENU_POPUP)) {
+      if (!ComponentUtil.getBooleanAttribute(component, Attributes.MENU_POPUP)) {
         HtmlRendererUtil.renderDojoDndSource(facesContext, component);
       }
 
@@ -204,10 +199,10 @@
         ResourceManagerUtil.getImageWithPath(facesContext, "image/MenuArrow.gif"));
     sb.append("\");\n");
 
-    if (ComponentUtil.getBooleanAttribute(component, ATTR_MENU_POPUP)) {
+    if (ComponentUtil.getBooleanAttribute(component, Attributes.MENU_POPUP)) {
       addMenu(sb, "menu", facesContext, (UIPanel) component, 0);
       sb.append("    initMenuPopUp(searchId, pageId, \"");
-      sb.append(component.getAttributes().get(ATTR_MENU_POPUP_TYPE));
+      sb.append(component.getAttributes().get(Attributes.MENU_POPUP_TYPE));
       sb.append("\");\n");
     } else {
       addMenuEntrys(sb, "menu", facesContext, component, true);
@@ -260,12 +255,12 @@
   private void writeMenuEntry(FacesContext facesContext, TobagoResponseWriter writer, UIPanel uiPanel)
       throws IOException {
     final boolean disabled
-        = ComponentUtil.getBooleanAttribute(uiPanel, ATTR_DISABLED);
+        = ComponentUtil.getBooleanAttribute(uiPanel, Attributes.DISABLED);
     final boolean topMenu = (uiPanel.getParent().getRendererType() != null)
-        || ComponentUtil.getBooleanAttribute(uiPanel, ATTR_MENU_POPUP);
+        || ComponentUtil.getBooleanAttribute(uiPanel, Attributes.MENU_POPUP);
     final boolean pageMenu = (uiPanel.getParent().getRendererType() != null)
         &&
-        ComponentUtil.getBooleanAttribute(uiPanel.getParent(), ATTR_PAGE_MENU);
+        ComponentUtil.getBooleanAttribute(uiPanel.getParent(), Attributes.PAGE_MENU);
     String spanClass
         = "tobago-menuBar-item-span tobago-menuBar-item-span-"
         + (disabled ? "disabled" : "enabled")
@@ -273,7 +268,7 @@
         + (pageMenu ? " tobago-menuBar-item-page-top" : "");
 
     final LabelWithAccessKey label = new LabelWithAccessKey(uiPanel);
-    String image = (String) uiPanel.getAttributes().get(ATTR_IMAGE);
+    String image = (String) uiPanel.getAttributes().get(Attributes.IMAGE);
 
 
     addImage(writer, facesContext, image, disabled);
@@ -387,7 +382,7 @@
 
   private void addCommand(StringBuilder sb, String var, FacesContext facesContext,
                           UICommand command, String onClick) throws IOException {
-    String image = (String) command.getAttributes().get(ATTR_IMAGE);
+    String image = (String) command.getAttributes().get(Attributes.IMAGE);
     addMenuItem(sb, var, facesContext, command, image, onClick);
   }
 
@@ -401,7 +396,7 @@
       checkbox.setId(facesContext.getViewRoot().createUniqueId());
     }
 
-    final boolean checked = ComponentUtil.getBooleanAttribute(checkbox, ATTR_VALUE);
+    final boolean checked = ComponentUtil.getBooleanAttribute(checkbox, Attributes.VALUE);
 
     String clientId = checkbox.getClientId(facesContext);
     onClick = RenderUtil.addMenuCheckToggle(clientId, onClick);
@@ -476,7 +471,7 @@
       return;
     }
     final boolean disabled
-        = ComponentUtil.getBooleanAttribute(command, ATTR_DISABLED);
+        = ComponentUtil.getBooleanAttribute(command, Attributes.DISABLED);
     String spanClass
         = "tobago-menuBar-item-span tobago-menuBar-item-span-"
         + (disabled ? "disabled" : "enabled");

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessageRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessageRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessageRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,13 +24,12 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_DETAIL;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SHOW_SUMMARY;
-import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.renderkit.MessageRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.application.FacesMessage;
@@ -80,8 +79,8 @@
 
     TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
 
-    boolean showSummary = ComponentUtil.getBooleanAttribute(component, ATTR_SHOW_SUMMARY);
-    boolean showDetail = ComponentUtil.getBooleanAttribute(component, ATTR_SHOW_DETAIL);
+    boolean showSummary = ComponentUtil.getBooleanAttribute(component, Attributes.SHOW_SUMMARY);
+    boolean showDetail = ComponentUtil.getBooleanAttribute(component, Attributes.SHOW_DETAIL);
 
     writer.startElement(HtmlConstants.SPAN, component);
     writer.writeClassAttribute("tobago-validation-message");

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/MessagesRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,14 +24,14 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_GLOBAL_ONLY;
-import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UIMessages;
 import org.apache.myfaces.tobago.renderkit.MessageRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
-import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
 import org.apache.myfaces.tobago.renderkit.html.StyleClasses;
+import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.application.FacesMessage;
@@ -76,7 +76,7 @@
       // with id
       String focusId = null;
       Iterator clientIds;
-      if (ComponentUtil.getBooleanAttribute(messages, ATTR_GLOBAL_ONLY)) {
+      if (ComponentUtil.getBooleanAttribute(messages, Attributes.GLOBAL_ONLY)) {
         ArrayList<String> list = new ArrayList<String>(1);
         list.add(null);
         clientIds = list.iterator();

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ObjectRenderer.java Fri Oct 24 12:16:37 2008
@@ -17,7 +17,7 @@
  * limitations under the License.
  */
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SRC;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
@@ -36,7 +36,7 @@
     writer.startElement(HtmlConstants.IFRAME, component);
     writer.writeIdAttribute(component.getClientId(facesContext));
     writer.writeNameAttribute(component.getClientId(facesContext));
-    Object src = component.getAttributes().get(ATTR_SRC);
+    Object src = component.getAttributes().get(Attributes.SRC);
     if (src != null) {
       writer.writeAttribute(HtmlAttributes.SRC, String.valueOf(src), true);
     } else {
@@ -49,9 +49,9 @@
         facesContext, "tobago", "browser.noframe.message.prefix");
     writer.writeText(noframes + " ");
     writer.startElement(HtmlConstants.A, component);
-    if (component.getAttributes().get(ATTR_SRC) != null) {
-      writer.writeAttributeFromComponent(HtmlAttributes.HREF, ATTR_SRC);
-      writer.writeTextFromComponent(ATTR_SRC);
+    if (component.getAttributes().get(Attributes.SRC) != null) {
+      writer.writeAttributeFromComponent(HtmlAttributes.HREF, Attributes.SRC);
+      writer.writeTextFromComponent(Attributes.SRC);
     }
     writer.endElement(HtmlConstants.A);
     noframes = ResourceManagerUtil.getPropertyNotNull(

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/OutRenderer.java Fri Oct 24 12:16:37 2008
@@ -22,13 +22,12 @@
  * $Id$
  */
 
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_CREATE_SPAN;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ESCAPE;
-import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -47,8 +46,8 @@
 
     TobagoResponseWriter writer = HtmlRendererUtil.getTobagoResponseWriter(facesContext);
 
-    boolean escape = ComponentUtil.getBooleanAttribute(component, ATTR_ESCAPE);
-    boolean createSpan = ComponentUtil.getBooleanAttribute(component, ATTR_CREATE_SPAN);
+    boolean escape = ComponentUtil.getBooleanAttribute(component, Attributes.ESCAPE);
+    boolean createSpan = ComponentUtil.getBooleanAttribute(component, Attributes.CREATE_SPAN);
 
     if (createSpan) {
       String id = component.getClientId(facesContext);

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,15 +24,9 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DELAY;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DOCTYPE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_METHOD;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_PAGE_MENU;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TARGET;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TRANSITION;
 import static org.apache.myfaces.tobago.TobagoConstants.FORM_ACCEPT_CHARSET;
 import static org.apache.myfaces.tobago.TobagoConstants.SUBCOMPONENT_SEP;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UILayout;
 import org.apache.myfaces.tobago.component.UIPage;
@@ -152,7 +146,7 @@
     ResponseUtils.ensureContentTypeHeader(facesContext, contentType);
     HtmlRendererUtil.renderDojoDndSource(facesContext, component);
 
-    String title = (String) page.getAttributes().get(ATTR_LABEL);
+    String title = (String) page.getAttributes().get(Attributes.LABEL);
 
     String doctype = generateDoctype(page);
 
@@ -285,9 +279,9 @@
     if (component.getFacets().containsKey(Facets.ACTION)) {
       UIComponent command = component.getFacet(Facets.ACTION);
       if (command != null && command.isRendered()) {
-        int duration = ComponentUtil.getIntAttribute(command, ATTR_DELAY, 100);
-        boolean transition = ComponentUtil.getBooleanAttribute(command, ATTR_TRANSITION);
-        String target = ComponentUtil.getStringAttribute(command, ATTR_TARGET);
+        int duration = ComponentUtil.getIntAttribute(command, Attributes.DELAY, 100);
+        boolean transition = ComponentUtil.getBooleanAttribute(command, Attributes.TRANSITION);
+        String target = ComponentUtil.getStringAttribute(command, Attributes.TARGET);
         String action;
         if (target != null) {
           action = "Tobago.submitAction(this, '" + command.getClientId(facesContext) + "', "
@@ -425,7 +419,7 @@
 */
 
     if (menubar != null) {
-      menubar.getAttributes().put(ATTR_PAGE_MENU, Boolean.TRUE);
+      menubar.getAttributes().put(Attributes.PAGE_MENU, Boolean.TRUE);
       RenderUtil.encode(facesContext, menubar);
     }
     // write the proviously rendered page content
@@ -576,12 +570,12 @@
   }
 
   private String getMethod(UIPage page) {
-    String method = (String) page.getAttributes().get(ATTR_METHOD);
+    String method = (String) page.getAttributes().get(Attributes.METHOD);
     return method == null ? "post" : method;
   }
 
   protected String generateDoctype(UIPage page) {
-    String doctype = (String) page.getAttributes().get(ATTR_DOCTYPE);
+    String doctype = (String) page.getAttributes().get(Attributes.DOCTYPE);
     String type = null;
     if (doctype == null || "loose".equals(doctype)) {
       //default

Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PanelRenderer.java Fri Oct 24 12:16:37 2008
@@ -24,9 +24,9 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HEIGHT;
 import org.apache.myfaces.tobago.ajax.api.AjaxRenderer;
 import org.apache.myfaces.tobago.ajax.api.AjaxUtils;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UIPanel;
 import org.apache.myfaces.tobago.component.UIReload;
@@ -65,7 +65,7 @@
     // sonst Warnung ausgebenn und addition der children's fixedHeight
 
     int height =
-        ComponentUtil.getIntAttribute(component, ATTR_HEIGHT, -1);
+        ComponentUtil.getIntAttribute(component, Attributes.HEIGHT, -1);
 
     if (height == -1) {
       height = getFixedHeightForPanel(component, facesContext);

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?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- 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 Fri Oct 24 12:16:37 2008
@@ -27,20 +27,20 @@
 import static org.apache.myfaces.tobago.TobagoConstants.SUBCOMPONENT_SEP;
 import org.apache.myfaces.tobago.ajax.api.AjaxRenderer;
 import org.apache.myfaces.tobago.ajax.api.AjaxUtils;
-import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UIPage;
 import org.apache.myfaces.tobago.component.UIPopup;
 import org.apache.myfaces.tobago.context.ClientProperties;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
 import org.apache.myfaces.tobago.context.TobagoFacesContext;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.StyleClasses;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
-import org.apache.myfaces.tobago.TobagoConstants;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -77,7 +77,7 @@
     final String contentDivId = clientId + CONTENT_ID_POSTFIX;
     //final String left = component.getLeft();
     //final String top = component.getTop();
-    Integer zIndex = (Integer) component.getAttributes().get(TobagoConstants.ATTR_ZINDEX);
+    Integer zIndex = (Integer) component.getAttributes().get(Attributes.Z_INDEX);
     if (zIndex == null) {
       zIndex = 0;
     }

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?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- 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 Fri Oct 24 12:16:37 2008
@@ -24,7 +24,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UICommand;
 import org.apache.myfaces.tobago.component.UIProgress;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
@@ -38,8 +38,7 @@
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import javax.swing.BoundedRangeModel;
-import javax.swing.DefaultBoundedRangeModel;
+import javax.swing.*;
 import java.io.IOException;
 
 public class ProgressRenderer extends LayoutableRendererBase {
@@ -63,7 +62,7 @@
     String value1 = Integer.toString(model.getValue());
     String value2 = Integer.toString(model.getMaximum() - model.getValue());
 
-    Object title = component.getAttributes().get(ATTR_TIP);
+    Object title = component.getAttributes().get(Attributes.TIP);
     if (title == null) {
       title = Integer.toString(100 * model.getValue()
           / (model.getMaximum() - model.getMinimum())) + " %";

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?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- 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 Fri Oct 24 12:16:37 2008
@@ -24,17 +24,9 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ACTION_ONCLICK;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ICON_SIZE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_IMAGE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL_POSITION;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STATE_PREVIEW;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STYLE_BODY;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_VALUE;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_MENUCOMMAND;
 import static org.apache.myfaces.tobago.TobagoConstants.RENDERER_TYPE_TOOL_BAR;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.CreateComponentUtils;
 import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UICommand;
@@ -75,8 +67,8 @@
     if (actionId != null
         && actionId.equals(component.getClientId(facesContext) + CHANGE_BUTTON)) {
       boolean state
-          = ComponentUtil.getBooleanAttribute(component, ATTR_STATE_PREVIEW);
-      component.getAttributes().put(ATTR_STATE_PREVIEW, !state);
+          = ComponentUtil.getBooleanAttribute(component, Attributes.STATE_PREVIEW);
+      component.getAttributes().put(Attributes.STATE_PREVIEW, !state);
       facesContext.renderResponse();
 
     }
@@ -104,7 +96,7 @@
 
 
     boolean previewState
-        = ComponentUtil.getBooleanAttribute(component, ATTR_STATE_PREVIEW);
+        = ComponentUtil.getBooleanAttribute(component, Attributes.STATE_PREVIEW);
     // FIXME: remove this when i18n is ok
 
     String clientId = component.getClientId(facesContext);
@@ -156,7 +148,7 @@
       writer.writeClassAttribute(bodyClasses);
       writer.writeNameAttribute(clientId);
       writer.writeIdAttribute(clientId);
-      writer.writeAttribute(HtmlAttributes.STYLE, null, ATTR_STYLE_BODY);
+      writer.writeAttribute(HtmlAttributes.STYLE, null, Attributes.STYLE_BODY);
       String onchange = HtmlUtils.generateOnchange(component, facesContext);
       if (null != onchange) {
         writer.writeAttribute(HtmlAttributes.ONCHANGE, onchange, null);
@@ -177,8 +169,8 @@
     String clientId = component.getClientId(facesContext);
 
     component.getFacets().put(Facets.TOOL_BAR, toolbar);
-    toolbar.getAttributes().put(ATTR_ICON_SIZE, UIToolBar.ICON_SMALL);
-    toolbar.getAttributes().put(ATTR_LABEL_POSITION, UIToolBar.LABEL_OFF);
+    toolbar.getAttributes().put(Attributes.ICON_SIZE, UIToolBar.ICON_SMALL);
+    toolbar.getAttributes().put(Attributes.LABEL_POSITION, UIToolBar.LABEL_OFF);
 
     UICommand //command = (AbstractUICommand) ComponentUtil.createComponent(
 //        facesContext, AbstractUICommand.COMPONENT_TYPE, RENDERER_TYPE_MENUCOMMAND);
@@ -188,36 +180,36 @@
         facesContext, UISelectBooleanCommand.COMPONENT_TYPE, RENDERER_TYPE_MENUCOMMAND);
     toolbar.getChildren().add(command);
 
-    command.getAttributes().put(ATTR_IMAGE, "image/tobago-richtext-edit.gif");
-    command.setValueBinding(ATTR_DISABLED, ComponentUtil.createValueBinding("#{! tobagoRichtextPreviewState}"));
-    command.setValueBinding(ATTR_VALUE, ComponentUtil.createValueBinding("#{!tobagoRichtextPreviewState}"));
+    command.getAttributes().put(Attributes.IMAGE, "image/tobago-richtext-edit.gif");
+    command.setValueBinding(Attributes.DISABLED, ComponentUtil.createValueBinding("#{! tobagoRichtextPreviewState}"));
+    command.setValueBinding(Attributes.VALUE, ComponentUtil.createValueBinding("#{!tobagoRichtextPreviewState}"));
 
     String title = ResourceManagerUtil.getPropertyNotNull(
         facesContext, "tobago", "tobago.richtexteditor.edit.title");
-    command.getAttributes().put(ATTR_TIP, title);
+    command.getAttributes().put(Attributes.TIP, title);
 
     String onClick = "Tobago.submitAction(this, '"
         + clientId + RichTextEditorRenderer.CHANGE_BUTTON + "')";
-    command.getAttributes().put(ATTR_ACTION_ONCLICK, onClick);
+    command.getAttributes().put(Attributes.ONCLICK, onClick);
 
     command = (UICommand) CreateComponentUtils.createComponent(
         facesContext, UISelectBooleanCommand.COMPONENT_TYPE, RENDERER_TYPE_MENUCOMMAND);
     toolbar.getChildren().add(command);
     //command.getAttributes().put(ATTR_COMMAND_TYPE, ToolBarSelectBooleanTag.COMMAND_TYPE);
-    command.getAttributes().put(ATTR_IMAGE, "image/tobago-richtext-preview.gif");
-    command.setValueBinding(ATTR_DISABLED, ComponentUtil.createValueBinding("#{tobagoRichtextPreviewState}"));
-    command.setValueBinding(ATTR_VALUE, ComponentUtil.createValueBinding("#{tobagoRichtextPreviewState}"));
+    command.getAttributes().put(Attributes.IMAGE, "image/tobago-richtext-preview.gif");
+    command.setValueBinding(Attributes.DISABLED, ComponentUtil.createValueBinding("#{tobagoRichtextPreviewState}"));
+    command.setValueBinding(Attributes.VALUE, ComponentUtil.createValueBinding("#{tobagoRichtextPreviewState}"));
 
     title = ResourceManagerUtil.getPropertyNotNull(
         facesContext, "tobago", "tobago.richtexteditor.preview.title");
-    command.getAttributes().put(ATTR_TIP, title);
-    command.getAttributes().put(ATTR_ACTION_ONCLICK, onClick);
+    command.getAttributes().put(Attributes.TIP, title);
+    command.getAttributes().put(Attributes.ONCLICK, onClick);
 
     command = (UICommand) CreateComponentUtils.createComponent(
         facesContext, UICommand.COMPONENT_TYPE, RENDERER_TYPE_MENUCOMMAND);
     toolbar.getChildren().add(command);
-    command.getAttributes().put(ATTR_IMAGE, "image/config.gif");
-    command.getAttributes().put(ATTR_ACTION_ONCLICK, "Tobago.doEditorCommand(this);");
+    command.getAttributes().put(Attributes.IMAGE, "image/config.gif");
+    command.getAttributes().put(Attributes.ONCLICK, "Tobago.doEditorCommand(this);");
 
     return toolbar;
   }

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?rev=707725&r1=707724&r2=707725&view=diff
==============================================================================
--- 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 Fri Oct 24 12:16:37 2008
@@ -24,16 +24,14 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_DISABLED;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_INLINE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_READONLY;
-import org.apache.myfaces.tobago.util.ComponentUtil;
+import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.UISelectBoolean;
 import org.apache.myfaces.tobago.renderkit.LayoutableRendererBase;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlConstants;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtil;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtil;
+import org.apache.myfaces.tobago.util.ComponentUtil;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -83,7 +81,7 @@
 
     UIComponent label = ComponentUtil.provideLabel(facesContext, selectBoolean);
 
-    boolean inline = ComponentUtil.getBooleanAttribute(selectBoolean, ATTR_INLINE);
+    boolean inline = ComponentUtil.getBooleanAttribute(selectBoolean, Attributes.INLINE);
 
     if (label != null && !inline) {
 
@@ -105,7 +103,7 @@
     writer.writeAttribute(HtmlAttributes.TYPE, "checkbox", false);
     writer.writeAttribute(HtmlAttributes.VALUE, "true", false);
     writer.writeAttribute(HtmlAttributes.CHECKED, checked);
-    if (ComponentUtil.getBooleanAttribute(selectBoolean, ATTR_READONLY)) {
+    if (ComponentUtil.getBooleanAttribute(selectBoolean, Attributes.READONLY)) {
       writer.writeAttribute(HtmlAttributes.READONLY, true);
       if (checked) {
         writer.writeAttribute(HtmlAttributes.ONCLICK, "this.checked=true", false);
@@ -117,7 +115,7 @@
     writer.writeClassAttribute();
     writer.writeIdAttribute(selectBoolean.getClientId(facesContext));
     writer.writeAttribute(HtmlAttributes.DISABLED,
-        ComponentUtil.getBooleanAttribute(selectBoolean, ATTR_DISABLED));
+        ComponentUtil.getBooleanAttribute(selectBoolean, Attributes.DISABLED));
     Integer tabIndex = selectBoolean.getTabIndex();
     if (tabIndex != null) {
       writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);