You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mr...@apache.org on 2007/01/07 06:18:56 UTC

svn commit: r493648 [3/11] - in /struts/struts2/trunk/core: ./ src/main/java/org/apache/struts2/components/ src/main/java/org/apache/struts2/components/table/ src/main/resources/META-INF/ src/site/ src/site/resources/ src/site/resources/tags/

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java?view=diff&rev=493648&r1=493647&r2=493648
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java Sat Jan  6 21:18:49 2007
@@ -31,6 +31,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.struts.annotations.StrutsTagAttribute;
 import org.apache.struts2.StrutsConstants;
 import org.apache.struts2.components.template.Template;
 import org.apache.struts2.components.template.TemplateEngine;
@@ -877,19 +878,12 @@
         }
     }
 
-
-    /**
-     * The template directory.
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The template directory.")
     public void setTemplateDir(String templateDir) {
         this.templateDir = templateDir;
     }
 
-    /**
-     * The theme (other than default) to use for rendering the element
-     * @s.tagattribute required="false"
-      */
+    @StrutsTagAttribute(description="The theme (other than default) to use for rendering the element")
     public void setTheme(String theme) {
         this.theme = theme;
     }
@@ -898,242 +892,152 @@
         return template;
     }
 
-    /**
-     * The template (other than default) to use for rendering the element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The template (other than default) to use for rendering the element")
     public void setTemplate(String template) {
         this.template = template;
     }
 
-    /**
-     * The css class to use for element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The css class to use for element")
     public void setCssClass(String cssClass) {
         this.cssClass = cssClass;
     }
 
-    /**
-     * The css style definitions for element ro use
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The css style definitions for element ro use")
     public void setCssStyle(String cssStyle) {
         this.cssStyle = cssStyle;
     }
 
-    /**
-     * Set the html title attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html title attribute on rendered html element")
     public void setTitle(String title) {
         this.title = title;
     }
 
-    /**
-     * Set the html disabled attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html disabled attribute on rendered html element")
     public void setDisabled(String disabled) {
         this.disabled = disabled;
     }
 
-    /**
-     * Label expression used for rendering a element specific label
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Label expression used for rendering a element specific label")
     public void setLabel(String label) {
         this.label = label;
     }
 
-    /**
-     * define label position of form element (top/left)
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Define label position of form element (top/left)")
     public void setLabelposition(String labelPosition) {
         this.labelPosition = labelPosition;
     }
 
-    /**
-     * define required position of required form element (left|right)
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Define required position of required form element (left|right)")
     public void setRequiredposition(String requiredposition) {
         this.requiredposition = requiredposition;
     }
 
-    /**
-     * The name to set for element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The name to set for element")
     public void setName(String name) {
         this.name = name;
     }
 
-    /**
-     * If set to true, the rendered element will indicate that input is required
-     * @s.tagattribute  required="false" type="Boolean" default="false"
-     */
+    @StrutsTagAttribute(description="If set to true, the rendered element will indicate that input is required", type="Boolean", defaultValue="false")
     public void setRequired(String required) {
         this.required = required;
     }
 
-    /**
-     * Set the html tabindex attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html tabindex attribute on rendered html element")
     public void setTabindex(String tabindex) {
         this.tabindex = tabindex;
     }
 
-    /**
-     * Preset the value of input element.
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Preset the value of input element.")
     public void setValue(String value) {
         this.value = value;
     }
 
-    /**
-     * Set the html onclick attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onclick attribute on rendered html element")
     public void setOnclick(String onclick) {
         this.onclick = onclick;
     }
 
-    /**
-     * Set the html ondblclick attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html ondblclick attribute on rendered html element")
     public void setOndblclick(String ondblclick) {
         this.ondblclick = ondblclick;
     }
 
-    /**
-     * Set the html onmousedown attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onmousedown attribute on rendered html element")
     public void setOnmousedown(String onmousedown) {
         this.onmousedown = onmousedown;
     }
 
-    /**
-     * Set the html onmouseup attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onmouseup attribute on rendered html element")
     public void setOnmouseup(String onmouseup) {
         this.onmouseup = onmouseup;
     }
 
-    /**
-     * Set the html onmouseover attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onmouseover attribute on rendered html element")
     public void setOnmouseover(String onmouseover) {
         this.onmouseover = onmouseover;
     }
 
-    /**
-     * Set the html onmousemove attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onmousemove attribute on rendered html element")
     public void setOnmousemove(String onmousemove) {
         this.onmousemove = onmousemove;
     }
 
-    /**
-     * Set the html onmouseout attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onmouseout attribute on rendered html element")
     public void setOnmouseout(String onmouseout) {
         this.onmouseout = onmouseout;
     }
 
-    /**
-     * Set the html onfocus attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onfocus attribute on rendered html element")
     public void setOnfocus(String onfocus) {
         this.onfocus = onfocus;
     }
 
-    /**
-     * Set the html onblur attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description=" Set the html onblur attribute on rendered html element")
     public void setOnblur(String onblur) {
         this.onblur = onblur;
     }
 
-    /**
-     * Set the html onkeypress attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onkeypress attribute on rendered html element")
     public void setOnkeypress(String onkeypress) {
         this.onkeypress = onkeypress;
     }
 
-    /**
-     * Set the html onkeydown attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onkeydown attribute on rendered html element")
     public void setOnkeydown(String onkeydown) {
         this.onkeydown = onkeydown;
     }
 
-    /**
-     * Set the html onkeyup attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onkeyup attribute on rendered html element")
     public void setOnkeyup(String onkeyup) {
         this.onkeyup = onkeyup;
     }
 
-    /**
-     * Set the html onselect attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onselect attribute on rendered html element")
     public void setOnselect(String onselect) {
         this.onselect = onselect;
     }
 
-    /**
-     * Set the html onchange attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html onchange attribute on rendered html element")
     public void setOnchange(String onchange) {
         this.onchange = onchange;
     }
 
-    /**
-     * Set the html accesskey attribute on rendered html element
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set the html accesskey attribute on rendered html element")
     public void setAccesskey(String accesskey) {
         this.accesskey = accesskey;
     }
 
-    /**
-     * Set the tooltip of this particular component
-     * @s.tagattribute required="false" type="String" default=""
-     */
+    @StrutsTagAttribute(description="Set the tooltip of this particular component")
     public void setTooltip(String tooltip) {
         this.tooltip = tooltip;
     }
 
-    /**
-     * Set the tooltip configuration
-     * @s.tagattribute required="false" type="String" default=""
-     */
+    @StrutsTagAttribute(description="Set the tooltip configuration")
     public void setTooltipConfig(String tooltipConfig) {
         this.tooltipConfig = tooltipConfig;
     }
 
-    /**
-     * Set the key (name, value, label) for this particular component
-     * @s.tagattribute required="false" type="String" default=""
-     */
+    @StrutsTagAttribute(description="Set the key (name, value, label) for this particular component")
     public void setKey(String key) {
         this.key = key;
     }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/URL.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/URL.java?view=diff&rev=493648&r1=493647&r2=493648
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/URL.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/URL.java Sat Jan  6 21:18:49 2007
@@ -32,6 +32,8 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.struts.annotations.StrutsTag;
+import org.apache.struts.annotations.StrutsTagAttribute;
 import org.apache.struts2.StrutsException;
 import org.apache.struts2.StrutsConstants;
 import org.apache.struts2.dispatcher.Dispatcher;
@@ -105,9 +107,8 @@
  *
  * @see Param
  *
- * @s.tag name="url" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.URLTag"
- * description="This tag is used to create a URL"
  */
+@StrutsTag(name="url", tldTagClass="org.apache.struts2.views.jsp.URLTag", description="This tag is used to create a URL")
 public class URL extends Component {
     private static final Log LOG = LogFactory.getLog(URL.class);
 
@@ -141,18 +142,18 @@
     protected String anchor;
     protected String urlIncludeParams;
     protected ExtraParameterProvider extraParameterProvider;
-    
+
     public URL(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
         super(stack);
         this.req = req;
         this.res = res;
     }
-    
+
     @Inject(StrutsConstants.STRUTS_URL_INCLUDEPARAMS)
     public void setUrlIncludeParams(String urlIncludeParams) {
         this.urlIncludeParams = urlIncludeParams;
     }
-    
+
     @Inject(required=false)
     public void setExtraParameterProvider(ExtraParameterProvider provider) {
         this.extraParameterProvider = provider;
@@ -278,98 +279,62 @@
         return super.end(writer, body);
     }
 
-    /**
-     * The includeParams attribute may have the value 'none', 'get' or 'all'.
-     * @s.tagattribute required="false" default="get"
-     */
+    @StrutsTagAttribute(description="The includeParams attribute may have the value 'none', 'get' or 'all'", defaultValue="get")
     public void setIncludeParams(String includeParams) {
         this.includeParams = includeParams;
     }
 
-    /**
-     * Set scheme attribute
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Set scheme attribute")
     public void setScheme(String scheme) {
         this.scheme = scheme;
     }
 
-    /**
-     * The target value to use, if not using action
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The target value to use, if not using action")
     public void setValue(String value) {
         this.value = value;
     }
 
-    /**
-     * The action generate url for, if not using value
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="he action generate url for, if not using value")
     public void setAction(String action) {
         this.action = action;
     }
 
-    /**
-     * The namespace to use
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The namespace to use")
     public void setNamespace(String namespace) {
         this.namespace = namespace;
     }
 
-    /**
-     * The method of action to use
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The method of action to use")
     public void setMethod(String method) {
         this.method = method;
     }
 
-    /**
-     * whether to encode parameters
-     * @s.tagattribute required="false" type="Boolean" default="true"
-     */
+    @StrutsTagAttribute(description="Whether to encode parameters", type="Boolean", defaultValue="true")
     public void setEncode(boolean encode) {
         this.encode = encode;
     }
 
-    /**
-     * whether actual context should be included in url
-     * @s.tagattribute required="false" type="Boolean" default="true"
-     */
+    @StrutsTagAttribute(description="Whether actual context should be included in url", type="Boolean", defaultValue="true")
     public void setIncludeContext(boolean includeContext) {
         this.includeContext = includeContext;
     }
 
-    /**
-     * The resulting portlet mode
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The resulting portlet mode")
     public void setPortletMode(String portletMode) {
         this.portletMode = portletMode;
     }
 
-    /**
-     * The resulting portlet window state
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The resulting portlet window state")
     public void setWindowState(String windowState) {
         this.windowState = windowState;
     }
 
-    /**
-     * Specifies if this should be a portlet render or action url
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="Specifies if this should be a portlet render or action url")
     public void setPortletUrlType(String portletUrlType) {
         this.portletUrlType = portletUrlType;
     }
 
-    /**
-     * The anchor for this URL
-     * @s.tagattribute required="false"
-     */
+    @StrutsTagAttribute(description="The anchor for this URL")
     public void setAnchor(String anchor) {
         this.anchor = anchor;
     }
@@ -431,7 +396,7 @@
             }
         }
     }
-    
+
     public static interface ExtraParameterProvider {
         public Map getExtraParameters();
     }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UpDownSelect.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UpDownSelect.java?view=diff&rev=493648&r1=493647&r2=493648
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UpDownSelect.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UpDownSelect.java Sat Jan  6 21:18:49 2007
@@ -28,6 +28,8 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.struts.annotations.StrutsTag;
+import org.apache.struts.annotations.StrutsTagAttribute;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
@@ -159,10 +161,8 @@
     public String getAllowMoveUp() {
         return allowMoveUp;
     }
-    /**
-     * Whether move up button should be displayed
-     * @s.tagattribute required="false" type="Boolean" default="true"
-     */
+
+    @StrutsTagAttribute(description="Whether move up button should be displayed", type="Boolean", defaultValue="true")
     public void setAllowMoveUp(String allowMoveUp) {
         this.allowMoveUp = allowMoveUp;
     }
@@ -172,10 +172,8 @@
     public String getAllowMoveDown() {
         return allowMoveDown;
     }
-    /**
-     * Whether move down button should be displayed
-     * @s.tagattribute required="false" type="Boolean" default="true"
-     */
+
+    @StrutsTagAttribute(description="Whether move down button should be displayed", type="Boolean", defaultValue="true")
     public void setAllowMoveDown(String allowMoveDown) {
         this.allowMoveDown = allowMoveDown;
     }
@@ -185,10 +183,8 @@
     public String getAllowSelectAll() {
         return allowSelectAll;
     }
-    /**
-     * Whether or not select all button should be displayed
-     * @s.tagattribute required="false" type="Boolean" default="true"
-     */
+
+    @StrutsTagAttribute(description="Whether or not select all button should be displayed", type="Boolean", defaultValue="true")
     public void setAllowSelectAll(String allowSelectAll) {
         this.allowSelectAll = allowSelectAll;
     }
@@ -197,10 +193,8 @@
     public String getMoveUpLabel() {
         return moveUpLabel;
     }
-    /**
-     * Text to display on the move up button
-     * @s.tagattribute required="false" type="String" default="^"
-     */
+
+    @StrutsTagAttribute(description="Text to display on the move up button", defaultValue="^")
     public void setMoveUpLabel(String moveUpLabel) {
         this.moveUpLabel = moveUpLabel;
     }
@@ -210,10 +204,8 @@
     public String getMoveDownLabel() {
         return moveDownLabel;
     }
-    /**
-     * Text to display on the move down button
-     * @s.tagattribute required="false" type="String" default="v"
-     */
+
+    @StrutsTagAttribute(description="Text to display on the move down button", defaultValue="v")
     public void setMoveDownLabel(String moveDownLabel) {
         this.moveDownLabel = moveDownLabel;
     }
@@ -223,10 +215,8 @@
     public String getSelectAllLabel() {
         return selectAllLabel;
     }
-    /**
-     * Text to display on the select all button
-     * @s.tagattribute required="false" type="String" default="*"
-     */
+
+    @StrutsTagAttribute(description="Text to display on the select all button", defaultValue="*")
     public void setSelectAllLabel(String selectAllLabel) {
         this.selectAllLabel = selectAllLabel;
     }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/table/WebTable.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/table/WebTable.java?view=diff&rev=493648&r1=493647&r2=493648
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/table/WebTable.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/table/WebTable.java Sat Jan  6 21:18:49 2007
@@ -31,16 +31,15 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.struts.annotations.StrutsTag;
+import org.apache.struts.annotations.StrutsTagAttribute;
 import org.apache.struts2.StrutsException;
 import org.apache.struts2.components.GenericUIBean;
 import org.apache.struts2.components.table.renderer.CellRenderer;
 
 import com.opensymphony.xwork2.util.ValueStack;
 
-/**
- * @s.tag name="table" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.table.WebTableTag"
- * description="Instantiate a JavaBean and place it in the context."
- */
+@StrutsTag(name="table", tldTagClass="org.apache.struts2.views.jsp.ui.table.WebTableTag", description="Instantiate a JavaBean and place it in the context")
 public class WebTable extends GenericUIBean {
     private static final Log LOG = LogFactory.getLog(WebTable.class);
 
@@ -247,10 +246,7 @@
         return new WebTableRowIterator(this);
     }
 
-    /**
-     * Index of column to sort data by
-     * @s.tagattribute required="false" type="Integer"
-     */
+    @StrutsTagAttribute(description="Index of column to sort data by", type="Integer")
     public void setSortColumn(int sortColumn) {
         this.sortColumn = sortColumn;
     }
@@ -267,10 +263,7 @@
         return "WEBTABLE_" + modelName + "_SORT_COLUMN";
     }
 
-    /**
-     * Set sort order. Allowed values are NONE, ASC and DESC
-     * @s.tagattribute required="false" type="String" default="NONE"
-     */
+    @StrutsTagAttribute(description="Set sort order. Allowed values are NONE, ASC and DESC", defaultValue="NONE")
     public void setSortOrder(String sortOrder) {
         if (sortOrder.equals(SortableTableModel.NONE)) {
             this.sortOrder = SortableTableModel.NONE;
@@ -295,10 +288,8 @@
         return "WEBTABLE_" + modelName + "_SORT_ORDER";
     }
 
-    /**
-     * Whether the table should be sortable. Requires that model implements org.apache.struts2.components.table.SortableTableModel if set to true.
-     * @s.tagattribute required="false" type="Boolean" default="false"
-     */
+    @StrutsTagAttribute(description="Whether the table should be sortable. Requires that model implements " +
+                "org.apache.struts2.components.table.SortableTableModel if set to true.", type="Boolean", defaultValue="false")
     public void setSortable(boolean sortable) {
         sortableAttr = sortable;