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 2010/03/10 16:28:41 UTC

svn commit: r921399 - /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AttributeTag.java

Author: lofwyr
Date: Wed Mar 10 15:28:41 2010
New Revision: 921399

URL: http://svn.apache.org/viewvc?rev=921399&view=rev
Log:
documentation

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AttributeTag.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AttributeTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AttributeTag.java?rev=921399&r1=921398&r2=921399&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AttributeTag.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/AttributeTag.java Wed Mar 10 15:28:41 2010
@@ -31,11 +31,6 @@ import javax.faces.webapp.UIComponentTag
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
-/*
- * Date: Oct 14, 2006
- * Time: 1:47:13 PM
- */
-
 /**
  * Add an attribute on the UIComponent
  * associated with the closest parent UIComponent custom action.
@@ -48,6 +43,9 @@ public abstract class AttributeTag exten
 
   public abstract Object getNameAsBindingOrExpression();
 
+  /**
+   * The name of the attribute in the parent component.
+   */
   @TagAttribute(required = true, name = "name")
   public abstract String getNameValue();
 
@@ -58,12 +56,36 @@ public abstract class AttributeTag exten
 
   public abstract Object getValueAsBindingOrExpression();
 
+  /**
+   * The value of the attribute in the parent component.
+   */
   @TagAttribute(required = true, name = "value")
   public abstract String getValueValue();
 
   public abstract String getValueExpression();
 
   /**
+   * Warning: The mode is only available when using Facelets.
+   * Allowed values are "action", "actionListener", "actionFromValue", "isNotSet", "isSet", "valueIfSet".
+   * <br/>
+   * "action" (method binding) evaluate the expression to find the method binding which is referenced with the template.
+   * <br/>
+   * "actionListener" same as "action" but for the method signature of ActionListeners.
+   * <br/>
+   * "isSet" (boolean) checks, if the expression is set from the composition caller.
+   * <br/>
+   * "isNotSet" (boolean) nagation of "isSet"
+   * <br/>
+   * "actionFromValue" Evaluates the ValueBinding to get an outcome set directly (no action method)
+   * <br/>
+   * "valueIfSet" set the attribute only if the value is set.
+   */
+  @TagAttribute(name = "mode")
+  public void setMode(String mode) {
+    throw new RuntimeException("The mode is only available when using Facelets, not with JSP.");
+  }
+  
+  /**
    * @throws javax.servlet.jsp.JspException if a JSP error occurs
    */
   public int doStartTag() throws JspException {