diff --git a/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java b/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java index 050fb321c..2467a51bf 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java @@ -24,6 +24,8 @@ import javax.servlet.jsp.JspException; 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.util.IteratorGenerator; import org.apache.struts2.util.IteratorGenerator.Converter; import org.apache.struts2.views.jsp.StrutsBodyTagSupport; @@ -121,10 +123,9 @@ import org.apache.struts2.views.jsp.StrutsBodyTagSupport; * * * @see org.apache.struts2.util.IteratorGenerator - * - * @s.tag name="generator" tld-body-content="JSP" - * description="Generate an iterator for a iterable source." */ +@StrutsTag(name="generator", tldTagClass="org.apache.struts2.views.jsp.iterator.IteratorGeneratorTag", + description="Generate an iterator for a iterable source.") public class IteratorGeneratorTag extends StrutsBodyTagSupport { private static final long serialVersionUID = 2968037295463973936L; @@ -140,10 +141,7 @@ public class IteratorGeneratorTag extends StrutsBodyTagSupport { IteratorGenerator iteratorGenerator = null; - /** - * @s.tagattribute required="false" type="Integer" - * description="the max number entries to be in the iterator" - */ + @StrutsTagAttribute(type="Integer",description="The max number entries to be in the iterator") public void setCount(String count) { countAttr = count; } @@ -152,6 +150,7 @@ public class IteratorGeneratorTag extends StrutsBodyTagSupport { * @s.tagattribute required="true" type="String" * description="the separator to be used in separating the val into entries of the iterator" */ + @StrutsTagAttribute(required=true, description="The separator to be used in separating the val into entries of the iterator") public void setSeparator(String separator) { separatorAttr = separator; } @@ -160,14 +159,13 @@ public class IteratorGeneratorTag extends StrutsBodyTagSupport { * @s.tagattribute required="true" * description="the source to be parsed into an iterator" */ + @StrutsTagAttribute(required=true, description="The source to be parsed into an iterator") public void setVal(String val) { valueAttr = val; } - /** - * @s.tagattribute required="false" type="org.apache.struts2.util.IteratorGenerator.Converter" - * description="the converter to convert the String entry parsed from val into an object" - */ + @StrutsTagAttribute(type="org.apache.struts2.util.IteratorGenerator.Converter", + description="The converter to convert the String entry parsed from val into an object") public void setConverter(String aConverter) { converterAttr = aConverter; } @@ -176,6 +174,7 @@ public class IteratorGeneratorTag extends StrutsBodyTagSupport { * @s.tagattribute required="false" type="String" * description="the id to store the resultant iterator into page context, if such id is supplied" */ + @StrutsTagAttribute(description="The id to store the resultant iterator into page context, if such id is supplied") public void setId(String string) { super.setId(string); } diff --git a/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java b/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java index 9ef3bfd02..23c9a960f 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/iterator/SortIteratorTag.java @@ -24,6 +24,8 @@ import java.util.Comparator; import javax.servlet.jsp.JspException; +import org.apache.struts.annotations.StrutsTag; +import org.apache.struts.annotations.StrutsTagAttribute; import org.apache.struts2.util.MakeIterator; import org.apache.struts2.util.SortIteratorFilter; import org.apache.struts2.views.jsp.StrutsBodyTagSupport; @@ -84,6 +86,8 @@ import org.apache.struts2.views.jsp.StrutsBodyTagSupport; * @s.tag name="sort" tld-body-content="JSP" * description="Sort a List using a Comparator both passed in as the tag attribute." */ +@StrutsTag(name="sort", tldTagClass="org.apache.struts2.views.jsp.iterator.SortIteratorTag", + description="Sort a List using a Comparator both passed in as the tag attribute.") public class SortIteratorTag extends StrutsBodyTagSupport { private static final long serialVersionUID = -7835719609764092235L; @@ -93,18 +97,12 @@ public class SortIteratorTag extends StrutsBodyTagSupport { SortIteratorFilter sortIteratorFilter = null; - /** - * @s.tagattribute required="true" type="java.util.Comparator" - * description="The comparator to use" - */ + @StrutsTagAttribute(required=true,type="java.util.Comparator", description="The comparator to use") public void setComparator(String comparator) { comparatorAttr = comparator; } - /** - * @s.tagattribute required="false" - * description="The iterable source to sort" - */ + @StrutsTagAttribute(description="The iterable source to sort") public void setSource(String source) { sourceAttr = source; } diff --git a/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java b/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java index 6f6b55c2a..cc27ef833 100644 --- a/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java +++ b/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java @@ -24,6 +24,8 @@ import javax.servlet.jsp.JspException; 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.util.SubsetIteratorFilter; import org.apache.struts2.util.SubsetIteratorFilter.Decider; import org.apache.struts2.views.jsp.StrutsBodyTagSupport; @@ -145,6 +147,8 @@ import org.apache.struts2.views.jsp.StrutsBodyTagSupport; * @s.tag name="subset" tld-body-content="JSP" * description="Takes an iterator and outputs a subset of it" */ +@StrutsTag(name="subset", tldTagClass="org.apache.struts2.views.jsp.iterator.SubsetIteratorTag", + description="Takes an iterator and outputs a subset of it.") public class SubsetIteratorTag extends StrutsBodyTagSupport { private static final long serialVersionUID = -6252696081713080102L; @@ -159,18 +163,12 @@ public class SubsetIteratorTag extends StrutsBodyTagSupport { SubsetIteratorFilter subsetIteratorFilter = null; - /** - * @s.tagattribute required="false" type="Integer" - * description="Indicate the number of entries to be in the resulting subset iterator" - */ + @StrutsTagAttribute(type="Integer", description="Indicate the number of entries to be in the resulting subset iterator") public void setCount(String count) { countAttr = count; } - /** - * @s.tagattribute required="false" - * description="Indicate the source of which the resulting subset iterator is to be derived base on" - */ + @StrutsTagAttribute(description="Indicate the source of which the resulting subset iterator is to be derived base on") public void setSource(String source) { sourceAttr = source; } @@ -179,14 +177,14 @@ public class SubsetIteratorTag extends StrutsBodyTagSupport { * @s.tagattribute required="false" type="Integer" * description="Indicate the starting index (eg. first entry is 0) of entries in the source to be available as the first entry in the resulting subset iterator" */ + @StrutsTagAttribute(type="Integer", + description="Indicate the starting index (eg. first entry is 0) of entries in the source to be available as the first entry in the resulting subset iterator") public void setStart(String start) { startAttr = start; } - /** - * @s.tagattribute required="false" type="org.apache.struts2.util.SubsetIteratorFilter.Decider" - * description="Extension to plug-in a decider to determine if that particular entry is to be included in the resulting subset iterator" - */ + @StrutsTagAttribute(type="org.apache.struts2.util.SubsetIteratorFilter.Decider", + description="Extension to plug-in a decider to determine if that particular entry is to be included in the resulting subset iterator") public void setDecider(String decider) { deciderAttr = decider; } diff --git a/core/src/main/resources/META-INF/struts-tags.tld b/core/src/main/resources/META-INF/struts-tags.tld index f8c58f888..6b457b3a3 100644 --- a/core/src/main/resources/META-INF/struts-tags.tld +++ b/core/src/main/resources/META-INF/struts-tags.tld @@ -11,6 +11,42 @@ The tags interact with the framework's validation and internationalization features; to ensure that input is correct and output is localized. The Struts Tags can be used with JSP FreeMarker or Velocity."]]> + + generator + org.apache.struts2.views.jsp.iterator.IteratorGeneratorTag + JSP + + + converter + false + true + val into an object]]> + + + count + false + true + + + + id + false + true + + + + separator + true + true + val into entries of the iterator]]> + + + val + true + true + + + push org.apache.struts2.views.jsp.PushTag @@ -1259,36 +1295,6 @@ - - property - org.apache.struts2.views.jsp.PropertyTag - empty - - - default - false - true - value attribute is null]]> - - - escape - false - true - - - - id - false - true - - - - value - false - true - - - hidden org.apache.struts2.views.jsp.ui.HiddenTag @@ -1493,258 +1499,6 @@ - - datepicker - org.apache.struts2.views.jsp.ui.DatePickerTag - JSP - - - accesskey - false - true - - - - adjustWeeks - false - true - - - - cssClass - false - true - - - - cssStyle - false - true - - - - dayWidth - false - true - - - - disabled - false - true - - - - displayWeeks - false - true - - - - endDate - false - true - - - - id - false - true - - - - key - false - true - - - - label - false - true - - - - labelposition - false - true - - - - language - false - true - - - - name - false - true - - - - onblur - false - true - - - - onchange - false - true - - - - onclick - false - true - - - - ondblclick - false - true - - - - onfocus - false - true - - - - onkeydown - false - true - - - - onkeypress - false - true - - - - onkeyup - false - true - - - - onmousedown - false - true - - - - onmousemove - false - true - - - - onmouseout - false - true - - - - onmouseover - false - true - - - - onmouseup - false - true - - - - onselect - false - true - - - - required - false - true - - - - requiredposition - false - true - - - - startDate - false - true - - - - staticDisplay - false - true - - - - tabindex - false - true - - - - template - false - true - - - - templateDir - false - true - - - - theme - false - true - - - - title - false - true - - - - tooltip - false - true - - - - tooltipConfig - false - true - - - - value - false - true - - - - weekStartsOn - false - true - - - autocompleter org.apache.struts2.views.jsp.ui.AutocompleterTag @@ -2099,6 +1853,288 @@ + + datepicker + org.apache.struts2.views.jsp.ui.DatePickerTag + JSP + + + accesskey + false + true + + + + adjustWeeks + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + dayWidth + false + true + + + + disabled + false + true + + + + displayWeeks + false + true + + + + endDate + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + language + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + startDate + false + true + + + + staticDisplay + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + + weekStartsOn + false + true + + + + + property + org.apache.struts2.views.jsp.PropertyTag + empty + + + default + false + true + value attribute is null]]> + + + escape + false + true + + + + id + false + true + + + + value + false + true + + + optgroup org.apache.struts2.views.jsp.ui.OptGroupTag @@ -3539,6 +3575,36 @@ + + subset + org.apache.struts2.views.jsp.iterator.SubsetIteratorTag + JSP + + + count + false + true + + + + decider + false + true + + + + source + false + true + + + + start + false + true + + + elseif org.apache.struts2.views.jsp.ElseIfTag @@ -5118,501 +5184,21 @@ - checkbox - org.apache.struts2.views.jsp.ui.CheckboxTag + sort + org.apache.struts2.views.jsp.iterator.SortIteratorTag JSP - + - accesskey - false - true - - - - cssClass - false - true - - - - cssStyle - false - true - - - - disabled - false - true - - - - fieldValue - false - true - - - - id - false - true - - - - key - false - true - - - - label - false - true - - - - labelposition - false - true - - - - name - false - true - - - - onblur - false - true - - - - onchange - false - true - - - - onclick - false - true - - - - ondblclick - false - true - - - - onfocus - false - true - - - - onkeydown - false - true - - - - onkeypress - false - true - - - - onkeyup - false - true - - - - onmousedown - false - true - - - - onmousemove - false - true - - - - onmouseout - false - true - - - - onmouseover - false - true - - - - onmouseup - false - true - - - - onselect - false - true - - - - required - false - true - - - - requiredposition - false - true - - - - tabindex - false - true - - - - template - false - true - - - - templateDir - false - true - - - - theme - false - true - - - - title - false - true - - - - tooltip - false - true - - - - tooltipConfig - false - true - - - - value - false - true - - - - - updownselect - org.apache.struts2.views.jsp.ui.UpDownSelectTag - JSP - - - accesskey - false - true - - - - allowMoveDown - false - true - - - - allowMoveUp - false - true - - - - allowSelectAll - false - true - - - - cssClass - false - true - - - - cssStyle - false - true - - - - disabled - false - true - - - - emptyOption - false - true - - - - headerKey - false - true - - - - headerValue - false - true - - - - id - false - true - - - - key - false - true - - - - label - false - true - - - - labelposition - false - true - - - - list + comparator true true - + - listKey + source false true - - - - listValue - false - true - - - - moveDownLabel - false - true - - - - moveUpLabel - false - true - - - - multiple - false - true - - - - name - false - true - - - - onblur - false - true - - - - onchange - false - true - - - - onclick - false - true - - - - ondblclick - false - true - - - - onfocus - false - true - - - - onkeydown - false - true - - - - onkeypress - false - true - - - - onkeyup - false - true - - - - onmousedown - false - true - - - - onmousemove - false - true - - - - onmouseout - false - true - - - - onmouseover - false - true - - - - onmouseup - false - true - - - - onselect - false - true - - - - required - false - true - - - - requiredposition - false - true - - - - selectAllLabel - false - true - - - - size - false - true - - - - tabindex - false - true - - - - template - false - true - - - - templateDir - false - true - - - - theme - false - true - - - - title - false - true - - - - tooltip - false - true - - - - tooltipConfig - false - true - - - - value - false - true - + @@ -5831,6 +5417,216 @@ + + checkbox + org.apache.struts2.views.jsp.ui.CheckboxTag + JSP + + + accesskey + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + fieldValue + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + a org.apache.struts2.views.jsp.ui.AnchorTag @@ -6125,6 +5921,294 @@ + + updownselect + org.apache.struts2.views.jsp.ui.UpDownSelectTag + JSP + + + accesskey + false + true + + + + allowMoveDown + false + true + + + + allowMoveUp + false + true + + + + allowSelectAll + false + true + + + + cssClass + false + true + + + + cssStyle + false + true + + + + disabled + false + true + + + + emptyOption + false + true + + + + headerKey + false + true + + + + headerValue + false + true + + + + id + false + true + + + + key + false + true + + + + label + false + true + + + + labelposition + false + true + + + + list + true + true + + + + listKey + false + true + + + + listValue + false + true + + + + moveDownLabel + false + true + + + + moveUpLabel + false + true + + + + multiple + false + true + + + + name + false + true + + + + onblur + false + true + + + + onchange + false + true + + + + onclick + false + true + + + + ondblclick + false + true + + + + onfocus + false + true + + + + onkeydown + false + true + + + + onkeypress + false + true + + + + onkeyup + false + true + + + + onmousedown + false + true + + + + onmousemove + false + true + + + + onmouseout + false + true + + + + onmouseover + false + true + + + + onmouseup + false + true + + + + onselect + false + true + + + + required + false + true + + + + requiredposition + false + true + + + + selectAllLabel + false + true + + + + size + false + true + + + + tabindex + false + true + + + + template + false + true + + + + templateDir + false + true + + + + theme + false + true + + + + title + false + true + + + + tooltip + false + true + + + + tooltipConfig + false + true + + + + value + false + true + + + password org.apache.struts2.views.jsp.ui.PasswordTag diff --git a/core/src/site/resources/tags/generator.html b/core/src/site/resources/tags/generator.html new file mode 100644 index 000000000..a1169cdf8 --- /dev/null +++ b/core/src/site/resources/tags/generator.html @@ -0,0 +1,74 @@ + + + + generator + + + +

Tag Name: generator

+

Description

+

+ + Generate an iterator for a iterable source. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

converterfalsetrueorg.apache.struts2.util.IteratorGenerator.ConverterThe converter to convert the String entry parsed from val into an object
countfalsetrueIntegerThe max number entries to be in the iterator
idfalsetrueStringThe id to store the resultant iterator into page context, if such id is supplied
separatortruetrueStringThe separator to be used in separating the val into entries of the iterator
valtruetrueStringThe source to be parsed into an iterator
+ + + + diff --git a/core/src/site/resources/tags/sort.html b/core/src/site/resources/tags/sort.html new file mode 100644 index 000000000..cf37809cc --- /dev/null +++ b/core/src/site/resources/tags/sort.html @@ -0,0 +1,50 @@ + + + + sort + + + +

Tag Name: sort

+

Description

+

+ + Sort a List using a Comparator both passed in as the tag attribute. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

comparatortruetruejava.util.ComparatorThe comparator to use
sourcefalsetrueStringThe iterable source to sort
+ + + + diff --git a/core/src/site/resources/tags/subset.html b/core/src/site/resources/tags/subset.html new file mode 100644 index 000000000..49ec7a7ed --- /dev/null +++ b/core/src/site/resources/tags/subset.html @@ -0,0 +1,66 @@ + + + + subset + + + +

Tag Name: subset

+

Description

+

+ + Takes an iterator and outputs a subset of it. + +

+ +

Attributes

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Name

Required

Default

Evaluated

Type

Description

countfalsetrueIntegerIndicate the number of entries to be in the resulting subset iterator
deciderfalsetrueorg.apache.struts2.util.SubsetIteratorFilter.DeciderExtension to plug-in a decider to determine if that particular entry is to be included in the resulting subset iterator
sourcefalsetrueStringIndicate the source of which the resulting subset iterator is to be derived base on
startfalsetrueIntegerIndicate the starting index (eg. first entry is 0) of entries in the source to be available as the first entry in the resulting subset iterator
+ + + +