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 2006/09/03 10:06:13 UTC
svn commit: r439739 [2/12] - in /struts/struts2/trunk/core/src:
main/java/org/apache/struts2/ main/java/org/apache/struts2/components/
main/java/org/apache/struts2/components/table/
main/java/org/apache/struts2/components/table/renderer/ main/java/org/...
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DatePicker.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DatePicker.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DatePicker.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DatePicker.java Sun Sep 3 01:05:51 2006
@@ -17,11 +17,11 @@
*/
package org.apache.struts2.components;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import com.opensymphony.xwork2.util.OgnlValueStack;
-
/**
* <!-- START SNIPPET: javadoc -->
*
@@ -72,9 +72,9 @@
* <!-- START SNIPPET: expl1 -->
*
* Example 1:
- * <a:datepicker name="order.date" label="Order Date" />
+ * <s:datepicker name="order.date" label="Order Date" />
* Example 2:
- * <a:datepicker name="delivery.date" label="Delivery Date" format="#yyyy-#MM-#dd" />
+ * <s:datepicker name="delivery.date" label="Delivery Date" format="#yyyy-#MM-#dd" />
*
* <!-- END SNIPPET: expl1 -->
* </pre>
@@ -89,12 +89,12 @@
* <pre>
* <!-- START SNIPPET: expl2 -->
*
- * <a:datepicker name="birthday" label="Birthday" templateCss="...." />
+ * <s:datepicker name="birthday" label="Birthday" templateCss="...." />
*
* <!-- END SNIPPET: expl2 -->
* </pre>
*
- * @a2.tag name="datepicker" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.DatePickerTag"
+ * @s.tag name="datepicker" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.DatePickerTag"
* description="Render datepicker"
*/
public class DatePicker extends TextField {
@@ -137,7 +137,7 @@
/**
* The format to use for date field.
- * @a2.tagattribute required="false" type="String" default="Dateformat specified by language preset (%Y/%m/%d for en)"
+ * @s.tagattribute required="false" type="String" default="Dateformat specified by language preset (%Y/%m/%d for en)"
*/
public void setFormat(String format) {
this.format = format;
@@ -145,7 +145,7 @@
/**
* The date picker icon path
- * @a2.tagattribute required="false" type="String" default="/struts/dojo/struts/widgets/dateIcon.gif"
+ * @s.tagattribute required="false" type="String" default="/struts/dojo/struts/widgets/dateIcon.gif"
*/
public void setDateIconPath(String dateIconPath) {
this.dateIconPath = dateIconPath;
@@ -153,7 +153,7 @@
/**
* The datepicker template path.
- * @a2.tagattribute required="false" type="String"
+ * @s.tagattribute required="false" type="String"
*/
public void setTemplatePath(String templatePath) {
this.templatePath = templatePath;
@@ -161,7 +161,7 @@
/**
* The datepicker template css path.
- * @a2.tagattribute required="false" type="String"
+ * @s.tagattribute required="false" type="String"
*/
public void setTemplateCssPath(String templateCssPath) {
this.templateCssPath = templateCssPath;
@@ -169,7 +169,7 @@
/**
* The datepicker text field size.
- * @a2.tagattribute required="false" type="String"
+ * @s.tagattribute required="false" type="String"
*/
public void setSize(String size) {
this.size = size;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Div.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Div.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Div.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Div.java Sun Sep 3 01:05:51 2006
@@ -17,14 +17,14 @@
*/
package org.apache.struts2.components;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.opensymphony.xwork2.util.OgnlValueStack;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.views.util.UrlHelper;
-import com.opensymphony.xwork2.util.OgnlValueStack;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
/**
* <!-- START SNIPPET: javadoc -->
@@ -44,11 +44,11 @@
*
* <pre>
* <!-- START SNIPPET: example -->
- * <a:div ... />
+ * <s:div ... />
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="div" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.DivTag"
+ * @s.tag name="div" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.DivTag"
* description="Render HTML div providing content from remote call via AJAX"
*/
public class Div extends RemoteCallUIBean {
@@ -126,7 +126,7 @@
/**
* How often to re-fetch the content (in milliseconds)
- * @a2.tagattribute required="false" type="Integer" default="0"
+ * @s.tagattribute required="false" type="Integer" default="0"
*/
public void setUpdateFreq(String updateFreq) {
this.updateFreq = updateFreq;
@@ -134,7 +134,7 @@
/**
* How long to wait before fetching the content (in milliseconds)
- * @a2.tagattribute required="false" type="Integer" default="0"
+ * @s.tagattribute required="false" type="Integer" default="0"
*/
public void setDelay(String delay) {
this.delay = delay;
@@ -142,7 +142,7 @@
/**
* The text to display to the user while the new content is being fetched (especially good if the content will take awhile)
- * @a2.tagattribute required="false" rtexprvalue="true"
+ * @s.tagattribute required="false" rtexprvalue="true"
*/
public void setLoadingText(String loadingText) {
this.loadingText = loadingText;
@@ -150,7 +150,7 @@
/**
* Topic name to listen to (comma delimited), that will cause the DIV's content to be re-fetched
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setListenTopics(String listenTopics) {
this.listenTopics = listenTopics;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DoubleListUIBean.java Sun Sep 3 01:05:51 2006
@@ -19,11 +19,11 @@
import java.util.Map;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import com.opensymphony.xwork2.util.OgnlValueStack;
-
/**
* DoubleListUIBean is the standard superclass of all Struts double list handling components.
*
@@ -257,7 +257,7 @@
/**
* The second iterable source to populate from.
- * @a2.tagattribute required="true"
+ * @s.tagattribute required="true"
*/
public void setDoubleList(String doubleList) {
this.doubleList = doubleList;
@@ -265,7 +265,7 @@
/**
* The key expression to use for second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleListKey(String doubleListKey) {
this.doubleListKey = doubleListKey;
@@ -273,7 +273,7 @@
/**
* The value expression to use for second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleListValue(String doubleListValue) {
this.doubleListValue = doubleListValue;
@@ -281,7 +281,7 @@
/**
* The name for complete component
- * @a2.tagattribute required="true"
+ * @s.tagattribute required="true"
*/
public void setDoubleName(String doubleName) {
this.doubleName = doubleName;
@@ -289,7 +289,7 @@
/**
* The value expression for complete component
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleValue(String doubleValue) {
this.doubleValue = doubleValue;
@@ -297,7 +297,7 @@
/**
* The form name this component resides in and populates to
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setFormName(String formName) {
this.formName = formName;
@@ -309,7 +309,7 @@
/**
* The css class for the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleCssClass(String doubleCssClass) {
this.doubleCssClass = doubleCssClass;
@@ -321,7 +321,7 @@
/**
* The css style for the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleCssStyle(String doubleCssStyle) {
this.doubleCssStyle = doubleCssStyle;
@@ -333,7 +333,7 @@
/**
* The header key for the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleHeaderKey(String doubleHeaderKey) {
this.doubleHeaderKey = doubleHeaderKey;
@@ -345,7 +345,7 @@
/**
* The header value for the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleHeaderValue(String doubleHeaderValue) {
this.doubleHeaderValue = doubleHeaderValue;
@@ -357,7 +357,7 @@
/**
* Decides if the second list will add an empty option
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleEmptyOption(String doubleEmptyOption) {
this.doubleEmptyOption = doubleEmptyOption;
@@ -374,7 +374,7 @@
/**
* Decides if a disable attribute should be added to the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleDisabled(String doubleDisabled) {
this.doubleDisabled = doubleDisabled;
@@ -386,7 +386,7 @@
/**
* The id of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleId(String doubleId) {
this.doubleId = doubleId;
@@ -398,7 +398,7 @@
/**
* Decides if multiple attribute should be set on the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleMultiple(String doubleMultiple) {
this.doubleMultiple = doubleMultiple;
@@ -410,7 +410,7 @@
/**
* Set the onblur attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnblur(String doubleOnblur) {
this.doubleOnblur = doubleOnblur;
@@ -422,7 +422,7 @@
/**
* Set the onchange attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnchange(String doubleOnchange) {
this.doubleOnchange = doubleOnchange;
@@ -434,7 +434,7 @@
/**
* Set the onclick attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnclick(String doubleOnclick) {
this.doubleOnclick = doubleOnclick;
@@ -446,7 +446,7 @@
/**
* Set the ondbclick attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOndblclick(String doubleOndblclick) {
this.doubleOndblclick = doubleOndblclick;
@@ -458,7 +458,7 @@
/**
* Set the onfocus attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnfocus(String doubleOnfocus) {
this.doubleOnfocus = doubleOnfocus;
@@ -470,7 +470,7 @@
/**
* Set the onkeydown attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnkeydown(String doubleOnkeydown) {
this.doubleOnkeydown = doubleOnkeydown;
@@ -482,7 +482,7 @@
/**
* Set the onkeypress attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnkeypress(String doubleOnkeypress) {
this.doubleOnkeypress = doubleOnkeypress;
@@ -494,7 +494,7 @@
/**
* Set the onkeyup attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnkeyup(String doubleOnkeyup) {
this.doubleOnkeyup = doubleOnkeyup;
@@ -506,7 +506,7 @@
/**
* Set the onmousedown attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnmousedown(String doubleOnmousedown) {
this.doubleOnmousedown = doubleOnmousedown;
@@ -518,7 +518,7 @@
/**
* Set the onmousemove attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnmousemove(String doubleOnmousemove) {
this.doubleOnmousemove = doubleOnmousemove;
@@ -530,7 +530,7 @@
/**
* Set the onmouseout attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnmouseout(String doubleOnmouseout) {
this.doubleOnmouseout = doubleOnmouseout;
@@ -542,7 +542,7 @@
/**
* Set the onmouseover attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnmouseover(String doubleOnmouseover) {
this.doubleOnmouseover = doubleOnmouseover;
@@ -554,7 +554,7 @@
/**
* Set the onmouseup attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnmouseup(String doubleOnmouseup) {
this.doubleOnmouseup = doubleOnmouseup;
@@ -566,7 +566,7 @@
/**
* Set the onselect attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleOnselect(String doubleOnselect) {
this.doubleOnselect = doubleOnselect;
@@ -578,7 +578,7 @@
/**
* Set the size attribute of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleSize(String doubleSize) {
this.doubleSize = doubleSize;
@@ -590,7 +590,7 @@
/**
* Set the list key of the second attribute
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public String getDoubleListKey() {
return doubleListKey;
@@ -610,7 +610,7 @@
/**
* Decides of an empty option is to be inserted in the second list
- * @a2.tagattribute required="false" default="false" type="Boolean"
+ * @s.tagattribute required="false" default="false" type="Boolean"
*/
public void setEmptyOption(String emptyOption) {
this.emptyOption = emptyOption;
@@ -618,7 +618,7 @@
/**
* Set the header key of the second list. Must not be empty! "'-1'" and "''" is correct, "" is bad.
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setHeaderKey(String headerKey) {
this.headerKey = headerKey;
@@ -626,7 +626,7 @@
/**
* Set the header value of the second list
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setHeaderValue(String headerValue) {
this.headerValue = headerValue;
@@ -634,7 +634,7 @@
/**
* Creates a multiple select. The tag will pre-select multiple values if the values are passed as an Array (of appropriate types) via the value attribute.
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setMultiple(String multiple) {
// TODO: Passing a Collection may work too?
@@ -643,7 +643,7 @@
/**
* Size of the element box (# of elements to show)
- * @a2.tagattribute required="false" type="Integer"
+ * @s.tagattribute required="false" type="Integer"
*/
public void setSize(String size) {
this.size = size;
@@ -651,7 +651,7 @@
/**
* Set the html accesskey attribute.
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDoubleAccesskey(String doubleAccesskey) {
this.doubleAccesskey = doubleAccesskey;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DoubleSelect.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DoubleSelect.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DoubleSelect.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DoubleSelect.java Sun Sep 3 01:05:51 2006
@@ -17,11 +17,11 @@
*/
package org.apache.struts2.components;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import com.opensymphony.xwork2.util.OgnlValueStack;
-
/**
* <!-- START SNIPPET: javadoc -->
* Renders two HTML select elements with second one changing displayed values depending on selected entry of first one.
@@ -31,12 +31,12 @@
*
* <pre>
* <!-- START SNIPPET: example -->
- * <a:doubleselect label="doubleselect test1" name="menu" list="{'fruit','other'}" doubleName="dishes" doubleList="top == 'fruit' ? {'apple', 'orange'} : {'monkey', 'chicken'}" />
- * <a:doubleselect label="doubleselect test2" name="menu" list="#{'fruit':'Nice Fruits', 'other':'Other Dishes'}" doubleName="dishes" doubleList="top == 'fruit' ? {'apple', 'orange'} : {'monkey', 'chicken'}" />
+ * <s:doubleselect label="doubleselect test1" name="menu" list="{'fruit','other'}" doubleName="dishes" doubleList="top == 'fruit' ? {'apple', 'orange'} : {'monkey', 'chicken'}" />
+ * <s:doubleselect label="doubleselect test2" name="menu" list="#{'fruit':'Nice Fruits', 'other':'Other Dishes'}" doubleName="dishes" doubleList="top == 'fruit' ? {'apple', 'orange'} : {'monkey', 'chicken'}" />
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="doubleselect" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.DoubleSelectTag"
+ * @s.tag name="doubleselect" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.DoubleSelectTag"
* description="Renders two HTML select elements with second one changing displayed values depending on selected entry of first one."
*/
public class DoubleSelect extends DoubleListUIBean {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Else.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Else.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Else.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Else.java Sun Sep 3 01:05:51 2006
@@ -17,11 +17,11 @@
*/
package org.apache.struts2.components;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
import java.io.Writer;
import java.util.Map;
-import com.opensymphony.xwork2.util.OgnlValueStack;
-
/**
* <!-- START SNIPPET: javadoc -->
*
@@ -39,19 +39,19 @@
*
* <pre>
* <!-- START SNIPPET: example -->
- * <a:if test="%{false}">
+ * <s:if test="%{false}">
* <div>Will Not Be Executed</div>
- * </a:if>
- * <a:elseif test="%{true}">
+ * </s:if>
+ * <s:elseif test="%{true}">
* <div>Will Be Executed</div>
- * </a:elseif>
- * <a:else>
+ * </s:elseif>
+ * <s:else>
* <div>Will Not Be Executed</div>
- * </a:else>
+ * </s:else>
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="else" bodycontent="JSP" description="Else tag" tld-tag-class="org.apache.struts2.views.jsp.ElseTag"
+ * @s.tag name="else" bodycontent="JSP" description="Else tag" tld-tag-class="org.apache.struts2.views.jsp.ElseTag"
*/
public class Else extends Component {
public Else(OgnlValueStack stack) {
@@ -65,6 +65,5 @@
context.remove(If.ANSWER);
return !((ifResult == null) || (ifResult.booleanValue()));
-
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ElseIf.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ElseIf.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ElseIf.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ElseIf.java Sun Sep 3 01:05:51 2006
@@ -17,10 +17,10 @@
*/
package org.apache.struts2.components;
-import java.io.Writer;
-
import com.opensymphony.xwork2.util.OgnlValueStack;
+import java.io.Writer;
+
/**
* <!-- START SNIPPET: javadoc -->
*
@@ -43,19 +43,19 @@
*
* <pre>
* <!-- START SNIPPET: example -->
- * <a:if test="%{false}">
+ * <s:if test="%{false}">
* <div>Will Not Be Executed</div>
- * </a:if>
- * <a:elseif test="%{true}">
+ * </s:if>
+ * <s:elseif test="%{true}">
* <div>Will Be Executed</div>
- * </a:elseif>
- * <a:else>
+ * </s:elseif>
+ * <s:else>
* <div>Will Not Be Executed</div>
- * </a:else>
+ * </s:else>
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="elseif" tld-body-content="JSP" description="Elseif tag" tld-tag-class="org.apache.struts2.views.jsp.ElseIfTag"
+ * @s.tag name="elseif" tld-body-content="JSP" description="Elseif tag" tld-tag-class="org.apache.struts2.views.jsp.ElseIfTag"
*/
public class ElseIf extends Component {
public ElseIf(OgnlValueStack stack) {
@@ -67,7 +67,7 @@
public boolean start(Writer writer) {
Boolean ifResult = (Boolean) stack.getContext().get(If.ANSWER);
-
+
if ((ifResult == null) || (ifResult.booleanValue())) {
return false;
}
@@ -85,13 +85,18 @@
}
public boolean end(Writer writer, String body) {
-
+ if (answer == null) {
+ answer = Boolean.FALSE;
+ }
+ if (answer.booleanValue()) {
+ stack.getContext().put(If.ANSWER, answer);
+ }
return super.end(writer, "");
}
/**
* Expression to determine if body of tag is to be displayed
- * @a2.tagattribute required="true" type="Boolean"
+ * @s.tagattribute required="true" type="Boolean"
*/
public void setTest(String test) {
this.test = test;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/FieldError.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/FieldError.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/FieldError.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/FieldError.java Sun Sep 3 01:05:51 2006
@@ -17,15 +17,13 @@
*/
package org.apache.struts2.components;
-import java.util.ArrayList;
-import java.util.List;
+import org.apache.struts2.components.Param.UnnamedParametric;
+import com.opensymphony.xwork2.util.OgnlValueStack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.components.Param.UnnamedParametric;
-
-import com.opensymphony.xwork2.util.OgnlValueStack;
+import java.util.ArrayList;
+import java.util.List;
/**
* <!-- START SNIPPET: javadoc -->
@@ -40,26 +38,26 @@
* <!-- START SNIPPET: example -->
*
* <!-- example 1 -->
- * <a:fielderror />
+ * <s:fielderror />
*
* <!-- example 2 -->
- * <a:fielderror>
- * <a:param>field1</a:param>
- * <a:param>field2</a:param>
- * </a:fielderror>
- * <a:form .... >>
+ * <s:fielderror>
+ * <s:param>field1</s:param>
+ * <s:param>field2</s:param>
+ * </s:fielderror>
+ * <s:form .... >>
* ....
- * </a:form>
+ * </s:form>
*
* OR
*
- * <a:fielderror>
- * <a:param value="%{'field1'}" />
- * <a:param value="%{'field2'}" />
- * </a:fielderror>
- * <a:form .... >>
+ * <s:fielderror>
+ * <s:param value="%{'field1'}" />
+ * <s:param value="%{'field2'}" />
+ * </s:fielderror>
+ * <s:form .... >>
* ....
- * </a:form>
+ * </s:form>
*
* <!-- END SNIPPET: example -->
* </pre>
@@ -77,7 +75,7 @@
* <!-- END SNIPPET: description -->
* </pre>
*
- * @a2.tag name="fielderror" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.FieldErrorTag"
+ * @s.tag name="fielderror" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.FieldErrorTag"
* description="Render field error (all or partial depending on param tag nested)if they exists"
*/
public class FieldError extends UIBean implements UnnamedParametric {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/File.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/File.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/File.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/File.java Sun Sep 3 01:05:51 2006
@@ -17,14 +17,14 @@
*/
package org.apache.struts2.components;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import com.opensymphony.xwork2.util.OgnlValueStack;
-
/**
* <!-- START SNIPPET: javadoc -->
* Renders an HTML file input element.
@@ -34,12 +34,12 @@
*
* <pre>
* <!-- START SNIPPET: example -->
- * <a:file name="anUploadFile" accept="text/*" />
- * <a:file name="anohterUploadFIle" accept="text/html,text/plain" />
+ * <s:file name="anUploadFile" accept="text/*" />
+ * <s:file name="anohterUploadFIle" accept="text/html,text/plain" />
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="file" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.FileTag"
+ * @s.tag name="file" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.FileTag"
* description="Render a file input field"
*/
public class File extends UIBean {
@@ -66,13 +66,13 @@
String encType = (String) form.getParameters().get("enctype");
if (!"multipart/form-data".equals(encType)) {
// uh oh, this isn't good! Let's warn the developer
- log.warn("Struts has detected a file upload UI tag (a:file) being used without a form set to enctype 'multipart/form-data'. This is probably an error!");
+ log.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to enctype 'multipart/form-data'. This is probably an error!");
}
String method = (String) form.getParameters().get("method");
if (!"post".equalsIgnoreCase(method)) {
// uh oh, this isn't good! Let's warn the developer
- log.warn("Struts has detected a file upload UI tag (a:file) being used without a form set to method 'POST'. This is probably an error!");
+ log.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!");
}
}
@@ -87,7 +87,7 @@
/**
* HTML accept attribute to indicate accepted file mimetypes
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAccept(String accept) {
this.accept = accept;
@@ -95,7 +95,7 @@
/**
* HTML size attribute
- * @a2.tagattribute required="false" type="Integer"
+ * @s.tagattribute required="false" type="Integer"
*/
public void setSize(String size) {
this.size = size;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Form.java Sun Sep 3 01:05:51 2006
@@ -17,24 +17,6 @@
*/
package org.apache.struts2.components;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.struts2.StrutsConstants;
-import org.apache.struts2.dispatcher.Dispatcher;
-import org.apache.struts2.dispatcher.mapper.ActionMapperFactory;
-import org.apache.struts2.dispatcher.mapper.ActionMapping;
-import org.apache.struts2.portlet.context.PortletActionContext;
-import org.apache.struts2.portlet.util.PortletUrlHelper;
-import org.apache.struts2.views.util.UrlHelper;
-
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ObjectFactory;
@@ -48,6 +30,20 @@
import com.opensymphony.xwork2.validator.FieldValidator;
import com.opensymphony.xwork2.validator.ValidationInterceptor;
import com.opensymphony.xwork2.validator.Validator;
+import org.apache.commons.lang.StringUtils;
+import org.apache.struts2.StrutsConstants;
+import org.apache.struts2.config.Settings;
+import org.apache.struts2.dispatcher.Dispatcher;
+import org.apache.struts2.dispatcher.mapper.ActionMapperFactory;
+import org.apache.struts2.dispatcher.mapper.ActionMapping;
+import org.apache.struts2.portlet.context.PortletActionContext;
+import org.apache.struts2.portlet.util.PortletUrlHelper;
+import org.apache.struts2.views.util.UrlHelper;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.*;
+import java.util.Set;
/**
* <!-- START SNIPPET: javadoc -->
@@ -82,18 +78,20 @@
* <pre>
* <!-- START SNIPPET: example -->
* <p/>
- * <a:form ... />
+ * <s:form ... />
* <p/>
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="form" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.FormTag"
+ * @s.tag name="form" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.FormTag"
* description="Renders an input form"
*/
public class Form extends ClosingUIBean {
public static final String OPEN_TEMPLATE = "form";
public static final String TEMPLATE = "form-close";
+ private int sequence = 0;
+
protected String onsubmit;
protected String action;
protected String target;
@@ -104,13 +102,6 @@
protected String portletMode;
protected String windowState;
protected String acceptcharset;
- protected static boolean compatibilityMode = false;
-
- static {
- if (org.apache.struts2.config.Settings.isSet(StrutsConstants.STRUTS_COMPATIBILITY_MODE)) {
- compatibilityMode = "true".equals(org.apache.struts2.config.Settings.get(StrutsConstants.STRUTS_COMPATIBILITY_MODE));
- }
- }
public Form(OgnlValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
@@ -136,14 +127,14 @@
protected void evaluateExtraParams() {
super.evaluateExtraParams();
- boolean isAjax = "ajax".equalsIgnoreCase(this.theme);
+ //boolean isAjax = "ajax".equalsIgnoreCase(this.theme);
if (validate != null) {
addParameter("validate", findValue(validate, Boolean.class));
}
// calculate the action and namespace
- String action = null;
+ /*String action = null;
if (this.action != null) {
// if it isn't specified, we'll make somethig up
action = findString(this.action);
@@ -155,7 +146,7 @@
String namespace = determineNamespace(this.namespace, getStack(),
request);
evaluateExtraParamsServletRequest(action, namespace, isAjax);
- }
+ }*/
if (onsubmit != null) {
addParameter("onsubmit", findString(onsubmit));
@@ -184,6 +175,34 @@
addParameter("tagNames", new ArrayList());
}
}
+
+ /**
+ * Form component determine the its HTML element id as follows:-
+ * <ol>
+ * <li>if an 'id' attribute is specified.</li>
+ * <li>if an 'action' attribute is specified, it will be used as the id.</li>
+ * </ol>
+ */
+ protected void populateComponentHtmlId(Form form) {
+ boolean isAjax = "ajax".equalsIgnoreCase(this.theme);
+
+ String action = null;
+ if (this.action != null) {
+ // if it isn't specified, we'll make somethig up
+ action = findString(this.action);
+ }
+
+ if (id != null) {
+ addParameter("id", escape(id));
+ }
+ if (Dispatcher.getInstance().isPortletSupportActive() && PortletActionContext.isPortletRequest()) {
+ evaluateExtraParamsPortletRequest(namespace, action);
+ } else {
+ String namespace = determineNamespace(this.namespace, getStack(),
+ request);
+ evaluateExtraParamsServletRequest(action, namespace, isAjax);
+ }
+ }
/**
* @param isAjax
@@ -205,10 +224,16 @@
}
String actionMethod = "";
- if (compatibilityMode && action.indexOf("!") != -1) {
- int endIdx = action.lastIndexOf("!");
- actionMethod = action.substring(endIdx + 1, action.length());
- action = action.substring(0, endIdx);
+ // FIXME: our implementation is flawed - the only concept of ! should be in DefaultActionMapper
+ boolean allowDynamicMethodCalls = "true".equals(Settings.get(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION));
+
+ // handle "name!method" convention.
+ if (allowDynamicMethodCalls) {
+ if (action.indexOf("!") != -1) {
+ int endIdx = action.lastIndexOf("!");
+ actionMethod = action.substring(endIdx + 1, action.length());
+ action = action.substring(0, endIdx);
+ }
}
Configuration config = Dispatcher.getInstance().getConfigurationManager().getConfiguration();
@@ -374,12 +399,23 @@
return validators;
}
+
+ /**
+ * Get a incrementing sequence unique to this <code>Form</code> component.
+ * It is used by <code>Form</code> component's child that might need a
+ * sequence to make them unique.
+ *
+ * @return int
+ */
+ protected int getSequence() {
+ return sequence++;
+ }
/**
* HTML onsubmit attribute
*
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setOnsubmit(String onsubmit) {
this.onsubmit = onsubmit;
@@ -388,7 +424,7 @@
/**
* Set action nane to submit to, without .action suffix
*
- * @a2.tagattribute required="false" default="current action"
+ * @s.tagattribute required="false" default="current action"
*/
public void setAction(String action) {
this.action = action;
@@ -397,7 +433,7 @@
/**
* HTML form target attribute
*
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setTarget(String target) {
this.target = target;
@@ -406,7 +442,7 @@
/**
* HTML form enctype attribute
*
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setEnctype(String enctype) {
this.enctype = enctype;
@@ -415,7 +451,7 @@
/**
* HTML form method attribute
*
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setMethod(String method) {
this.method = method;
@@ -424,7 +460,7 @@
/**
* namespace for action to submit to
*
- * @a2.tagattribute required="false" default="current namespace"
+ * @s.tagattribute required="false" default="current namespace"
*/
public void setNamespace(String namespace) {
this.namespace = namespace;
@@ -433,7 +469,7 @@
/**
* Whether client side/remote validation should be performed. Only useful with theme xhtml/ajax
*
- * @a2.tagattribute required="false" type="Boolean" default="false"
+ * @s.tagattribute required="false" type="Boolean" default="false"
*/
public void setValidate(String validate) {
this.validate = validate;
@@ -442,7 +478,7 @@
/**
* The portlet mode to display after the form submit
*
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setPortletMode(String portletMode) {
this.portletMode = portletMode;
@@ -451,7 +487,7 @@
/**
* The window state to display after the form submit
*
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setWindowState(String windowState) {
this.windowState = windowState;
@@ -460,7 +496,7 @@
/**
* The accepted charsets for this form. The values may be comma or blank delimited.
*
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAcceptcharset(String acceptcharset) {
this.acceptcharset = acceptcharset;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/FormButton.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/FormButton.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/FormButton.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/FormButton.java Sun Sep 3 01:05:51 2006
@@ -17,11 +17,11 @@
*/
package org.apache.struts2.components;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import com.opensymphony.xwork2.util.OgnlValueStack;
-
/**
* FormButton.
*/
@@ -40,7 +40,9 @@
super(stack, request, response);
}
- public void evaluateParams() {
+ //public void evaluateParams() {
+ public void evaluateExtraParams() {
+ super.evaluateExtraParams();
if (align == null) {
align = "right";
}
@@ -51,7 +53,7 @@
submitType = type;
}
- super.evaluateParams();
+ //super.evaluateParams();
addParameter("type", submitType);
@@ -78,18 +80,66 @@
addParameter("align", findString(align));
}
-
+
/**
- * Indicate whether the concrete button supports the type "image".
- *
- * @return <tt>true</tt> if type image is supported.
+ * Override UIBean's implementation, such that component Html id is determined
+ * in the following order :-
+ * <ol>
+ * <li>This component id attribute</li>
+ * <li>[containing_form_id]_[this_component_name]</li>
+ * <li>[containing_form_id]_[this_component_action]_[this_component_method]</li>
+ * <li>[containing_form_id]_[this_component_method]</li>
+ * <li>[this_component_name]</li>
+ * <li>[this_component_action]_[this_component_method]</li>
+ * <li>[this_component_method]</li>
+ * <li>[an increasing sequential number unique to the form starting with 0]</li>
+ * </ol>
*/
+ protected void populateComponentHtmlId(Form form) {
+ String _tmp_id = "";
+ if (id != null) {
+ // this check is needed for backwards compatibility with 2.1.x
+ if (altSyntax()) {
+ _tmp_id = findString(id);
+ } else {
+ _tmp_id = id;
+ }
+ }
+ else {
+ if (form != null && form.getParameters().get("id") != null) {
+ _tmp_id = _tmp_id + form.getParameters().get("id").toString() + "_";
+ }
+ if (name != null) {
+ _tmp_id = _tmp_id + escape(name);
+ } else if (action != null || method != null){
+ if (action != null) {
+ _tmp_id = _tmp_id + escape(action);
+ }
+ if (method != null) {
+ _tmp_id = _tmp_id + "_" + escape(method);
+ }
+ } else {
+ // if form is null, this component is used, without a form, i guess
+ // there's not much we could do then.
+ if (form != null) {
+ _tmp_id = _tmp_id + form.getSequence();
+ }
+ }
+ }
+ addParameter("id", _tmp_id);
+ }
+
+ /**
+ * Indicate whether the concrete button supports the type "image".
+ *
+ * @return <tt>true</tt> if type image is supported.
+ */
protected abstract boolean supportsImageType();
/**
* Set action attribute.
*
- * @a2.tagattribute required="false" type="String"
+ * @s.tagattribute required="false" type="String"
*/
public void setAction(String action) {
this.action = action;
@@ -98,7 +148,7 @@
/**
* Set method attribute.
*
- * @a2.tagattribute required="false" type="String"
+ * @s.tagattribute required="false" type="String"
*/
public void setMethod(String method) {
this.method = method;
@@ -107,7 +157,7 @@
/**
* HTML align attribute.
*
- * @a2.tagattribute required="false" type="String"
+ * @s.tagattribute required="false" type="String"
*/
public void setAlign(String align) {
this.align = align;
@@ -116,7 +166,7 @@
/**
* The type of submit to use. Valid values are <i>input</i>, <i>button</i> and <i>image</i>.
*
- * @a2.tagattribute required="false" type="String" default="input"
+ * @s.tagattribute required="false" type="String" default="input"
*/
public void setType(String type) {
this.type = type;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/GenericUIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/GenericUIBean.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/GenericUIBean.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/GenericUIBean.java Sun Sep 3 01:05:51 2006
@@ -17,12 +17,11 @@
*/
package org.apache.struts2.components;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.opensymphony.xwork2.util.OgnlValueStack;
import org.apache.struts2.util.ContainUtil;
-import com.opensymphony.xwork2.util.OgnlValueStack;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
/**
* <!-- START SNIPPET: javadoc -->
@@ -34,7 +33,7 @@
* Objects provided can be retrieve from within the template via $parameters._paramname_.<p/>
*
* <b>Jsp:</b><p/>
- * Objects provided can be retrieve from within the template via <saf:property value="%{parameters._paramname_}" /><p/>
+ * Objects provided can be retrieve from within the template via <s:property value="%{parameters._paramname_}" /><p/>
*
*
* In the bottom JSP and Velocity samples, two parameters are being passed in to the component. From within the
@@ -44,8 +43,8 @@
* $parameters.get('key1') and $parameters.get('key2') or $parameters.key1 and $parameters.key2<p/>
*
* <b>Jsp:</b><p/>
- * <saf:property value="%{parameters.key1}" /> and <saf:property value="%{'parameters.key2'}" /> or
- * <saf:property value="%{parameters.get('key1')}" /> and <saf:property value="%{parameters.get('key2')}" /><p/>
+ * <s:property value="%{parameters.key1}" /> and <s:property value="%{'parameters.key2'}" /> or
+ * <s:property value="%{parameters.get('key1')}" /> and <s:property value="%{parameters.get('key2')}" /><p/>
*
* Currently, your custom UI components can be written in Velocity, JSP, or Freemarker, and the correct rendering
* engine will be found based on file extension.<p/>
@@ -62,34 +61,34 @@
* <pre>
* <!-- START SNIPPET: example -->
* JSP
- * <a:component template="/my/custom/component.vm"/>
+ * <s:component template="/my/custom/component.vm"/>
*
* or
*
- * <a:component template="/my/custom/component.vm">
- * <a:param name="key1" value="value1"/>
- * <a:param name="key2" value="value2"/>
- * </a:component>
+ * <s:component template="/my/custom/component.vm">
+ * <s:param name="key1" value="value1"/>
+ * <s:param name="key2" value="value2"/>
+ * </s:component>
*
* Velocity
- * #safcomponent( "template=/my/custom/component.vm" )
+ * #s-component( "template=/my/custom/component.vm" )
*
* or
*
- * #safcomponent( "template=/my/custom/component.vm" )
- * #safparam( "name=key1" "value=value1" )
- * #safparam( "name=key2" "value=value2" )
+ * #s-component( "template=/my/custom/component.vm" )
+ * #s-param( "name=key1" "value=value1" )
+ * #s-param( "name=key2" "value=value2" )
* #end
*
* Freemarker
- * <@saf.component template="/my/custom/component.ftl" />
+ * <@s..component template="/my/custom/component.ftl" />
*
* or
*
- * <@saf.component template="/my/custom/component.ftl">
- * <@saf.param name="key1" value="%{'value1'}" />
- * <@saf.param name="key2" value="%{'value2'}" />
- * </@saf.component>
+ * <@s..component template="/my/custom/component.ftl">
+ * <@s..param name="key1" value="%{'value1'}" />
+ * <@s..param name="key2" value="%{'value2'}" />
+ * </@s..component>
*
* <!-- END SNIPPET: example -->
* </pre>
@@ -105,7 +104,7 @@
*
* <!-- END SNIPPET: note -->
*
- * @a2.tag name="component" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.ComponentTag"
+ * @s.tag name="component" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.ComponentTag"
* description="Render a custom ui widget"
*/
public class GenericUIBean extends UIBean {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Head.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Head.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Head.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Head.java Sun Sep 3 01:05:51 2006
@@ -17,13 +17,12 @@
*/
package org.apache.struts2.components;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.StrutsConstants;
+import com.opensymphony.xwork2.util.OgnlValueStack;
import org.apache.struts2.config.Settings;
+import org.apache.struts2.StrutsConstants;
-import com.opensymphony.xwork2.util.OgnlValueStack;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
/**
* <!-- START SNIPPET: javadoc -->
@@ -48,7 +47,7 @@
* <!-- START SNIPPET: example1 -->
* <head>
* <title>My page</title>
- * <a:head/>
+ * <s:head/>
* </head>
* <!-- END SNIPPET: example1 -->
* </pre>
@@ -57,7 +56,7 @@
* <!-- START SNIPPET: example2 -->
* <head>
* <title>My page</title>
- * <a:head theme="ajax" calendarcss="calendar-green"/>
+ * <s:head theme="ajax" calendarcss="calendar-green"/>
* </head>
* <!-- END SNIPPET: example2 -->
* </pre>
@@ -66,12 +65,12 @@
* <!-- START SNIPPET: example3 -->
* <head>
* <title>My page</title>
- * <a:head theme="ajax" debug="true"/>
+ * <s:head theme="ajax" debug="true"/>
* </head>
* <!-- END SNIPPET: example3 -->
* </pre>
*
- * @a2.tag name="head" tld-body-content="empty" tld-tag-class="org.apache.struts2.views.jsp.ui.HeadTag"
+ * @s.tag name="head" tld-body-content="empty" tld-tag-class="org.apache.struts2.views.jsp.ui.HeadTag"
* description="Render a chunk of HEAD for your HTML file"
*/
public class Head extends UIBean {
@@ -112,7 +111,7 @@
/**
* The jscalendar css theme to use" default="calendar-blue.css
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setCalendarcss(String calendarcss) {
this.calendarcss = calendarcss;
@@ -124,7 +123,7 @@
/**
* Set to true to enable debugging mode for AJAX themes
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDebug(boolean debug) {
this.debug = debug;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Hidden.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Hidden.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Hidden.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Hidden.java Sun Sep 3 01:05:51 2006
@@ -17,11 +17,11 @@
*/
package org.apache.struts2.components;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import com.opensymphony.xwork2.util.OgnlValueStack;
-
/**
* <!-- START SNIPPET: javadoc -->
* Renders an HTML input element of type hidden, populated by the specified property from the OgnlValueStack.
@@ -32,9 +32,9 @@
* <pre>
* <!-- START SNIPPET: example -->
* <-- example one -->
- * <a:hidden name="foo" />
+ * <s:hidden name="foo" />
* <-- example two -->
- * <a:hidden name="foo" value="bar" />
+ * <s:hidden name="foo" value="bar" />
*
* Example One Resulting HTML (if foo evaluates to bar):
* <input type="hidden" name="foo" value="bar" />
@@ -43,7 +43,7 @@
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="hidden" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.HiddenTag"
+ * @s.tag name="hidden" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.HiddenTag"
* description="Render a hidden input field"
*/
public class Hidden extends UIBean {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/I18n.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/I18n.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/I18n.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/I18n.java Sun Sep 3 01:05:51 2006
@@ -17,17 +17,18 @@
*/
package org.apache.struts2.components;
-import java.io.Writer;
-import java.util.Locale;
-import java.util.ResourceBundle;
-
-import org.apache.struts2.StrutsException;
-
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.LocaleProvider;
import com.opensymphony.xwork2.TextProviderSupport;
import com.opensymphony.xwork2.util.LocalizedTextUtil;
import com.opensymphony.xwork2.util.OgnlValueStack;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.struts2.StrutsException;
+
+import java.io.Writer;
+import java.util.Locale;
+import java.util.ResourceBundle;
/**
* <!-- START SNIPPET: javadoc -->
@@ -55,9 +56,9 @@
* <pre>
* <!-- START SNIPPET: example -->
*
- * <a:i18n name="myCustomBundle">
- * The i18n value for key aaa.bbb.ccc in myCustomBundle is <a:property value="text('aaa.bbb.ccc')" />
- * </a:i18n>
+ * <s:i18n name="myCustomBundle">
+ * The i18n value for key aaa.bbb.ccc in myCustomBundle is <s:property value="text('aaa.bbb.ccc')" />
+ * </s:i18n>
*
* <!-- END SNIPPET: example -->
* </pre>
@@ -66,17 +67,19 @@
* <pre>
* <!-- START SNIPPET: i18nExample -->
*
- * <a:i18n name="some.package.bundle" >
- * <a:text name="some.key" />
- * </a:i18n>
+ * <s:i18n name="some.package.bundle" >
+ * <s:text name="some.key" />
+ * </s:i18n>
*
* <!-- END SNIPPET: i18nExample -->
* </pre>
*
- * @a2.tag name="i18n" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.I18nTag"
+ * @s.tag name="i18n" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.I18nTag"
* description="Get a resource bundle and place it on the value stack"
*/
public class I18n extends Component {
+ private static final Log LOG = LogFactory.getLog(I18n.class);
+
protected boolean pushed;
protected String name;
@@ -122,7 +125,7 @@
/**
* Name of ressource bundle to use (eg foo/bar/customBundle)
- * @a2.tagattribute required="true" default="String"
+ * @s.tagattribute required="true" default="String"
*/
public void setName(String name) {
this.name = name;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/If.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/If.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/If.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/If.java Sun Sep 3 01:05:51 2006
@@ -17,10 +17,10 @@
*/
package org.apache.struts2.components;
-import java.io.Writer;
-
import com.opensymphony.xwork2.util.OgnlValueStack;
+import java.io.Writer;
+
/**
* <!-- START SNIPPET: javadoc -->
*
@@ -43,22 +43,22 @@
*
* <pre>
* <!-- START SNIPPET: example -->
- * <a:if test="%{false}">
+ * <s:if test="%{false}">
* <div>Will Not Be Executed</div>
- * </a:if>
- * <a:elseif test="%{true}">
+ * </s:if>
+ * <s:elseif test="%{true}">
* <div>Will Be Executed</div>
- * </a:elseif>
- * <a:else>
+ * <s:else>
+ * </s:elseif>
* <div>Will Not Be Executed</div>
- * </a:else>
+ * </s:else>
* <!-- END SNIPPET: example -->
* </pre>
*
* @see Else
* @see ElseIf
*
- * @a2.tag name="if" tld-body-content="JSP" description="If tag" tld-tag-class="org.apache.struts2.views.jsp.IfTag"
+ * @s.tag name="if" tld-body-content="JSP" description="If tag" tld-tag-class="org.apache.struts2.views.jsp.IfTag"
*/
public class If extends Component {
public static final String ANSWER = "struts.if.answer";
@@ -68,7 +68,7 @@
/**
* Expression to determine if body of tag is to be displayed
- * @a2.tagattribute required="true" type="Boolean"
+ * @s.tagattribute required="true" type="Boolean"
*/
public void setTest(String test) {
this.test = test;
@@ -84,13 +84,12 @@
if (answer == null) {
answer = Boolean.FALSE;
}
-
stack.getContext().put(ANSWER, answer);
return answer.booleanValue();
}
public boolean end(Writer writer, String body) {
-
+ stack.getContext().put(ANSWER, answer);
return super.end(writer, body);
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java Sun Sep 3 01:05:51 2006
@@ -17,17 +17,14 @@
*/
package org.apache.struts2.components;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.Writer;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Stack;
-import java.util.StringTokenizer;
+import org.apache.struts2.config.Settings;
+import org.apache.struts2.util.FastByteArrayOutputStream;
+import org.apache.struts2.RequestUtils;
+import org.apache.struts2.StrutsConstants;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
@@ -36,15 +33,12 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.struts2.RequestUtils;
-import org.apache.struts2.StrutsConstants;
-import org.apache.struts2.config.Settings;
-import org.apache.struts2.util.FastByteArrayOutputStream;
-
-import com.opensymphony.xwork2.util.OgnlValueStack;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.net.URLEncoder;
+import java.util.*;
/**
* <!-- START SNIPPET: javadoc -->
@@ -63,19 +57,19 @@
* <pre>
* <!-- START SNIPPET: example -->
* <-- One: -->
- * <a:include value="myJsp.jsp" />
+ * <s:include value="myJsp.jsp" />
*
* <-- Two: -->
- * <a:include value="myJsp.jsp">
- * <a:param name="param1" value="value2" />
- * <a:param name="param2" value="value2" />
- * </a:include>
+ * <s:include value="myJsp.jsp">
+ * <s:param name="param1" value="value2" />
+ * <s:param name="param2" value="value2" />
+ * </s:include>
*
* <-- Three: -->
- * <a:include value="myJsp.jsp">
- * <a:param name="param1">value1</a:param>
- * <a:param name="param2">value2<a:param>
- * </a:include>
+ * <s:include value="myJsp.jsp">
+ * <s:param name="param1">value1</s:param>
+ * <s:param name="param2">value2<s:param>
+ * </s:include>
* <!-- END SNIPPET: example -->
*
* <!-- START SNIPPET: exampledescription -->
@@ -85,7 +79,7 @@
* <!-- END SNIPPET: exampledescription -->
* </pre>
*
- * @a2.tag name="include" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.IncludeTag"
+ * @s.tag name="include" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.IncludeTag"
* description="Include a servlet's output (result of servlet or a JSP page)"
*/
public class Include extends Component {
@@ -156,7 +150,7 @@
/**
* The jsp/servlet output to include
- * @a2.tagattribute required="true" type="String"
+ * @s.tagattribute required="true" type="String"
*/
public void setValue(String value) {
this.value = value;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/IteratorComponent.java Sun Sep 3 01:05:51 2006
@@ -17,14 +17,13 @@
*/
package org.apache.struts2.components;
-import java.io.Writer;
-import java.util.Iterator;
-
import org.apache.struts2.util.MakeIterator;
import org.apache.struts2.views.jsp.IteratorStatus;
-
import com.opensymphony.xwork2.util.OgnlValueStack;
+import java.io.Writer;
+import java.util.Iterator;
+
/**
* <!-- START SNIPPET: javadoc -->
*
@@ -50,15 +49,15 @@
* <!-- START SNIPPET: example1description -->
*
* <p>The following example retrieves the value of the getDays() method of the current object on the value stack and
- * uses it to iterate over. The <a:property/> tag prints out the current value of the iterator.</p>
+ * uses it to iterate over. The <s:property/> tag prints out the current value of the iterator.</p>
*
* <!-- END SNIPPET: example1description -->
*
* <pre>
* <!-- START SNIPPET: example1code -->
- * <a:iterator value="days">
- * <p>day is: <a:property/></p>
- * </a:iterator>
+ * <s:iterator value="days">
+ * <p>day is: <s:property/></p>
+ * </s:iterator>
* <!-- END SNIPPET: example1code -->
* </pre>
*
@@ -76,26 +75,26 @@
* <pre>
* <!-- START SNIPPET: example2code -->
*
- * <a:bean name="org.apache.struts2.example.IteratorExample" id="it">
- * <a:param name="day" value="'foo'"/>
- * <a:param name="day" value="'bar'"/>
- * </a:bean>
+ * <s:bean name="org.apache.struts2.example.IteratorExample" id="it">
+ * <s:param name="day" value="'foo'"/>
+ * <s:param name="day" value="'bar'"/>
+ * </s:bean>
* <p/>
* <table border="0" cellspacing="0" cellpadding="1">
* <tr>
* <th>Days of the week</th>
* </tr>
* <p/>
- * <a:iterator value="#it.days" status="rowstatus">
+ * <s:iterator value="#it.days" status="rowstatus">
* <tr>
- * <a:if test="#rowstatus.odd == true">
- * <td style="background: grey"><a:property/></td>
- * </a:if>
- * <a:else>
- * <td><a:property/></td>
- * </a:else>
+ * <s:if test="#rowstatus.odd == true">
+ * <td style="background: grey"><s:property/></td>
+ * </s:if>
+ * <s:else>
+ * <td><s:property/></td>
+ * </s:else>
* </tr>
- * </a:iterator>
+ * </s:iterator>
* </table>
*
* <!-- END SNIPPET: example2code -->
@@ -112,17 +111,17 @@
* <pre>
* <!-- START SNIPPET: example3code -->
*
- * <saf:iterator value="groupDao.groups" status="groupStatus">
- * <tr class="<saf:if test="#groupStatus.odd == true ">odd</saf:if><saf:else>even</saf:else>">
- * <td><saf:property value="name" /></td>
- * <td><saf:property value="description" /></td>
+ * <s:iterator value="groupDao.groups" status="groupStatus">
+ * <tr class="<s:if test="#groupStatus.odd == true ">odd</s:if><s:else>even</s:else>">
+ * <td><s:property value="name" /></td>
+ * <td><s:property value="description" /></td>
* <td>
- * <saf:iterator value="users" status="userStatus">
- * <saf:property value="fullName" /><saf:if test="!#userStatus.last">,</saf:if>
- * </saf:iterator>
+ * <s:iterator value="users" status="userStatus">
+ * <s:property value="fullName" /><s:if test="!#userStatus.last">,</s:if>
+ * </s:iterator>
* </td>
* </tr>
- * </saf:iterator>
+ * </s:iterator>
*
* <!-- END SNIPPET: example3code -->
* </pre>
@@ -132,7 +131,7 @@
*
* </p> The next example iterates over a an action collection and passes every iterator value to another action. The
* trick here lies in the use of the '[0]' operator. It takes the current iterator value and passes it on to the edit
- * action. Using the '[0]' operator has the same effect as using >a:property />. (The latter, however, does not
+ * action. Using the '[0]' operator has the same effect as using >s:property />. (The latter, however, does not
* work from inside the param tag). </p>
*
* <!-- END SNIPPET: example4description -->
@@ -140,16 +139,16 @@
* <pre>
* <!-- START SNIPPET: example4code -->
*
- * <a:action name="entries" id="entries"/>
- * <a:iterator value="#entries.entries" >
- * <a:property value="name" />
- * <a:property />
- * <a:push value="...">
- * <a:action name="edit" id="edit" >
- * <a:param name="entry" value="[0]" />
- * </a:action>
+ * <s:action name="entries" id="entries"/>
+ * <s:iterator value="#entries.entries" >
+ * <s:property value="name" />
+ * <s:property />
+ * <s:push value="...">
+ * <s:action name="edit" id="edit" >
+ * <s:param name="entry" value="[0]" />
+ * </s:action>
* </push>
- * </a:iterator>
+ * </s:iterator>
*
* <!-- END SNIPPET: example4code -->
* </pre>
@@ -164,19 +163,19 @@
* <pre>
* <!-- START SNIPPET: example5code -->
*
- * <a:iterator status="stat" value="{1,2,3,4,5}" >
+ * <s:iterator status="stat" value="{1,2,3,4,5}" >
* <!-- grab the index (start with 0 ... ) -->
- * <a:property value="#stat.index" />
+ * <s:property value="#stat.index" />
*
* <!-- grab the top of the stack which should be the -->
* <!-- current iteration value (0, 1, ... 5) -->
- * <a:property value="top" />
- * </a:iterator>
+ * <s:property value="top" />
+ * </s:iterator>
*
* <!-- END SNIPPET: example5code -->
* </pre>
*
- * @a2.tag name="iterator" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.IteratorTag"
+ * @s.tag name="iterator" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.IteratorTag"
* description="Iterate over a iterable value"
*/
public class IteratorComponent extends Component {
@@ -273,7 +272,7 @@
/**
* if specified, an instanceof IteratorStatus will be pushed into stack upon each iteration
- * @a2.tagattribute required="false" type="Boolean" default="false"
+ * @s.tagattribute required="false" type="Boolean" default="false"
*/
public void setStatus(String status) {
this.statusAttr = status;
@@ -281,7 +280,7 @@
/**
* the iteratable source to iterate over, else an the object itself will be put into a newly created List
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setValue(String value) {
this.value = value;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Label.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Label.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Label.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Label.java Sun Sep 3 01:05:51 2006
@@ -17,11 +17,11 @@
*/
package org.apache.struts2.components;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import com.opensymphony.xwork2.util.OgnlValueStack;
-
/**
* <!-- START SNIPPET: javadoc -->
* Renders an HTML LABEL that will allow you to output label:name combination that has the same format treatment as
@@ -37,11 +37,11 @@
* <!-- END SNIPPET: exdescription -->
* <pre>
* <!-- START SNIPPET: example -->
- * <a:label label="%{text('user_name')}" name="userName" />
+ * <s:label label="%{text('user_name')}" name="userName" />
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="label" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.LabelTag"
+ * @s.tag name="label" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.LabelTag"
* description="Render a label that displays read-only information"
*/
public class Label extends UIBean {
@@ -79,7 +79,7 @@
/**
* HTML for attribute
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setFor(String forAttr) {
this.forAttr = forAttr;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ListUIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ListUIBean.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ListUIBean.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ListUIBean.java Sun Sep 3 01:05:51 2006
@@ -17,18 +17,16 @@
*/
package org.apache.struts2.components;
-import java.lang.reflect.Array;
-import java.util.Collection;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import org.apache.struts2.util.ContainUtil;
import org.apache.struts2.util.MakeIterator;
-
import com.opensymphony.xwork2.util.OgnlValueStack;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.lang.reflect.Array;
+import java.util.Collection;
+import java.util.Map;
+
/**
* DoubleListUIBean is the standard superclass of all Struts list handling components.
*
@@ -120,7 +118,7 @@
/**
* Iterable source to populate from. If the list is a Map (key, value), the Map key will become the option "value" parameter and the Map value will become the option body.
- * @a2.tagattribute required="true"
+ * @s.tagattribute required="true"
*/
public void setList(Object list) {
this.list = list;
@@ -128,7 +126,7 @@
/**
* Property of list objects to get field value from
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setListKey(String listKey) {
this.listKey = listKey;
@@ -136,7 +134,7 @@
/**
* Property of list objects to get field content from
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setListValue(String listValue) {
this.listValue = listValue;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java Sun Sep 3 01:05:51 2006
@@ -24,10 +24,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.apache.struts2.components.Param.UnnamedParametric;
import org.apache.struts2.util.MakeIterator;
import org.apache.struts2.util.MergeIteratorFilter;
-
import com.opensymphony.xwork2.util.OgnlValueStack;
/**
@@ -105,14 +105,14 @@
* <!-- END SNIPPET: javacode -->
*
* <!-- START SNIPPET: example -->
- * <a:merge id="myMergedIterator1">
- * <a:param value="%{myList1}" />
- * <a:param value="%{myList2}" />
- * <a:param value="%{myList3}" />
- * </a:merge>
- * <a:iterator value="%{#myMergedIterator1}">
- * <a:property />
- * </a:iterator>
+ * <s:merge id="myMergedIterator1">
+ * <s:param value="%{myList1}" />
+ * <s:param value="%{myList2}" />
+ * <s:param value="%{myList3}" />
+ * </s:merge>
+ * <s:iterator value="%{#myMergedIterator1}">
+ * <s:property />
+ * </s:iterator>
* <!-- END SNIPPET: example -->
*
* <!-- START SNIPPET: description -->
@@ -122,7 +122,7 @@
* @see org.apache.struts2.util.MergeIteratorFilter
* @see org.apache.struts2.views.jsp.iterator.MergeIteratorTag
*
- * @a2.tag name="merge" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.iterator.MergeIteratorTag"
+ * @s.tag name="merge" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.iterator.MergeIteratorTag"
* description="Merge the values of a list of iterators into one iterator"
*/
public class MergeIterator extends Component implements UnnamedParametric {
@@ -169,7 +169,7 @@
/**
* the id where the resultant merged iterator will be stored in the stack's context
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setId(String id) {
super.setId(id);
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptGroup.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptGroup.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptGroup.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptGroup.java Sun Sep 3 01:05:51 2006
@@ -49,20 +49,20 @@
* <pre>
* <!-- START SNIPPET: example -->
*
- * <ww:select label="My Selection"
+ * <s:select label="My Selection"
* name="mySelection"
* value="%{'POPEYE'}"
* list="%{#{'SUPERMAN':'Superman', 'SPIDERMAN':'spiderman'}}">
- * <ww:optgroup label="Adult"
+ * <s:optgroup label="Adult"
* list="%{#{'SOUTH_PARK':'South Park'}}" />
- * <ww:optgroup label="Japanese"
+ * <s:optgroup label="Japanese"
* list="%{#{'POKEMON':'pokemon','DIGIMON':'digimon','SAILORMOON':'Sailormoon'}}" />
- * </ww:select>
+ * </s:select>
*
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="optgroup" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.OptGroupTag"
+ * @s.tag name="optgroup" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.OptGroupTag"
* description="Renders a Select Tag's OptGroup Tag"
*/
public class OptGroup extends Component {
@@ -109,7 +109,7 @@
/**
* Set the label attribute.
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setLabel(String label) {
internalUiBean.setLabel(label);
@@ -117,7 +117,7 @@
/**
* Set the disable attribute.
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setDisabled(String disabled) {
internalUiBean.setDisabled(disabled);
@@ -125,7 +125,7 @@
/**
* Set the list attribute.
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setList(String list) {
internalUiBean.setList(list);
@@ -133,7 +133,7 @@
/**
* Set the listKey attribute.
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setListKey(String listKey) {
internalUiBean.setListKey(listKey);
@@ -141,7 +141,7 @@
/**
* Set the listValue attribute.
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setListValue(String listValue) {
internalUiBean.setListValue(listValue);
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java Sun Sep 3 01:05:51 2006
@@ -56,7 +56,7 @@
* <!-- START SNIPPET: example -->
*
* <-- minimum configuration -->
- * <a:optiontransferselect
+ * <s:optiontransferselect
* label="Favourite Cartoons Characters"
* name="leftSideCartoonCharacters"
* list="{'Popeye', 'He-Man', 'Spiderman'}"
@@ -65,7 +65,7 @@
* />
*
* <-- possible configuration -->
- * <a:optiontransferselect
+ * <s:optiontransferselect
* label="Favourite Cartoons Characters"
* name="leftSideCartoonCharacters"
* leftTitle="Left Title"
@@ -86,7 +86,7 @@
* <!-- END SNIPPET: example -->
* </pre>
*
- * @a2.tag name="optiontransferselect" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.OptionTransferSelectTag"
+ * @s.tag name="optiontransferselect" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.OptionTransferSelectTag"
* description="Renders an input form"
*/
public class OptionTransferSelect extends DoubleListUIBean {
@@ -302,7 +302,7 @@
/**
* set Add To Left button label
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAddAllToLeftLabel(String addAllToLeftLabel) {
this.addAllToLeftLabel = addAllToLeftLabel;
@@ -314,7 +314,7 @@
/**
* set Add All To Right button label
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAddAllToRightLabel(String addAllToRightLabel) {
this.addAllToRightLabel = addAllToRightLabel;
@@ -326,7 +326,7 @@
/**
* set Add To Left button label
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAddToLeftLabel(String addToLeftLabel) {
this.addToLeftLabel = addToLeftLabel;
@@ -338,7 +338,7 @@
/**
* set Add To Right button label
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAddToRightLabel(String addToRightLabel) {
this.addToRightLabel = addToRightLabel;
@@ -350,7 +350,7 @@
/**
* enable Add All To Left button
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAllowAddAllToLeft(String allowAddAllToLeft) {
this.allowAddAllToLeft = allowAddAllToLeft;
@@ -362,7 +362,7 @@
/**
* enable Add All To Right button
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAllowAddAllToRight(String allowAddAllToRight) {
this.allowAddAllToRight = allowAddAllToRight;
@@ -374,7 +374,7 @@
/**
* enable Add To Left button
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAllowAddToLeft(String allowAddToLeft) {
this.allowAddToLeft = allowAddToLeft;
@@ -386,7 +386,7 @@
/**
* enable Add To Right button
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAllowAddToRight(String allowAddToRight) {
this.allowAddToRight = allowAddToRight;
@@ -425,7 +425,7 @@
/**
* set Left title
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setLeftTitle(String leftTitle) {
this.leftTitle = leftTitle;
@@ -437,7 +437,7 @@
/**
* set Right title
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setRightTitle(String rightTitle) {
this.rightTitle = rightTitle;
@@ -446,7 +446,7 @@
/**
* enable Select All button
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setAllowSelectAll(String allowSelectAll) {
this.allowSelectAll = allowSelectAll;
@@ -459,7 +459,7 @@
/**
* set Select All button label
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setSelectAllLabel(String selectAllLabel) {
this.selectAllLabel = selectAllLabel;
@@ -472,7 +472,7 @@
/**
* set buttons css class
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setButtonCssClass(String buttonCssClass) {
this.buttonCssClass = buttonCssClass;
@@ -485,7 +485,7 @@
/**
* set button css style
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setButtonCssStyle(String buttonCssStyle) {
this.buttonCssStyle = buttonCssStyle;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Panel.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Panel.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Panel.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Panel.java Sun Sep 3 01:05:51 2006
@@ -17,12 +17,11 @@
*/
package org.apache.struts2.components;
-import java.io.Writer;
+import com.opensymphony.xwork2.util.OgnlValueStack;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-
-import com.opensymphony.xwork2.util.OgnlValueStack;
+import java.io.Writer;
/**
* <!-- START SNIPPET: javadoc -->
@@ -35,7 +34,7 @@
*
* @see TabbedPanel
*
- * @a2.tag name="panel" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.PanelTag"
+ * @s.tag name="panel" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.PanelTag"
* description="Render a panel for tabbedPanel"
*/
public class Panel extends Div {
@@ -96,7 +95,7 @@
/**
* The text of the tab to display in the header tab list
- * @a2.tagattribute required="true"
+ * @s.tagattribute required="true"
*/
public void setTabName(String tabName) {
this.tabName = tabName;
@@ -104,7 +103,7 @@
/**
* Set subscribeTopicName attribute
- * @a2.tagattribute required="false"
+ * @s.tagattribute required="false"
*/
public void setSubscribeTopicName(String subscribeTopicName) {
this.subscribeTopicName = subscribeTopicName;
@@ -112,7 +111,7 @@
/**
* determines whether this is a remote panel (ajax) or a local panel (content loaded into visible/hidden containers)
- * @a2.tagattribute required="false" type="Boolean" default="false"
+ * @s.tagattribute required="false" type="Boolean" default="false"
*/
public void setRemote(String remote) {
this.remote = remote;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java?rev=439739&r1=439738&r2=439739&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Param.java Sun Sep 3 01:05:51 2006
@@ -17,12 +17,12 @@
*/
package org.apache.struts2.components;
+import com.opensymphony.xwork2.util.OgnlValueStack;
+
import java.io.Writer;
import org.apache.struts2.StrutsException;
-import com.opensymphony.xwork2.util.OgnlValueStack;
-
/**
* <!-- START SNIPPET: javadoc -->
* <p>This tag can be used to parameterize other tags.</p>
@@ -72,9 +72,9 @@
* This second example demonstrates how the text tag can use parameters from this param tag.
* <!-- START SNIPPET: example2 -->
* <pre>
- * <a:text name="cart.total.cost">
- * <a:param value="#session.cartTotal"/>
- * </a:text>
+ * <s:text name="cart.total.cost">
+ * <s:param value="#session.cartTotal"/>
+ * </s:text>
* </pre>
* <!-- END SNIPPET: example2 -->
* <p/>
@@ -83,7 +83,7 @@
* @see Bean
* @see Text
*
- * @a2.tag name="param" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ParamTag"
+ * @s.tag name="param" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ParamTag"
* description="Parametrize other tags"
*/
public class Param extends Component {
@@ -126,7 +126,7 @@
/**
* Name of Parameter to set
- * @a2.tagattribute required="false" type="String"
+ * @s.tagattribute required="false" type="String"
*/
public void setName(String name) {
this.name = name;
@@ -134,7 +134,7 @@
/**
* Value expression for Parameter to set
- * @a2.tagattribute required="false" default="The value of evaluating provided name against stack"
+ * @s.tagattribute required="false" default="The value of evaluating provided name against stack"
*/
public void setValue(String value) {
this.value = value;