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 2007/01/20 12:19:26 UTC

svn commit: r498100 - in /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago: component/ renderkit/html/ taglib/component/ taglib/decl/ taglib/extension/

Author: bommel
Date: Sat Jan 20 03:19:22 2007
New Revision: 498100

URL: http://svn.apache.org/viewvc?view=rev&rev=498100
Log:
(TOBAGO-205) Allow multiple values in markup attribute

Added:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMarkup.java
Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/SupportsMarkup.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIBox.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIColumn.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java Sat Jan 20 03:19:22 2007
@@ -34,6 +34,7 @@
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_FOR;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HOVER;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MARKUP;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_READONLY;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_RENDER_RANGE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_RENDER_RANGE_EXTERN;
@@ -316,6 +317,19 @@
      } else {
        String [] components  = renderers.split(",");
        command.setRenderedPartially(components);
+      }
+    }
+  }
+
+  public static void setMarkup(UIComponent markupComponent, String markup) {
+    if (markup != null) {
+      if (markupComponent instanceof SupportsMarkup) {
+        if (UIComponentTag.isValueReference(markup)) {
+          markupComponent.setValueBinding(ATTR_MARKUP, createValueBinding(markup));
+        } else {
+          String [] markups  = markup.split(",");
+          ((SupportsMarkup) markupComponent).setMarkup(markups);
+        }
       }
     }
   }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/SupportsMarkup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/SupportsMarkup.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/SupportsMarkup.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/SupportsMarkup.java Sat Jan 20 03:19:22 2007
@@ -25,6 +25,7 @@
  */
 public interface SupportsMarkup {
 
+  String[] getMarkup();
 
-  String getMarkup();
+  void setMarkup(String[] markups);
 }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIBox.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIBox.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIBox.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIBox.java Sat Jan 20 03:19:22 2007
@@ -33,21 +33,21 @@
 
   public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Box";
 
-  private String markup;
+  private String[] markup;
 
-  public String getMarkup() {
+  public String[] getMarkup() {
     if (markup != null) {
       return markup;
     }
     ValueBinding vb = getValueBinding(ATTR_MARKUP);
     if (vb != null) {
-      return (String) vb.getValue(getFacesContext());
+      return (String[]) vb.getValue(getFacesContext());
     } else {
-      return null;
+      return new String[0];
     }
   }
 
-  public void setMarkup(String markup) {
+  public void setMarkup(String[] markup) {
     this.markup = markup;
   }
 
@@ -55,7 +55,7 @@
   public void restoreState(FacesContext context, Object state) {
     Object[] values = (Object[]) state;
     super.restoreState(context, values[0]);
-    markup = (String) values[1];
+    markup = (String[]) values[1];
    }
 
   @Override

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIColumn.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIColumn.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIColumn.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIColumn.java Sat Jan 20 03:19:22 2007
@@ -37,7 +37,7 @@
   private Boolean sortable;
   private String align;
   private String label;
-  private String markup;
+  private String[] markup;
 
   public void restoreState(FacesContext context, Object state) {
     Object[] values = (Object[]) state;
@@ -45,7 +45,7 @@
     align = (String) values[1];
     sortable = (Boolean) values[2];
     label = (String) values[3];
-    markup = (String) values[4];
+    markup = (String[]) values[4];
   }
 
   public Object saveState(FacesContext context) {
@@ -58,19 +58,19 @@
     return values;
   }
 
-  public String getMarkup() {
+  public String[] getMarkup() {
     if (markup != null) {
       return markup;
     }
     ValueBinding vb = getValueBinding(ATTR_MARKUP);
     if (vb != null) {
-      return (String) vb.getValue(getFacesContext());
+      return (String[]) vb.getValue(getFacesContext());
     } else {
-      return null;
+      return new String[0];
     }
   }
 
-  public void setMarkup(String markup) {
+  public void setMarkup(String[] markup) {
     this.markup = markup;
   }
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIInput.java Sat Jan 20 03:19:22 2007
@@ -38,7 +38,7 @@
 
   private Boolean readonly;
   private Boolean password;
-  private String markup;
+  private String[] markup;
   private javax.faces.el.MethodBinding suggestMethod;
 
   public void restoreState(FacesContext context, Object state) {
@@ -47,7 +47,7 @@
     suggestMethod = (MethodBinding) restoreAttachedState(context, values[1]);
     readonly = (Boolean) values[2];
     password = (Boolean) values[3];
-    markup = (String) values[4];
+    markup = (String[]) values[4];
   }
 
   public Object saveState(FacesContext context) {
@@ -60,19 +60,19 @@
     return values;
   }
 
-  public String getMarkup() {
+  public String[] getMarkup() {
     if (markup != null) {
       return markup;
     }
     ValueBinding vb = getValueBinding(ATTR_MARKUP);
     if (vb != null) {
-      return (String) vb.getValue(getFacesContext());
+      return (String[]) vb.getValue(getFacesContext());
     } else {
-      return null;
+      return new String[0];
     }
   }
 
-  public void setMarkup(String markup) {
+  public void setMarkup(String[] markup) {
     this.markup = markup;
   }
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIOutput.java Sat Jan 20 03:19:22 2007
@@ -33,7 +33,7 @@
 public class UIOutput extends javax.faces.component.UIOutput implements SupportsMarkup {
   public static final String COMPONENT_TYPE = "org.apache.myfaces.tobago.Output";
   private Boolean escape;
-  private String markup;
+  private String[] markup;
   private String tip;
   private boolean createSpan = true;
 
@@ -42,7 +42,7 @@
     Object[] values = (Object[]) state;
     super.restoreState(context, values[0]);
     escape = (Boolean) values[1];
-    markup = (String) values[2];
+    markup = (String[]) values[2];
     tip = (String) values[3];
     createSpan = (Boolean) values[4];
    }
@@ -74,19 +74,19 @@
     this.escape = escape;
   }
 
-  public String getMarkup() {
+  public String[] getMarkup() {
     if (markup != null) {
       return markup;
     }
     ValueBinding vb = getValueBinding(ATTR_MARKUP);
     if (vb != null) {
-      return (String) vb.getValue(getFacesContext());
+      return (String[]) vb.getValue(getFacesContext());
     } else {
-      return null;
+      return new String[0];
     }
   }
 
-  public void setMarkup(String markup) {
+  public void setMarkup(String[] markup) {
     this.markup = markup;
   }
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/html/HtmlRendererUtil.java Sat Jan 20 03:19:22 2007
@@ -29,7 +29,6 @@
 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_MARKUP;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_READONLY;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STYLE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STYLE_BODY;
@@ -490,8 +489,8 @@
       String subComponent, StringBuilder tobagoClass) {
 
     if (component instanceof SupportsMarkup) {
-      String markup = ComponentUtil.getStringAttribute(component, ATTR_MARKUP);
-      if (StringUtils.isNotEmpty(markup)) {
+      String[] markups = ((SupportsMarkup) component).getMarkup();
+      for (String markup: markups) {
         Theme theme = ClientProperties.getInstance(FacesContext.getCurrentInstance().getViewRoot()).getTheme();
         if (theme.getRenderersConfig().isMarkupSupported(rendererName, markup)) {
           tobagoClass.append(TOBAGO_CSS_CLASS_PREFIX).append(rendererName).append("-").append(subComponent)
@@ -506,8 +505,8 @@
   public static void addMarkupClass(UIComponent component, String rendererName, StringBuilder tobagoClass) {
 
     if (component instanceof SupportsMarkup) {
-      String markup = ComponentUtil.getStringAttribute(component, ATTR_MARKUP);
-      if (StringUtils.isNotEmpty(markup)) {
+      String[] markups = ((SupportsMarkup) component).getMarkup();
+      for (String markup: markups) {
         Theme theme = ClientProperties.getInstance(FacesContext.getCurrentInstance().getViewRoot()).getTheme();
         if (theme.getRenderersConfig().isMarkupSupported(rendererName, markup)) {
           tobagoClass.append(TOBAGO_CSS_CLASS_PREFIX).append(rendererName)

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/BoxTag.java Sat Jan 20 03:19:22 2007
@@ -19,7 +19,6 @@
 
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UIBox;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MARKUP;
 
 import javax.servlet.jsp.tagext.BodyTag;
 import javax.faces.component.UIComponent;
@@ -44,7 +43,7 @@
 
   protected void setProperties(UIComponent component) {
     super.setProperties(component);
-    ComponentUtil.setStringProperty(component, ATTR_MARKUP, markup);
+    ComponentUtil.setMarkup(component, markup);
   }
 
   public void setMarkup(String markup) {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTag.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/ColumnTag.java Sat Jan 20 03:19:22 2007
@@ -19,7 +19,6 @@
 
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ALIGN;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SORTABLE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MARKUP;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UIColumn;
 
@@ -52,7 +51,7 @@
     super.setProperties(component);
     ComponentUtil.setBooleanProperty(component, ATTR_SORTABLE, sortable);
     ComponentUtil.setStringProperty(component, ATTR_ALIGN, align);
-    ComponentUtil.setStringProperty(component, ATTR_MARKUP, markup);
+    ComponentUtil.setMarkup(component, markup);
   }
 
   public void setMarkup(String markup) {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTag.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/InTag.java Sat Jan 20 03:19:22 2007
@@ -25,7 +25,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_PASSWORD;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MARKUP;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UIInput;
 
@@ -60,7 +59,7 @@
     if (component instanceof UIInput) {
       ComponentUtil.setSuggestMethodBinding((UIInput) component, suggestMethod);
     }
-    ComponentUtil.setStringProperty(component, ATTR_MARKUP, markup);
+    ComponentUtil.setMarkup(component, markup);
   }
 
   public String getPassword() {

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/OutTag.java Sat Jan 20 03:19:22 2007
@@ -23,7 +23,6 @@
  */
 
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ESCAPE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MARKUP;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 import org.apache.myfaces.tobago.component.UIOutput;
@@ -53,7 +52,7 @@
     ComponentUtil.setBooleanProperty(component, ATTR_ESCAPE, escape);
     // TODO ???? SPAN ?
     //ComponentUtil.setBooleanProperty(component, ATTR_CREATE_SPAN, "true");
-    ComponentUtil.setStringProperty(component, ATTR_MARKUP, markup);
+    ComponentUtil.setMarkup(component, markup);
     ComponentUtil.setStringProperty(component, ATTR_TIP, tip);
   }
 

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTag.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/TextAreaTag.java Sat Jan 20 03:19:22 2007
@@ -20,7 +20,6 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ROWS;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_MARKUP;
 import org.apache.myfaces.tobago.component.ComponentUtil;
 
 import javax.faces.component.UIComponent;
@@ -50,7 +49,7 @@
     }
 
     ComponentUtil.setStringProperty(component, ATTR_ROWS, rows);
-    ComponentUtil.setStringProperty(component, ATTR_MARKUP, markup);
+    ComponentUtil.setMarkup(component, markup);
   }
 
   public String getRows() {

Added: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMarkup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMarkup.java?view=auto&rev=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMarkup.java (added)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/decl/HasMarkup.java Sat Jan 20 03:19:22 2007
@@ -0,0 +1,36 @@
+package org.apache.myfaces.tobago.taglib.decl;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+
+/*
+ * User: bommel
+ * Date: Jan 19, 2007
+ * Time: 9:51:30 PM
+ */
+public interface HasMarkup {
+  /**
+   * Indicate markup of this component.
+   * Possible value is 'none'. But this can be overridden in the theme.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(defaultValue = "none")
+  void setMarkup(String markup);
+}

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java Sat Jan 20 03:19:22 2007
@@ -18,8 +18,6 @@
  */
 
 import org.apache.myfaces.tobago.apt.annotation.Tag;
-import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
-import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.taglib.component.InTag;
 import org.apache.myfaces.tobago.taglib.decl.HasConverter;
 import org.apache.myfaces.tobago.taglib.decl.HasIdBindingAndRendered;
@@ -36,6 +34,7 @@
 import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
 import org.apache.myfaces.tobago.taglib.decl.HasSuggestMethod;
 import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
+import org.apache.myfaces.tobago.taglib.decl.HasMarkup;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -60,7 +59,7 @@
 @Tag(name = "in")
 public class InExtensionTag extends BodyTagSupport
     implements HasValue, HasValueChangeListener, HasValidator, HasIdBindingAndRendered,
-    HasConverter, IsReadonly, IsDisabled, HasOnchange,
+    HasConverter, IsReadonly, IsDisabled, HasOnchange, HasMarkup,
     IsRequired, HasTip, HasLabel, HasLabelWidth, IsPassword, IsFocus, HasSuggestMethod {
 
   private String binding;
@@ -184,12 +183,6 @@
     markup = null;
   }
 
-   /**
-   * Indicate markup of this component.
-   * Possible value is 'none'. But this can be overridden in the theme.
-   */
-  @TagAttribute
-  @UIComponentTagAttribute(defaultValue = "none")
   public void setMarkup(String markup) {
     this.markup = markup;
   }

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java?view=diff&rev=498100&r1=498099&r2=498100
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/TextAreaExtensionTag.java Sat Jan 20 03:19:22 2007
@@ -32,6 +32,7 @@
 import org.apache.myfaces.tobago.taglib.decl.HasOnchange;
 import org.apache.myfaces.tobago.taglib.decl.HasValueChangeListener;
 import org.apache.myfaces.tobago.taglib.decl.HasLabelWidth;
+import org.apache.myfaces.tobago.taglib.decl.HasMarkup;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.BodyTagSupport;
@@ -43,7 +44,7 @@
 @Tag(name = "textarea")
 public class TextAreaExtensionTag extends BodyTagSupport
     implements HasValue, HasValueChangeListener, HasIdBindingAndRendered,
-    HasConverter, HasValidator, IsReadonly, IsDisabled,
+    HasConverter, HasValidator, IsReadonly, IsDisabled, HasMarkup,
     IsRequired, HasTip, HasLabel, HasLabelWidth, IsFocus, HasOnchange {
 
   private String binding;
@@ -59,6 +60,7 @@
   private String valueChangeListener;
   private String validator;
   private String onchange;
+  private String markup;
   private String labelWidth;
 
   private LabelExtensionTag labelTag;
@@ -119,6 +121,9 @@
     if (required != null) {
       textAreaTag.setRequired(required);
     }
+    if (markup != null) {
+      textAreaTag.setMarkup(markup);
+    }
     textAreaTag.setParent(labelTag);
     textAreaTag.doStartTag();
 
@@ -148,6 +153,7 @@
     tip = null;
     value = null;
     onchange = null;
+    markup = null;
     valueChangeListener = null;
   }
 
@@ -187,6 +193,9 @@
     this.onchange = onchange;
   }
 
+  public void setMarkup(String markup) {
+    this.markup = markup;
+  }
 
   public void setReadonly(String readonly) {
     this.readonly = readonly;