You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by mr...@apache.org on 2007/01/07 23:26:25 UTC
svn commit: r493867 - in /struts/struts2/trunk:
apps/showcase/src/main/webapp/ajax/
apps/showcase/src/main/webapp/ajax/datepicker/
apps/showcase/src/main/webapp/ajax/dropdowndatepicker/
apps/showcase/src/main/webapp/ajax/dropdowntimepicker/ apps/showca...
Author: mrdon
Date: Sun Jan 7 14:26:23 2007
New Revision: 493867
URL: http://svn.apache.org/viewvc?view=rev&rev=493867
Log:
Renamed DropDownDateTimePicker to DateTimePicker and got rid of DatePicker and
TimePicker, better aligning Struts 2 with WebWork 2 offerings.
WW-1596
Added:
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DateTimePicker.java
- copied, changed from r493648, struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DatePicker.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java
- copied, changed from r493427, struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DropdownDateTimePickerModel.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java
- copied, changed from r493427, struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DatePickerTag.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java
- copied, changed from r493427, struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DropdownDateTimePickerDirective.java
struts/struts2/trunk/core/src/main/resources/template/css_xhtml/datetimepicker.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/datetimepicker.ftl
struts/struts2/trunk/core/src/site/resources/tags/datetimepicker.html
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java
- copied, changed from r493427, struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DatePickerTagTest.java
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest-1.txt
Removed:
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/datepicker/
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/dropdowndatepicker/
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/dropdowntimepicker/
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/timepicker/
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DatePicker.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DropdownDateTimePicker.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/TimePicker.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DatePickerModel.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DropdownDateTimePickerModel.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/TimePickerModel.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DatePickerTag.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DropdownDateTimePickerTag.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/TimePickerTag.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DatePickerDirective.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DropdownDateTimePickerDirective.java
struts/struts2/trunk/core/src/main/resources/template/css_xhtml/datepicker.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/datepicker.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/dropdowndatetimepicker.ftl
struts/struts2/trunk/core/src/main/resources/template/simple/timepicker.ftl
struts/struts2/trunk/core/src/main/resources/template/xhtml/dropdowndatetimepicker.ftl
struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DatePickerTagTest.java
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/DatePickerTagTest-1.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/DatePickerTagTest-2.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/DropDownTimePicker-1.txt
struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/DropdownDatePicker-1.txt
Modified:
struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/index.jsp
struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.jsp
struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.vm
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java
struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/StrutsModels.java
struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld
struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html
struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/index.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/index.jsp?view=diff&rev=493867&r1=493866&r2=493867
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/index.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/ajax/index.jsp Sun Jan 7 14:26:23 2007
@@ -13,10 +13,6 @@
<li><a href="remotelink">Remote link tag</a></li>
<li><a href="remotebutton">Remote button tag</a></li>
<li><a href="tabbedpanel">Tabbed panel</a></li>
- <li><a href="datepicker">DatePicker</a></li>
- <li><a href="dropdowndatepicker">Dropdown DatePicker</a></li>
- <li><a href="timepicker">TimePicker</a></li>
- <li><a href="dropdowntimepicker">Dropdown TimePicker</a></li>
<li><a href="remoteforms">Remote forms</a></li>
<li><a href="widgets">Widgets </a> (experimental - may not work in all browsers
see the <a href="http://www.dojotoolkit.org">dojo website</a> for more information</li>
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.jsp
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.jsp?view=diff&rev=493867&r1=493866&r2=493867
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.jsp (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.jsp Sun Jan 7 14:26:23 2007
@@ -19,7 +19,7 @@
name="name"
tooltip="Enter your Name here" />
- <s:dropdowndatetimepicker
+ <s:datetimepicker
tooltip="Select Your Birthday"
label="Birthday"
name="birthday" />
Modified: struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.vm
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.vm?view=diff&rev=493867&r1=493866&r2=493867
==============================================================================
--- struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.vm (original)
+++ struts/struts2/trunk/apps/showcase/src/main/webapp/tags/ui/example.vm Sun Jan 7 14:26:23 2007
@@ -12,7 +12,7 @@
#sform ("action=exampleSubmitVelocity" "method=post" "enctype=multipart/form-data")
#stextfield ("label=Name" "name=name")
- #sdropdowndatetimepicker ("label=Birthday" "name=birthday")
+ #sdatetimepicker ("label=Birthday" "name=birthday")
#stextarea ("label=Biograph" "name=bio" "cols=20" "rows=3")
#sselect ("label=Favourite Color" "list={'Red', 'Blue', 'Green'}" "name=favouriteColor" "emptyOption=true" "headerKey=None" "headerValue=None")
#sselect ("label=Favourite Language" "list=favouriteLanguages" "name=favouriteLanguage" "listKey=key" "listValue=description" "emptyOption=true" "headerKey=None" "headerValue=None")
Copied: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DateTimePicker.java (from r493648, 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/DateTimePicker.java?view=diff&rev=493867&p1=struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DatePicker.java&r1=493648&p2=struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/DateTimePicker.java&r2=493867
==============================================================================
--- 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/DateTimePicker.java Sun Jan 7 14:26:23 2007
@@ -20,9 +20,15 @@
*/
package org.apache.struts2.components;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.struts.annotations.StrutsTag;
import org.apache.struts.annotations.StrutsTagAttribute;
@@ -31,15 +37,15 @@
/**
* <!-- START SNIPPET: javadoc -->
* <p>
- * Renders datepicker element.
+ * Renders a date/time picker in a dropdown container.
* </p>
* <p>
- * A stand-alone DatePicker widget that makes it easy to select a date, or increment by week, month,
+ * A stand-alone DateTimePicker widget that makes it easy to select a date/time, or increment by week, month,
* and/or year.
* </p>
* Dates attributes passed in the `RFC 3339` format:
*
- * Renders datepicker element.</p>
+ * Renders date/time picker element.</p>
* Format supported by this component are:-
* <table border="1">
* <tr>
@@ -75,6 +81,14 @@
* <td>Display the last digits of the year</td>
* </tr>
* </table>
+ *
+ * <p>
+ * It is possible to customize the user-visible formatting with either the
+ * formatLength or displayFormat attributes. The value sent to the server is
+ * typically a locale-independent value in a hidden field as defined by the name
+ * attribute. RFC3339 representation is used by default, but other options are
+ * available with saveFormat
+ * </p>
*
* <p/>
*
@@ -86,9 +100,9 @@
* <!-- START SNIPPET: expl1 -->
*
* Example 1:
- * <s:datepicker name="order.date" label="Order Date" />
+ * <s:datetimepicker name="order.date" label="Order Date" />
* Example 2:
- * <s:datepicker name="delivery.date" label="Delivery Date" format="#yyyy-#MM-#dd" />
+ * <s:datetimepicker name="delivery.date" label="Delivery Date" format="#yyyy-#MM-#dd" />
*
* <!-- END SNIPPET: expl1 -->
* </pre>
@@ -103,16 +117,26 @@
* <pre>
* <!-- START SNIPPET: expl2 -->
*
- * <s:datepicker name="birthday" label="Birthday" templateCss="...." />
+ * <s:datetimepicker name="birthday" label="Birthday" templateCss="...." />
*
* <!-- END SNIPPET: expl2 -->
* </pre>
*
*/
-@StrutsTag(name="datepicker", tldTagClass="org.apache.struts2.views.jsp.ui.DatePickerTag", description="Render datepicker")
-public class DatePicker extends UIBean {
+@StrutsTag(name="datetimepicker", tldTagClass="org.apache.struts2.views.jsp.ui.DateTimePickerTag", description="Render datetimepicker")
+public class DateTimePicker extends UIBean {
- final public static String TEMPLATE = "datepicker";
+ final public static String TEMPLATE = "datetimepicker";
+ final private static SimpleDateFormat RFC3399_FORMAT = new SimpleDateFormat(
+ "yyyy-MM-dd'T'HH:mm:ss");
+ final protected static Log LOG = LogFactory.getLog(DateTimePicker.class);
+
+ protected String iconPath;
+ protected String formatLength;
+ protected String displayFormat;
+ protected String toggleType;
+ protected String toggleDuration;
+ protected String type;
protected String displayWeeks;
protected String adjustWeeks;
@@ -123,7 +147,7 @@
protected String dayWidth;
protected String language;
- public DatePicker(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
+ public DateTimePicker(ValueStack stack, HttpServletRequest request, HttpServletResponse response) {
super(stack, request, response);
}
@@ -152,6 +176,34 @@
addParameter("language", findString(language));
if(value != null)
addParameter("value", findString(value));
+ if(iconPath != null)
+ addParameter("iconPath", iconPath);
+ if(formatLength != null)
+ addParameter("formatLength", findString(formatLength));
+ if(displayFormat != null)
+ addParameter("displayFormat", findString(displayFormat));
+ if(toggleType != null)
+ addParameter("toggleType", findString(toggleType));
+ if(toggleDuration != null)
+ addParameter("toggleDuration", findValue(toggleDuration,
+ Integer.class));
+ if(type != null)
+ addParameter("type", findString(type));
+ else
+ addParameter("type", "date");
+
+ // format the value to RFC 3399
+ if(parameters.containsKey("value")) {
+ parameters.put("nameValue", format(parameters.get("value")));
+ } else {
+ if(name != null) {
+ String expr = name;
+ if(altSyntax()) {
+ expr = "%{" + expr + "}";
+ }
+ addParameter("nameValue", format(findValue(expr)));
+ }
+ }
}
@StrutsTagAttribute(description="If true, weekly size of calendar changes to acomodate the month if false," +
@@ -193,6 +245,68 @@
@StrutsTagAttribute(description="Language to display this widget in", defaultValue="brower's specified preferred language")
public void setLanguage(String language) {
this.language = language;
+ }
+
+ @StrutsTagAttribute(description="A pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy")
+ public void setDisplayFormat(String displayFormat) {
+ this.displayFormat = displayFormat;
+ }
+
+ @StrutsTagAttribute(description="Type of formatting used for visual display. Possible values are " +
+ "long, short, medium or full", defaultValue="short")
+ public void setFormatLength(String formatLength) {
+ this.formatLength = formatLength;
+ }
+
+ @StrutsTagAttribute(description=" Path to icon used for the dropdown")
+ public void setIconPath(String iconPath) {
+ this.iconPath = iconPath;
+ }
+
+ @StrutsTagAttribute(description="Duration of toggle in milliseconds", type="Integer", defaultValue="100")
+ public void setToggleDuration(String toggleDuration) {
+ this.toggleDuration = toggleDuration;
+ }
+
+ @StrutsTagAttribute(description="Defines the type of the picker on the dropdown. Possible values are 'date'" +
+ " for a DateTimePicker, and 'time' for a timePicker", defaultValue="date")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @StrutsTagAttribute(description="oggle type of the dropdown. Possible values are plain,wipe,explode,fade", defaultValue="plain")
+ public void setToggleType(String toggleType) {
+ this.toggleType = toggleType;
+ }
+
+ private String format(Object obj) {
+ if(obj == null)
+ return null;
+
+ if(obj instanceof Date) {
+ return RFC3399_FORMAT.format((Date) obj);
+ } else {
+ // try to parse a date
+ String dateStr = obj.toString();
+ if(dateStr.equalsIgnoreCase("today"))
+ return RFC3399_FORMAT.format(new Date());
+
+ try {
+ Date date = null;
+ if(this.displayFormat != null) {
+ SimpleDateFormat format = new SimpleDateFormat(
+ this.displayFormat);
+ date = format.parse(dateStr);
+ } else {
+ // last resource
+ date = SimpleDateFormat.getInstance().parse(dateStr);
+ }
+ return RFC3399_FORMAT.format(date);
+ } catch (ParseException e) {
+ LOG.error("Could not parse date", e);
+ return dateStr;
+ }
+ }
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java?view=diff&rev=493867&r1=493866&r2=493867
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/DefaultTagLibrary.java Sun Jan 7 14:26:23 2007
@@ -18,10 +18,9 @@
import org.apache.struts2.views.velocity.components.ComboBoxDirective;
import org.apache.struts2.views.velocity.components.ComponentDirective;
import org.apache.struts2.views.velocity.components.DateDirective;
-import org.apache.struts2.views.velocity.components.DatePickerDirective;
import org.apache.struts2.views.velocity.components.DivDirective;
import org.apache.struts2.views.velocity.components.DoubleSelectDirective;
-import org.apache.struts2.views.velocity.components.DropdownDateTimePickerDirective;
+import org.apache.struts2.views.velocity.components.DateTimePickerDirective;
import org.apache.struts2.views.velocity.components.FieldErrorDirective;
import org.apache.struts2.views.velocity.components.FileDirective;
import org.apache.struts2.views.velocity.components.FormDirective;
@@ -73,8 +72,7 @@
ComboBoxDirective.class,
ComponentDirective.class,
DateDirective.class,
- DatePickerDirective.class,
- DropdownDateTimePickerDirective.class,
+ DateTimePickerDirective.class,
DivDirective.class,
AutocompleterDirective.class,
DoubleSelectDirective.class,
Copied: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java (from r493427, struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DropdownDateTimePickerModel.java)
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java?view=diff&rev=493867&p1=struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DropdownDateTimePickerModel.java&r1=493427&p2=struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java&r2=493867
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DropdownDateTimePickerModel.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/DateTimePickerModel.java Sun Jan 7 14:26:23 2007
@@ -21,20 +21,20 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
-import org.apache.struts2.components.DropdownDateTimePicker;
+import org.apache.struts2.components.DateTimePicker;
import com.opensymphony.xwork2.util.ValueStack;
/**
* @see DropdownDateTimePicker
*/
-public class DropdownDateTimePickerModel extends TextFieldModel {
+public class DateTimePickerModel extends TextFieldModel {
- public DropdownDateTimePickerModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
+ public DateTimePickerModel(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
super(stack, req, res);
}
protected Component getBean() {
- return new DropdownDateTimePicker(stack, req, res);
+ return new DateTimePicker(stack, req, res);
}
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/StrutsModels.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/StrutsModels.java?view=diff&rev=493867&r1=493866&r2=493867
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/StrutsModels.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/tags/StrutsModels.java Sun Jan 7 14:26:23 2007
@@ -41,8 +41,7 @@
protected ComboBoxModel comboBox;
protected ComponentModel component;
protected DateModel date;
- protected DatePickerModel datepicker;
- protected DropdownDateTimePickerModel dropdownDateTimePicker;
+ protected DateTimePickerModel dateTimePicker;
protected DivModel div;
protected DoubleSelectModel doubleselect;
protected FileModel file;
@@ -80,7 +79,6 @@
protected IfModel ifModel;
protected ElseModel elseModel;
protected ElseIfModel elseIfModel;
- protected TimePickerModel timePickerModel;
protected AutocompleterModel autocompleterModel;
@@ -241,20 +239,12 @@
return date;
}
- public DatePickerModel getDatePicker() {
- if (datepicker == null) {
- datepicker = new DatePickerModel(stack, req, res);
+ public DateTimePickerModel getDropdownDateTimePicker() {
+ if (dateTimePicker == null) {
+ dateTimePicker = new DateTimePickerModel(stack, req, res);
}
- return datepicker;
- }
-
- public DropdownDateTimePickerModel getDropdownDateTimePicker() {
- if (dropdownDateTimePicker == null) {
- dropdownDateTimePicker = new DropdownDateTimePickerModel(stack, req, res);
- }
-
- return dropdownDateTimePicker;
+ return dateTimePicker;
}
public TokenModel getToken() {
@@ -464,12 +454,5 @@
elseIfModel = new ElseIfModel(stack, req, res);
}
return elseIfModel;
- }
-
- public TimePickerModel getTimepicker() {
- if (timePickerModel == null) {
- timePickerModel = new TimePickerModel(stack, req, res);
- }
- return timePickerModel;
}
}
Copied: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java (from r493427, struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DatePickerTag.java)
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java?view=diff&rev=493867&p1=struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DatePickerTag.java&r1=493427&p2=struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java&r2=493867
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DatePickerTag.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/ui/DateTimePickerTag.java Sun Jan 7 14:26:23 2007
@@ -24,14 +24,14 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
-import org.apache.struts2.components.DatePicker;
+import org.apache.struts2.components.DateTimePicker;
import com.opensymphony.xwork2.util.ValueStack;
/**
- * @see DatePicker
+ * @see DateTimePicker
*/
-public class DatePickerTag extends AbstractUITag {
+public class DateTimePickerTag extends AbstractUITag {
private static final long serialVersionUID = 4054114507143447232L;
@@ -43,23 +43,36 @@
protected String staticDisplay;
protected String dayWidth;
protected String language;
+
+ protected String iconPath;
+ protected String formatLength;
+ protected String displayFormat;
+ protected String toggleType;
+ protected String toggleDuration;
+ protected String type;
public Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
- return new DatePicker(stack, req, res);
+ return new DateTimePicker(stack, req, res);
}
protected void populateParams() {
super.populateParams();
- final DatePicker datePicker = (DatePicker) component;
- datePicker.setAdjustWeeks(adjustWeeks);
- datePicker.setDayWidth(dayWidth);
- datePicker.setDisplayWeeks(displayWeeks);
- datePicker.setEndDate(endDate);
- datePicker.setStartDate(startDate);
- datePicker.setStaticDisplay(staticDisplay);
- datePicker.setWeekStartsOn(weekStartsOn);
- datePicker.setLanguage(language);
+ final DateTimePicker dateTimePicker = (DateTimePicker) component;
+ dateTimePicker.setAdjustWeeks(adjustWeeks);
+ dateTimePicker.setDayWidth(dayWidth);
+ dateTimePicker.setDisplayWeeks(displayWeeks);
+ dateTimePicker.setEndDate(endDate);
+ dateTimePicker.setStartDate(startDate);
+ dateTimePicker.setStaticDisplay(staticDisplay);
+ dateTimePicker.setWeekStartsOn(weekStartsOn);
+ dateTimePicker.setLanguage(language);
+ dateTimePicker.setIconPath(iconPath);
+ dateTimePicker.setFormatLength(formatLength);
+ dateTimePicker.setDisplayFormat(displayFormat);
+ dateTimePicker.setToggleType(toggleType);
+ dateTimePicker.setToggleDuration(toggleDuration);
+ dateTimePicker.setType(type);
}
public void setAdjustWeeks(String adjustWeeks) {
@@ -92,5 +105,29 @@
public void setLanguage(String language) {
this.language = language;
+ }
+
+ public void setDisplayFormat(String displayFormat) {
+ this.displayFormat = displayFormat;
+ }
+
+ public void setFormatLength(String formatLength) {
+ this.formatLength = formatLength;
+ }
+
+ public void setIconPath(String iconPath) {
+ this.iconPath = iconPath;
+ }
+
+ public void setToggleDuration(String toggleDuration) {
+ this.toggleDuration = toggleDuration;
+ }
+
+ public void setToggleType(String toggleType) {
+ this.toggleType = toggleType;
+ }
+
+ public void setType(String type) {
+ this.type = type;
}
}
Copied: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java (from r493427, struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DropdownDateTimePickerDirective.java)
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java?view=diff&rev=493867&p1=struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DropdownDateTimePickerDirective.java&r1=493427&p2=struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java&r2=493867
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DropdownDateTimePickerDirective.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/components/DateTimePickerDirective.java Sun Jan 7 14:26:23 2007
@@ -21,21 +21,20 @@
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.components.Component;
-import org.apache.struts2.components.DatePicker;
-import org.apache.struts2.components.DropdownDateTimePicker;
+import org.apache.struts2.components.DateTimePicker;
import com.opensymphony.xwork2.util.ValueStack;
/**
- * @see DatePicker
+ * @see DateTimePicker
*/
-public class DropdownDateTimePickerDirective extends TextFieldDirective {
+public class DateTimePickerDirective extends TextFieldDirective {
protected Component getBean(ValueStack stack, HttpServletRequest req, HttpServletResponse res) {
- return new DropdownDateTimePicker(stack, req, res);
+ return new DateTimePicker(stack, req, res);
}
public String getBeanName() {
- return "dropdowndatetimepicker";
+ return "datetimepicker";
}
}
Modified: struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld?view=diff&rev=493867&r1=493866&r2=493867
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld (original)
+++ struts/struts2/trunk/core/src/main/resources/META-INF/struts-tags.tld Sun Jan 7 14:26:23 2007
@@ -1866,10 +1866,10 @@
</attribute>
</tag>
<tag>
- <name>datepicker</name>
- <tag-class>org.apache.struts2.views.jsp.ui.DatePickerTag</tag-class>
+ <name>datetimepicker</name>
+ <tag-class>org.apache.struts2.views.jsp.ui.DateTimePickerTag</tag-class>
<body-content>JSP</body-content>
- <description><![CDATA[Render datepicker]]></description>
+ <description><![CDATA[Render datetimepicker]]></description>
<attribute>
<name>accesskey</name>
<required>false</required>
@@ -1907,6 +1907,12 @@
<description><![CDATA[Set the html disabled attribute on rendered html element]]></description>
</attribute>
<attribute>
+ <name>displayFormat</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <description><![CDATA[A pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy]]></description>
+ </attribute>
+ <attribute>
<name>displayWeeks</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -1919,6 +1925,18 @@
<description><![CDATA[Last available date in the calendar set]]></description>
</attribute>
<attribute>
+ <name>formatLength</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <description><![CDATA[Type of formatting used for visual display. Possible values are long, short, medium or full]]></description>
+ </attribute>
+ <attribute>
+ <name>iconPath</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <description><![CDATA[ Path to icon used for the dropdown]]></description>
+ </attribute>
+ <attribute>
<name>id</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -2093,6 +2111,18 @@
<description><![CDATA[Set the html title attribute on rendered html element]]></description>
</attribute>
<attribute>
+ <name>toggleDuration</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <description><![CDATA[Duration of toggle in milliseconds]]></description>
+ </attribute>
+ <attribute>
+ <name>toggleType</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <description><![CDATA[oggle type of the dropdown. Possible values are plain,wipe,explode,fade]]></description>
+ </attribute>
+ <attribute>
<name>tooltip</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -2105,6 +2135,12 @@
<description><![CDATA[Set the tooltip configuration]]></description>
</attribute>
<attribute>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <description><![CDATA[Defines the type of the picker on the dropdown. Possible values are 'date' for a DateTimePicker, and 'time' for a timePicker]]></description>
+ </attribute>
+ <attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
@@ -2726,7 +2762,7 @@
<name>doubleListKey</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the list key of the second attribute]]></description>
+ <description><![CDATA[The key expression to use for second list]]></description>
</attribute>
<attribute>
<name>doubleListValue</name>
@@ -3044,289 +3080,13 @@
<name>theme</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The theme (other than default) to use for rendering the element]]></description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html title attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>tooltip</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the tooltip of this particular component]]></description>
- </attribute>
- <attribute>
- <name>tooltipConfig</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the tooltip configuration]]></description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Preset the value of input element.]]></description>
- </attribute>
- </tag>
- <tag>
- <name>dropdowndatetimepicker</name>
- <tag-class>org.apache.struts2.views.jsp.ui.DropdownDateTimePickerTag</tag-class>
- <body-content>JSP</body-content>
- <description><![CDATA[Renders a dropdown picker(datepicker or timepicker)]]></description>
- <attribute>
- <name>accesskey</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html accesskey attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>adjustWeeks</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[If true, weekly size of calendar changes to acomodate the month if false, 42 day format is used]]></description>
- </attribute>
- <attribute>
- <name>cssClass</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The css class to use for element]]></description>
- </attribute>
- <attribute>
- <name>cssStyle</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The css style definitions for element ro use]]></description>
- </attribute>
- <attribute>
- <name>dayWidth</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[How to render the names of the days in the header(narrow, abbr or wide)]]></description>
- </attribute>
- <attribute>
- <name>disabled</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html disabled attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>displayFormat</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[A pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy]]></description>
- </attribute>
- <attribute>
- <name>displayWeeks</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Total weeks to display]]></description>
- </attribute>
- <attribute>
- <name>endDate</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Last available date in the calendar set]]></description>
- </attribute>
- <attribute>
- <name>formatLength</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Type of formatting used for visual display. Possible values are long, short, medium or full]]></description>
- </attribute>
- <attribute>
- <name>iconPath</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[ Path to icon used for the dropdown]]></description>
- </attribute>
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[id for referencing element. For UI and form tags it will be used as HTML id attribute]]></description>
- </attribute>
- <attribute>
- <name>key</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the key (name, value, label) for this particular component]]></description>
- </attribute>
- <attribute>
- <name>label</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Label expression used for rendering a element specific label]]></description>
- </attribute>
- <attribute>
- <name>labelposition</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Define label position of form element (top/left)]]></description>
- </attribute>
- <attribute>
- <name>language</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Language to display this widget in]]></description>
- </attribute>
- <attribute>
- <name>name</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The name to set for element]]></description>
- </attribute>
- <attribute>
- <name>onblur</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[ Set the html onblur attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onchange</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onchange attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onclick attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html ondblclick attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onfocus</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onfocus attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onkeydown attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onkeypress attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onkeyup attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmousedown attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmousemove attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmouseout attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmouseover attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmouseup attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onselect</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onselect attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>required</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[If set to true, the rendered element will indicate that input is required]]></description>
- </attribute>
- <attribute>
- <name>requiredposition</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Define required position of required form element (left|right)]]></description>
- </attribute>
- <attribute>
- <name>startDate</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[First available date in the calendar set]]></description>
- </attribute>
- <attribute>
- <name>staticDisplay</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Disable all incremental controls, must pick a date in the current display]]></description>
- </attribute>
- <attribute>
- <name>tabindex</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html tabindex attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>template</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The template (other than default) to use for rendering the element]]></description>
- </attribute>
- <attribute>
- <name>templateDir</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The template directory.]]></description>
- </attribute>
- <attribute>
- <name>theme</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The theme (other than default) to use for rendering the element]]></description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html title attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>toggleDuration</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Duration of toggle in milliseconds]]></description>
+ <description><![CDATA[The theme (other than default) to use for rendering the element]]></description>
</attribute>
<attribute>
- <name>toggleType</name>
+ <name>title</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
- <description><![CDATA[oggle type of the dropdown. Possible values are plain,wipe,explode,fade]]></description>
+ <description><![CDATA[Set the html title attribute on rendered html element]]></description>
</attribute>
<attribute>
<name>tooltip</name>
@@ -3341,23 +3101,11 @@
<description><![CDATA[Set the tooltip configuration]]></description>
</attribute>
<attribute>
- <name>type</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Defines the type of the picker on the dropdown. Possible values are 'date' for a DatePicker, and 'time' for a timePicker]]></description>
- </attribute>
- <attribute>
<name>value</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description><![CDATA[Preset the value of input element.]]></description>
</attribute>
- <attribute>
- <name>weekStartsOn</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Adjusts the first day of the week 0==Sunday..6==Saturday]]></description>
- </attribute>
</tag>
<tag>
<name>else</name>
@@ -5210,7 +4958,7 @@
<name>doubleListKey</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the list key of the second attribute]]></description>
+ <description><![CDATA[The key expression to use for second list]]></description>
</attribute>
<attribute>
<name>doubleListValue</name>
@@ -7647,252 +7395,6 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
<description><![CDATA[Set the tooltip configuration]]></description>
- </attribute>
- <attribute>
- <name>value</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Preset the value of input element.]]></description>
- </attribute>
- </tag>
- <tag>
- <name>timepicker</name>
- <tag-class>org.apache.struts2.views.jsp.ui.TimePickerTag</tag-class>
- <body-content>JSP</body-content>
- <description><![CDATA[Render timepicker]]></description>
- <attribute>
- <name>accesskey</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html accesskey attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>cssClass</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The css class to use for element]]></description>
- </attribute>
- <attribute>
- <name>cssStyle</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The css style definitions for element ro use]]></description>
- </attribute>
- <attribute>
- <name>disabled</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html disabled attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>id</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[id for referencing element. For UI and form tags it will be used as HTML id attribute]]></description>
- </attribute>
- <attribute>
- <name>key</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the key (name, value, label) for this particular component]]></description>
- </attribute>
- <attribute>
- <name>label</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Label expression used for rendering a element specific label]]></description>
- </attribute>
- <attribute>
- <name>labelposition</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Define label position of form element (top/left)]]></description>
- </attribute>
- <attribute>
- <name>language</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Language to display this widget in]]></description>
- </attribute>
- <attribute>
- <name>maxLength</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Deprecated. Use maxlength instead.]]></description>
- </attribute>
- <attribute>
- <name>maxlength</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[HTML maxlength attribute]]></description>
- </attribute>
- <attribute>
- <name>name</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The name to set for element]]></description>
- </attribute>
- <attribute>
- <name>onblur</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[ Set the html onblur attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onchange</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onchange attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onclick</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onclick attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>ondblclick</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html ondblclick attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onfocus</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onfocus attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onkeydown</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onkeydown attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onkeypress</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onkeypress attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onkeyup</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onkeyup attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmousedown</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmousedown attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmousemove</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmousemove attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmouseout</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmouseout attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmouseover</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmouseover attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onmouseup</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onmouseup attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>onselect</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html onselect attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>readonly</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Whether the input is readonly]]></description>
- </attribute>
- <attribute>
- <name>required</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[If set to true, the rendered element will indicate that input is required]]></description>
- </attribute>
- <attribute>
- <name>requiredposition</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Define required position of required form element (left|right)]]></description>
- </attribute>
- <attribute>
- <name>size</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[HTML size attribute]]></description>
- </attribute>
- <attribute>
- <name>tabindex</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html tabindex attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>template</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The template (other than default) to use for rendering the element]]></description>
- </attribute>
- <attribute>
- <name>templateDir</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The template directory.]]></description>
- </attribute>
- <attribute>
- <name>theme</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[The theme (other than default) to use for rendering the element]]></description>
- </attribute>
- <attribute>
- <name>title</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the html title attribute on rendered html element]]></description>
- </attribute>
- <attribute>
- <name>tooltip</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the tooltip of this particular component]]></description>
- </attribute>
- <attribute>
- <name>tooltipConfig</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set the tooltip configuration]]></description>
- </attribute>
- <attribute>
- <name>useDefaultMinutes</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set default minutes to current time]]></description>
- </attribute>
- <attribute>
- <name>useDefaultTime</name>
- <required>false</required>
- <rtexprvalue>true</rtexprvalue>
- <description><![CDATA[Set time to current time]]></description>
</attribute>
<attribute>
<name>value</name>
Added: struts/struts2/trunk/core/src/main/resources/template/css_xhtml/datetimepicker.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/css_xhtml/datetimepicker.ftl?view=auto&rev=493867
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/css_xhtml/datetimepicker.ftl (added)
+++ struts/struts2/trunk/core/src/main/resources/template/css_xhtml/datetimepicker.ftl Sun Jan 7 14:26:23 2007
@@ -0,0 +1 @@
+<#include "/${parameters.templateDir}/simple/datetimepicker.ftl" />
\ No newline at end of file
Added: struts/struts2/trunk/core/src/main/resources/template/simple/datetimepicker.ftl
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/simple/datetimepicker.ftl?view=auto&rev=493867
==============================================================================
--- struts/struts2/trunk/core/src/main/resources/template/simple/datetimepicker.ftl (added)
+++ struts/struts2/trunk/core/src/main/resources/template/simple/datetimepicker.ftl Sun Jan 7 14:26:23 2007
@@ -0,0 +1,70 @@
+<script type="text/javascript">
+ dojo.require("dojo.widget.DatePicker");
+</script>
+<div
+ <#if parameters.type?if_exists == "date">
+ dojoType="dropdowndatepicker"<#rt/>
+ <#else>
+ dojoType="dropdowntimepicker"<#rt/>
+ </#if>
+ <#if parameters.id?if_exists != "">
+ id="${parameters.id?html}"<#rt/>
+ </#if>
+ <#if parameters.nameValue?if_exists != "">
+ value="${parameters.nameValue?html}"<#rt/>
+ </#if>
+ <#if parameters.language?if_exists != "">
+ lang="${parameters.language?html}"<#rt/>
+ </#if>
+ <#if parameters.name?if_exists != "">
+ name="dojo.${parameters.name?html}"<#rt/>
+ inputName="${parameters.name?html}"<#rt/>
+ </#if>
+ <#if parameters.displayWeeks?if_exists != "">
+ displayWeeks="${parameters.displayWeeks?html}"<#rt/>
+ </#if>
+ <#if parameters.adjustWeeks?exists>
+ adjustWeeks="${parameters.adjustWeeks?string?html}"<#rt/>
+ </#if>
+ <#if parameters.startDate?if_exists != "">
+ startDate="${parameters.startDate?html}"<#rt/>
+ </#if>
+ <#if parameters.endDate?if_exists != "">
+ endDate="${parameters.endDate?html}"<#rt/>
+ </#if>
+ <#if parameters.weekStartsOn?if_exists != "">
+ weekStartsOn="${parameters.weekStartsOn?html}"<#rt/>
+ </#if>
+ <#if parameters.staticDisplay?exists>
+ staticDisplay="${parameters.staticDisplay?string?html}"<#rt/>
+ </#if>
+ <#if parameters.dayWidth?if_exists != "">
+ dayWidth="${parameters.dayWidth?html}"<#rt/>
+ </#if>
+ <#if parameters.tabindex?if_exists != "">
+ tabindex="${parameters.tabindex?html}"<#rt/>
+ </#if>
+ <#if parameters.cssClass?if_exists != "">
+ class="${parameters.cssClass?html}"<#rt/>
+ </#if>
+ <#if parameters.cssStyle?if_exists != "">
+ style="${parameters.cssStyle?html}"<#rt/>
+ </#if>
+ <#if parameters.iconPath?if_exists != "">
+ iconURL="${parameters.iconPath}"<#rt/>
+ </#if>
+ <#if parameters.formatLength?if_exists != "">
+ formatLength="${parameters.formatLength?html}"<#rt/>
+ </#if>
+ <#if parameters.displayFormat?if_exists != "">
+ displayFormat="${parameters.displayFormat?html}"<#rt/>
+ </#if>
+ <#if parameters.toggleType?if_exists != "">
+ containerToggle="${parameters.toggleType?html}"<#rt/>
+ </#if>
+ <#if parameters.toggleDuration?exists>
+ containerToggleDuration="${parameters.toggleDuration?string?html}"<#rt/>
+ </#if>
+ saveFormat="rfc"<#rt/>
+ <#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
+></div>
Added: struts/struts2/trunk/core/src/site/resources/tags/datetimepicker.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/datetimepicker.html?view=auto&rev=493867
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/datetimepicker.html (added)
+++ struts/struts2/trunk/core/src/site/resources/tags/datetimepicker.html Sun Jan 7 14:26:23 2007
@@ -0,0 +1,410 @@
+<!--
+This file is generated during the build by processing Component class annotations.
+Please do not edit it directly.
+-->
+<html>
+ <head>
+ <title>datetimepicker</title>
+ </head>
+
+ <body>
+ <h1>Tag Name: datetimepicker</h1>
+ <h2>Description</h2>
+ <p>
+ <!-- START SNIPPET: tagdescription -->
+ Render datetimepicker
+ <!-- END SNIPPET: tagdescription -->
+ </p>
+
+ <h2>Attributes</h2>
+ <!-- START SNIPPET: tagattributes -->
+ <table width="100%">
+ <tr>
+ <th align="left" valign="top"><h4>Name</h4></th>
+ <th align="left" valign="top"><h4>Required</h4></th>
+ <th align="left" valign="top"><h4>Default</h4></th>
+ <th align="left" valign="top"><h4>Evaluated</h4></th>
+ <th align="left" valign="top"><h4>Type</h4></th>
+ <th align="left" valign="top"><h4>Description</h4></th>
+ </tr>
+ <tr>
+ <td align="left" valign="top">accesskey</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html accesskey attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">adjustWeeks</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">Boolean</td>
+ <td align="left" valign="top">If true, weekly size of calendar changes to acomodate the month if false, 42 day format is used</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">cssClass</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">The css class to use for element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">cssStyle</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">The css style definitions for element ro use</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">dayWidth</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">narrow</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">How to render the names of the days in the header(narrow, abbr or wide)</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">disabled</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html disabled attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">displayFormat</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">A pattern used for the visual display of the formatted date, e.g. dd/MM/yyyy</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">displayWeeks</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">6</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">Integer</td>
+ <td align="left" valign="top">Total weeks to display</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">endDate</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">2941-10-12</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">Date</td>
+ <td align="left" valign="top">Last available date in the calendar set</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">formatLength</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">short</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Type of formatting used for visual display. Possible values are long, short, medium or full</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">iconPath</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top"> Path to icon used for the dropdown</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">id</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">id for referencing element. For UI and form tags it will be used as HTML id attribute</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">key</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the key (name, value, label) for this particular component</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">label</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Label expression used for rendering a element specific label</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">labelposition</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Define label position of form element (top/left)</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">language</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">brower's specified preferred language</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Language to display this widget in</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">name</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">The name to set for element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onblur</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top"> Set the html onblur attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onchange</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onchange attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onclick</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onclick attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">ondblclick</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html ondblclick attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onfocus</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onfocus attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onkeydown</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onkeydown attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onkeypress</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onkeypress attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onkeyup</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onkeyup attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onmousedown</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onmousedown attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onmousemove</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onmousemove attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onmouseout</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onmouseout attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onmouseover</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onmouseover attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onmouseup</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onmouseup attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">onselect</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html onselect attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">required</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">Boolean</td>
+ <td align="left" valign="top">If set to true, the rendered element will indicate that input is required</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">requiredposition</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Define required position of required form element (left|right)</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">startDate</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">1492-10-12</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">Date</td>
+ <td align="left" valign="top">First available date in the calendar set</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">staticDisplay</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">Boolean</td>
+ <td align="left" valign="top">Disable all incremental controls, must pick a date in the current display</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">tabindex</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html tabindex attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">template</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">The template (other than default) to use for rendering the element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">templateDir</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">The template directory.</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">theme</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">The theme (other than default) to use for rendering the element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">title</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the html title attribute on rendered html element</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">toggleDuration</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">100</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">Integer</td>
+ <td align="left" valign="top">Duration of toggle in milliseconds</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">toggleType</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">plain</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">oggle type of the dropdown. Possible values are plain,wipe,explode,fade</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">tooltip</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the tooltip of this particular component</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">tooltipConfig</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Set the tooltip configuration</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">type</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">date</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Defines the type of the picker on the dropdown. Possible values are 'date' for a DateTimePicker, and 'time' for a timePicker</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">value</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top"></td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">String</td>
+ <td align="left" valign="top">Preset the value of input element.</td>
+ </tr>
+ <tr>
+ <td align="left" valign="top">weekStartsOn</td>
+ <td align="left" valign="top">false</td>
+ <td align="left" valign="top">0</td>
+ <td align="left" valign="top">true</td>
+ <td align="left" valign="top">Integer</td>
+ <td align="left" valign="top">Adjusts the first day of the week 0==Sunday..6==Saturday</td>
+ </tr>
+ </table>
+ <!-- END SNIPPET: tagattributes -->
+ </body>
+</html>
+
Modified: struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html?view=diff&rev=493867&r1=493866&r2=493867
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/doubleselect.html Sun Jan 7 14:26:23 2007
@@ -137,7 +137,7 @@
<td align="left" valign="top"></td>
<td align="left" valign="top">true</td>
<td align="left" valign="top">String</td>
- <td align="left" valign="top">Set the list key of the second attribute</td>
+ <td align="left" valign="top">The key expression to use for second list</td>
</tr>
<tr>
<td align="left" valign="top">doubleListValue</td>
Modified: struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html?view=diff&rev=493867&r1=493866&r2=493867
==============================================================================
--- struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html (original)
+++ struts/struts2/trunk/core/src/site/resources/tags/optiontransferselect.html Sun Jan 7 14:26:23 2007
@@ -241,7 +241,7 @@
<td align="left" valign="top"></td>
<td align="left" valign="top">true</td>
<td align="left" valign="top">String</td>
- <td align="left" valign="top">Set the list key of the second attribute</td>
+ <td align="left" valign="top">The key expression to use for second list</td>
</tr>
<tr>
<td align="left" valign="top">doubleListValue</td>
Copied: struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java (from r493427, struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DatePickerTagTest.java)
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java?view=diff&rev=493867&p1=struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DatePickerTagTest.java&r1=493427&p2=struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java&r2=493867
==============================================================================
--- struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DatePickerTagTest.java (original)
+++ struts/struts2/trunk/core/src/test/java/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest.java Sun Jan 7 14:26:23 2007
@@ -25,7 +25,7 @@
/**
*/
-public class DatePickerTagTest extends AbstractUITagTest {
+public class DateTimePickerTagTest extends AbstractUITagTest {
public void testGenericSimple() throws Exception {
@@ -44,7 +44,7 @@
}
public void testSimple() throws Exception {
- DatePickerTag tag = new DatePickerTag();
+ DateTimePickerTag tag = new DateTimePickerTag();
tag.setPageContext(pageContext);
tag.setId("id");
@@ -62,7 +62,7 @@
tag.doStartTag();
tag.doEndTag();
- verify(DatePickerTagTest.class.getResource("DatePickerTagTest-1.txt"));
+ verify(DateTimePickerTagTest.class.getResource("DateTimePickerTagTest-1.txt"));
}
}
Added: struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest-1.txt
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest-1.txt?view=auto&rev=493867
==============================================================================
--- struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest-1.txt (added)
+++ struts/struts2/trunk/core/src/test/resources/org/apache/struts2/views/jsp/ui/DateTimePickerTagTest-1.txt Sun Jan 7 14:26:23 2007
@@ -0,0 +1,22 @@
+<tr>
+ <td class="tdLabel"></td>
+ <td>
+ <script type="text/javascript">
+ dojo.require("dojo.widget.DatePicker");
+ </script>
+
+ <div dojoType="dropdowndatepicker"
+ id="id"
+ lang="i"
+ name="dojo.h"
+ inputName="h"
+ displayWeeks="true"
+ adjustWeeks="true"
+ startDate="e"
+ endDate="d"
+ weekStartsOn="g"
+ staticDisplay="false"
+ saveFormat="rfc">
+ </div>
+</td>
+</tr>