You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by hu...@apache.org on 2006/11/06 16:02:22 UTC
svn commit: r471756 [7/31] - in /struts/struts2/trunk: apps/blank/
apps/blank/src/main/java/example/ apps/blank/src/test/java/example/
apps/mailreader/src/main/java/mailreader2/
apps/portlet/src/main/java/org/apache/struts2/portlet/example/ apps/portle...
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ComboBox.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ComboBox.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ComboBox.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ComboBox.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -56,7 +59,7 @@
*
* <s:combobox label="Birth year" size="6" maxlength="4" name="birthYear" list="#year"/>
* </s:bean>
- *
+ *
* <-- Example Two -->
* <s:combobox
* label="My Favourite Fruit"
@@ -66,7 +69,7 @@
* headerValue="--- Please Select ---"
* emptyOption="true"
* value="banana" />
- *
+ *
* <-- Example Two -->
* <s:combobox
* label="My Favourite Color"
@@ -94,7 +97,7 @@
protected String headerKey;
protected String headerValue;
protected String emptyOption;
-
+
public ComboBox(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
@@ -107,55 +110,55 @@
public void evaluateExtraParams() {
super.evaluateExtraParams();
- Object value = findValue(list, "list",
- "You must specify a collection/array/map/enumeration/iterator. " +
+ Object value = findValue(list, "list",
+ "You must specify a collection/array/map/enumeration/iterator. " +
"Example: people or people.{name}");
-
+
if (headerKey != null) {
- addParameter("headerKey", findString(headerKey));
+ addParameter("headerKey", findString(headerKey));
}
if (headerValue != null) {
- addParameter("headerValue", findString(headerValue));
+ addParameter("headerValue", findString(headerValue));
}
if (emptyOption != null) {
- addParameter("emptyOption", findValue(emptyOption, Boolean.class));
+ addParameter("emptyOption", findValue(emptyOption, Boolean.class));
}
-
+
if (value instanceof Collection) {
- Collection tmp = (Collection) value;
- addParameter("list", tmp);
- if (listKey != null) {
- addParameter("listKey", listKey);
- }
- if (listValue != null) {
- addParameter("listValue", listValue);
- }
+ Collection tmp = (Collection) value;
+ addParameter("list", tmp);
+ if (listKey != null) {
+ addParameter("listKey", listKey);
+ }
+ if (listValue != null) {
+ addParameter("listValue", listValue);
+ }
}
else if (value instanceof Map) {
- Map tmp = (Map) value;
- addParameter("list", MakeIterator.convert(tmp));
- addParameter("listKey", "key");
- addParameter("listValue", "value");
+ Map tmp = (Map) value;
+ addParameter("list", MakeIterator.convert(tmp));
+ addParameter("listKey", "key");
+ addParameter("listValue", "value");
}
else if (value.getClass().isArray()) {
- Iterator i = MakeIterator.convert(value);
- addParameter("list", i);
- if (listKey != null) {
- addParameter("listKey", listKey);
- }
- if (listValue != null) {
- addParameter("listValue", listValue);
- }
+ Iterator i = MakeIterator.convert(value);
+ addParameter("list", i);
+ if (listKey != null) {
+ addParameter("listKey", listKey);
+ }
+ if (listValue != null) {
+ addParameter("listValue", listValue);
+ }
}
else {
- Iterator i = MakeIterator.convert(value);
- addParameter("list", i);
- if (listKey != null) {
- addParameter("listKey", listKey);
- }
- if (listValue != null) {
- addParameter("listValue", listValue);
- }
+ Iterator i = MakeIterator.convert(value);
+ addParameter("list", i);
+ if (listKey != null) {
+ addParameter("listKey", listKey);
+ }
+ if (listValue != null) {
+ addParameter("listValue", listValue);
+ }
}
}
@@ -171,41 +174,41 @@
* Decide if an empty option is to be inserted. Default false.
* @s.tagattribute required="false"
*/
- public void setEmptyOption(String emptyOption) {
- this.emptyOption = emptyOption;
- }
-
- /**
- * set the header key for the header option.
- * @s.tagattribute required="false"
- */
- public void setHeaderKey(String headerKey) {
- this.headerKey = headerKey;
- }
-
- /**
- * set the header value for the header option.
- * @s.tagattribute required="false"
- */
- public void setHeaderValue(String headerValue) {
- this.headerValue = headerValue;
- }
-
- /**
- * set the key used to retrive the option key.
- * @s.tagattribute required="false"
- */
- public void setListKey(String listKey) {
- this.listKey = listKey;
- }
-
- /**
- * set the value used to retrive the option value.
- * @s.tagattribute required="false"
- */
- public void setListValue(String listValue) {
- this.listValue = listValue;
- }
-
-
+ public void setEmptyOption(String emptyOption) {
+ this.emptyOption = emptyOption;
+ }
+
+ /**
+ * set the header key for the header option.
+ * @s.tagattribute required="false"
+ */
+ public void setHeaderKey(String headerKey) {
+ this.headerKey = headerKey;
+ }
+
+ /**
+ * set the header value for the header option.
+ * @s.tagattribute required="false"
+ */
+ public void setHeaderValue(String headerValue) {
+ this.headerValue = headerValue;
+ }
+
+ /**
+ * set the key used to retrive the option key.
+ * @s.tagattribute required="false"
+ */
+ public void setListKey(String listKey) {
+ this.listKey = listKey;
+ }
+
+ /**
+ * set the value used to retrive the option value.
+ * @s.tagattribute required="false"
+ */
+ public void setListValue(String listValue) {
+ this.listValue = listValue;
+ }
+
+
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Component.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Component.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Component.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Component.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -132,7 +135,7 @@
* @return true if the body should be evaluated again
*/
protected boolean end(Writer writer, String body, boolean popComponentStack) {
- assert(body != null);
+ assert(body != null);
try {
writer.write(body);
@@ -140,7 +143,7 @@
throw new StrutsException("IOError while writing the body: " + e.getMessage(), e);
}
if (popComponentStack) {
- popComponentStack();
+ popComponentStack();
}
return false;
}
@@ -149,7 +152,7 @@
* Pops the component stack.
*/
protected void popComponentStack() {
- getComponentStack().pop();
+ getComponentStack().pop();
}
/**
@@ -161,15 +164,15 @@
Stack componentStack = getComponentStack();
int currPosition = componentStack.search(this);
if (currPosition >= 0) {
- int start = componentStack.size() - currPosition - 1;
+ int start = componentStack.size() - currPosition - 1;
- //for (int i = componentStack.size() - 2; i >= 0; i--) {
- for (int i = start; i >=0; i--) {
- Component component = (Component) componentStack.get(i);
- if (clazz.isAssignableFrom(component.getClass()) && component != this) {
- return component;
- }
- }
+ //for (int i = componentStack.size() - 2; i >= 0; i--) {
+ for (int i = start; i >=0; i--) {
+ Component component = (Component) componentStack.get(i);
+ if (clazz.isAssignableFrom(component.getClass()) && component != this) {
+ return component;
+ }
+ }
}
return null;
@@ -447,9 +450,9 @@
* @s.tagattribute required="false"
*/
public void setId(String id) {
- if (id != null) {
- this.id = findString(id);
- }
+ if (id != null) {
+ this.id = findString(id);
+ }
}
/**
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Date.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Date.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Date.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Date.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -34,7 +37,7 @@
/**
* <!-- START SNIPPET: javadoc -->
- *
+ *
* Format Date object in different ways.
* <p>
* The date tag will allow you to format a Date in a quick and easy way.
@@ -47,77 +50,77 @@
*
* <b>Note</b>: If the requested Date object isn't found on the stack, a blank will be returned.
* </p>
- *
+ *
* Configurable attributes are :-
* <ul>
* <li>name</li>
* <li>nice</li>
* <li>format</li>
* </ul>
- *
+ *
* <p/>
- *
- * Following how the date component will work, depending on the value of nice attribute
+ *
+ * Following how the date component will work, depending on the value of nice attribute
* (which by default is false) and the format attribute.
- *
+ *
* <p/>
- *
+ *
* <b><u>Condition 1: With nice attribute as true</u></b>
* <table border="1">
* <tr>
* <td>i18n key</td>
* <td>default</td>
- * </tr>
+ * </tr>
* <tr>
- * <td>struts.date.format.past</td>
- * <td>{0} ago</td>
+ * <td>struts.date.format.past</td>
+ * <td>{0} ago</td>
* </tr>
* <tr>
- * <td>struts.date.format.future</td>
+ * <td>struts.date.format.future</td>
* <td>in {0}</td>
* </tr>
* <tr>
- * <td>struts.date.format.seconds</td>
+ * <td>struts.date.format.seconds</td>
* <td>an instant</td>
* </tr>
* <tr>
- * <td>struts.date.format.minutes</td>
+ * <td>struts.date.format.minutes</td>
* <td>{0,choice,1#one minute|1<{0} minutes}</td>
* </tr>
* <tr>
- * <td>struts.date.format.hours</td>
- * <td>{0,choice,1#one hour|1<{0} hours}{1,choice,0#|1#, one minute|1<, {1} minutes}</td>
+ * <td>struts.date.format.hours</td>
+ * <td>{0,choice,1#one hour|1<{0} hours}{1,choice,0#|1#, one minute|1<, {1} minutes}</td>
* </tr>
* <tr>
- * <td>struts.date.format.days</td>
- * <td>{0,choice,1#one day|1<{0} days}{1,choice,0#|1#, one hour|1<, {1} hours}</td>
+ * <td>struts.date.format.days</td>
+ * <td>{0,choice,1#one day|1<{0} days}{1,choice,0#|1#, one hour|1<, {1} hours}</td>
* </tr>
* <tr>
- * <td>struts.date.format.years</td>
- * <td>{0,choice,1#one year|1<{0} years}{1,choice,0#|1#, one day|1<, {1} days}</td>
+ * <td>struts.date.format.years</td>
+ * <td>{0,choice,1#one year|1<{0} years}{1,choice,0#|1#, one day|1<, {1} days}</td>
* </tr>
* </table>
- *
+ *
* <p/>
- *
+ *
* <b><u>Condition 2: With nice attribute as false and format attribute is specified eg. dd/MM/yyyyy </u></b>
* <p>In this case the format attribute will be used.</p>
- *
+ *
* <p/>
- *
+ *
* <b><u>Condition 3: With nice attribute as false and no format attribute is specified </u></b>
* <table border="1">
* <tr>
* <td>i18n key</td>
* <td>default</td>
- * </tr>
+ * </tr>
* <tr>
- * <td>struts.date.format</td>
+ * <td>struts.date.format</td>
* <td>if one is not found DateFormat.MEDIUM format will be used</td>
* </tr>
* </table>
- *
- *
+ *
+ *
* <!-- END SNIPPET: javadoc -->
*
* <p/> <b>Examples</b>
@@ -379,5 +382,5 @@
*/
public boolean isNice() {
return nice;
- }
+ }
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -29,35 +32,35 @@
* Format supported by this component are:-
* <table border="1">
* <tr>
- * <td>Format</td>
- * <td>Description</td>
+ * <td>Format</td>
+ * <td>Description</td>
* </tr>
* <tr>
- * <td>#dd</td>
- * <td>Display day in two digits format</td>
- * </tr>
+ * <td>#dd</td>
+ * <td>Display day in two digits format</td>
+ * </tr>
* <tr>
- * <td>#d</td>
- * <td>Try to display day in one digit format, if cannot use 2 digit format</td>
+ * <td>#d</td>
+ * <td>Try to display day in one digit format, if cannot use 2 digit format</td>
* </tr>
* <tr>
- * <td>#MM</td>
+ * <td>#MM</td>
* <td>Display month in two digits format</td>
* </tr>
* <tr>
- * <td>#M</td>
- * <td>Try to display month in one digits format, if cannot use 2 digit format</td>
+ * <td>#M</td>
+ * <td>Try to display month in one digits format, if cannot use 2 digit format</td>
* </tr>
* <tr>
- * <td>#yyyy</td>
+ * <td>#yyyy</td>
* <td>Display year in four digits format</td>
* </tr>
* <tr>
- * <td>#yy</td>
+ * <td>#yy</td>
* <td>Display the last two digits of the yaer</td>
* </tr>
* <tr>
- * <td>#y</td>
+ * <td>#y</td>
* <td>Display the last digits of the year</td>
* </tr>
* </table>
@@ -75,7 +78,7 @@
* <s:datepicker name="order.date" label="Order Date" />
* Example 2:
* <s:datepicker name="delivery.date" label="Delivery Date" format="#yyyy-#MM-#dd" />
- *
+ *
* <!-- END SNIPPET: expl1 -->
* </pre>
* <p/>
@@ -85,12 +88,12 @@
* The css could be changed by using the following :-
*
* <!-- END SNIPPET: expldesc2 -->
- *
+ *
* <pre>
* <!-- START SNIPPET: expl2 -->
- *
+ *
* <s:datepicker name="birthday" label="Birthday" templateCss="...." />
- *
+ *
* <!-- END SNIPPET: expl2 -->
* </pre>
*
@@ -122,16 +125,16 @@
addParameter("format", findString(format));
}
if (dateIconPath != null) {
- addParameter("dateIconPath", dateIconPath);
+ addParameter("dateIconPath", dateIconPath);
}
if (templatePath != null) {
- addParameter("templatePath", templatePath);
+ addParameter("templatePath", templatePath);
}
if (templateCssPath != null) {
- addParameter("templateCssPath", templateCssPath);
+ addParameter("templateCssPath", templateCssPath);
}
if (size != null) {
- addParameter("size", findValue(size, Integer.class));
+ addParameter("size", findValue(size, Integer.class));
}
}
@@ -142,36 +145,36 @@
public void setFormat(String format) {
this.format = format;
}
-
+
/**
* The date picker icon path
* @s.tagattribute required="false" type="String" default="/struts/dojo/struts/widgets/dateIcon.gif"
*/
public void setDateIconPath(String dateIconPath) {
- this.dateIconPath = dateIconPath;
+ this.dateIconPath = dateIconPath;
}
-
+
/**
* The datepicker template path.
* @s.tagattribute required="false" type="String"
*/
public void setTemplatePath(String templatePath) {
- this.templatePath = templatePath;
+ this.templatePath = templatePath;
}
-
+
/**
* The datepicker template css path.
* @s.tagattribute required="false" type="String"
*/
public void setTemplateCssPath(String templateCssPath) {
- this.templateCssPath = templateCssPath;
+ this.templateCssPath = templateCssPath;
}
-
+
/**
* The datepicker text field size.
* @s.tagattribute required="false" type="String"
*/
public void setSize(String size) {
- this.size = size;
+ this.size = size;
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Debug.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Debug.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Debug.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Debug.java Mon Nov 6 07:01:43 2006
@@ -1,41 +1,23 @@
-package org.apache.struts2.components;
-
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.struts2.StrutsException;
-
-import com.opensymphony.xwork2.util.OgnlUtil;
-import com.opensymphony.xwork2.util.ValueStack;
-
-/**
- * <!-- START SNIPPET: javadoc -->
- * <p>Renders an debug tag.</P>
+/*
+ * $Id$
*
- * The debug information contain mostly stack information:
- * <ul>
- * <li>Value Stack Contents</li>
- * <li>Stack Context</li>
- * </ul>
- * <!-- END SNIPPET: javadoc -->
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * <p/> <b>Examples</b>
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * <pre>
- * <!-- START SNIPPET: example -->
- * <ww:debug/>
- * <!-- END SNIPPET: example -->
- * </pre>
- *
- * @s.tag name="debug" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.DebugTag"
- * description="Render debug tag"
- */
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
public class Debug extends UIBean {
public static final String TEMPLATE = "debug";
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -52,9 +55,9 @@
* description="Render HTML div providing content from remote call via AJAX"
*/
public class Div extends RemoteCallUIBean {
-
- private static final Log _log = LogFactory.getLog(Div.class);
-
+
+ private static final Log _log = LogFactory.getLog(Div.class);
+
public static final String TEMPLATE = "div";
public static final String TEMPLATE_CLOSE = "div-close";
@@ -91,21 +94,21 @@
} else {
addParameter("delay", "0");
}
-
+
String tmpUpdateFreq = (String) getParameters().get("delay");
String tmpDelay = (String) getParameters().get("updateFreq");
try {
- int _updateFreq = Integer.parseInt(tmpUpdateFreq);
- int _delay = Integer.parseInt(tmpDelay);
-
- if (_updateFreq <= 0 && _delay <= 0) {
- addParameter("autoStart", "false");
- }
+ int _updateFreq = Integer.parseInt(tmpUpdateFreq);
+ int _delay = Integer.parseInt(tmpDelay);
+
+ if (_updateFreq <= 0 && _delay <= 0) {
+ addParameter("autoStart", "false");
+ }
}
catch(NumberFormatException e) {
- // too bad, invalid updateFreq or delay provided, we
- // can't determine autoStart mode.
- _log.info("error while parsing updateFreq ["+tmpUpdateFreq+"] or delay ["+tmpDelay+"] to integer, cannot determine autoStart mode", e);
+ // too bad, invalid updateFreq or delay provided, we
+ // can't determine autoStart mode.
+ _log.info("error while parsing updateFreq ["+tmpUpdateFreq+"] or delay ["+tmpDelay+"] to integer, cannot determine autoStart mode", e);
}
if (loadingText != null) {
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -30,29 +33,29 @@
* <p/>
*
* <!-- START SNIPPET: javadoc -->
- *
+ *
* Note that the doublelistkey and doublelistvalue attribute will default to "key" and "value"
* respectively only when the doublelist attribute is evaluated to a Map or its decendant.
* Other thing else, will result in doublelistkey and doublelistvalue to be null and not used.
- *
+ *
* <!-- END SNIPPET: javadoc -->
*
*/
public abstract class DoubleListUIBean extends ListUIBean {
-
- protected String emptyOption;
+
+ protected String emptyOption;
protected String headerKey;
protected String headerValue;
protected String multiple;
protected String size;
-
+
protected String doubleList;
protected String doubleListKey;
protected String doubleListValue;
protected String doubleName;
protected String doubleValue;
protected String formName;
-
+
protected String doubleId;
protected String doubleDisabled;
protected String doubleMultiple;
@@ -60,10 +63,10 @@
protected String doubleHeaderKey;
protected String doubleHeaderValue;
protected String doubleEmptyOption;
-
+
protected String doubleCssClass;
protected String doubleCssStyle;
-
+
protected String doubleOnclick;
protected String doubleOndblclick;
protected String doubleOnmousedown;
@@ -78,9 +81,9 @@
protected String doubleOnkeyup;
protected String doubleOnselect;
protected String doubleOnchange;
-
+
protected String doubleAccesskey;
-
+
public DoubleListUIBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
@@ -90,7 +93,7 @@
super.evaluateExtraParams();
//Object doubleName = null;
-
+
if (emptyOption != null) {
addParameter("emptyOption", findValue(emptyOption, Boolean.class));
}
@@ -107,18 +110,18 @@
addParameter("headerKey", findString(headerKey));
addParameter("headerValue", findString(headerValue));
}
-
-
+
+
if (doubleMultiple != null) {
- addParameter("doubleMultiple", findValue(doubleMultiple, Boolean.class));
+ addParameter("doubleMultiple", findValue(doubleMultiple, Boolean.class));
}
-
+
if (doubleSize != null) {
- addParameter("doubleSize", findString(doubleSize));
+ addParameter("doubleSize", findString(doubleSize));
}
-
+
if (doubleDisabled != null) {
- addParameter("doubleDisabled", findValue(doubleDisabled, Boolean.class));
+ addParameter("doubleDisabled", findValue(doubleDisabled, Boolean.class));
}
if (doubleName != null) {
@@ -128,14 +131,14 @@
if (doubleList != null) {
addParameter("doubleList", doubleList);
}
-
+
Object tmpDoubleList = findValue(doubleList);
if (doubleListKey != null) {
addParameter("doubleListKey", doubleListKey);
}else if (tmpDoubleList instanceof Map) {
- addParameter("doubleListKey", "key");
+ addParameter("doubleListKey", "key");
}
-
+
if (doubleListValue != null) {
if (altSyntax()) {
// the same logic as with findValue(String)
@@ -147,7 +150,7 @@
addParameter("doubleListValue", doubleListValue);
}else if (tmpDoubleList instanceof Map) {
- addParameter("doubleListValue", "value");
+ addParameter("doubleListValue", "value");
}
@@ -176,7 +179,7 @@
addParameter("doubleNameValue", findValue(doubleName.toString()));
}
}
-
+
Form form = (Form) findAncestor(Form.class);
if (doubleId != null) {
// this check is needed for backwards compatibility with 2.1.x
@@ -188,78 +191,78 @@
} else if (form != null) {
addParameter("doubleId", form.getParameters().get("id") + "_" +escape(this.doubleName));
}
-
+
if (doubleOnclick != null) {
- addParameter("doubleOnclick", findString(doubleOnclick));
+ addParameter("doubleOnclick", findString(doubleOnclick));
}
-
+
if (doubleOndblclick != null) {
- addParameter("doubleOndblclick", findString(doubleOndblclick));
+ addParameter("doubleOndblclick", findString(doubleOndblclick));
}
-
+
if (doubleOnmousedown != null) {
- addParameter("doubleOnmousedown", findString(doubleOnmousedown));
+ addParameter("doubleOnmousedown", findString(doubleOnmousedown));
}
-
+
if (doubleOnmouseup != null) {
- addParameter("doubleOnmouseup", findString(doubleOnmouseup));
+ addParameter("doubleOnmouseup", findString(doubleOnmouseup));
}
-
+
if (doubleOnmouseover != null) {
- addParameter("doubleOnmouseover", findString(doubleOnmouseover));
+ addParameter("doubleOnmouseover", findString(doubleOnmouseover));
}
-
+
if (doubleOnmousemove != null) {
- addParameter("doubleOnmousemove", findString(doubleOnmousemove));
+ addParameter("doubleOnmousemove", findString(doubleOnmousemove));
}
-
+
if (doubleOnmouseout != null) {
- addParameter("doubleOnmouseout", findString(doubleOnmouseout));
+ addParameter("doubleOnmouseout", findString(doubleOnmouseout));
}
-
+
if (doubleOnfocus != null) {
- addParameter("doubleOnfocus", findString(doubleOnfocus));
+ addParameter("doubleOnfocus", findString(doubleOnfocus));
}
-
+
if (doubleOnblur != null) {
- addParameter("doubleOnblur", findString(doubleOnblur));
+ addParameter("doubleOnblur", findString(doubleOnblur));
}
-
+
if (doubleOnkeypress != null) {
- addParameter("doubleOnkeypress", findString(doubleOnkeypress));
+ addParameter("doubleOnkeypress", findString(doubleOnkeypress));
}
-
+
if (doubleOnkeydown != null) {
- addParameter("doubleOnkeydown", findString(doubleOnkeydown));
+ addParameter("doubleOnkeydown", findString(doubleOnkeydown));
}
-
+
if (doubleOnselect != null) {
- addParameter("doubleOnselect", findString(doubleOnselect));
+ addParameter("doubleOnselect", findString(doubleOnselect));
}
-
+
if (doubleOnchange != null) {
- addParameter("doubleOnchange", findString(doubleOnchange));
+ addParameter("doubleOnchange", findString(doubleOnchange));
}
-
+
if (doubleCssClass != null) {
- addParameter("doubleCss", findString(doubleCssClass));
+ addParameter("doubleCss", findString(doubleCssClass));
}
-
+
if (doubleCssStyle != null) {
- addParameter("doubleStyle", findString(doubleCssStyle));
+ addParameter("doubleStyle", findString(doubleCssStyle));
}
-
+
if (doubleHeaderKey != null && doubleHeaderValue != null) {
- addParameter("doubleHeaderKey", findString(doubleHeaderKey));
- addParameter("doubleHeaderValue", findString(doubleHeaderValue));
+ addParameter("doubleHeaderKey", findString(doubleHeaderKey));
+ addParameter("doubleHeaderValue", findString(doubleHeaderValue));
}
-
+
if (doubleEmptyOption != null) {
- addParameter("doubleEmptyOption", findValue(doubleEmptyOption, Boolean.class));
+ addParameter("doubleEmptyOption", findValue(doubleEmptyOption, Boolean.class));
}
-
+
if (doubleAccesskey != null) {
- addParameter("doubleAccesskey", findString(doubleAccesskey));
+ addParameter("doubleAccesskey", findString(doubleAccesskey));
}
}
@@ -310,57 +313,57 @@
public void setFormName(String formName) {
this.formName = formName;
}
-
+
public String getFormName() {
- return formName;
+ return formName;
}
-
+
/**
* The css class for the second list
* @s.tagattribute required="false"
*/
public void setDoubleCssClass(String doubleCssClass) {
- this.doubleCssClass = doubleCssClass;
+ this.doubleCssClass = doubleCssClass;
}
-
+
public String getDoubleCssClass() {
- return doubleCssClass;
+ return doubleCssClass;
}
-
+
/**
* The css style for the second list
* @s.tagattribute required="false"
*/
public void setDoubleCssStyle(String doubleCssStyle) {
- this.doubleCssStyle = doubleCssStyle;
+ this.doubleCssStyle = doubleCssStyle;
}
-
+
public String getDoubleCssStyle() {
- return doubleCssStyle;
+ return doubleCssStyle;
}
-
+
/**
* The header key for the second list
* @s.tagattribute required="false"
*/
public void setDoubleHeaderKey(String doubleHeaderKey) {
- this.doubleHeaderKey = doubleHeaderKey;
+ this.doubleHeaderKey = doubleHeaderKey;
}
-
+
public String getDoubleHeaderKey() {
- return doubleHeaderKey;
+ return doubleHeaderKey;
}
-
+
/**
* The header value for the second list
* @s.tagattribute required="false"
*/
public void setDoubleHeaderValue(String doubleHeaderValue) {
- this.doubleHeaderValue = doubleHeaderValue;
+ this.doubleHeaderValue = doubleHeaderValue;
}
-
+
public String getDoubleHeaderValue() {
- return doubleHeaderValue;
+ return doubleHeaderValue;
}
/**
@@ -368,255 +371,255 @@
* @s.tagattribute required="false"
*/
public void setDoubleEmptyOption(String doubleEmptyOption) {
- this.doubleEmptyOption = doubleEmptyOption;
+ this.doubleEmptyOption = doubleEmptyOption;
}
-
+
public String getDoubleEmptyOption() {
- return this.doubleEmptyOption;
+ return this.doubleEmptyOption;
}
-
- public String getDoubleDisabled() {
- return doubleDisabled;
- }
- /**
+ public String getDoubleDisabled() {
+ return doubleDisabled;
+ }
+
+ /**
* Decides if a disable attribute should be added to the second list
* @s.tagattribute required="false"
*/
- public void setDoubleDisabled(String doubleDisabled) {
- this.doubleDisabled = doubleDisabled;
- }
-
- public String getDoubleId() {
- return doubleId;
- }
+ public void setDoubleDisabled(String doubleDisabled) {
+ this.doubleDisabled = doubleDisabled;
+ }
- /**
+ public String getDoubleId() {
+ return doubleId;
+ }
+
+ /**
* The id of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleId(String doubleId) {
- this.doubleId = doubleId;
- }
-
- public String getDoubleMultiple() {
- return doubleMultiple;
- }
+ public void setDoubleId(String doubleId) {
+ this.doubleId = doubleId;
+ }
- /**
+ public String getDoubleMultiple() {
+ return doubleMultiple;
+ }
+
+ /**
* Decides if multiple attribute should be set on the second list
* @s.tagattribute required="false"
*/
- public void setDoubleMultiple(String doubleMultiple) {
- this.doubleMultiple = doubleMultiple;
- }
-
- public String getDoubleOnblur() {
- return doubleOnblur;
- }
+ public void setDoubleMultiple(String doubleMultiple) {
+ this.doubleMultiple = doubleMultiple;
+ }
- /**
+ public String getDoubleOnblur() {
+ return doubleOnblur;
+ }
+
+ /**
* Set the onblur attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnblur(String doubleOnblur) {
- this.doubleOnblur = doubleOnblur;
- }
-
- public String getDoubleOnchange() {
- return doubleOnchange;
- }
+ public void setDoubleOnblur(String doubleOnblur) {
+ this.doubleOnblur = doubleOnblur;
+ }
- /**
+ public String getDoubleOnchange() {
+ return doubleOnchange;
+ }
+
+ /**
* Set the onchange attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnchange(String doubleOnchange) {
- this.doubleOnchange = doubleOnchange;
- }
-
- public String getDoubleOnclick() {
- return doubleOnclick;
- }
+ public void setDoubleOnchange(String doubleOnchange) {
+ this.doubleOnchange = doubleOnchange;
+ }
- /**
+ public String getDoubleOnclick() {
+ return doubleOnclick;
+ }
+
+ /**
* Set the onclick attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnclick(String doubleOnclick) {
- this.doubleOnclick = doubleOnclick;
- }
-
- public String getDoubleOndblclick() {
- return doubleOndblclick;
- }
+ public void setDoubleOnclick(String doubleOnclick) {
+ this.doubleOnclick = doubleOnclick;
+ }
- /**
+ public String getDoubleOndblclick() {
+ return doubleOndblclick;
+ }
+
+ /**
* Set the ondbclick attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOndblclick(String doubleOndblclick) {
- this.doubleOndblclick = doubleOndblclick;
- }
-
- public String getDoubleOnfocus() {
- return doubleOnfocus;
- }
+ public void setDoubleOndblclick(String doubleOndblclick) {
+ this.doubleOndblclick = doubleOndblclick;
+ }
- /**
+ public String getDoubleOnfocus() {
+ return doubleOnfocus;
+ }
+
+ /**
* Set the onfocus attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnfocus(String doubleOnfocus) {
- this.doubleOnfocus = doubleOnfocus;
- }
-
- public String getDoubleOnkeydown() {
- return doubleOnkeydown;
- }
+ public void setDoubleOnfocus(String doubleOnfocus) {
+ this.doubleOnfocus = doubleOnfocus;
+ }
+
+ public String getDoubleOnkeydown() {
+ return doubleOnkeydown;
+ }
- /**
+ /**
* Set the onkeydown attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnkeydown(String doubleOnkeydown) {
- this.doubleOnkeydown = doubleOnkeydown;
- }
-
- public String getDoubleOnkeypress() {
- return doubleOnkeypress;
- }
+ public void setDoubleOnkeydown(String doubleOnkeydown) {
+ this.doubleOnkeydown = doubleOnkeydown;
+ }
- /**
+ public String getDoubleOnkeypress() {
+ return doubleOnkeypress;
+ }
+
+ /**
* Set the onkeypress attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnkeypress(String doubleOnkeypress) {
- this.doubleOnkeypress = doubleOnkeypress;
- }
-
- public String getDoubleOnkeyup() {
- return doubleOnkeyup;
- }
+ public void setDoubleOnkeypress(String doubleOnkeypress) {
+ this.doubleOnkeypress = doubleOnkeypress;
+ }
+
+ public String getDoubleOnkeyup() {
+ return doubleOnkeyup;
+ }
- /**
+ /**
* Set the onkeyup attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnkeyup(String doubleOnkeyup) {
- this.doubleOnkeyup = doubleOnkeyup;
- }
-
- public String getDoubleOnmousedown() {
- return doubleOnmousedown;
- }
+ public void setDoubleOnkeyup(String doubleOnkeyup) {
+ this.doubleOnkeyup = doubleOnkeyup;
+ }
+
+ public String getDoubleOnmousedown() {
+ return doubleOnmousedown;
+ }
- /**
+ /**
* Set the onmousedown attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnmousedown(String doubleOnmousedown) {
- this.doubleOnmousedown = doubleOnmousedown;
- }
-
- public String getDoubleOnmousemove() {
- return doubleOnmousemove;
- }
+ public void setDoubleOnmousedown(String doubleOnmousedown) {
+ this.doubleOnmousedown = doubleOnmousedown;
+ }
+
+ public String getDoubleOnmousemove() {
+ return doubleOnmousemove;
+ }
- /**
+ /**
* Set the onmousemove attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnmousemove(String doubleOnmousemove) {
- this.doubleOnmousemove = doubleOnmousemove;
- }
-
- public String getDoubleOnmouseout() {
- return doubleOnmouseout;
- }
+ public void setDoubleOnmousemove(String doubleOnmousemove) {
+ this.doubleOnmousemove = doubleOnmousemove;
+ }
- /**
+ public String getDoubleOnmouseout() {
+ return doubleOnmouseout;
+ }
+
+ /**
* Set the onmouseout attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnmouseout(String doubleOnmouseout) {
- this.doubleOnmouseout = doubleOnmouseout;
- }
-
- public String getDoubleOnmouseover() {
- return doubleOnmouseover;
- }
+ public void setDoubleOnmouseout(String doubleOnmouseout) {
+ this.doubleOnmouseout = doubleOnmouseout;
+ }
+
+ public String getDoubleOnmouseover() {
+ return doubleOnmouseover;
+ }
- /**
+ /**
* Set the onmouseover attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnmouseover(String doubleOnmouseover) {
- this.doubleOnmouseover = doubleOnmouseover;
- }
-
- public String getDoubleOnmouseup() {
- return doubleOnmouseup;
- }
+ public void setDoubleOnmouseover(String doubleOnmouseover) {
+ this.doubleOnmouseover = doubleOnmouseover;
+ }
+
+ public String getDoubleOnmouseup() {
+ return doubleOnmouseup;
+ }
- /**
+ /**
* Set the onmouseup attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnmouseup(String doubleOnmouseup) {
- this.doubleOnmouseup = doubleOnmouseup;
- }
-
- public String getDoubleOnselect() {
- return doubleOnselect;
- }
+ public void setDoubleOnmouseup(String doubleOnmouseup) {
+ this.doubleOnmouseup = doubleOnmouseup;
+ }
+
+ public String getDoubleOnselect() {
+ return doubleOnselect;
+ }
- /**
+ /**
* Set the onselect attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleOnselect(String doubleOnselect) {
- this.doubleOnselect = doubleOnselect;
- }
-
- public String getDoubleSize() {
- return doubleSize;
- }
+ public void setDoubleOnselect(String doubleOnselect) {
+ this.doubleOnselect = doubleOnselect;
+ }
+
+ public String getDoubleSize() {
+ return doubleSize;
+ }
- /**
+ /**
* Set the size attribute of the second list
* @s.tagattribute required="false"
*/
- public void setDoubleSize(String doubleSize) {
- this.doubleSize = doubleSize;
- }
-
- public String getDoubleList() {
- return doubleList;
- }
+ public void setDoubleSize(String doubleSize) {
+ this.doubleSize = doubleSize;
+ }
+
+ public String getDoubleList() {
+ return doubleList;
+ }
- /**
+ /**
* Set the list key of the second attribute
* @s.tagattribute required="false"
*/
- public String getDoubleListKey() {
- return doubleListKey;
- }
-
- public String getDoubleListValue() {
- return doubleListValue;
- }
-
- public String getDoubleName() {
- return doubleName;
- }
-
- public String getDoubleValue() {
- return doubleValue;
- }
-
- /**
+ public String getDoubleListKey() {
+ return doubleListKey;
+ }
+
+ public String getDoubleListValue() {
+ return doubleListValue;
+ }
+
+ public String getDoubleName() {
+ return doubleName;
+ }
+
+ public String getDoubleValue() {
+ return doubleValue;
+ }
+
+ /**
* Decides of an empty option is to be inserted in the second list
* @s.tagattribute required="false" default="false" type="Boolean"
*/
@@ -656,12 +659,12 @@
public void setSize(String size) {
this.size = size;
}
-
+
/**
* Set the html accesskey attribute.
* @s.tagattribute required="false"
*/
public void setDoubleAccesskey(String doubleAccesskey) {
- this.doubleAccesskey = 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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -40,13 +43,13 @@
* <pre>
* <!-- START SNIPPET: example -->
* <s:if test="%{false}">
- * <div>Will Not Be Executed</div>
+ * <div>Will Not Be Executed</div>
* </s:if>
- * <s:elseif test="%{true}">
- * <div>Will Be Executed</div>
+ * <s:elseif test="%{true}">
+ * <div>Will Be Executed</div>
* </s:elseif>
* <s:else>
- * <div>Will Not Be Executed</div>
+ * <div>Will Not Be Executed</div>
* </s:else>
* <!-- END SNIPPET: example -->
* </pre>
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -44,13 +47,13 @@
* <pre>
* <!-- START SNIPPET: example -->
* <s:if test="%{false}">
- * <div>Will Not Be Executed</div>
+ * <div>Will Not Be Executed</div>
* </s:if>
- * <s:elseif test="%{true}">
- * <div>Will Be Executed</div>
+ * <s:elseif test="%{true}">
+ * <div>Will Be Executed</div>
* </s:elseif>
* <s:else>
- * <div>Will Not Be Executed</div>
+ * <div>Will Not Be Executed</div>
* </s:else>
* <!-- END SNIPPET: example -->
* </pre>
@@ -67,7 +70,7 @@
public boolean start(Writer writer) {
Boolean ifResult = (Boolean) stack.getContext().get(If.ANSWER);
-
+
if ((ifResult == null) || (ifResult.booleanValue())) {
return false;
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -38,7 +41,7 @@
*
* <pre>
* <!-- START SNIPPET: example -->
- *
+ *
* <!-- example 1 -->
* <s:fielderror />
*
@@ -54,24 +57,24 @@
* OR
*
* <s:fielderror>
- * <s:param value="%{'field1'}" />
- * <s:param value="%{'field2'}" />
+ * <s:param value="%{'field1'}" />
+ * <s:param value="%{'field2'}" />
* </s:fielderror>
* <s:form .... >>
* ....
* </s:form>
- *
+ *
* <!-- END SNIPPET: example -->
* </pre>
*
*
* <p/> <b>Description</b><p/>
*
- *
+ *
* <pre>
* <!-- START SNIPPET: description -->
*
- * Example 1: display all field errors<p/>
+ * Example 1: display all field errors<p/>
* Example 2: display field errors only for 'field1' and 'field2'<p/>
*
* <!-- END SNIPPET: description -->
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -96,7 +99,7 @@
public static final String TEMPLATE = "form-close";
private int sequence = 0;
-
+
protected String onsubmit;
protected String action;
protected String target;
@@ -180,7 +183,7 @@
addParameter("tagNames", new ArrayList());
}
}
-
+
/**
* Form component determine the its HTML element id as follows:-
* <ol>
@@ -189,16 +192,16 @@
* </ol>
*/
protected void populateComponentHtmlId(Form form) {
- boolean isAjax = "ajax".equalsIgnoreCase(this.theme);
-
- String action = null;
+ 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));
+ addParameter("id", escape(id));
}
if (Dispatcher.getInstance().isPortletSupportActive() && PortletActionContext.isPortletRequest()) {
evaluateExtraParamsPortletRequest(namespace, action);
@@ -301,7 +304,7 @@
}
// WW-1284
- // evaluate if client-side js is to be enabled. (if validation interceptor
+ // evaluate if client-side js is to be enabled. (if validation interceptor
// does allow validation eg. method is not filtered out)
evaluateClientSideJsEnablement(actionName, namespace, actionMethod);
}
@@ -404,16 +407,16 @@
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
+ * 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++;
+ return sequence++;
}
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -42,7 +45,7 @@
//public void evaluateParams() {
public void evaluateExtraParams() {
- super.evaluateExtraParams();
+ super.evaluateExtraParams();
if (align == null) {
align = "right";
}
@@ -80,12 +83,12 @@
addParameter("align", findString(align));
}
-
+
/**
* Override UIBean's implementation, such that component Html id is determined
* in the following order :-
* <ol>
- * <li>This component id attribute</li>
+ * <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>
@@ -100,40 +103,40 @@
if (id != null) {
// this check is needed for backwards compatibility with 2.1.x
if (altSyntax()) {
- _tmp_id = findString(id);
+ _tmp_id = findString(id);
} else {
- _tmp_id = id;
+ _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();
- }
- }
+ 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);
+ addParameter("id", _tmp_id);
}
/**
- * Indicate whether the concrete button supports the type "image".
- *
- * @return <tt>true</tt> if type image is supported.
- */
+ * Indicate whether the concrete button supports the type "image".
+ *
+ * @return <tt>true</tt> if type image is supported.
+ */
protected abstract boolean supportsImageType();
/**
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -26,23 +29,23 @@
/**
* <!-- START SNIPPET: javadoc -->
- *
+ *
* Renders an custom UI widget using the specified templates. Additional objects can be passed in to the template
* using the param tags.<p/>
- *
+ *
* <b>Freemarker:</b><p/>
* 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 <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
* component, they can be accessed as:- <p/>
- *
+ *
* <b>Freemarker:</b><p/>
* $parameters.get('key1') and $parameters.get('key2') or $parameters.key1 and $parameters.key2<p/>
- *
+ *
* <b>Jsp:</b><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/>
@@ -54,7 +57,7 @@
* string literal to your component, make sure to wrap it in quotes i.e. value="'value1'" otherwise, the the value
* stack will search for an Object on the stack with a method of getValue1(). (now that i've written this, i'm not
* entirely sure this is the case. i should verify this manana)<p/>
- *
+ *
* <!-- END SNIPPET: javadoc -->
*
* <p/> <b>Examples</b>
@@ -63,7 +66,7 @@
* <!-- START SNIPPET: example -->
* JSP
* <s:component template="/my/custom/component.vm"/>
- *
+ *
* or
*
* <s:component template="/my/custom/component.vm">
@@ -80,29 +83,29 @@
* #s-param( "name=key1" "value=value1" )
* #s-param( "name=key2" "value=value2" )
* #end
- *
+ *
* Freemarker
* <@s..component template="/my/custom/component.ftl" />
- *
+ *
* or
- *
+ *
* <@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>
- *
+ *
* <p/>
- *
+ *
* <b>NOTE:</b>
* <!-- START SNIPPET: note -->
- *
- * If Jsp is used as the template, the jsp template itself must lie within the
+ *
+ * If Jsp is used as the template, the jsp template itself must lie within the
* webapp itself and not the classpath. Unlike Freemarker or Velocity, JSP template
* could not be picked up from the classpath.
- *
+ *
* <!-- END SNIPPET: note -->
*
* @s.tag name="component" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.ComponentTag"
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -31,48 +34,48 @@
/**
* <!-- START SNIPPET: javadoc -->
- *
+ *
* Gets a resource bundle and place it on the value stack. This allows
* the text tag to access messages from any bundle, and not just the bundle
* associated with the current action.
- *
+ *
* <!-- END SNIPPET: javadoc -->
- *
+ *
* <p/>
- *
+ *
* <!-- START SNIPPET: params-->
- *
+ *
* <ul>
- * <li>name* - the resource bundle's name (eg foo/bar/customBundle)</li>
+ * <li>name* - the resource bundle's name (eg foo/bar/customBundle)</li>
* </ul>
- *
+ *
* <!-- END SNIPPET: params -->
- *
+ *
* <p/>
- *
+ *
* Example:
- *
+ *
* <pre>
* <!-- START SNIPPET: example -->
- *
+ *
* <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>
- *
- *
+ *
+ *
* <pre>
* <!-- START SNIPPET: i18nExample -->
- *
+ *
* <s:i18n name="some.package.bundle" >
* <s:text name="some.key" />
* </s:i18n>
- *
+ *
* <!-- END SNIPPET: i18nExample -->
* </pre>
- *
+ *
* @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"
*/
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?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- 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 Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.components;
@@ -44,13 +47,13 @@
* <pre>
* <!-- START SNIPPET: example -->
* <s:if test="%{false}">
- * <div>Will Not Be Executed</div>
+ * <div>Will Not Be Executed</div>
* </s:if>
- * <s:elseif test="%{true}">
- * <div>Will Be Executed</div>
+ * <s:elseif test="%{true}">
+ * <div>Will Be Executed</div>
* </s:elseif>
* <s:else>
- * <div>Will Not Be Executed</div>
+ * <div>Will Not Be Executed</div>
* </s:else>
* <!-- END SNIPPET: example -->
* </pre>
@@ -89,7 +92,7 @@
}
public boolean end(Writer writer, String body) {
- stack.getContext().put(ANSWER, answer);
+ stack.getContext().put(ANSWER, answer);
return super.end(writer, body);
}
}