You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by sv...@apache.org on 2017/10/17 20:44:15 UTC

[01/20] wicket git commit: WICKET-6200 handle DateTimeParseException; support ZonedDateTime

Repository: wicket
Updated Branches:
  refs/heads/master 9e3e16709 -> 9e028af34


WICKET-6200 handle DateTimeParseException; support ZonedDateTime


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/e5d21dac
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/e5d21dac
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/e5d21dac

Branch: refs/heads/master
Commit: e5d21dac1e9356584ed6d5ff93ef7ab4a403ec8b
Parents: 2f6b59e
Author: Sven Meier <sv...@apache.org>
Authored: Sat Oct 7 09:57:21 2017 +0200
Committer: Sven Meier <sv...@apache.org>
Committed: Tue Oct 17 22:32:39 2017 +0200

----------------------------------------------------------------------
 .../converter/AbstractJavaTimeConverter.java    | 10 +++-
 .../converter/ZonedDateTimeConverter.java       | 50 ++++++++++++++++
 .../converter/LocalDateConverterTest.java       | 11 ++++
 .../converter/LocalDateTimeConverterTest.java   | 11 ++++
 .../converter/LocalTimeConverterTest.java       | 11 ++++
 .../converter/ZonedDateTimeConverterTest.java   | 61 ++++++++++++++++++++
 6 files changed, 153 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/e5d21dac/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/AbstractJavaTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/AbstractJavaTimeConverter.java b/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/AbstractJavaTimeConverter.java
index d870b54..23e5e77 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/AbstractJavaTimeConverter.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/AbstractJavaTimeConverter.java
@@ -17,6 +17,7 @@
 package org.apache.wicket.util.convert.converter;
 
 import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
 import java.time.temporal.Temporal;
 import java.time.temporal.TemporalAccessor;
 import java.util.Locale;
@@ -50,7 +51,14 @@ public abstract class AbstractJavaTimeConverter<T extends Temporal> extends Abst
 		}
 
 		DateTimeFormatter dateTimeFormatter = getDateTimeFormatter(locale);
-		TemporalAccessor temporalAccessor = dateTimeFormatter.parse(value);
+		
+		TemporalAccessor temporalAccessor;
+		try {
+			temporalAccessor = dateTimeFormatter.parse(value);
+		} catch (DateTimeParseException ex) {
+			throw newConversionException("Cannot parse '" + value, value, locale);
+		}
+		
 		return createTemporal(temporalAccessor);
 	}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/e5d21dac/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverter.java b/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverter.java
new file mode 100644
index 0000000..2972b20
--- /dev/null
+++ b/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverter.java
@@ -0,0 +1,50 @@
+/*
+ * 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.wicket.util.convert.converter;
+
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.FormatStyle;
+import java.time.temporal.TemporalAccessor;
+
+/**
+ * Converts to {@link java.time.ZonedDateTime}.
+ */
+public class ZonedDateTimeConverter extends AbstractJavaTimeConverter<ZonedDateTime>
+{
+	private static final long serialVersionUID = 1L;
+
+	private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM);
+
+	@Override
+	protected Class<ZonedDateTime> getTargetType()
+	{
+		return ZonedDateTime.class;
+	}
+
+	@Override
+	protected ZonedDateTime createTemporal(TemporalAccessor temporalAccessor)
+	{
+		return ZonedDateTime.from(temporalAccessor);
+	}
+
+	@Override
+	protected DateTimeFormatter getDateTimeFormatter() {
+		return DATE_TIME_FORMATTER.withZone(ZoneId.systemDefault());
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/e5d21dac/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateConverterTest.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateConverterTest.java b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateConverterTest.java
index 5fceaf6..4058e32 100644
--- a/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateConverterTest.java
+++ b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateConverterTest.java
@@ -22,6 +22,7 @@ import static org.hamcrest.Matchers.is;
 import java.time.LocalDate;
 import java.util.Locale;
 
+import org.apache.wicket.util.convert.ConversionException;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -43,4 +44,14 @@ public class LocalDateConverterTest extends Assert
 		LocalDate date = converter.convertToObject("7/11/16", Locale.ENGLISH);
 		assertThat(date, is(equalTo(LocalDate.of(2016, 7, 11))));
 	}
+	
+	@Test
+	public void convertFails() {
+		LocalDateConverter converter = new LocalDateConverter();
+
+		try {
+			converter.convertToObject("aaa", Locale.ENGLISH);
+		} catch (ConversionException expected) {
+		}
+	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/e5d21dac/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateTimeConverterTest.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateTimeConverterTest.java b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateTimeConverterTest.java
index 05a037e..f9dc8fc 100644
--- a/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateTimeConverterTest.java
+++ b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalDateTimeConverterTest.java
@@ -22,6 +22,7 @@ import static org.hamcrest.Matchers.is;
 import java.time.LocalDateTime;
 import java.util.Locale;
 
+import org.apache.wicket.util.convert.ConversionException;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -43,4 +44,14 @@ public class LocalDateTimeConverterTest extends Assert
 		LocalDateTime date = converter.convertToObject("Jul 11, 2016 1:02:03 AM", Locale.ENGLISH);
 		assertThat(date, is(equalTo(LocalDateTime.of(2016, 7, 11, 1, 2, 3))));
 	}
+	
+	@Test
+	public void convertFails() {
+		LocalDateTimeConverter converter = new LocalDateTimeConverter();
+
+		try {
+			converter.convertToObject("aaa", Locale.ENGLISH);
+		} catch (ConversionException expected) {
+		}
+	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/e5d21dac/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalTimeConverterTest.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalTimeConverterTest.java b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalTimeConverterTest.java
index fcfdaf4..7c36b20 100644
--- a/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalTimeConverterTest.java
+++ b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/LocalTimeConverterTest.java
@@ -22,6 +22,7 @@ import static org.hamcrest.Matchers.is;
 import java.time.LocalTime;
 import java.util.Locale;
 
+import org.apache.wicket.util.convert.ConversionException;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -43,4 +44,14 @@ public class LocalTimeConverterTest extends Assert
 		LocalTime time = converter.convertToObject("01:02:03", Locale.ENGLISH);
 		assertThat(time, is(equalTo(LocalTime.of(1, 2, 3))));
 	}
+	
+	@Test
+	public void convertFails() {
+		LocalTimeConverter converter = new LocalTimeConverter();
+
+		try {
+			converter.convertToObject("aaa", Locale.ENGLISH);
+		} catch (ConversionException expected) {
+		}
+	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/e5d21dac/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverterTest.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverterTest.java b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverterTest.java
new file mode 100644
index 0000000..8d946c5
--- /dev/null
+++ b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverterTest.java
@@ -0,0 +1,61 @@
+/*
+ * 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.wicket.util.convert.converter;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.is;
+
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.util.Locale;
+
+import org.apache.wicket.util.convert.ConversionException;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests for {@link ZonedDateTimeConverter}
+ */
+public class ZonedDateTimeConverterTest extends Assert
+{
+	private ZoneId zone = ZoneId.systemDefault();
+
+	@Test
+	public void convertToString() {
+		ZonedDateTimeConverter converter = new ZonedDateTimeConverter();
+		String date = converter.convertToString(ZonedDateTime.of(2016, 7, 11, 1, 2, 3, 0, zone), Locale.ENGLISH);
+		assertThat(date, is(equalTo("Jul 11, 2016 1:02:03 AM")));
+	}
+
+	@Test
+	public void convertToObject() {
+		ZonedDateTimeConverter converter = new ZonedDateTimeConverter();
+		ZoneId zone = ZoneId.systemDefault();
+		ZonedDateTime date = converter.convertToObject("Jul 11, 2016 1:02:03 AM", Locale.ENGLISH);
+		assertThat(date, is(equalTo(ZonedDateTime.of(2016, 7, 11, 1, 2, 3, 0, zone))));
+	}
+	
+	@Test
+	public void convertFails() {
+		ZonedDateTimeConverter converter = new ZonedDateTimeConverter();
+
+		try {
+			converter.convertToObject("aaa", Locale.ENGLISH);
+		} catch (ConversionException expected) {
+		}
+	}
+}


[17/20] wicket git commit: WICKET-6105 restructured, fixed javadoc

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleDateConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleDateConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleDateConverter.java
deleted file mode 100644
index 79decad..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleDateConverter.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.time.LocalDate;
-import java.time.chrono.IsoChronology;
-import java.time.format.DateTimeFormatter;
-import java.time.format.DateTimeFormatterBuilder;
-import java.time.format.FormatStyle;
-import java.util.Locale;
-
-/**
- * Date converter that uses javax.time and can be configured to take the time zone difference between
- * clients and server into account, and that is configured for a certain date style. The pattern
- * will always be locale specific.
- * <p>
- * This converter is especially suited on a per-component base.
- * </p>
- * 
- * @see org.apache.wicket.extensions.markup.html.form.DateTextField
- * @see java.time.LocalDate
- * @see DateTimeFormatter
- * 
- * @author eelcohillenius
- */
-public class StyleDateConverter extends LocalDateConverter
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Date style to use. See {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}.
-	 */
-	private final FormatStyle dateStyle;
-
-	/**
-	 * Construct. The dateStyle 'S-' (which is the same as {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}) will
-	 * be used for constructing the date format for the current locale.
-	 * 
-	 */
-	public StyleDateConverter()
-	{
-		this(FormatStyle.SHORT);
-	}
-
-	/**
-	 * Construct. The provided pattern will be used as the base format (but they will be localized
-	 * for the current locale) and if null, {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)} will be used.
-	 * 
-	 * @param dateStyle
-	 *            Date style to use. See {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}.
-	 * @throws IllegalArgumentException
-	 *             in case dateStyle is null
-	 */
-	public StyleDateConverter(FormatStyle dateStyle)
-	{
-		super();
-		this.dateStyle = dateStyle;
-	}
-
-	public StyleDateConverter(String dateStyle)
-	{
-		this(parseFormatStyle(dateStyle.charAt(0)));
-	}
-
-	/**
-	 * Gets the optional date pattern.
-	 * 
-	 * @return datePattern
-	 */
-	@Override
-	public final String getPattern(Locale locale)
-	{
-		return DateTimeFormatterBuilder.getLocalizedDateTimePattern(dateStyle, null, IsoChronology.INSTANCE, locale);
-	}
-
-	/**
-	 * @return formatter The formatter for the current conversion
-	 */
-	@Override
-	public DateTimeFormatter getFormat(Locale locale)
-	{
-		return dateStyle == null ? null : DateTimeFormatter.ofLocalizedDate(dateStyle).withLocale(locale);
-	}
-
-	public static FormatStyle parseFormatStyle(char style)
-	{
-		return DateField.parseFormatStyle(style);
-	}
-
-	@Override
-	public LocalDate convertToObject(String value, DateTimeFormatter format, Locale locale) {
-		if (format == null) {
-			return null;
-		}
-		try
-		{
-			return LocalDate.parse(value, format);
-		}
-		catch (RuntimeException e)
-		{
-			throw newConversionException(e, locale);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleTimeConverter.java
deleted file mode 100644
index e95725b..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleTimeConverter.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.time.LocalTime;
-import java.time.chrono.IsoChronology;
-import java.time.format.DateTimeFormatter;
-import java.time.format.DateTimeFormatterBuilder;
-import java.time.format.FormatStyle;
-import java.util.Locale;
-
-/**
- * Date converter that uses javax.time and can be configured to take the time zone difference between
- * clients and server into account, and that is configured for a certain date style. The pattern
- * will always be locale specific.
- * <p>
- * This converter is especially suited on a per-component base.
- * </p>
- * 
- * @see org.apache.wicket.extensions.markup.html.form.DateTextField
- */
-public class StyleTimeConverter extends LocalTimeConverter
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Date style to use. See {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)}.
-	 */
-	private final FormatStyle timeStyle;
-
-	/**
-	 * Construct. The dateStyle 'S-' (which is the same as {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)}) will
-	 * be used for constructing the date format for the current locale.
-	 * 
-	 */
-	public StyleTimeConverter()
-	{
-		this(FormatStyle.SHORT);
-	}
-
-	/**
-	 * Construct. The provided pattern will be used as the base format (but they will be localized
-	 * for the current locale) and if null, {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)} will be used.
-	 * 
-	 * @param timeStyle
-	 *            Date style to use. See {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)}.
-	 * @throws IllegalArgumentException
-	 *             in case dateStyle is null
-	 */
-	public StyleTimeConverter(FormatStyle timeStyle)
-	{
-		super();
-		this.timeStyle = timeStyle;
-	}
-
-	public StyleTimeConverter(String timeStyle)
-	{
-		this(parseFormatStyle(timeStyle.charAt(0)));
-	}
-
-	/**
-	 * Gets the optional time pattern.
-	 * 
-	 * @return timePattern
-	 */
-	@Override
-	public final String getPattern(Locale locale)
-	{
-		return DateTimeFormatterBuilder.getLocalizedDateTimePattern(null, timeStyle, IsoChronology.INSTANCE, locale);
-	}
-
-	/**
-	 * @return formatter The formatter for the current conversion
-	 */
-	@Override
-	public DateTimeFormatter getFormat(Locale locale)
-	{
-		return timeStyle == null ? null : DateTimeFormatter.ofLocalizedTime(timeStyle).withLocale(locale);
-	}
-
-	public static FormatStyle parseFormatStyle(char style)
-	{
-		return TimeField.parseFormatStyle(style);
-	}
-
-	@Override
-	public LocalTime convertToObject(String value, DateTimeFormatter format, Locale locale) {
-		if (format == null) {
-			return null;
-		}
-		try
-		{
-			return LocalTime.parse(value, format);
-		}
-		catch (RuntimeException e)
-		{
-			throw newConversionException(e, locale);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleZonedDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleZonedDateTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleZonedDateTimeConverter.java
deleted file mode 100644
index c186cfe..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleZonedDateTimeConverter.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.time.LocalDate;
-import java.time.ZonedDateTime;
-import java.time.chrono.IsoChronology;
-import java.time.format.DateTimeFormatter;
-import java.time.format.DateTimeFormatterBuilder;
-import java.time.format.FormatStyle;
-import java.util.Locale;
-
-/**
- * Date converter that uses javax.time and can be configured to take the time zone difference between
- * clients and server into account, and that is configured for a certain date style. The pattern
- * will always be locale specific.
- * <p>
- * This converter is especially suited on a per-component base.
- * </p>
- * 
- * @see org.apache.wicket.extensions.markup.html.form.DateTextField
- * @see java.time.ZonedDateTime
- * @see DateTimeFormatter
- * @see java.time.ZoneId
- * 
- * @author eelcohillenius
- */
-public class StyleZonedDateTimeConverter extends ZonedDateTimeConverter
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Date style to use. See {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}.
-	 */
-	private final FormatStyle dateStyle;
-
-	private final FormatStyle timeStyle;
-
-	/**
-	 * Construct. The dateStyle 'S-' (which is the same as {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}) will
-	 * be used for constructing the date format for the current locale. </p> When
-	 * applyTimeZoneDifference is true, the current time is applied on the parsed date, and the date
-	 * will be corrected for the time zone difference between the server and the client. For
-	 * instance, if I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9
-	 * hours ahead. So, if I'm inputting say 12/24 at a couple of hours before midnight, at the
-	 * server it is already 12/25. If this boolean is true, it will be transformed to 12/25, while
-	 * the client sees 12/24. </p>
-	 * 
-	 * @param applyTimeZoneDifference
-	 *            whether to apply the difference in time zones between client and server
-	 */
-	public StyleZonedDateTimeConverter(boolean applyTimeZoneDifference)
-	{
-		this(FormatStyle.SHORT, null, applyTimeZoneDifference);
-	}
-
-	/**
-	 * Construct. The provided pattern will be used as the base format (but they will be localized
-	 * for the current locale) and if null, {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)} will be used. </p>
-	 * When applyTimeZoneDifference is true, the current time is applied on the parsed date, and the
-	 * date will be corrected for the time zone difference between the server and the client. For
-	 * instance, if I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9
-	 * hours ahead. So, if I'm inputting say 12/24 at a couple of hours before midnight, at the
-	 * server it is already 12/25. If this boolean is true, it will be transformed to 12/25, while
-	 * the client sees 12/24. </p>
-	 * 
-	 * @param dateStyle
-	 *            Date style to use. See {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}.
-	 * @param timeStyle
-	 *            Time style to use. See {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)}
-	 * @param applyTimeZoneDifference
-	 *            whether to apply the difference in time zones between client and server
-	 * @throws IllegalArgumentException
-	 *             in case dateStyle is null
-	 */
-	public StyleZonedDateTimeConverter(FormatStyle dateStyle, FormatStyle timeStyle, boolean applyTimeZoneDifference)
-	{
-		super(applyTimeZoneDifference);
-		this.dateStyle = dateStyle;
-		this.timeStyle = timeStyle;
-	}
-
-	public StyleZonedDateTimeConverter(String dateTimeStyle, boolean applyTimeZoneDifference)
-	{
-		this(parseFormatStyle(dateTimeStyle.charAt(0)), parseFormatStyle(dateTimeStyle.charAt(1)), applyTimeZoneDifference);
-	}
-
-	/**
-	 * Gets the optional date pattern.
-	 * 
-	 * @return datePattern
-	 */
-	@Override
-	public final String getPattern(Locale locale)
-	{
-		String localizedDateTimePattern = DateTimeFormatterBuilder.getLocalizedDateTimePattern(dateStyle, timeStyle, IsoChronology.INSTANCE, locale);
-		return localizedDateTimePattern;
-	}
-
-	/**
-	 * @return formatter The formatter for the current conversion
-	 */
-	@Override
-	public DateTimeFormatter getFormat(Locale locale)
-	{
-		DateTimeFormatter df = null;
-		if (dateStyle == null && timeStyle == null) {
-			return df;
-		}
-		if (timeStyle == null)
-		{
-			df = DateTimeFormatter.ofLocalizedDate(dateStyle);
-		}
-		else if (dateStyle == null)
-		{
-			df = DateTimeFormatter.ofLocalizedTime(timeStyle);
-		}
-		else
-		{
-			df = DateTimeFormatter.ofLocalizedDateTime(dateStyle, timeStyle);
-		}
-		return df.withLocale(locale);
-	}
-
-	public static FormatStyle parseFormatStyle(char style)
-	{
-		return DateField.parseFormatStyle(style);
-	}
-
-	@Override
-	public ZonedDateTime convertToObject(String value, DateTimeFormatter format, Locale locale) {
-		if (format == null) {
-			return null;
-		}
-		try
-		{
-			if (timeStyle == null)
-			{
-				LocalDate d = LocalDate.parse(value, format);
-				return ZonedDateTime.of(d.atStartOfDay(), getTimeZone());
-			}
-			else if (dateStyle == null)
-			{
-				// not sure how we can get ZonedDateTime from time
-				return null;
-			}
-			return super.convertToObject(value, format, locale);
-		}
-		catch (RuntimeException e)
-		{
-			throw newConversionException(e, locale);
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.html
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.html b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.html
index 82cb00d..b80249c 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.html
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.html
@@ -16,9 +16,9 @@
    limitations under the License.
 -->
 <wicket:panel xmlns:wicket="http://wicket.apache.org">
-  <span style="white-space: nowrap;">
+  <span>
     <input type="number" wicket:id="hours" size="2" maxlength="2" />
-    <span wicket:id="hoursSeparator">&#160;:</span>
+    <span wicket:id="hoursSeparator"> : </span>
     <input type="number" wicket:id="minutes" size="2" maxlength="2" />
     <select wicket:id="amOrPmChoice"></select>
   </span>

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
index 68af251..976bc49 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
@@ -18,7 +18,6 @@ package org.apache.wicket.extensions.markup.html.form.datetime;
 
 import java.text.DecimalFormat;
 import java.text.NumberFormat;
-import java.text.SimpleDateFormat;
 import java.time.LocalTime;
 import java.time.chrono.IsoChronology;
 import java.time.format.DateTimeFormatterBuilder;
@@ -27,63 +26,49 @@ import java.time.temporal.ChronoField;
 import java.util.Arrays;
 import java.util.Locale;
 
-import org.apache.wicket.AttributeModifier;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
+import org.apache.wicket.core.util.string.CssUtils;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.FormComponentPanel;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.util.convert.ConversionException;
 import org.apache.wicket.util.convert.IConverter;
 import org.apache.wicket.util.convert.converter.IntegerConverter;
-import org.apache.wicket.util.lang.Args;
 import org.apache.wicket.validation.validator.RangeValidator;
 
 /**
- * Works on a {@link java.util.Date} object. Displays a field for hours and a field for minutes, and
- * an AM/PM field. The format (12h/24h) of the hours field depends on the time format of this
+ * Works on a {@link LocalTime} object. Displays a field for hours and a field for minutes, and an
+ * AM/PM field. The format (12h/24h) of the hours field depends on the time format of this
  * {@link TimeField}'s {@link Locale}, as does the visibility of the AM/PM field (see
  * {@link TimeField#use12HourFormat}).
  * 
  * @author eelcohillenius
- * @see TimeField for a variant with just the date field and date picker
  */
-public class TimeField extends FormComponentPanel<LocalTime> implements ITextFormatProvider
+public class TimeField extends FormComponentPanel<LocalTime>
 {
 	private static final long serialVersionUID = 1L;
 
+	public static final String HOURS_CSS_CLASS_KEY = CssUtils.key(TimeField.class, "hours");
+
+	public static final String MINUTES_CSS_CLASS_KEY = CssUtils.key(TimeField.class, "minutes");
+
 	/**
 	 * Enumerated type for different ways of handling the render part of requests.
 	 */
-	public enum AM_PM {
-		/** */
-		AM("AM"),
-
-		/** */
-		PM("PM");
-
-		private  final String value;
-
-		AM_PM(final String name)
-		{
-			value = name;
-		}
-
-		@Override
-		public String toString()
-		{
-			return value;
-		}
+	public enum AM_PM
+	{
+		AM, PM;
 	}
-	protected static final String HOURS = "hours";
-	protected static final String MINUTES = "minutes";
-	protected static final String AM_OR_PM_CHOICE = "amOrPmChoice";
 
-	private static final IConverter<Integer> MINUTES_CONVERTER = new IntegerConverter() {
+	private static final IConverter<Integer> MINUTES_CONVERTER = new IntegerConverter()
+	{
 		private static final long serialVersionUID = 1L;
 
-		protected NumberFormat newNumberFormat(Locale locale) {
+		protected NumberFormat newNumberFormat(Locale locale)
+		{
 			return new DecimalFormat("00");
 		}
 	};
@@ -96,184 +81,67 @@ public class TimeField extends FormComponentPanel<LocalTime> implements ITextFor
 
 	// The dropdown list for AM/PM and it's associated model object
 	private DropDownChoice<AM_PM> amOrPmChoice;
-	private LocalTime time = LocalTime.now();
 
 	/**
-	 * Creates a new TimeField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param timePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @return TimeField
-	 */
-	public static TimeField forTimePattern(String id, IModel<LocalTime> model, String timePattern)
-	{
-		return new TimeField(id, model, new PatternTimeConverter(timePattern));
-	}
-
-	/**
-	 * Creates a new TimeField defaulting to using a short date pattern
+	 * Construct.
 	 * 
 	 * @param id
-	 *            The id of the text field
-	 * @param timePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @return TimeField
+	 *            the component id
 	 */
-	public static TimeField forTimePattern(String id, String timePattern)
+	public TimeField(String id)
 	{
-		return forTimePattern(id, null, timePattern);
+		this(id, null);
 	}
 
 	/**
-	 * Creates a new TimeField using the provided date style.
+	 * Construct.
 	 * 
 	 * @param id
-	 *            The id of the text field
+	 *            the component id
 	 * @param model
-	 *            The model
-	 * @param timeStyle
-	 *            Date style to use. The first character is the date style, and the second character
-	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
-	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
-	 *            character '-'. See {@link org.joda.time.DateTimeFormat#forStyle(String)}.
-	 * @return TimeField
-	 */
-	public static TimeField forTimeStyle(String id, IModel<LocalTime> model, String timeStyle)
-	{
-		return new TimeField(id, model, new StyleTimeConverter(timeStyle));
-	}
-
-	/**
-	 * Creates a new TimeField using the provided date style.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param timeStyle
-	 *            Date style to use. The first character is the date style, and the second character
-	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
-	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
-	 *            character '-'. See {@link org.joda.time.DateTimeFormat#forStyle(String)}.
-	 * @return TimeField
+	 *            the component's model
 	 */
-	public static TimeField forTimeStyle(String id, String timeStyle)
+	public TimeField(String id, IModel<LocalTime> model)
 	{
-		return forTimeStyle(id, null, timeStyle);
-	}
-
-	/**
-	 * Creates a new TimeField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @return TimeField
-	 */
-	public static TimeField forShortStyle(String id)
-	{
-		return forShortStyle(id, null);
-	}
+		super(id, model);
 
-	/**
-	 * Creates a new TimeField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @return TimeField
-	 */
-	public static TimeField forShortStyle(String id, IModel<LocalTime> model)
-	{
-		return new TimeField(id, model, new StyleTimeConverter());
-	}
+		// Sets the type that will be used when updating the model for this component.
+		setType(LocalTime.class);
 
-	/**
-	 * Creates a new TimeField using the provided converter.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param converter
-	 *            the date converter
-	 * @return TimeField
-	 */
-	public static TimeField withConverter(String id, LocalTimeConverter converter)
-	{
-		return withConverter(id, null, converter);
-	}
+		add(new Label("hoursSeparator", new ResourceModel("TimeField.hoursSeparator"))
+		{
+			private static final long serialVersionUID = 1L;
 
-	/**
-	 * Creates a new TimeField using the provided converter.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param converter
-	 *            the date converter
-	 * @return TimeField
-	 */
-	public static TimeField withConverter(String id, IModel<LocalTime> model, LocalTimeConverter converter)
-	{
-		return new TimeField(id, model, converter);
-	}
+			@Override
+			protected void onConfigure()
+			{
+				super.onConfigure();
 
-	/**
-	 * The converter for the TextField
-	 */
-	private final LocalTimeConverter converter;
+				minutesField.configure();
 
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 *      the component id
-	 */
-	public TimeField(String id, LocalTimeConverter converter)
-	{
-		this(id, null, converter);
+				setVisible(minutesField.isVisible());
+			}
+		});
 	}
 
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 *      the component id
-	 * @param model
-	 *      the component's model
-	 */
-	public TimeField(String id, IModel<LocalTime> model, LocalTimeConverter converter)
+	@Override
+	protected void onInitialize()
 	{
-		super(id, model);
-
-		Args.notNull(converter, "converter");
-		this.converter = converter;
-
-		// Sets the type that will be used when updating the model for this component.
-		setType(LocalTime.class);
-
+		super.onInitialize();
 
 		// Create and add the "hours" TextField
-		add(hoursField = newHoursTextField(HOURS, new HoursModel(), Integer.class));
+		add(hoursField = newHoursTextField("hours", new HoursModel(), Integer.class));
 
 		// Create and add the "minutes" TextField
-		add(minutesField = newMinutesTextField(MINUTES, new MinutesModel(), Integer.class));
-
-		// Create and add the "AM/PM" Listbox
-		add(amOrPmChoice = new DropDownChoice<>(AM_OR_PM_CHOICE, new AmPmModel(), Arrays.asList(AM_PM.values())));
-
-		add(new WebMarkupContainer("hoursSeparator")
-		{
-			private static final long serialVersionUID = 1L;
+		add(minutesField = newMinutesTextField("minutes", new MinutesModel(), Integer.class));
 
+		// Create and add the "AM/PM" choice
+		add(amOrPmChoice = new DropDownChoice<AM_PM>("amOrPmChoice", new AmPmModel(),
+			Arrays.asList(AM_PM.values())) {
 			@Override
-			public boolean isVisible()
+			protected boolean localizeDisplayValues()
 			{
-				return minutesField.determineVisibility();
+				return true;
 			}
 		});
 	}
@@ -289,7 +157,9 @@ public class TimeField extends FormComponentPanel<LocalTime> implements ITextFor
 	 *            the type of the text field
 	 * @return a new text field instance
 	 */
-	protected TextField<Integer> newHoursTextField(final String id, IModel<Integer> model, Class<Integer> type) {
+	protected TextField<Integer> newHoursTextField(final String id, IModel<Integer> model,
+		Class<Integer> type)
+	{
 		TextField<Integer> hoursTextField = new TextField<Integer>(id, model, type)
 		{
 			private static final long serialVersionUID = 1L;
@@ -297,13 +167,22 @@ public class TimeField extends FormComponentPanel<LocalTime> implements ITextFor
 			@Override
 			protected String[] getInputTypes()
 			{
-				return new String[] {"number"};
+				return new String[] { "number" };
+			}
+
+			@Override
+			protected void onComponentTag(ComponentTag tag)
+			{
+				super.onComponentTag(tag);
+
+				tag.append("class", getString(HOURS_CSS_CLASS_KEY), " ");
+
+				tag.put("min", use12HourFormat() ? 1 : 0);
+				tag.put("max", use12HourFormat() ? 12 : 23);
 			}
 		};
-		hoursTextField.add(AttributeModifier.append("min", getMaximumHours() == 24 ? 0 : 1));
-		hoursTextField.add(AttributeModifier.append("max", getMaximumHours() == 24 ? 23 : 12));
-		hoursTextField.add(getMaximumHours() == 24 ? RangeValidator.range(0, 23) : RangeValidator.range(1, 12));
-		hoursTextField.setLabel(new Model<>(HOURS));
+		hoursTextField
+			.add(use12HourFormat() ? RangeValidator.range(1, 12) : RangeValidator.range(0, 23));
 		return hoursTextField;
 	}
 
@@ -338,13 +217,21 @@ public class TimeField extends FormComponentPanel<LocalTime> implements ITextFor
 			@Override
 			protected String[] getInputTypes()
 			{
-				return new String[] {"number"};
+				return new String[] { "number" };
+			}
+
+			@Override
+			protected void onComponentTag(ComponentTag tag)
+			{
+				super.onComponentTag(tag);
+
+				tag.append("class", getString(MINUTES_CSS_CLASS_KEY), " ");
+
+				tag.put("min", 0);
+				tag.put("max", 59);
 			}
 		};
-		minutesField.add(AttributeModifier.append("min", 0));
-		minutesField.add(AttributeModifier.append("max", 59));
 		minutesField.add(new RangeValidator<>(0, 59));
-		minutesField.setLabel(new Model<>(MINUTES));
 		return minutesField;
 	}
 
@@ -363,8 +250,12 @@ public class TimeField extends FormComponentPanel<LocalTime> implements ITextFor
 		Integer minutes = minutesField.getConvertedInput();
 		AM_PM amOrPmInput = amOrPmChoice.getConvertedInput();
 
-		LocalTime localTime = null;
-		if (hours != null && minutes != null)
+		LocalTime localTime;
+		if (hours == null && minutes == null)
+		{
+			localTime = null;
+		}
+		else if (hours != null && minutes != null)
 		{
 			// Use the input to create a LocalTime object
 			localTime = LocalTime.of(hours, minutes);
@@ -376,51 +267,39 @@ public class TimeField extends FormComponentPanel<LocalTime> implements ITextFor
 				localTime = localTime.with(ChronoField.AMPM_OF_DAY, halfday);
 			}
 		}
+		else
+		{
+			error(newValidationError(new ConversionException("Cannot parse time").setTargetType(getType())));
+			return;
+		}
+
 		setConvertedInput(localTime);
 	}
 
 	@Override
-	protected void onBeforeRender() {
+	protected void onConfigure()
+	{
+		super.onConfigure();
+
 		hoursField.setRequired(isRequired());
 		minutesField.setRequired(isRequired());
 
-		boolean use12HourFormat = use12HourFormat();
-		amOrPmChoice.setVisible(use12HourFormat);
-		super.onBeforeRender();
+		amOrPmChoice.setVisible(use12HourFormat());
 	}
 
 	/**
 	 * Checks whether the current {@link Locale} uses the 12h or 24h time format. This method can be
 	 * overridden to e.g. always use 24h format.
 	 * 
-	 * @return true, if the current {@link Locale} uses the 12h format.<br/>
-	 *         false, otherwise
+	 * @return {@value true}, if the current {@link Locale} uses the 12h format.<br/>
+	 *         {@value false}, otherwise
 	 */
 	protected boolean use12HourFormat()
 	{
-		String pattern = DateTimeFormatterBuilder.getLocalizedDateTimePattern(null, FormatStyle.SHORT, IsoChronology.INSTANCE, getLocale());
-		return pattern.indexOf('a') != -1 || pattern.indexOf('h') != -1 || pattern.indexOf('K') != -1;
-	}
-
-	/**
-	 * @return either 12 or 24, depending on the hour format of the current {@link Locale}
-	 */
-	private int getMaximumHours()
-	{
-		return getMaximumHours(use12HourFormat());
-	}
-
-	/**
-	 * Convenience method (mainly for optimization purposes), in case {@link #use12HourFormat()} has
-	 * already been stored in a local variable and thus doesn't need to be computed again.
-	 * 
-	 * @param use12HourFormat
-	 *            the hour format to use
-	 * @return either 12 or 24, depending on the parameter <code>use12HourFormat</code>
-	 */
-	private int getMaximumHours(boolean use12HourFormat)
-	{
-		return use12HourFormat ? 12 : 24;
+		String pattern = DateTimeFormatterBuilder.getLocalizedDateTimePattern(null,
+			FormatStyle.SHORT, IsoChronology.INSTANCE, getLocale());
+		return pattern.indexOf('a') != -1 || pattern.indexOf('h') != -1
+			|| pattern.indexOf('K') != -1;
 	}
 
 	protected class HoursModel implements IModel<Integer>
@@ -435,13 +314,13 @@ public class TimeField extends FormComponentPanel<LocalTime> implements ITextFor
 			{
 				return null;
 			}
-			return getMaximumHours() == 24 ? t.getHour() : t.get(ChronoField.CLOCK_HOUR_OF_AMPM);
+			return use12HourFormat() ? t.get(ChronoField.CLOCK_HOUR_OF_AMPM) : t.getHour();
 		}
 
 		@Override
 		public void setObject(Integer hour)
 		{
-			time = time.with(getMaximumHours() == 24 ? ChronoField.HOUR_OF_DAY : ChronoField.CLOCK_HOUR_OF_AMPM, hour);
+			// ignored
 		}
 	}
 
@@ -459,7 +338,7 @@ public class TimeField extends FormComponentPanel<LocalTime> implements ITextFor
 		@Override
 		public void setObject(Integer minute)
 		{
-			time = time.with(ChronoField.MINUTE_OF_HOUR, minute);
+			// ignored
 		}
 	}
 
@@ -478,43 +357,7 @@ public class TimeField extends FormComponentPanel<LocalTime> implements ITextFor
 		@Override
 		public void setObject(AM_PM amPm)
 		{
-			int i = AM_PM.AM == amPm ? 0 : 1;
-			time = time.with(ChronoField.AMPM_OF_DAY, i);
-		}
-	}
-
-	/**
-	 * @return The specialized converter.
-	 * @see org.apache.wicket.Component#createConverter(java.lang.Class)
-	 */
-	@Override
-	protected IConverter<?> createConverter(Class<?> clazz)
-	{
-		if (LocalTime.class.isAssignableFrom(clazz))
-		{
-			return converter;
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider#getTextFormat()
-	 */
-	@Override
-	public final String getTextFormat()
-	{
-		return converter.getPattern(getLocale());
-	}
-
-	public static FormatStyle parseFormatStyle(char style)
-	{
-		switch (style)
-		{
-			case 'M':
-				return FormatStyle.MEDIUM;
-			case 'S':
-			default:
-				return FormatStyle.SHORT;
+			// ignored
 		}
 	}
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeConverter.java
deleted file mode 100644
index 9286f2e..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeConverter.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.time.ZoneId;
-import java.time.ZonedDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Locale;
-import java.util.TimeZone;
-
-import org.apache.wicket.Session;
-import org.apache.wicket.core.request.ClientInfo;
-import org.apache.wicket.protocol.http.request.WebClientInfo;
-import org.apache.wicket.util.convert.ConversionException;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.lang.Args;
-import org.apache.wicket.util.string.Strings;
-
-
-/**
- * Base class for javax.time based date converters. It contains the logic to parse and format,
- * optionally taking the time zone difference between clients and the server into account.
- * <p>
- * Converters of this class are best suited for per-component use.
- * </p>
- * 
- * @author eelcohillenius
- */
-public abstract class ZonedDateTimeConverter implements IConverter<ZonedDateTime>
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Whether to apply the time zone difference when interpreting dates.
-	 */
-	private final boolean applyTimeZoneDifference;
-
-	/**
-	 * Construct. <p> When applyTimeZoneDifference is true, the current time is applied on the
-	 * parsed date, and the date will be corrected for the time zone difference between the server
-	 * and the client. For instance, if I'm in Seattle and the server I'm working on is in
-	 * Amsterdam, the server is 9 hours ahead. So, if I'm inputting say 12/24 at a couple of hours
-	 * before midnight, at the server it is already 12/25. If this boolean is true, it will be
-	 * transformed to 12/25, while the client sees 12/24. </p>
-	 * 
-	 * @param applyTimeZoneDifference
-	 *            whether to apply the difference in time zones between client and server
-	 */
-	public ZonedDateTimeConverter(boolean applyTimeZoneDifference)
-	{
-		this.applyTimeZoneDifference = applyTimeZoneDifference;
-	}
-
-	public ZonedDateTime convertToObject(String value, DateTimeFormatter format, Locale locale) {
-		try
-		{
-			// parse date retaining the time of the submission
-			return ZonedDateTime.parse(value, format);
-		}
-		catch (RuntimeException e)
-		{
-			throw newConversionException(e, locale);
-		}
-	}
-
-	@Override
-	public ZonedDateTime convertToObject(String value, Locale locale)
-	{
-		if (Strings.isEmpty(value))
-		{
-			return null;
-		}
-
-		DateTimeFormatter format = getFormat(locale);
-		Args.notNull(format, "format");
-
-		if (applyTimeZoneDifference)
-		{
-			ZoneId zoneId = getClientTimeZone();
-
-			// set time zone for client
-			format = format.withZone(getTimeZone());
-
-			ZonedDateTime dateTime = convertToObject(value, format, locale);
-			// apply the server time zone to the parsed value
-			if (zoneId != null)
-			{
-				dateTime = dateTime.withZoneSameInstant(zoneId);
-			}
-
-			return dateTime;
-		}
-		else
-		{
-			return convertToObject(value, format, locale);
-		}
-	}
-
-	/**
-	 * Creates a ConversionException and sets additional context information to it.
-	 *
-	 * @param cause
-	 *            - {@link RuntimeException} cause
-	 * @param locale
-	 *            - {@link Locale} used to set 'format' variable with localized pattern
-	 * @return {@link ConversionException}
-	 */
-	ConversionException newConversionException(RuntimeException cause, Locale locale)
-	{
-		return new ConversionException(cause)
-				.setVariable("format", getPattern(locale));
-	}
-
-	@Override
-	public String convertToString(ZonedDateTime dateTime, Locale locale)
-	{
-		DateTimeFormatter format = getFormat(locale);
-
-		if (applyTimeZoneDifference)
-		{
-			ZoneId zoneId = getClientTimeZone();
-			if (zoneId != null)
-			{
-				// apply time zone to formatter
-				format = format.withZone(zoneId);
-			}
-		}
-		return format.format(dateTime);
-	}
-
-	/**
-	 * Gets whether to apply the time zone difference when interpreting dates.
-	 * 
-	 * </p> When true, the current time is applied on the parsed date, and the date will be
-	 * corrected for the time zone difference between the server and the client. For instance, if
-	 * I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9 hours ahead.
-	 * So, if I'm inputting say 12/24 at a couple of hours before midnight, at the server it is
-	 * already 12/25. If this boolean is true, it will be transformed to 12/25, while the client
-	 * sees 12/24. </p>
-	 * 
-	 * @return whether to apply the difference in time zones between client and server
-	 */
-	public final boolean getApplyTimeZoneDifference()
-	{
-		return applyTimeZoneDifference;
-	}
-
-	/**
-	 * @param locale
-	 *            The locale used to convert the value
-	 * @return Gets the pattern that is used for printing and parsing
-	 */
-	public abstract String getPattern(Locale locale);
-
-	/**
-	 * Gets the client's time zone.
-	 * 
-	 * @return The client's time zone or null
-	 */
-	protected ZoneId getClientTimeZone()
-	{
-		ClientInfo info = Session.get().getClientInfo();
-		if (info instanceof WebClientInfo)
-		{
-			TimeZone timeZone = ((WebClientInfo) info).getProperties().getTimeZone();
-			return timeZone.toZoneId();
-		}
-		return null;
-	}
-
-	/**
-	 * @param locale
-	 *            The locale used to convert the value
-	 * 
-	 * @return formatter The formatter for the current conversion
-	 */
-	public abstract DateTimeFormatter getFormat(Locale locale);
-
-	/**
-	 * Gets the server time zone. Override this method if you want to fix to a certain time zone,
-	 * regardless of what actual time zone the server is in.
-	 * 
-	 * @return The server time zone
-	 */
-	protected ZoneId getTimeZone()
-	{
-		return ZoneId.systemDefault();
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
index eb70e12..4b3143d 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
@@ -20,53 +20,19 @@ import java.time.LocalDate;
 import java.time.LocalTime;
 import java.time.ZoneId;
 import java.time.ZonedDateTime;
-import java.time.temporal.ChronoField;
-import java.util.Locale;
-import java.util.TimeZone;
 
-import org.apache.wicket.Session;
-import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.core.request.ClientInfo;
 import org.apache.wicket.model.IModel;
-import org.apache.wicket.protocol.http.request.WebClientInfo;
 
 /**
- * Works on a {@link java.time.ZonedDateTimeTime} object. Displays a date field and a DatePicker, a field
- * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field
- * depends on the time format of this {@link ZonedDateTimeField}'s {@link Locale}, as does the visibility
- * of the AM/PM field (see {@link ZonedDateTimeField#use12HourFormat}).
- * <p>
- * <strong>Ajaxifying the DateTimeField</strong>: If you want to update a DateTimeField with an
- * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained
- * {@link DateField} by overriding {@link #newDateTextField(String, IModel)} and calling
- * {@link #processInput()}:
- * 
- * <pre>{@code
- *  DateTimeField dateTimeField = new DateTimeField(...) {
- *    protected DateTextField newDateTextField(String id, PropertyModel<Date> dateFieldModel)
- *    {
- *      DateTextField dateField = super.newDateTextField(id, dateFieldModel);     
- *      dateField.add(new AjaxFormComponentUpdatingBehavior("change") {
- *        protected void onUpdate(AjaxRequestTarget target) {
- *          processInput(); // let DateTimeField process input too
- *
- *          ...
- *        }
- *      });
- *      return recorder;
- *    }
- *  }
- * }</pre>
+ * Works on a {@link java.time.ZonedDateTimeTime} object. See {@link AbstractDateTimeField} for
+ * further details.
  * 
  * @author eelcohillenius
- * @see DateField for a variant with just the date field and date picker
  */
 public class ZonedDateTimeField extends AbstractDateTimeField<ZonedDateTime>
 {
 	private static final long serialVersionUID = 1L;
 
-	private ZonedDateTime dateTime = ZonedDateTime.now();
-
 	/**
 	 * Construct.
 	 * 
@@ -92,59 +58,23 @@ public class ZonedDateTimeField extends AbstractDateTimeField<ZonedDateTime>
 	}
 
 	/**
-	 * Gets the client's time zone.
+	 * Creates a zoned date time in the systems default zone.
 	 * 
-	 * @return The client's time zone or null
+	 * @see ZoneId#systemDefault()
 	 */
-	protected ZoneId getClientTimeZone()
-	{
-		ClientInfo info = Session.get().getClientInfo();
-		if (info instanceof WebClientInfo)
-		{
-			TimeZone timeZone = ((WebClientInfo) info).getProperties().getTimeZone();
-			return timeZone != null ? timeZone.toZoneId() : null;
-		}
-		return null;
-	}
-
-	ZonedDateTime performConvert(LocalDate date, LocalTime time) {
-		return ZonedDateTime.of(date, time, getClientTimeZone());
+	protected ZonedDateTime createTemporal(LocalDate date, LocalTime time) {
+		return ZonedDateTime.of(date, time, ZoneId.systemDefault());
 	}
 
 	@Override
-	void prepareObject() {
-		ZonedDateTime modelObject = getModelObject();
-		if (modelObject != null)
-		{
-			// convert date to the client's time zone if we have that info
-			ZoneId zone = getClientTimeZone();
-			if (zone != null)
-			{
-				modelObject = modelObject.withZoneSameInstant(zone);
-			}
-		}
-	}
-
-	LocalDate getLocalDate()
+	protected LocalDate getLocalDate(ZonedDateTime temporal)
 	{
-		return getModelObject() == null ? null : dateTime.toLocalDate();
+		return temporal.toLocalDate();
 	}
 
-	void setLocalDate(LocalDate date)
-	{
-		dateTime = dateTime.with(ChronoField.YEAR, date.getYear())
-				.with(ChronoField.MONTH_OF_YEAR, date.getMonthValue())
-				.with(ChronoField.DAY_OF_YEAR, date.getDayOfMonth());
-	}
-
-	LocalTime getLocalTime()
-	{
-		return getModelObject() == null ? null : dateTime.toLocalTime();
-	}
-
-	void setLocalTime(LocalTime time)
+	@Override
+	protected LocalTime getLocalTime(ZonedDateTime temporal)
 	{
-		dateTime = dateTime.with(ChronoField.HOUR_OF_DAY, time.getHour())
-				.with(ChronoField.MINUTE_OF_HOUR, time.getMinute());
+		return temporal.toLocalTime();
 	}
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
new file mode 100644
index 0000000..0fcb79c
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
@@ -0,0 +1,118 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.util.TimeZone;
+
+import org.apache.wicket.Session;
+import org.apache.wicket.core.request.ClientInfo;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.protocol.http.request.WebClientInfo;
+import org.apache.wicket.settings.RequestCycleSettings;
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * Model mapping {@link ZonedDateTime} to a {@link LocalDateTime} in {@link #getClientTimeZone()}.
+ * 
+ * @author svenmeier
+ */
+public class ZonedToLocalDateTimeModel implements IModel<LocalDateTime>
+{
+	private IModel<ZonedDateTime> model;
+
+	/**
+	 * Map the given {@link ZonedDateTime} to a {@link LocalDateTime} in the client's time zone.
+	 *  
+	 * @param model zoned date time
+	 */
+	public ZonedToLocalDateTimeModel(IModel<ZonedDateTime> model)
+	{
+		Args.notNull(model, "model");
+		
+		this.model = model;
+	}
+
+	@Override
+	public void detach()
+	{
+		model.detach();
+	}
+
+	/**
+	 * What is the {@link ZoneId} of the client.
+	 * 
+	 * @see RequestCycleSettings#getGatherExtendedBrowserInfo()
+	 * @see ZoneId#systemDefault()
+	 */
+	protected ZoneId getClientTimeZone()
+	{
+		ClientInfo info = Session.get().getClientInfo();
+		if (info instanceof WebClientInfo)
+		{
+			TimeZone timeZone = ((WebClientInfo)info).getProperties().getTimeZone();
+			return timeZone != null ? timeZone.toZoneId() : null;
+		}
+		return ZoneId.systemDefault();
+	}
+
+	/**
+	 * What is the {@link ZoneId} of created {@link ZonedDateTime} objects. 
+	 */
+	protected ZoneId getTargetTimeZone()
+	{
+		return ZoneId.systemDefault();
+	}
+
+	@Override
+	public LocalDateTime getObject()
+	{
+		ZonedDateTime zonedDateTime = model.getObject();
+		if (zonedDateTime == null)
+		{
+			return null;
+		}
+		else
+		{
+			return zonedDateTime.withZoneSameInstant(getClientTimeZone()).toLocalDateTime();
+		}
+	}
+
+	@Override
+	public void setObject(LocalDateTime dateTime)
+	{
+		if (dateTime == null)
+		{
+			model.setObject(null);
+		}
+		else
+		{
+			model.setObject(dateTime.atZone(getClientTimeZone()).withZoneSameInstant(getTargetTimeZone()));
+		}
+	}
+
+	/**
+	 * Convenience factory for a date time.
+	 */
+	public static IModel<LocalDateTime> of(ZonedDateTime dateTime)
+	{
+		return new ZonedToLocalDateTimeModel(new Model<ZonedDateTime>(dateTime));
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateConverterTest.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateConverterTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateConverterTest.java
deleted file mode 100644
index d590615..0000000
--- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateConverterTest.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.time.ZoneId;
-import java.time.ZonedDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Locale;
-
-import org.apache.wicket.extensions.markup.html.form.datetime.PatternZonedDateTimeConverter;
-import org.apache.wicket.extensions.markup.html.form.datetime.StyleZonedDateTimeConverter;
-import org.apache.wicket.util.convert.ConversionException;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.convert.converter.CalendarConverter;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests for {@link ZonedDateTimeConverter} and subclasses.
- * 
- * @author akiraly
- */
-public class DateConverterTest
-{
-	/**
-	 * WICKET-3598
-	 */
-	@Test
-	public void testLocaleUsed()
-	{
-		Locale locale = Locale.GERMAN;
-
-		StyleZonedDateTimeConverter styleDateConverter = new StyleZonedDateTimeConverter("F-", false);
-		DateTimeFormatter styleFormatter = styleDateConverter.getFormat(locale);
-
-		Assert.assertEquals(locale, styleFormatter.getLocale());
-
-		PatternZonedDateTimeConverter patternDateConverter = new PatternZonedDateTimeConverter(
-			styleDateConverter.getPattern(locale), false);
-		DateTimeFormatter patternFormatter = patternDateConverter.getFormat(locale);
-
-		Assert.assertEquals(locale, patternFormatter.getLocale());
-
-		Calendar now = Calendar.getInstance();
-
-		ZonedDateTime zNow = ZonedDateTime.ofInstant(now.toInstant(), ZoneId.systemDefault());
-		String actual = styleDateConverter.convertToString(zNow, locale);
-		String expected = patternDateConverter.convertToString(zNow, locale);
-
-		Assert.assertEquals(expected, actual);
-	}
-
-	/**
-	 * WICKET-3658
-	 */
-	@Test
-	public void testCalendarConverterWithDelegate()
-	{
-		Locale locale = Locale.GERMAN;
-
-		Calendar input = Calendar.getInstance(locale);
-		input.clear();
-		input.set(2011, Calendar.MAY, 7);
-
-		final StyleZonedDateTimeConverter styleDateConverter = new StyleZonedDateTimeConverter("F-", false);
-
-		CalendarConverter calendarConverter = new CalendarConverter(new IConverter<Date>()
-		{
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			public Date convertToObject(String value, Locale locale) throws ConversionException {
-				ZonedDateTime zd = styleDateConverter.convertToObject(value, locale);
-				return zd == null ? null : Date.from(zd.toInstant());
-			}
-
-			@Override
-			public String convertToString(Date value, Locale locale) {
-				return styleDateConverter.convertToString(ZonedDateTime.ofInstant(value.toInstant(), ZoneId.systemDefault()), locale);
-			}
-			
-		});
-
-		String expected = styleDateConverter.convertToString(ZonedDateTime.ofInstant(input.toInstant(), ZoneId.systemDefault()), locale);
-		String actual = calendarConverter.convertToString(input, locale);
-
-		Assert.assertEquals(expected, actual);
-
-		Calendar revert = calendarConverter.convertToObject(actual, locale);
-
-		Assert.assertEquals(input, revert);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
index 753e98e..64efda6 100644
--- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
+++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
@@ -20,6 +20,7 @@ import java.io.Serializable;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.time.format.FormatStyle;
 import java.util.Locale;
 
 import org.apache.wicket.MarkupContainer;
@@ -29,6 +30,7 @@ import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.FormComponent;
 import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
+import org.apache.wicket.util.convert.converter.LocalDateConverter;
 import org.apache.wicket.util.resource.IResourceStream;
 import org.apache.wicket.util.resource.StringResourceStream;
 import org.apache.wicket.util.tester.FormTester;
@@ -98,7 +100,7 @@ public class DateTimeFieldTest extends WicketTestCase {
 		TestDatePage page = new TestDatePage(null);
 		tester.startPage(page);
 		FormTester formTester = tester.newFormTester("form", false);
-		formTester.setValue("field", new StyleDateConverter("F").convertToString(date, Locale.forLanguageTag("en-US")));
+		formTester.setValue("field", new LocalDateConverter().convertToString(date, Locale.forLanguageTag("en-US")));
 		formTester.submit();
 		LocalDate d = page.field.getModelObject();
 		assertNotNull(d);
@@ -120,7 +122,7 @@ public class DateTimeFieldTest extends WicketTestCase {
 		TestDateTimePage page = new TestDateTimePage(null);
 		tester.startPage(page);
 		FormTester formTester = tester.newFormTester("form", false);
-		formTester.setValue("field:date", new StyleDateConverter("F").convertToString(date, Locale.forLanguageTag("en-US")));
+		formTester.setValue("field:date", new LocalDateConverter().convertToString(date, Locale.forLanguageTag("en-US")));
 		formTester.submit();
 		assertNull(page.field.getModelObject());
 	}
@@ -143,7 +145,7 @@ public class DateTimeFieldTest extends WicketTestCase {
 		TestDateTimePage page = new TestDateTimePage(null);
 		tester.startPage(page);
 		FormTester formTester = tester.newFormTester("form", false);
-		formTester.setValue("field:date", new StyleDateConverter("S").convertToString(date, Locale.forLanguageTag("en-US")));
+		formTester.setValue("field:date", new LocalDateConverter().convertToString(date, Locale.forLanguageTag("en-US")));
 		formTester.setValue("field:time:hours", "6");
 		formTester.setValue("field:time:minutes", "15");
 		formTester.select("field:time:amOrPmChoice", 0);
@@ -164,7 +166,7 @@ public class DateTimeFieldTest extends WicketTestCase {
 		@Override
 		FormComponent<LocalDateTime> newComponent()
 		{
-			return new DateTimeField("field", model);
+			return new LocalDateTimeField("field", model);
 		}
 	}
 
@@ -181,7 +183,7 @@ public class DateTimeFieldTest extends WicketTestCase {
 		@Override
 		FormComponent<LocalDate> newComponent()
 		{
-			return DateField.forDateStyle("field", model, "F");
+			return new LocalDateTextField("field", model, FormatStyle.SHORT);
 		}
 	}
 
@@ -197,7 +199,7 @@ public class DateTimeFieldTest extends WicketTestCase {
 		@Override
 		FormComponent<LocalTime> newComponent()
 		{
-			return TimeField.forTimeStyle("field", model, "F");
+			return new TimeField("field", model);
 		}
 	}
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModelTest.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModelTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModelTest.java
new file mode 100644
index 0000000..76caf09
--- /dev/null
+++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModelTest.java
@@ -0,0 +1,65 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import static org.junit.Assert.assertEquals;
+
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.junit.Test;
+
+/**
+ * Test for {@link ZonedToLocalDateTimeModel}.
+ * 
+ * @author svenmeier
+ */
+public class ZonedToLocalDateTimeModelTest
+{
+
+	@Test
+	public void test() {
+		
+		ZoneId targetZone = ZoneId.of("UTC");
+		ZoneId clientZone = ZoneId.of("UTC+2");
+		
+		IModel<ZonedDateTime> target = Model.of(ZonedDateTime.of(2000, 6, 1, 5, 0, 0, 0, targetZone));
+		
+		ZonedToLocalDateTimeModel client = new ZonedToLocalDateTimeModel(target) {
+			@Override
+			protected ZoneId getTargetTimeZone()
+			{
+				return targetZone;
+			}
+			
+			@Override
+			protected ZoneId getClientTimeZone()
+			{
+				return clientZone;
+			}
+		};
+		
+		assertEquals(LocalDateTime.of(2000, 6, 1, 7, 0, 0, 0), client.getObject());
+		
+		client.setObject(LocalDateTime.of(2000, 6, 1, 7, 30, 0, 0));
+		
+		assertEquals(ZonedDateTime.of(2000, 6, 1, 5, 30, 0, 0, targetZone), target.getObject());
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverter.java b/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverter.java
index 2972b20..dd85a77 100644
--- a/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverter.java
+++ b/wicket-util/src/main/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverter.java
@@ -16,7 +16,6 @@
  */
 package org.apache.wicket.util.convert.converter;
 
-import java.time.ZoneId;
 import java.time.ZonedDateTime;
 import java.time.format.DateTimeFormatter;
 import java.time.format.FormatStyle;
@@ -29,7 +28,7 @@ public class ZonedDateTimeConverter extends AbstractJavaTimeConverter<ZonedDateT
 {
 	private static final long serialVersionUID = 1L;
 
-	private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM);
+	private static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM, FormatStyle.FULL);
 
 	@Override
 	protected Class<ZonedDateTime> getTargetType()
@@ -45,6 +44,6 @@ public class ZonedDateTimeConverter extends AbstractJavaTimeConverter<ZonedDateT
 
 	@Override
 	protected DateTimeFormatter getDateTimeFormatter() {
-		return DATE_TIME_FORMATTER.withZone(ZoneId.systemDefault());
+		return DATE_TIME_FORMATTER;
 	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverterTest.java
----------------------------------------------------------------------
diff --git a/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverterTest.java b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverterTest.java
index 8d946c5..58a0af9 100644
--- a/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverterTest.java
+++ b/wicket-util/src/test/java/org/apache/wicket/util/convert/converter/ZonedDateTimeConverterTest.java
@@ -32,20 +32,19 @@ import org.junit.Test;
  */
 public class ZonedDateTimeConverterTest extends Assert
 {
-	private ZoneId zone = ZoneId.systemDefault();
+	private ZoneId zone = ZoneId.of("UTC");
 
 	@Test
 	public void convertToString() {
 		ZonedDateTimeConverter converter = new ZonedDateTimeConverter();
 		String date = converter.convertToString(ZonedDateTime.of(2016, 7, 11, 1, 2, 3, 0, zone), Locale.ENGLISH);
-		assertThat(date, is(equalTo("Jul 11, 2016 1:02:03 AM")));
+		assertThat(date, is(equalTo("Jul 11, 2016 1:02:03 AM UTC")));
 	}
 
 	@Test
 	public void convertToObject() {
 		ZonedDateTimeConverter converter = new ZonedDateTimeConverter();
-		ZoneId zone = ZoneId.systemDefault();
-		ZonedDateTime date = converter.convertToObject("Jul 11, 2016 1:02:03 AM", Locale.ENGLISH);
+		ZonedDateTime date = converter.convertToObject("Jul 11, 2016 1:02:03 AM UTC", Locale.ENGLISH);
 		assertThat(date, is(equalTo(ZonedDateTime.of(2016, 7, 11, 1, 2, 3, 0, zone))));
 	}
 	


[20/20] wicket git commit: WICKET-6348 minor addition: update raw input when component is not contained in form this wasn't done in 7.x either, but for consistency the raw input should be updated, so it is available when a validation fails

Posted by sv...@apache.org.
WICKET-6348 minor addition: update raw input when component is not contained in form
this wasn't done in 7.x either, but for consistency the raw input should be updated, so it is available when a validation fails


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/9e028af3
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/9e028af3
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/9e028af3

Branch: refs/heads/master
Commit: 9e028af34cc432ddbffd6e09e82bf46d6226c0c8
Parents: 1176c0a
Author: Sven Meier <sv...@apache.org>
Authored: Tue Oct 17 21:25:18 2017 +0200
Committer: Sven Meier <sv...@apache.org>
Committed: Tue Oct 17 22:40:30 2017 +0200

----------------------------------------------------------------------
 .../markup/html/form/FormComponentUpdatingBehavior.java  |  5 +++++
 .../html/form/datetime/ZonedToLocalDateTimeModel.java    | 11 +----------
 2 files changed, 6 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/9e028af3/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentUpdatingBehavior.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentUpdatingBehavior.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentUpdatingBehavior.java
index 0d5f410..d913e77 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentUpdatingBehavior.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentUpdatingBehavior.java
@@ -233,6 +233,10 @@ public class FormComponentUpdatingBehavior extends Behavior implements IRequestL
 		Form<?> form = formComponent.findParent(Form.class);
 		if (form == null)
 		{
+			// let form component change its input, so it is available
+			// in case of any errors
+			formComponent.inputChanged();
+
 			process();
 		}
 		else
@@ -264,6 +268,7 @@ public class FormComponentUpdatingBehavior extends Behavior implements IRequestL
 				@Override
 				public boolean getDefaultFormProcessing()
 				{
+					// do not process the whole form
 					return false;
 				}
 			});

http://git-wip-us.apache.org/repos/asf/wicket/blob/9e028af3/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
index 4571b36..e4b27de 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
@@ -24,7 +24,6 @@ import java.util.TimeZone;
 import org.apache.wicket.Session;
 import org.apache.wicket.core.request.ClientInfo;
 import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
 import org.apache.wicket.protocol.http.request.WebClientInfo;
 import org.apache.wicket.settings.RequestCycleSettings;
 import org.apache.wicket.util.lang.Args;
@@ -108,12 +107,4 @@ public class ZonedToLocalDateTimeModel implements IModel<LocalDateTime>
 			model.setObject(dateTime.atZone(getClientTimeZone()).withZoneSameInstant(getTargetTimeZone()));
 		}
 	}
-
-	/**
-	 * Convenience factory for a date time.
-	 */
-	public static IModel<LocalDateTime> of(ZonedDateTime dateTime)
-	{
-		return new ZonedToLocalDateTimeModel(new Model<ZonedDateTime>(dateTime));
-	}
-}
+}
\ No newline at end of file


[19/20] wicket git commit: WICKET-6105 serialVersionUID are added and whitespaces are fixed

Posted by sv...@apache.org.
WICKET-6105 serialVersionUID are added and whitespaces are fixed

This closes #235


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/1176c0a6
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/1176c0a6
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/1176c0a6

Branch: refs/heads/master
Commit: 1176c0a6d7051f51d72eafdd648602c9fad6669a
Parents: a4aed9e
Author: Maxim Solodovnik <so...@gmail.com>
Authored: Mon Oct 16 15:00:03 2017 +0700
Committer: Sven Meier <sv...@apache.org>
Committed: Tue Oct 17 22:35:47 2017 +0200

----------------------------------------------------------------------
 .../examples/datetime/DateTimeApplication.java  |  4 ++--
 .../wicket/examples/datetime/DateTimePage.java  | 21 ++++++++++++++++++++
 .../wicket/extensions/Initializer.properties    |  2 +-
 .../form/datetime/AbstractDateTimeField.java    |  4 ++++
 .../html/form/datetime/LocalDateTextField.java  | 11 ++++++----
 .../form/datetime/LocalDateTimeTextField.java   |  9 ++++++---
 .../html/form/datetime/LocalTimeTextField.java  |  9 ++++++---
 .../markup/html/form/datetime/TimeField.java    |  2 ++
 .../html/form/datetime/ZonedDateTimeField.java  |  2 +-
 .../datetime/ZonedToLocalDateTimeModel.java     |  3 ++-
 10 files changed, 52 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
index 713f5b7..fa29a21 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
@@ -37,5 +37,5 @@ public class DateTimeApplication extends WicketExampleApplication
 	public Class< ? extends Page> getHomePage()
 	{
 		return DateTimePage.class;
-	}	
-}
\ No newline at end of file
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
index b102c2e..de0f8ea 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
@@ -95,6 +95,8 @@ public class DateTimePage extends WicketExamplePage
 		// Link to return to default locale
 		form.add(new Link<Void>("defaultLocaleLink")
 		{
+			private static final long serialVersionUID = 1L;
+
 			public void onClick()
 			{
 				WebRequest request = (WebRequest)getRequest();
@@ -127,6 +129,8 @@ public class DateTimePage extends WicketExamplePage
 		final LocalDateTimeField datetimeField0 = new LocalDateTimeField("datetime0",
 			new PropertyModel<>(this, "dateTime0"))
 		{
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			protected LocalTime getDefaultTime()
 			{
@@ -139,6 +143,8 @@ public class DateTimePage extends WicketExamplePage
 		final LocalDateTimeField datetimeField1 = new LocalDateTimeField("datetime1",
 			new ZonedToLocalDateTimeModel(zonedDateTime1)
 			{
+				private static final long serialVersionUID = 1L;
+
 				@Override
 				protected ZoneId getClientTimeZone()
 				{
@@ -158,6 +164,8 @@ public class DateTimePage extends WicketExamplePage
 		LocalDateTimeTextField datetime2 = new LocalDateTimeTextField("datetime2",
 			new ZonedToLocalDateTimeModel(zonedDateTime2)
 			{
+				private static final long serialVersionUID = 1L;
+
 				@Override
 				protected ZoneId getClientTimeZone()
 				{
@@ -197,6 +205,8 @@ public class DateTimePage extends WicketExamplePage
 	 */
 	private final class LocaleChoiceRenderer extends ChoiceRenderer<Locale>
 	{
+		private static final long serialVersionUID = 1L;
+
 		@Override
 		public Object getDisplayValue(Locale locale)
 		{
@@ -209,6 +219,8 @@ public class DateTimePage extends WicketExamplePage
 	 */
 	private final class LocaleDropDownChoice extends DropDownChoice<Locale>
 	{
+		private static final long serialVersionUID = 1L;
+
 		/**
 		 * Construct.
 		 * 
@@ -223,6 +235,8 @@ public class DateTimePage extends WicketExamplePage
 
 			add(new FormComponentUpdatingBehavior()
 			{
+				private static final long serialVersionUID = 1L;
+
 				@Override
 				protected void onUpdate()
 				{
@@ -234,11 +248,14 @@ public class DateTimePage extends WicketExamplePage
 
 	private class ZoneDropDownChoice extends DropDownChoice<ZoneId>
 	{
+		private static final long serialVersionUID = 1L;
 
 		public ZoneDropDownChoice(String id)
 		{
 			super(id, new IModel<List<ZoneId>>()
 			{
+				private static final long serialVersionUID = 1L;
+
 				@Override
 				public List<ZoneId> getObject()
 				{
@@ -251,6 +268,8 @@ public class DateTimePage extends WicketExamplePage
 
 			setChoiceRenderer(new IChoiceRenderer<ZoneId>()
 			{
+				private static final long serialVersionUID = 1L;
+
 				@Override
 				public Object getDisplayValue(ZoneId object)
 				{
@@ -276,6 +295,8 @@ public class DateTimePage extends WicketExamplePage
 
 			add(new FormComponentUpdatingBehavior()
 			{
+				private static final long serialVersionUID = 1L;
+
 				protected void onUpdate()
 				{
 					// clear raw input of all inputs so that values are reformatted

http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties b/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties
index b9a7819..98f7925 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties
@@ -44,4 +44,4 @@ AbstractDateTimeField.CSS.date=datetime-date
 AbstractDateTimeField.CSS.time=datetime-time
 TimeField.hoursSeparator=\u00a0:\u00a0
 TimeField.CSS.hours=time-hours
-TimeField.CSS.minutes=time-minutes
\ No newline at end of file
+TimeField.CSS.minutes=time-minutes

http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
index 2f86c19..a9e9cf2 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
@@ -207,6 +207,8 @@ abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPa
 	protected LocalDateTextField newDateField(String id, IModel<LocalDate> dateFieldModel)
 	{
 		return new LocalDateTextField(id, dateFieldModel, FormatStyle.SHORT) {
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			protected void onComponentTag(ComponentTag tag)
 			{
@@ -229,6 +231,8 @@ abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPa
 	protected TimeField newTimeField(String id, IModel<LocalTime> timeFieldModel)
 	{
 		return new TimeField(id, timeFieldModel) {
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			protected void onComponentTag(ComponentTag tag)
 			{

http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextField.java
index a1d1dc0..68d46de 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextField.java
@@ -61,7 +61,8 @@ public class LocalDateTextField extends TextField<LocalDate> implements ITextFor
 		super(id, model, LocalDate.class);
 
 		this.converter = new TextFormatConverter() {
-			
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public DateTimeFormatter getDateTimeFormatter(Locale locale)
 			{
@@ -104,7 +105,8 @@ public class LocalDateTextField extends TextField<LocalDate> implements ITextFor
 		super(id, model, LocalDate.class);
 
 		this.converter = new TextFormatConverter() {
-			
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public DateTimeFormatter getDateTimeFormatter(Locale locale)
 			{
@@ -157,7 +159,8 @@ public class LocalDateTextField extends TextField<LocalDate> implements ITextFor
 	}
 
 	private abstract class TextFormatConverter extends LocalDateConverter {
-		
+		private static final long serialVersionUID = 1L;
+
 		public abstract String getTextFormat(Locale locale);
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeTextField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeTextField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeTextField.java
index 772b5f3..5095334 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeTextField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeTextField.java
@@ -61,7 +61,8 @@ public class LocalDateTimeTextField extends TextField<LocalDateTime> implements
 		super(id, model, LocalDateTime.class);
 
 		this.converter = new TextFormatConverter() {
-			
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public DateTimeFormatter getDateTimeFormatter(Locale locale)
 			{
@@ -104,7 +105,8 @@ public class LocalDateTimeTextField extends TextField<LocalDateTime> implements
 		super(id, model, LocalDateTime.class);
 
 		this.converter = new TextFormatConverter() {
-			
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public DateTimeFormatter getDateTimeFormatter(Locale locale)
 			{
@@ -157,7 +159,8 @@ public class LocalDateTimeTextField extends TextField<LocalDateTime> implements
 	}
 
 	private abstract class TextFormatConverter extends LocalDateTimeConverter {
-		
+		private static final long serialVersionUID = 1L;
+
 		public abstract String getTextFormat(Locale locale);
 	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeTextField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeTextField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeTextField.java
index 5ea7e3a..36df2e1 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeTextField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeTextField.java
@@ -61,7 +61,8 @@ public class LocalTimeTextField extends TextField<LocalTime> implements ITextFor
 		super(id, model, LocalTime.class);
 
 		this.converter = new TextFormatConverter() {
-			
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public DateTimeFormatter getDateTimeFormatter(Locale locale)
 			{
@@ -104,7 +105,8 @@ public class LocalTimeTextField extends TextField<LocalTime> implements ITextFor
 		super(id, model, LocalTime.class);
 
 		this.converter = new TextFormatConverter() {
-			
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public DateTimeFormatter getDateTimeFormatter(Locale locale)
 			{
@@ -157,7 +159,8 @@ public class LocalTimeTextField extends TextField<LocalTime> implements ITextFor
 	}
 
 	private abstract class TextFormatConverter extends LocalTimeConverter {
-		
+		private static final long serialVersionUID = 1L;
+
 		public abstract String getTextFormat(Locale locale);
 	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
index 976bc49..8f56031 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
@@ -138,6 +138,8 @@ public class TimeField extends FormComponentPanel<LocalTime>
 		// Create and add the "AM/PM" choice
 		add(amOrPmChoice = new DropDownChoice<AM_PM>("amOrPmChoice", new AmPmModel(),
 			Arrays.asList(AM_PM.values())) {
+				private static final long serialVersionUID = 1L;
+
 			@Override
 			protected boolean localizeDisplayValues()
 			{

http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
index 4b3143d..c1b8403 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
@@ -77,4 +77,4 @@ public class ZonedDateTimeField extends AbstractDateTimeField<ZonedDateTime>
 	{
 		return temporal.toLocalTime();
 	}
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/1176c0a6/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
index 0fcb79c..4571b36 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedToLocalDateTimeModel.java
@@ -36,6 +36,7 @@ import org.apache.wicket.util.lang.Args;
  */
 public class ZonedToLocalDateTimeModel implements IModel<LocalDateTime>
 {
+	private static final long serialVersionUID = 1L;
 	private IModel<ZonedDateTime> model;
 
 	/**
@@ -115,4 +116,4 @@ public class ZonedToLocalDateTimeModel implements IModel<LocalDateTime>
 	{
 		return new ZonedToLocalDateTimeModel(new Model<ZonedDateTime>(dateTime));
 	}
-}
\ No newline at end of file
+}


[07/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader-min.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader-min.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader-min.js
deleted file mode 100644
index 9934bb0..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader-min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0
 ,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=
 e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["to
 String","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.construc
 tor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.l
 ength>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+
 |\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});YAHOO.util.Get=function(){var m={},k=0,r=0,l=false,n=YAHOO.env.ua,s=YAHOO.lang,q,d,
 e,i=function(x,t,y){var u=y||window,z=u.document,A=z.createElement(x),v;for(v in t){if(t.hasOwnProperty(v)){A.setAttribute(v,t[v]);}}return A;},h=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/css",rel:"stylesheet",href:u};if(t){s.augmentObject(w,t);}return i("link",w,v);},p=function(u,v,t){var w={id:"yui__dyn_"+(r++),type:"text/javascript",src:u};if(t){s.augmentObject(w,t);}return i("script",w,v);},a=function(t,u){return{tId:t.tId,win:t.win,data:t.data,nodes:t.nodes,msg:u,purge:function(){d(this.tId);}};},b=function(t,w){var u=m[w],v=(s.isString(t))?u.win.document.getElementById(t):t;if(!v){q(w,"target node not found: "+t);}return v;},c=function(w){YAHOO.log("Finishing transaction "+w);var u=m[w],v,t;u.finished=true;if(u.aborted){v="transaction "+w+" was aborted";q(w,v);return;}if(u.onSuccess){t=u.scope||u.win;u.onSuccess.call(t,a(u));}},o=function(v){YAHOO.log("Timeout "+v,"info","get");var u=m[v],t;if(u.onTimeout){t=u.scope||u;u.onTimeout.call(t,a(u));}},f=function(v,A){Y
 AHOO.log("_next: "+v+", loaded: "+A,"info","Get");var u=m[v],D=u.win,C=D.document,B=C.getElementsByTagName("head")[0],x,y,t,E,z;if(u.timer){u.timer.cancel();}if(u.aborted){y="transaction "+v+" was aborted";q(v,y);return;}if(A){u.url.shift();if(u.varName){u.varName.shift();}}else{u.url=(s.isString(u.url))?[u.url]:u.url;if(u.varName){u.varName=(s.isString(u.varName))?[u.varName]:u.varName;}}if(u.url.length===0){if(u.type==="script"&&n.webkit&&n.webkit<420&&!u.finalpass&&!u.varName){z=p(null,u.win,u.attributes);z.innerHTML='YAHOO.util.Get._finalize("'+v+'");';u.nodes.push(z);B.appendChild(z);}else{c(v);}return;}t=u.url[0];if(!t){u.url.shift();YAHOO.log("skipping empty url");return f(v);}YAHOO.log("attempting to load "+t,"info","Get");if(u.timeout){u.timer=s.later(u.timeout,u,o,v);}if(u.type==="script"){x=p(t,D,u.attributes);}else{x=h(t,D,u.attributes);}e(u.type,x,v,t,D,u.url.length);u.nodes.push(x);if(u.insertBefore){E=b(u.insertBefore,v);if(E){E.parentNode.insertBefore(x,E);}}else{B.a
 ppendChild(x);}YAHOO.log("Appending node: "+t,"info","Get");if((n.webkit||n.gecko)&&u.type==="css"){f(v,t);}},j=function(){if(l){return;}l=true;var t,u;for(t in m){if(m.hasOwnProperty(t)){u=m[t];if(u.autopurge&&u.finished){d(u.tId);delete m[t];}}}l=false;},g=function(u,t,v){var x="q"+(k++),w;v=v||{};if(k%YAHOO.util.Get.PURGE_THRESH===0){j();}m[x]=s.merge(v,{tId:x,type:u,url:t,finished:false,aborted:false,nodes:[]});w=m[x];w.win=w.win||window;w.scope=w.scope||w.win;w.autopurge=("autopurge" in w)?w.autopurge:(u==="script")?true:false;w.attributes=w.attributes||{};w.attributes.charset=v.charset||w.attributes.charset||"utf-8";s.later(0,w,f,x);return{tId:x};};e=function(H,z,x,u,D,E,G){var F=G||f,B,t,I,v,J,A,C,y;if(n.ie){z.onreadystatechange=function(){B=this.readyState;if("loaded"===B||"complete"===B){YAHOO.log(x+" onload "+u,"info","Get");z.onreadystatechange=null;F(x,u);}};}else{if(n.webkit){if(H==="script"){if(n.webkit>=420){z.addEventListener("load",function(){YAHOO.log(x+" DOM2 onlo
 ad "+u,"info","Get");F(x,u);});}else{t=m[x];if(t.varName){v=YAHOO.util.Get.POLL_FREQ;YAHOO.log("Polling for "+t.varName[0]);t.maxattempts=YAHOO.util.Get.TIMEOUT/v;t.attempts=0;t._cache=t.varName[0].split(".");t.timer=s.later(v,t,function(w){I=this._cache;A=I.length;J=this.win;for(C=0;C<A;C=C+1){J=J[I[C]];if(!J){this.attempts++;if(this.attempts++>this.maxattempts){y="Over retry limit, giving up";t.timer.cancel();q(x,y);}else{YAHOO.log(I[C]+" failed, retrying");}return;}}YAHOO.log("Safari poll complete");t.timer.cancel();F(x,u);},null,true);}else{s.later(YAHOO.util.Get.POLL_FREQ,null,F,[x,u]);}}}}else{z.onload=function(){YAHOO.log(x+" onload "+u,"info","Get");F(x,u);};}}};q=function(w,v){YAHOO.log("get failure: "+v,"warn","Get");var u=m[w],t;if(u.onFailure){t=u.scope||u.win;u.onFailure.call(t,a(u,v));}};d=function(z){if(m[z]){var t=m[z],u=t.nodes,x=u.length,C=t.win.document,A=C.getElementsByTagName("head")[0],v,y,w,B;if(t.insertBefore){v=b(t.insertBefore,z);if(v){A=v.parentNode;}}for(
 y=0;y<x;y=y+1){w=u[y];if(w.clearAttributes){w.clearAttributes();}else{for(B in w){if(w.hasOwnProperty(B)){delete w[B];}}}A.removeChild(w);}t.nodes=[];}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(t){YAHOO.log(t+" finalized ","info","Get");s.later(0,null,c,t);},abort:function(u){var v=(s.isString(u))?u:u.tId,t=m[v];if(t){YAHOO.log("Aborting "+v,"info","Get");t.aborted=true;}},script:function(t,u){return g("script",t,u);},css:function(t,u){return g("css",t,u);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.9.0",build:"2800"});(function(){var Y=YAHOO,util=Y.util,lang=Y.lang,env=Y.env,PROV="_provides",SUPER="_supersedes",REQ="expanded",AFTER="_after",VERSION="2.9.0";var YUI={dupsAllowed:{"yahoo":true,"get":true},info:{"root":VERSION+"/build/","base":"http://yui.yahooapis.com/"+VERSION+"/build/","comboBase":"http://yui.yahooapis.com/combo?","skin":{"defaultSkin":"sam","base":"assets/skins/","path":"skin.css","after":["reset","fonts","grids","base"],"rollup
 ":3},dupsAllowed:["yahoo","get"],"moduleInfo":{"animation":{"type":"js","path":"animation/animation-min.js","requires":["dom","event"]},"autocomplete":{"type":"js","path":"autocomplete/autocomplete-min.js","requires":["dom","event","datasource"],"optional":["connection","animation"],"skinnable":true},"base":{"type":"css","path":"base/base-min.css","after":["reset","fonts","grids"]},"button":{"type":"js","path":"button/button-min.js","requires":["element"],"optional":["menu"],"skinnable":true},"calendar":{"type":"js","path":"calendar/calendar-min.js","requires":["event","dom"],supersedes:["datemath"],"skinnable":true},"carousel":{"type":"js","path":"carousel/carousel-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"charts":{"type":"js","path":"charts/charts-min.js","requires":["element","json","datasource","swf"]},"colorpicker":{"type":"js","path":"colorpicker/colorpicker-min.js","requires":["slider","element"],"optional":["animation"],"skinnable":true},"con
 nection":{"type":"js","path":"connection/connection-min.js","requires":["event"],"supersedes":["connectioncore"]},"connectioncore":{"type":"js","path":"connection/connection_core-min.js","requires":["event"],"pkg":"connection"},"container":{"type":"js","path":"container/container-min.js","requires":["dom","event"],"optional":["dragdrop","animation","connection"],"supersedes":["containercore"],"skinnable":true},"containercore":{"type":"js","path":"container/container_core-min.js","requires":["dom","event"],"pkg":"container"},"cookie":{"type":"js","path":"cookie/cookie-min.js","requires":["yahoo"]},"datasource":{"type":"js","path":"datasource/datasource-min.js","requires":["event"],"optional":["connection"]},"datatable":{"type":"js","path":"datatable/datatable-min.js","requires":["element","datasource"],"optional":["calendar","dragdrop","paginator"],"skinnable":true},datemath:{"type":"js","path":"datemath/datemath-min.js","requires":["yahoo"]},"dom":{"type":"js","path":"dom/dom-min.js
 ","requires":["yahoo"]},"dragdrop":{"type":"js","path":"dragdrop/dragdrop-min.js","requires":["dom","event"]},"editor":{"type":"js","path":"editor/editor-min.js","requires":["menu","element","button"],"optional":["animation","dragdrop"],"supersedes":["simpleeditor"],"skinnable":true},"element":{"type":"js","path":"element/element-min.js","requires":["dom","event"],"optional":["event-mouseenter","event-delegate"]},"element-delegate":{"type":"js","path":"element-delegate/element-delegate-min.js","requires":["element"]},"event":{"type":"js","path":"event/event-min.js","requires":["yahoo"]},"event-simulate":{"type":"js","path":"event-simulate/event-simulate-min.js","requires":["event"]},"event-delegate":{"type":"js","path":"event-delegate/event-delegate-min.js","requires":["event"],"optional":["selector"]},"event-mouseenter":{"type":"js","path":"event-mouseenter/event-mouseenter-min.js","requires":["dom","event"]},"fonts":{"type":"css","path":"fonts/fonts-min.css"},"get":{"type":"js","p
 ath":"get/get-min.js","requires":["yahoo"]},"grids":{"type":"css","path":"grids/grids-min.css","requires":["fonts"],"optional":["reset"]},"history":{"type":"js","path":"history/history-min.js","requires":["event"]},"imagecropper":{"type":"js","path":"imagecropper/imagecropper-min.js","requires":["dragdrop","element","resize"],"skinnable":true},"imageloader":{"type":"js","path":"imageloader/imageloader-min.js","requires":["event","dom"]},"json":{"type":"js","path":"json/json-min.js","requires":["yahoo"]},"layout":{"type":"js","path":"layout/layout-min.js","requires":["element"],"optional":["animation","dragdrop","resize","selector"],"skinnable":true},"logger":{"type":"js","path":"logger/logger-min.js","requires":["event","dom"],"optional":["dragdrop"],"skinnable":true},"menu":{"type":"js","path":"menu/menu-min.js","requires":["containercore"],"skinnable":true},"paginator":{"type":"js","path":"paginator/paginator-min.js","requires":["element"],"skinnable":true},"profiler":{"type":"js"
 ,"path":"profiler/profiler-min.js","requires":["yahoo"]},"profilerviewer":{"type":"js","path":"profilerviewer/profilerviewer-min.js","requires":["profiler","yuiloader","element"],"skinnable":true},"progressbar":{"type":"js","path":"progressbar/progressbar-min.js","requires":["element"],"optional":["animation"],"skinnable":true},"reset":{"type":"css","path":"reset/reset-min.css"},"reset-fonts-grids":{"type":"css","path":"reset-fonts-grids/reset-fonts-grids.css","supersedes":["reset","fonts","grids","reset-fonts"],"rollup":4},"reset-fonts":{"type":"css","path":"reset-fonts/reset-fonts.css","supersedes":["reset","fonts"],"rollup":2},"resize":{"type":"js","path":"resize/resize-min.js","requires":["dragdrop","element"],"optional":["animation"],"skinnable":true},"selector":{"type":"js","path":"selector/selector-min.js","requires":["yahoo","dom"]},"simpleeditor":{"type":"js","path":"editor/simpleeditor-min.js","requires":["element"],"optional":["containercore","menu","button","animation","
 dragdrop"],"skinnable":true,"pkg":"editor"},"slider":{"type":"js","path":"slider/slider-min.js","requires":["dragdrop"],"optional":["animation"],"skinnable":true},"storage":{"type":"js","path":"storage/storage-min.js","requires":["yahoo","event","cookie"],"optional":["swfstore"]},"stylesheet":{"type":"js","path":"stylesheet/stylesheet-min.js","requires":["yahoo"]},"swf":{"type":"js","path":"swf/swf-min.js","requires":["element"],"supersedes":["swfdetect"]},"swfdetect":{"type":"js","path":"swfdetect/swfdetect-min.js","requires":["yahoo"]},"swfstore":{"type":"js","path":"swfstore/swfstore-min.js","requires":["element","cookie","swf"]},"tabview":{"type":"js","path":"tabview/tabview-min.js","requires":["element"],"optional":["connection"],"skinnable":true},"treeview":{"type":"js","path":"treeview/treeview-min.js","requires":["event","dom"],"optional":["json","animation","calendar"],"skinnable":true},"uploader":{"type":"js","path":"uploader/uploader-min.js","requires":["element"]},"utili
 ties":{"type":"js","path":"utilities/utilities.js","supersedes":["yahoo","event","dragdrop","animation","dom","connection","element","yahoo-dom-event","get","yuiloader","yuiloader-dom-event"],"rollup":8},"yahoo":{"type":"js","path":"yahoo/yahoo-min.js"},"yahoo-dom-event":{"type":"js","path":"yahoodomevent/yahoo-dom-event.js","supersedes":["yahoo","event","dom"],"rollup":3},"yuiloader":{"type":"js","path":"yuiloader/yuiloader-min.js","supersedes":["yahoo","get"]},"yuiloader-dom-event":{"type":"js","path":"yuiloader-dom-event/yuiloader-dom-event.js","supersedes":["yahoo","dom","event","get","yuiloader","yahoo-dom-event"],"rollup":5},"yuitest":{"type":"js","path":"yuitest/yuitest-min.js","requires":["logger"],"optional":["event-simulate"],"skinnable":true}}},ObjectUtil:{appendArray:function(o,a){if(a){for(var i=0;
-i<a.length;i=i+1){o[a[i]]=true;}}},keys:function(o,ordered){var a=[],i;for(i in o){if(lang.hasOwnProperty(o,i)){a.push(i);}}return a;}},ArrayUtil:{appendArray:function(a1,a2){Array.prototype.push.apply(a1,a2);},indexOf:function(a,val){for(var i=0;i<a.length;i=i+1){if(a[i]===val){return i;}}return -1;},toObject:function(a){var o={};for(var i=0;i<a.length;i=i+1){o[a[i]]=true;}return o;},uniq:function(a){return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));}}};YAHOO.util.YUILoader=function(o){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=Y.log;this.onProgress=null;this.onTimeout=null;this.scope=this;this.data=null;this.insertBefore=null;this.charset=null;this.varName=null;this.base=YUI.info.base;this.comboBase=YUI.info.comboBase;this.combine=false;this.root=YUI.info.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo=lang.merge(YUI.info.moduleInfo);this.rollups=null;t
 his.loadOptional=false;this.sorted=[];this.loaded={};this.dirty=true;this.inserted={};var self=this;env.listeners.push(function(m){if(self._useYahooListener){self.loadNext(m.name);}});this.skin=lang.merge(YUI.info.skin);this._config(o);};Y.util.YUILoader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(o){if(o){for(var i in o){if(lang.hasOwnProperty(o,i)){if(i=="require"){this.require(o[i]);}else{this[i]=o[i];}}}}var f=this.filter;if(lang.isString(f)){f=f.toUpperCase();if(f==="DEBUG"){this.require("logger");}if(!Y.widget.LogWriter){Y.widget.LogWriter=function(){return Y;};}this.filter=this.FILTERS[f];}},addModule:function(o){if(!o||!o.name||!o.type||(!o.path&&!o.fullpath)){return false;}o.ext=("ext" in o)?o.ext:true;o.requires=o.requires||[];this.moduleInfo[o.name]=o;this.dirty=true;return true;},require:function(what){var a=(typeof what==="string")?arguments:what;this.
 dirty=true;YUI.ObjectUtil.appendArray(this.required,a);},_addSkin:function(skin,mod){var name=this.formatSkin(skin),info=this.moduleInfo,sinf=this.skin,ext=info[mod]&&info[mod].ext;if(!info[name]){this.addModule({"name":name,"type":"css","path":sinf.base+skin+"/"+sinf.path,"after":sinf.after,"rollup":sinf.rollup,"ext":ext});}if(mod){name=this.formatSkin(skin,mod);if(!info[name]){var mdef=info[mod],pkg=mdef.pkg||mod;this.addModule({"name":name,"type":"css","after":sinf.after,"path":pkg+"/"+sinf.base+skin+"/"+mod+".css","ext":ext});}}return name;},getRequires:function(mod){if(!mod){return[];}if(!this.dirty&&mod.expanded){return mod.expanded;}mod.requires=mod.requires||[];var i,d=[],r=mod.requires,o=mod.optional,info=this.moduleInfo,m;for(i=0;i<r.length;i=i+1){d.push(r[i]);m=info[r[i]];YUI.ArrayUtil.appendArray(d,this.getRequires(m));}if(o&&this.loadOptional){for(i=0;i<o.length;i=i+1){d.push(o[i]);YUI.ArrayUtil.appendArray(d,this.getRequires(info[o[i]]));}}mod.expanded=YUI.ArrayUtil.un
 iq(d);return mod.expanded;},getProvides:function(name,notMe){var addMe=!(notMe),ckey=(addMe)?PROV:SUPER,m=this.moduleInfo[name],o={};if(!m){return o;}if(m[ckey]){return m[ckey];}var s=m.supersedes,done={},me=this;var add=function(mm){if(!done[mm]){done[mm]=true;lang.augmentObject(o,me.getProvides(mm));}};if(s){for(var i=0;i<s.length;i=i+1){add(s[i]);}}m[SUPER]=o;m[PROV]=lang.merge(o);m[PROV][name]=true;return m[ckey];},calculate:function(o){if(o||this.dirty){this._config(o);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var info=this.moduleInfo,name,i,j;for(name in info){if(lang.hasOwnProperty(info,name)){var m=info[name];if(m&&m.skinnable){var o=this.skin.overrides,smod;if(o&&o[name]){for(i=0;i<o[name].length;i=i+1){smod=this._addSkin(o[name][i],name);}}else{smod=this._addSkin(this.skin.defaultSkin,name);}if(YUI.ArrayUtil.indexOf(m.requires,smod)==-1){m.requires.push(smod);}}}}var l=lang.merge(thi
 s.inserted);if(!this._sandbox){l=lang.merge(l,env.modules);}if(this.ignore){YUI.ObjectUtil.appendArray(l,this.ignore);}if(this.force){for(i=0;i<this.force.length;i=i+1){if(this.force[i] in l){delete l[this.force[i]];}}}for(j in l){if(lang.hasOwnProperty(l,j)){lang.augmentObject(l,this.getProvides(j));}}this.loaded=l;},_explode:function(){var r=this.required,i,mod;for(i in r){if(lang.hasOwnProperty(r,i)){mod=this.moduleInfo[i];if(mod){var req=this.getRequires(mod);if(req){YUI.ObjectUtil.appendArray(r,req);}}}}},_skin:function(){},formatSkin:function(skin,mod){var s=this.SKIN_PREFIX+skin;if(mod){s=s+"-"+mod;}return s;},parseSkin:function(mod){if(mod.indexOf(this.SKIN_PREFIX)===0){var a=mod.split("-");return{skin:a[1],module:a[2]};}return null;},_rollup:function(){var i,j,m,s,rollups={},r=this.required,roll,info=this.moduleInfo;if(this.dirty||!this.rollups){for(i in info){if(lang.hasOwnProperty(info,i)){m=info[i];if(m&&m.rollup){rollups[i]=m;}}}this.rollups=rollups;}for(;;){var rolled=
 false;for(i in rollups){if(!r[i]&&!this.loaded[i]){m=info[i];s=m.supersedes;roll=false;if(!m.rollup){continue;}var skin=(m.ext)?false:this.parseSkin(i),c=0;if(skin){for(j in r){if(lang.hasOwnProperty(r,j)){if(i!==j&&this.parseSkin(j)){c++;roll=(c>=m.rollup);if(roll){break;}}}}}else{for(j=0;j<s.length;j=j+1){if(this.loaded[s[j]]&&(!YUI.dupsAllowed[s[j]])){roll=false;break;}else{if(r[s[j]]){c++;roll=(c>=m.rollup);if(roll){break;}}}}}if(roll){r[i]=true;rolled=true;this.getRequires(m);}}}if(!rolled){break;}}},_reduce:function(){var i,j,s,m,r=this.required;for(i in r){if(i in this.loaded){delete r[i];}else{var skinDef=this.parseSkin(i);if(skinDef){if(!skinDef.module){var skin_pre=this.SKIN_PREFIX+skinDef.skin;for(j in r){if(lang.hasOwnProperty(r,j)){m=this.moduleInfo[j];var ext=m&&m.ext;if(!ext&&j!==i&&j.indexOf(skin_pre)>-1){delete r[j];}}}}}else{m=this.moduleInfo[i];s=m&&m.supersedes;if(s){for(j=0;j<s.length;j=j+1){if(s[j] in r){delete r[s[j]];}}}}}}},_onFailure:function(msg){YAHOO.log
 ("Failure","info","loader");
-var f=this.onFailure;if(f){f.call(this.scope,{msg:"failure: "+msg,data:this.data,success:false});}},_onTimeout:function(){YAHOO.log("Timeout","info","loader");var f=this.onTimeout;if(f){f.call(this.scope,{msg:"timeout",data:this.data,success:false});}},_sort:function(){var s=[],info=this.moduleInfo,loaded=this.loaded,checkOptional=!this.loadOptional,me=this;var requires=function(aa,bb){var mm=info[aa];if(loaded[bb]||!mm){return false;}var ii,rr=mm.expanded,after=mm.after,other=info[bb],optional=mm.optional;if(rr&&YUI.ArrayUtil.indexOf(rr,bb)>-1){return true;}if(after&&YUI.ArrayUtil.indexOf(after,bb)>-1){return true;}if(checkOptional&&optional&&YUI.ArrayUtil.indexOf(optional,bb)>-1){return true;}var ss=info[bb]&&info[bb].supersedes;if(ss){for(ii=0;ii<ss.length;ii=ii+1){if(requires(aa,ss[ii])){return true;}}}if(mm.ext&&mm.type=="css"&&!other.ext&&other.type=="css"){return true;}return false;};for(var i in this.required){if(lang.hasOwnProperty(this.required,i)){s.push(i);}}var p=0;for(
 ;;){var l=s.length,a,b,j,k,moved=false;for(j=p;j<l;j=j+1){a=s[j];for(k=j+1;k<l;k=k+1){if(requires(a,s[k])){b=s.splice(k,1);s.splice(j,0,b[0]);moved=true;break;}}if(moved){break;}else{p=p+1;}}if(!moved){break;}}this.sorted=s;},toString:function(){var o={type:"YUILoader",base:this.base,filter:this.filter,required:this.required,loaded:this.loaded,inserted:this.inserted};lang.dump(o,1);},_combine:function(){this._combining=[];var self=this,s=this.sorted,len=s.length,js=this.comboBase,css=this.comboBase,target,startLen=js.length,i,m,type=this.loadType;YAHOO.log("type "+type);for(i=0;i<len;i=i+1){m=this.moduleInfo[s[i]];if(m&&!m.ext&&(!type||type===m.type)){target=this.root+m.path;target+="&";if(m.type=="js"){js+=target;}else{css+=target;}this._combining.push(s[i]);}}if(this._combining.length){YAHOO.log("Attempting to combine: "+this._combining,"info","loader");var callback=function(o){var c=this._combining,len=c.length,i,m;for(i=0;i<len;i=i+1){this.inserted[c[i]]=true;}this.loadNext(o.da
 ta);},loadScript=function(){if(js.length>startLen){YAHOO.util.Get.script(self._filter(js),{data:self._loading,onSuccess:callback,onFailure:self._onFailure,onTimeout:self._onTimeout,insertBefore:self.insertBefore,charset:self.charset,timeout:self.timeout,scope:self});}else{this.loadNext();}};if(css.length>startLen){YAHOO.util.Get.css(this._filter(css),{data:this._loading,onSuccess:loadScript,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,scope:self});}else{loadScript();}return;}else{this.loadNext(this._loading);}},insert:function(o,type){this.calculate(o);this._loading=true;this.loadType=type;if(this.combine){return this._combine();}if(!type){var self=this;this._internalCallback=function(){self._internalCallback=null;self.insert(null,"js");};this.insert(null,"css");return;}this.loadNext();},sandbox:function(o,type){var self=this,success=function(o){var idx=o.argument[0],name=o.argument[2];self._scriptText[i
 dx]=o.responseText;if(self.onProgress){self.onProgress.call(self.scope,{name:name,scriptText:o.responseText,xhrResponse:o,data:self.data});}self._loadCount++;if(self._loadCount>=self._stopCount){var v=self.varName||"YAHOO";var t="(function() {\n";var b="\nreturn "+v+";\n})();";var ref=eval(t+self._scriptText.join("\n")+b);self._pushEvents(ref);if(ref){self.onSuccess.call(self.scope,{reference:ref,data:self.data});}else{self._onFailure.call(self.varName+" reference failure");}}},failure=function(o){self.onFailure.call(self.scope,{msg:"XHR failure",xhrResponse:o,data:self.data});};self._config(o);if(!self.onSuccess){throw new Error("You must supply an onSuccess handler for your sandbox");}self._sandbox=true;if(!type||type!=="js"){self._internalCallback=function(){self._internalCallback=null;self.sandbox(null,"js");};self.insert(null,"css");return;}if(!util.Connect){var ld=new YAHOO.util.YUILoader();ld.insert({base:self.base,filter:self.filter,require:"connection",insertBefore:self.ins
 ertBefore,charset:self.charset,onSuccess:function(){self.sandbox(null,"js");},scope:self},"js");return;}self._scriptText=[];self._loadCount=0;self._stopCount=self.sorted.length;self._xhr=[];self.calculate();var s=self.sorted,l=s.length,i,m,url;for(i=0;i<l;i=i+1){m=self.moduleInfo[s[i]];if(!m){self._onFailure("undefined module "+m);for(var j=0;j<self._xhr.length;j=j+1){self._xhr[j].abort();}return;}if(m.type!=="js"){self._loadCount++;continue;}url=m.fullpath;url=(url)?self._filter(url):self._url(m.path);var xhrData={success:success,failure:failure,scope:self,argument:[i,url,s[i]]};self._xhr.push(util.Connect.asyncRequest("GET",url,xhrData));}},loadNext:function(mname){if(!this._loading){return;}var self=this,donext=function(o){self.loadNext(o.data);},successfn,s=this.sorted,len=s.length,i,fn,m,url;if(mname){if(mname!==this._loading){return;}this.inserted[mname]=true;if(this.onProgress){this.onProgress.call(this.scope,{name:mname,data:this.data});}}for(i=0;i<len;i=i+1){if(s[i] in this
 .inserted){continue;}if(s[i]===this._loading){return;}m=this.moduleInfo[s[i]];if(!m){this.onFailure.call(this.scope,{msg:"undefined module "+m,data:this.data});return;}if(!this.loadType||this.loadType===m.type){successfn=donext;this._loading=s[i];fn=(m.type==="css")?util.Get.css:util.Get.script;url=m.fullpath;url=(url)?this._filter(url):this._url(m.path);if(env.ua.webkit&&env.ua.webkit<420&&m.type==="js"&&!m.varName){successfn=null;this._useYahooListener=true;}fn(url,{data:s[i],onSuccess:successfn,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,varName:m.varName,scope:self});return;}}this._loading=null;if(this._internalCallback){var f=this._internalCallback;this._internalCallback=null;f.call(this);}else{if(this.onSuccess){this._pushEvents();this.onSuccess.call(this.scope,{data:this.data});}}},_pushEvents:function(ref){var r=ref||YAHOO;if(r.util&&r.util.Event){r.util.Event._load();}},_filter:function(str){va
 r f=this.filter;return(f)?str.replace(new RegExp(f.searchExp,"g"),f.replaceStr):str;
-},_url:function(path){return this._filter((this.base||"")+path);}};})();YAHOO.register("yuiloader",YAHOO.util.YUILoader,{version:"2.9.0",build:"2800"});
\ No newline at end of file


[02/20] wicket git commit: WICKET-6105 More tests are added some issues are fixed

Posted by sv...@apache.org.
WICKET-6105 More tests are added some issues are fixed


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2f6b59ef
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2f6b59ef
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2f6b59ef

Branch: refs/heads/master
Commit: 2f6b59effd25a92385417e65724d835c8fdc0459
Parents: 2bb684c
Author: Maxim Solodovnik <so...@gmail.com>
Authored: Fri Oct 6 12:15:28 2017 +0700
Committer: Sven Meier <sv...@apache.org>
Committed: Tue Oct 17 22:32:39 2017 +0200

----------------------------------------------------------------------
 .../form/datetime/AbstractDateTimeField.java    | 22 ++++---
 .../html/form/datetime/DateTimeField.java       | 12 +---
 .../html/form/datetime/ZonedDateTimeField.java  | 10 +--
 .../html/form/datetime/DateTimeFieldTest.java   | 64 ++++++++++++++++++++
 4 files changed, 81 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/2f6b59ef/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
index 5ec27a6..8b6f85d 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
@@ -137,18 +137,18 @@ abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPa
 		try
 		{
 			// Get the converted input values
-			LocalDate localDate = dateField.getConvertedInput();
+			LocalDate date = dateField.getConvertedInput();
+			LocalTime time = timeField.getConvertedInput();
 
-			if (localDate == null)
+			if (date == null || time == null)
 			{
-				return;
+				setConvertedInput(null);
+			}
+			else
+			{
+				// Use the input to create proper date-time
+				setConvertedInput(performConvert(date, time));
 			}
-
-			// Use the input to create a date object with proper timezone
-			LocalTime localTime = timeField.getConvertedInput();
-
-			// The date will be in the server's timezone
-			setConvertedInput(performConvert(localDate, localTime));
 		}
 		catch (RuntimeException e)
 		{
@@ -159,7 +159,9 @@ abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPa
 
 	abstract T performConvert(LocalDate date, LocalTime time);
 
-	abstract void prepareObject();
+	void prepareObject() {
+		// no-op by default
+	}
 
 	/**
 	 * create a new {@link DateField} instance to be added to this panel.

http://git-wip-us.apache.org/repos/asf/wicket/blob/2f6b59ef/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
index 8ff825a..bc4801c 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
@@ -90,17 +90,9 @@ public class DateTimeField extends AbstractDateTimeField<LocalDateTime>
 		return LocalDateTime.of(date, time);
 	}
 
-	@Override
-	void prepareObject() {
-		if (getModelObject() == null)
-		{
-			dateTime = null;
-		}
-	}
-
 	LocalDate getLocalDate()
 	{
-		return dateTime.toLocalDate();
+		return getModelObject() == null ? null : dateTime.toLocalDate();
 	}
 
 	void setLocalDate(LocalDate date)
@@ -112,7 +104,7 @@ public class DateTimeField extends AbstractDateTimeField<LocalDateTime>
 
 	LocalTime getLocalTime()
 	{
-		return dateTime.toLocalTime();
+		return getModelObject() == null ? null : dateTime.toLocalTime();
 	}
 
 	void setLocalTime(LocalTime time)

http://git-wip-us.apache.org/repos/asf/wicket/blob/2f6b59ef/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
index a6814f8..eb70e12 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
@@ -114,11 +114,7 @@ public class ZonedDateTimeField extends AbstractDateTimeField<ZonedDateTime>
 	@Override
 	void prepareObject() {
 		ZonedDateTime modelObject = getModelObject();
-		if (modelObject == null)
-		{
-			dateTime = null;
-		}
-		else
+		if (modelObject != null)
 		{
 			// convert date to the client's time zone if we have that info
 			ZoneId zone = getClientTimeZone();
@@ -131,7 +127,7 @@ public class ZonedDateTimeField extends AbstractDateTimeField<ZonedDateTime>
 
 	LocalDate getLocalDate()
 	{
-		return dateTime.toLocalDate();
+		return getModelObject() == null ? null : dateTime.toLocalDate();
 	}
 
 	void setLocalDate(LocalDate date)
@@ -143,7 +139,7 @@ public class ZonedDateTimeField extends AbstractDateTimeField<ZonedDateTime>
 
 	LocalTime getLocalTime()
 	{
-		return dateTime.toLocalTime();
+		return getModelObject() == null ? null : dateTime.toLocalTime();
 	}
 
 	void setLocalTime(LocalTime time)

http://git-wip-us.apache.org/repos/asf/wicket/blob/2f6b59ef/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
index 3b167e4..753e98e 100644
--- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
+++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
@@ -18,6 +18,7 @@ package org.apache.wicket.extensions.markup.html.form.datetime;
 
 import java.io.Serializable;
 import java.time.LocalDate;
+import java.time.LocalDateTime;
 import java.time.LocalTime;
 import java.util.Locale;
 
@@ -104,6 +105,69 @@ public class DateTimeFieldTest extends WicketTestCase {
 		assertEquals(date, d);
 	}
 
+	@Test
+	public void dateTimeNullTest() {
+		TestDateTimePage page = new TestDateTimePage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.submit();
+		assertNull(page.field.getModelObject());
+	}
+
+	@Test
+	public void dateTimeNullTest1() {
+		LocalDate date = LocalDate.of(2017, 02, 13);
+		TestDateTimePage page = new TestDateTimePage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field:date", new StyleDateConverter("F").convertToString(date, Locale.forLanguageTag("en-US")));
+		formTester.submit();
+		assertNull(page.field.getModelObject());
+	}
+
+	@Test
+	public void dateTimeNullTest2() {
+		TestDateTimePage page = new TestDateTimePage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field:time:hours", "6");
+		formTester.setValue("field:time:minutes", "15");
+		formTester.select("field:time:amOrPmChoice", 0);
+		formTester.submit();
+		assertNull(page.field.getModelObject());
+	}
+
+	@Test
+	public void dateTimeNotNullTest() {
+		LocalDate date = LocalDate.of(2017, 02, 13);
+		TestDateTimePage page = new TestDateTimePage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field:date", new StyleDateConverter("S").convertToString(date, Locale.forLanguageTag("en-US")));
+		formTester.setValue("field:time:hours", "6");
+		formTester.setValue("field:time:minutes", "15");
+		formTester.select("field:time:amOrPmChoice", 0);
+		formTester.submit();
+		assertNotNull(page.field.getModelObject());
+		assertEquals(LocalDateTime.of(date, LocalTime.of(6,  15)), page.field.getModelObject());
+	}
+
+	public static class TestDateTimePage extends TestPage<LocalDateTime>
+	{
+		private static final long serialVersionUID = 1L;
+
+		TestDateTimePage(LocalDateTime val)
+		{
+			super(val);
+		}
+
+		@Override
+		FormComponent<LocalDateTime> newComponent()
+		{
+			return new DateTimeField("field", model);
+		}
+	}
+
 	public static class TestDatePage extends TestPage<LocalDate>
 	{
 		private static final long serialVersionUID = 1L;


[12/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js
deleted file mode 100644
index 05ce3ce..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js
+++ /dev/null
@@ -1,7390 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-(function () {
-
-    /**
-    * Config is a utility used within an Object to allow the implementer to
-    * maintain a list of local configuration properties and listen for changes 
-    * to those properties dynamically using CustomEvent. The initial values are 
-    * also maintained so that the configuration can be reset at any given point 
-    * to its initial state.
-    * @namespace YAHOO.util
-    * @class Config
-    * @constructor
-    * @param {Object} owner The owner Object to which this Config Object belongs
-    */
-    YAHOO.util.Config = function (owner) {
-
-        if (owner) {
-            this.init(owner);
-        }
-
-
-    };
-
-
-    var Lang = YAHOO.lang,
-        CustomEvent = YAHOO.util.CustomEvent,
-        Config = YAHOO.util.Config;
-
-
-    /**
-     * Constant representing the CustomEvent type for the config changed event.
-     * @property YAHOO.util.Config.CONFIG_CHANGED_EVENT
-     * @private
-     * @static
-     * @final
-     */
-    Config.CONFIG_CHANGED_EVENT = "configChanged";
-    
-    /**
-     * Constant representing the boolean type string
-     * @property YAHOO.util.Config.BOOLEAN_TYPE
-     * @private
-     * @static
-     * @final
-     */
-    Config.BOOLEAN_TYPE = "boolean";
-    
-    Config.prototype = {
-     
-        /**
-        * Object reference to the owner of this Config Object
-        * @property owner
-        * @type Object
-        */
-        owner: null,
-        
-        /**
-        * Boolean flag that specifies whether a queue is currently 
-        * being executed
-        * @property queueInProgress
-        * @type Boolean
-        */
-        queueInProgress: false,
-        
-        /**
-        * Maintains the local collection of configuration property objects and 
-        * their specified values
-        * @property config
-        * @private
-        * @type Object
-        */ 
-        config: null,
-        
-        /**
-        * Maintains the local collection of configuration property objects as 
-        * they were initially applied.
-        * This object is used when resetting a property.
-        * @property initialConfig
-        * @private
-        * @type Object
-        */ 
-        initialConfig: null,
-        
-        /**
-        * Maintains the local, normalized CustomEvent queue
-        * @property eventQueue
-        * @private
-        * @type Object
-        */ 
-        eventQueue: null,
-        
-        /**
-        * Custom Event, notifying subscribers when Config properties are set 
-        * (setProperty is called without the silent flag
-        * @event configChangedEvent
-        */
-        configChangedEvent: null,
-    
-        /**
-        * Initializes the configuration Object and all of its local members.
-        * @method init
-        * @param {Object} owner The owner Object to which this Config 
-        * Object belongs
-        */
-        init: function (owner) {
-    
-            this.owner = owner;
-    
-            this.configChangedEvent = 
-                this.createEvent(Config.CONFIG_CHANGED_EVENT);
-    
-            this.configChangedEvent.signature = CustomEvent.LIST;
-            this.queueInProgress = false;
-            this.config = {};
-            this.initialConfig = {};
-            this.eventQueue = [];
-        
-        },
-        
-        /**
-        * Validates that the value passed in is a Boolean.
-        * @method checkBoolean
-        * @param {Object} val The value to validate
-        * @return {Boolean} true, if the value is valid
-        */ 
-        checkBoolean: function (val) {
-            return (typeof val == Config.BOOLEAN_TYPE);
-        },
-        
-        /**
-        * Validates that the value passed in is a number.
-        * @method checkNumber
-        * @param {Object} val The value to validate
-        * @return {Boolean} true, if the value is valid
-        */
-        checkNumber: function (val) {
-            return (!isNaN(val));
-        },
-        
-        /**
-        * Fires a configuration property event using the specified value. 
-        * @method fireEvent
-        * @private
-        * @param {String} key The configuration property's name
-        * @param {value} Object The value of the correct type for the property
-        */ 
-        fireEvent: function ( key, value ) {
-            var property = this.config[key];
-        
-            if (property && property.event) {
-                property.event.fire(value);
-            } 
-        },
-        
-        /**
-        * Adds a property to the Config Object's private config hash.
-        * @method addProperty
-        * @param {String} key The configuration property's name
-        * @param {Object} propertyObject The Object containing all of this 
-        * property's arguments
-        */
-        addProperty: function ( key, propertyObject ) {
-            key = key.toLowerCase();
-        
-            this.config[key] = propertyObject;
-        
-            propertyObject.event = this.createEvent(key, { scope: this.owner });
-            propertyObject.event.signature = CustomEvent.LIST;
-            
-            
-            propertyObject.key = key;
-        
-            if (propertyObject.handler) {
-                propertyObject.event.subscribe(propertyObject.handler, 
-                    this.owner);
-            }
-        
-            this.setProperty(key, propertyObject.value, true);
-            
-            if (! propertyObject.suppressEvent) {
-                this.queueProperty(key, propertyObject.value);
-            }
-            
-        },
-        
-        /**
-        * Returns a key-value configuration map of the values currently set in  
-        * the Config Object.
-        * @method getConfig
-        * @return {Object} The current config, represented in a key-value map
-        */
-        getConfig: function () {
-        
-            var cfg = {},
-                currCfg = this.config,
-                prop,
-                property;
-                
-            for (prop in currCfg) {
-                if (Lang.hasOwnProperty(currCfg, prop)) {
-                    property = currCfg[prop];
-                    if (property && property.event) {
-                        cfg[prop] = property.value;
-                    }
-                }
-            }
-
-            return cfg;
-        },
-        
-        /**
-        * Returns the value of specified property.
-        * @method getProperty
-        * @param {String} key The name of the property
-        * @return {Object}  The value of the specified property
-        */
-        getProperty: function (key) {
-            var property = this.config[key.toLowerCase()];
-            if (property && property.event) {
-                return property.value;
-            } else {
-                return undefined;
-            }
-        },
-        
-        /**
-        * Resets the specified property's value to its initial value.
-        * @method resetProperty
-        * @param {String} key The name of the property
-        * @return {Boolean} True is the property was reset, false if not
-        */
-        resetProperty: function (key) {
-            key = key.toLowerCase();
-
-            var property = this.config[key];
-
-            if (property && property.event) {
-                if (key in this.initialConfig) {
-                    this.setProperty(key, this.initialConfig[key]);
-                    return true;
-                }
-            } else {
-                return false;
-            }
-        },
-        
-        /**
-        * Sets the value of a property. If the silent property is passed as 
-        * true, the property's event will not be fired.
-        * @method setProperty
-        * @param {String} key The name of the property
-        * @param {String} value The value to set the property to
-        * @param {Boolean} silent Whether the value should be set silently, 
-        * without firing the property event.
-        * @return {Boolean} True, if the set was successful, false if it failed.
-        */
-        setProperty: function (key, value, silent) {
-        
-            var property;
-        
-            key = key.toLowerCase();
-        
-            if (this.queueInProgress && ! silent) {
-                // Currently running through a queue... 
-                this.queueProperty(key,value);
-                return true;
-    
-            } else {
-                property = this.config[key];
-                if (property && property.event) {
-                    if (property.validator && !property.validator(value)) {
-                        return false;
-                    } else {
-                        property.value = value;
-                        if (! silent) {
-                            this.fireEvent(key, value);
-                            this.configChangedEvent.fire([key, value]);
-                        }
-                        return true;
-                    }
-                } else {
-                    return false;
-                }
-            }
-        },
-        
-        /**
-        * Sets the value of a property and queues its event to execute. If the 
-        * event is already scheduled to execute, it is
-        * moved from its current position to the end of the queue.
-        * @method queueProperty
-        * @param {String} key The name of the property
-        * @param {String} value The value to set the property to
-        * @return {Boolean}  true, if the set was successful, false if 
-        * it failed.
-        */ 
-        queueProperty: function (key, value) {
-        
-            key = key.toLowerCase();
-        
-            var property = this.config[key],
-                foundDuplicate = false,
-                iLen,
-                queueItem,
-                queueItemKey,
-                queueItemValue,
-                sLen,
-                supercedesCheck,
-                qLen,
-                queueItemCheck,
-                queueItemCheckKey,
-                queueItemCheckValue,
-                i,
-                s,
-                q;
-                                
-            if (property && property.event) {
-    
-                if (!Lang.isUndefined(value) && property.validator && 
-                    !property.validator(value)) { // validator
-                    return false;
-                } else {
-        
-                    if (!Lang.isUndefined(value)) {
-                        property.value = value;
-                    } else {
-                        value = property.value;
-                    }
-        
-                    foundDuplicate = false;
-                    iLen = this.eventQueue.length;
-        
-                    for (i = 0; i < iLen; i++) {
-                        queueItem = this.eventQueue[i];
-        
-                        if (queueItem) {
-                            queueItemKey = queueItem[0];
-                            queueItemValue = queueItem[1];
-
-                            if (queueItemKey == key) {
-    
-                                /*
-                                    found a dupe... push to end of queue, null 
-                                    current item, and break
-                                */
-    
-                                this.eventQueue[i] = null;
-    
-                                this.eventQueue.push(
-                                    [key, (!Lang.isUndefined(value) ? 
-                                    value : queueItemValue)]);
-    
-                                foundDuplicate = true;
-                                break;
-                            }
-                        }
-                    }
-                    
-                    // this is a refire, or a new property in the queue
-    
-                    if (! foundDuplicate && !Lang.isUndefined(value)) { 
-                        this.eventQueue.push([key, value]);
-                    }
-                }
-        
-                if (property.supercedes) {
-
-                    sLen = property.supercedes.length;
-
-                    for (s = 0; s < sLen; s++) {
-
-                        supercedesCheck = property.supercedes[s];
-                        qLen = this.eventQueue.length;
-
-                        for (q = 0; q < qLen; q++) {
-                            queueItemCheck = this.eventQueue[q];
-
-                            if (queueItemCheck) {
-                                queueItemCheckKey = queueItemCheck[0];
-                                queueItemCheckValue = queueItemCheck[1];
-
-                                if (queueItemCheckKey == 
-                                    supercedesCheck.toLowerCase() ) {
-
-                                    this.eventQueue.push([queueItemCheckKey, 
-                                        queueItemCheckValue]);
-
-                                    this.eventQueue[q] = null;
-                                    break;
-
-                                }
-                            }
-                        }
-                    }
-                }
-
-
-                return true;
-            } else {
-                return false;
-            }
-        },
-        
-        /**
-        * Fires the event for a property using the property's current value.
-        * @method refireEvent
-        * @param {String} key The name of the property
-        */
-        refireEvent: function (key) {
-    
-            key = key.toLowerCase();
-        
-            var property = this.config[key];
-    
-            if (property && property.event && 
-    
-                !Lang.isUndefined(property.value)) {
-    
-                if (this.queueInProgress) {
-    
-                    this.queueProperty(key);
-    
-                } else {
-    
-                    this.fireEvent(key, property.value);
-    
-                }
-    
-            }
-        },
-        
-        /**
-        * Applies a key-value Object literal to the configuration, replacing  
-        * any existing values, and queueing the property events.
-        * Although the values will be set, fireQueue() must be called for their 
-        * associated events to execute.
-        * @method applyConfig
-        * @param {Object} userConfig The configuration Object literal
-        * @param {Boolean} init  When set to true, the initialConfig will 
-        * be set to the userConfig passed in, so that calling a reset will 
-        * reset the properties to the passed values.
-        */
-        applyConfig: function (userConfig, init) {
-        
-            var sKey,
-                oConfig;
-
-            if (init) {
-                oConfig = {};
-                for (sKey in userConfig) {
-                    if (Lang.hasOwnProperty(userConfig, sKey)) {
-                        oConfig[sKey.toLowerCase()] = userConfig[sKey];
-                    }
-                }
-                this.initialConfig = oConfig;
-            }
-
-            for (sKey in userConfig) {
-                if (Lang.hasOwnProperty(userConfig, sKey)) {
-                    this.queueProperty(sKey, userConfig[sKey]);
-                }
-            }
-        },
-        
-        /**
-        * Refires the events for all configuration properties using their 
-        * current values.
-        * @method refresh
-        */
-        refresh: function () {
-
-            var prop;
-
-            for (prop in this.config) {
-                if (Lang.hasOwnProperty(this.config, prop)) {
-                    this.refireEvent(prop);
-                }
-            }
-        },
-        
-        /**
-        * Fires the normalized list of queued property change events
-        * @method fireQueue
-        */
-        fireQueue: function () {
-        
-            var i, 
-                queueItem,
-                key,
-                value,
-                property;
-        
-            this.queueInProgress = true;
-            for (i = 0;i < this.eventQueue.length; i++) {
-                queueItem = this.eventQueue[i];
-                if (queueItem) {
-        
-                    key = queueItem[0];
-                    value = queueItem[1];
-                    property = this.config[key];
-
-                    property.value = value;
-
-                    // Clear out queue entry, to avoid it being 
-                    // re-added to the queue by any queueProperty/supercedes
-                    // calls which are invoked during fireEvent
-                    this.eventQueue[i] = null;
-
-                    this.fireEvent(key,value);
-                }
-            }
-            
-            this.queueInProgress = false;
-            this.eventQueue = [];
-        },
-        
-        /**
-        * Subscribes an external handler to the change event for any 
-        * given property. 
-        * @method subscribeToConfigEvent
-        * @param {String} key The property name
-        * @param {Function} handler The handler function to use subscribe to 
-        * the property's event
-        * @param {Object} obj The Object to use for scoping the event handler 
-        * (see CustomEvent documentation)
-        * @param {Boolean} overrideContext Optional. If true, will override
-        * "this" within the handler to map to the scope Object passed into the
-        * method.
-        * @return {Boolean} True, if the subscription was successful, 
-        * otherwise false.
-        */ 
-        subscribeToConfigEvent: function (key, handler, obj, overrideContext) {
-    
-            var property = this.config[key.toLowerCase()];
-    
-            if (property && property.event) {
-                if (!Config.alreadySubscribed(property.event, handler, obj)) {
-                    property.event.subscribe(handler, obj, overrideContext);
-                }
-                return true;
-            } else {
-                return false;
-            }
-    
-        },
-        
-        /**
-        * Unsubscribes an external handler from the change event for any 
-        * given property. 
-        * @method unsubscribeFromConfigEvent
-        * @param {String} key The property name
-        * @param {Function} handler The handler function to use subscribe to 
-        * the property's event
-        * @param {Object} obj The Object to use for scoping the event 
-        * handler (see CustomEvent documentation)
-        * @return {Boolean} True, if the unsubscription was successful, 
-        * otherwise false.
-        */
-        unsubscribeFromConfigEvent: function (key, handler, obj) {
-            var property = this.config[key.toLowerCase()];
-            if (property && property.event) {
-                return property.event.unsubscribe(handler, obj);
-            } else {
-                return false;
-            }
-        },
-        
-        /**
-        * Returns a string representation of the Config object
-        * @method toString
-        * @return {String} The Config object in string format.
-        */
-        toString: function () {
-            var output = "Config";
-            if (this.owner) {
-                output += " [" + this.owner.toString() + "]";
-            }
-            return output;
-        },
-        
-        /**
-        * Returns a string representation of the Config object's current 
-        * CustomEvent queue
-        * @method outputEventQueue
-        * @return {String} The string list of CustomEvents currently queued 
-        * for execution
-        */
-        outputEventQueue: function () {
-
-            var output = "",
-                queueItem,
-                q,
-                nQueue = this.eventQueue.length;
-              
-            for (q = 0; q < nQueue; q++) {
-                queueItem = this.eventQueue[q];
-                if (queueItem) {
-                    output += queueItem[0] + "=" + queueItem[1] + ", ";
-                }
-            }
-            return output;
-        },
-
-        /**
-        * Sets all properties to null, unsubscribes all listeners from each 
-        * property's change event and all listeners from the configChangedEvent.
-        * @method destroy
-        */
-        destroy: function () {
-
-            var oConfig = this.config,
-                sProperty,
-                oProperty;
-
-
-            for (sProperty in oConfig) {
-            
-                if (Lang.hasOwnProperty(oConfig, sProperty)) {
-
-                    oProperty = oConfig[sProperty];
-
-                    oProperty.event.unsubscribeAll();
-                    oProperty.event = null;
-
-                }
-            
-            }
-            
-            this.configChangedEvent.unsubscribeAll();
-            
-            this.configChangedEvent = null;
-            this.owner = null;
-            this.config = null;
-            this.initialConfig = null;
-            this.eventQueue = null;
-        
-        }
-
-    };
-    
-    
-    
-    /**
-    * Checks to determine if a particular function/Object pair are already 
-    * subscribed to the specified CustomEvent
-    * @method YAHOO.util.Config.alreadySubscribed
-    * @static
-    * @param {YAHOO.util.CustomEvent} evt The CustomEvent for which to check 
-    * the subscriptions
-    * @param {Function} fn The function to look for in the subscribers list
-    * @param {Object} obj The execution scope Object for the subscription
-    * @return {Boolean} true, if the function/Object pair is already subscribed 
-    * to the CustomEvent passed in
-    */
-    Config.alreadySubscribed = function (evt, fn, obj) {
-    
-        var nSubscribers = evt.subscribers.length,
-            subsc,
-            i;
-
-        if (nSubscribers > 0) {
-            i = nSubscribers - 1;
-            do {
-                subsc = evt.subscribers[i];
-                if (subsc && subsc.obj == obj && subsc.fn == fn) {
-                    return true;
-                }
-            }
-            while (i--);
-        }
-
-        return false;
-
-    };
-
-    YAHOO.lang.augmentProto(Config, YAHOO.util.EventProvider);
-
-}());
-/**
-* The datemath module provides utility methods for basic JavaScript Date object manipulation and 
-* comparison. 
-* 
-* @module datemath
-*/
-
-/**
-* YAHOO.widget.DateMath is used for simple date manipulation. The class is a static utility
-* used for adding, subtracting, and comparing dates.
-* @namespace YAHOO.widget
-* @class DateMath
-*/
-YAHOO.widget.DateMath = {
-    /**
-    * Constant field representing Day
-    * @property DAY
-    * @static
-    * @final
-    * @type String
-    */
-    DAY : "D",
-
-    /**
-    * Constant field representing Week
-    * @property WEEK
-    * @static
-    * @final
-    * @type String
-    */
-    WEEK : "W",
-
-    /**
-    * Constant field representing Year
-    * @property YEAR
-    * @static
-    * @final
-    * @type String
-    */
-    YEAR : "Y",
-
-    /**
-    * Constant field representing Month
-    * @property MONTH
-    * @static
-    * @final
-    * @type String
-    */
-    MONTH : "M",
-
-    /**
-    * Constant field representing one day, in milliseconds
-    * @property ONE_DAY_MS
-    * @static
-    * @final
-    * @type Number
-    */
-    ONE_DAY_MS : 1000*60*60*24,
-    
-    /**
-     * Constant field representing the date in first week of January
-     * which identifies the first week of the year.
-     * <p>
-     * In the U.S, Jan 1st is normally used based on a Sunday start of week.
-     * ISO 8601, used widely throughout Europe, uses Jan 4th, based on a Monday start of week.
-     * </p>
-     * @property WEEK_ONE_JAN_DATE
-     * @static
-     * @type Number
-     */
-    WEEK_ONE_JAN_DATE : 1,
-
-    /**
-    * Adds the specified amount of time to the this instance.
-    * @method add
-    * @param {Date} date The JavaScript Date object to perform addition on
-    * @param {String} field The field constant to be used for performing addition.
-    * @param {Number} amount The number of units (measured in the field constant) to add to the date.
-    * @return {Date} The resulting Date object
-    */
-    add : function(date, field, amount) {
-        var d = new Date(date.getTime());
-        switch (field) {
-            case this.MONTH:
-                var newMonth = date.getMonth() + amount;
-                var years = 0;
-
-                if (newMonth < 0) {
-                    while (newMonth < 0) {
-                        newMonth += 12;
-                        years -= 1;
-                    }
-                } else if (newMonth > 11) {
-                    while (newMonth > 11) {
-                        newMonth -= 12;
-                        years += 1;
-                    }
-                }
-
-                d.setMonth(newMonth);
-                d.setFullYear(date.getFullYear() + years);
-                break;
-            case this.DAY:
-                this._addDays(d, amount);
-                // d.setDate(date.getDate() + amount);
-                break;
-            case this.YEAR:
-                d.setFullYear(date.getFullYear() + amount);
-                break;
-            case this.WEEK:
-                this._addDays(d, (amount * 7));
-                // d.setDate(date.getDate() + (amount * 7));
-                break;
-        }
-        return d;
-    },
-
-    /**
-     * Private helper method to account for bug in Safari 2 (webkit < 420)
-     * when Date.setDate(n) is called with n less than -128 or greater than 127.
-     * <p>
-     * Fix approach and original findings are available here:
-     * http://brianary.blogspot.com/2006/03/safari-date-bug.html
-     * </p>
-     * @method _addDays
-     * @param {Date} d JavaScript date object
-     * @param {Number} nDays The number of days to add to the date object (can be negative)
-     * @private
-     */
-    _addDays : function(d, nDays) {
-        if (YAHOO.env.ua.webkit && YAHOO.env.ua.webkit < 420) {
-            if (nDays < 0) {
-                // Ensure we don't go below -128 (getDate() is always 1 to 31, so we won't go above 127)
-                for(var min = -128; nDays < min; nDays -= min) {
-                    d.setDate(d.getDate() + min);
-                }
-            } else {
-                // Ensure we don't go above 96 + 31 = 127
-                for(var max = 96; nDays > max; nDays -= max) {
-                    d.setDate(d.getDate() + max);
-                }
-            }
-            // nDays should be remainder between -128 and 96
-        }
-        d.setDate(d.getDate() + nDays);
-    },
-
-    /**
-    * Subtracts the specified amount of time from the this instance.
-    * @method subtract
-    * @param {Date} date The JavaScript Date object to perform subtraction on
-    * @param {Number} field The this field constant to be used for performing subtraction.
-    * @param {Number} amount The number of units (measured in the field constant) to subtract from the date.
-    * @return {Date} The resulting Date object
-    */
-    subtract : function(date, field, amount) {
-        return this.add(date, field, (amount*-1));
-    },
-
-    /**
-    * Determines whether a given date is before another date on the calendar.
-    * @method before
-    * @param {Date} date  The Date object to compare with the compare argument
-    * @param {Date} compareTo The Date object to use for the comparison
-    * @return {Boolean} true if the date occurs before the compared date; false if not.
-    */
-    before : function(date, compareTo) {
-        var ms = compareTo.getTime();
-        if (date.getTime() < ms) {
-            return true;
-        } else {
-            return false;
-        }
-    },
-
-    /**
-    * Determines whether a given date is after another date on the calendar.
-    * @method after
-    * @param {Date} date  The Date object to compare with the compare argument
-    * @param {Date} compareTo The Date object to use for the comparison
-    * @return {Boolean} true if the date occurs after the compared date; false if not.
-    */
-    after : function(date, compareTo) {
-        var ms = compareTo.getTime();
-        if (date.getTime() > ms) {
-            return true;
-        } else {
-            return false;
-        }
-    },
-
-    /**
-    * Determines whether a given date is between two other dates on the calendar.
-    * @method between
-    * @param {Date} date  The date to check for
-    * @param {Date} dateBegin The start of the range
-    * @param {Date} dateEnd  The end of the range
-    * @return {Boolean} true if the date occurs between the compared dates; false if not.
-    */
-    between : function(date, dateBegin, dateEnd) {
-        if (this.after(date, dateBegin) && this.before(date, dateEnd)) {
-            return true;
-        } else {
-            return false;
-        }
-    },
-    
-    /**
-    * Retrieves a JavaScript Date object representing January 1 of any given year.
-    * @method getJan1
-    * @param {Number} calendarYear  The calendar year for which to retrieve January 1
-    * @return {Date} January 1 of the calendar year specified.
-    */
-    getJan1 : function(calendarYear) {
-        return this.getDate(calendarYear,0,1);
-    },
-
-    /**
-    * Calculates the number of days the specified date is from January 1 of the specified calendar year.
-    * Passing January 1 to this function would return an offset value of zero.
-    * @method getDayOffset
-    * @param {Date} date The JavaScript date for which to find the offset
-    * @param {Number} calendarYear The calendar year to use for determining the offset
-    * @return {Number} The number of days since January 1 of the given year
-    */
-    getDayOffset : function(date, calendarYear) {
-        var beginYear = this.getJan1(calendarYear); // Find the start of the year. This will be in week 1.
-        
-        // Find the number of days the passed in date is away from the calendar year start
-        var dayOffset = Math.ceil((date.getTime()-beginYear.getTime()) / this.ONE_DAY_MS);
-        return dayOffset;
-    },
-
-    /**
-    * Calculates the week number for the given date. Can currently support standard
-    * U.S. week numbers, based on Jan 1st defining the 1st week of the year, and 
-    * ISO8601 week numbers, based on Jan 4th defining the 1st week of the year.
-    * 
-    * @method getWeekNumber
-    * @param {Date} date The JavaScript date for which to find the week number
-    * @param {Number} firstDayOfWeek The index of the first day of the week (0 = Sun, 1 = Mon ... 6 = Sat).
-    * Defaults to 0
-    * @param {Number} janDate The date in the first week of January which defines week one for the year
-    * Defaults to the value of YAHOO.widget.DateMath.WEEK_ONE_JAN_DATE, which is 1 (Jan 1st). 
-    * For the U.S, this is normally Jan 1st. ISO8601 uses Jan 4th to define the first week of the year.
-    * 
-    * @return {Number} The number of the week containing the given date.
-    */
-    getWeekNumber : function(date, firstDayOfWeek, janDate) {
-
-        // Setup Defaults
-        firstDayOfWeek = firstDayOfWeek || 0;
-        janDate = janDate || this.WEEK_ONE_JAN_DATE;
-
-        var targetDate = this.clearTime(date),
-            startOfWeek,
-            endOfWeek;
-
-        if (targetDate.getDay() === firstDayOfWeek) { 
-            startOfWeek = targetDate;
-        } else {
-            startOfWeek = this.getFirstDayOfWeek(targetDate, firstDayOfWeek);
-        }
-
-        var startYear = startOfWeek.getFullYear();
-
-        // DST shouldn't be a problem here, math is quicker than setDate();
-        endOfWeek = new Date(startOfWeek.getTime() + 6*this.ONE_DAY_MS);
-
-        var weekNum;
-        if (startYear !== endOfWeek.getFullYear() && endOfWeek.getDate() >= janDate) {
-            // If years don't match, endOfWeek is in Jan. and if the 
-            // week has WEEK_ONE_JAN_DATE in it, it's week one by definition.
-            weekNum = 1;
-        } else {
-            // Get the 1st day of the 1st week, and 
-            // find how many days away we are from it.
-            var weekOne = this.clearTime(this.getDate(startYear, 0, janDate)),
-                weekOneDayOne = this.getFirstDayOfWeek(weekOne, firstDayOfWeek);
-
-            // Round days to smoothen out 1 hr DST diff
-            var daysDiff  = Math.round((targetDate.getTime() - weekOneDayOne.getTime())/this.ONE_DAY_MS);
-
-            // Calc. Full Weeks
-            var rem = daysDiff % 7;
-            var weeksDiff = (daysDiff - rem)/7;
-            weekNum = weeksDiff + 1;
-        }
-        return weekNum;
-    },
-
-    /**
-     * Get the first day of the week, for the give date. 
-     * @param {Date} dt The date in the week for which the first day is required.
-     * @param {Number} startOfWeek The index for the first day of the week, 0 = Sun, 1 = Mon ... 6 = Sat (defaults to 0)
-     * @return {Date} The first day of the week
-     */
-    getFirstDayOfWeek : function (dt, startOfWeek) {
-        startOfWeek = startOfWeek || 0;
-        var dayOfWeekIndex = dt.getDay(),
-            dayOfWeek = (dayOfWeekIndex - startOfWeek + 7) % 7;
-
-        return this.subtract(dt, this.DAY, dayOfWeek);
-    },
-
-    /**
-    * Determines if a given week overlaps two different years.
-    * @method isYearOverlapWeek
-    * @param {Date} weekBeginDate The JavaScript Date representing the first day of the week.
-    * @return {Boolean} true if the date overlaps two different years.
-    */
-    isYearOverlapWeek : function(weekBeginDate) {
-        var overlaps = false;
-        var nextWeek = this.add(weekBeginDate, this.DAY, 6);
-        if (nextWeek.getFullYear() != weekBeginDate.getFullYear()) {
-            overlaps = true;
-        }
-        return overlaps;
-    },
-
-    /**
-    * Determines if a given week overlaps two different months.
-    * @method isMonthOverlapWeek
-    * @param {Date} weekBeginDate The JavaScript Date representing the first day of the week.
-    * @return {Boolean} true if the date overlaps two different months.
-    */
-    isMonthOverlapWeek : function(weekBeginDate) {
-        var overlaps = false;
-        var nextWeek = this.add(weekBeginDate, this.DAY, 6);
-        if (nextWeek.getMonth() != weekBeginDate.getMonth()) {
-            overlaps = true;
-        }
-        return overlaps;
-    },
-
-    /**
-    * Gets the first day of a month containing a given date.
-    * @method findMonthStart
-    * @param {Date} date The JavaScript Date used to calculate the month start
-    * @return {Date}  The JavaScript Date representing the first day of the month
-    */
-    findMonthStart : function(date) {
-        var start = this.getDate(date.getFullYear(), date.getMonth(), 1);
-        return start;
-    },
-
-    /**
-    * Gets the last day of a month containing a given date.
-    * @method findMonthEnd
-    * @param {Date} date The JavaScript Date used to calculate the month end
-    * @return {Date}  The JavaScript Date representing the last day of the month
-    */
-    findMonthEnd : function(date) {
-        var start = this.findMonthStart(date);
-        var nextMonth = this.add(start, this.MONTH, 1);
-        var end = this.subtract(nextMonth, this.DAY, 1);
-        return end;
-    },
-
-    /**
-    * Clears the time fields from a given date, effectively setting the time to 12 noon.
-    * @method clearTime
-    * @param {Date} date The JavaScript Date for which the time fields will be cleared
-    * @return {Date}  The JavaScript Date cleared of all time fields
-    */
-    clearTime : function(date) {
-        date.setHours(12,0,0,0);
-        return date;
-    },
-
-    /**
-     * Returns a new JavaScript Date object, representing the given year, month and date. Time fields (hr, min, sec, ms) on the new Date object
-     * are set to 0. The method allows Date instances to be created with the a year less than 100. "new Date(year, month, date)" implementations 
-     * set the year to 19xx if a year (xx) which is less than 100 is provided.
-     * <p>
-     * <em>NOTE:</em>Validation on argument values is not performed. It is the caller's responsibility to ensure
-     * arguments are valid as per the ECMAScript-262 Date object specification for the new Date(year, month[, date]) constructor.
-     * </p>
-     * @method getDate
-     * @param {Number} y Year.
-     * @param {Number} m Month index from 0 (Jan) to 11 (Dec).
-     * @param {Number} d (optional) Date from 1 to 31. If not provided, defaults to 1.
-     * @return {Date} The JavaScript date object with year, month, date set as provided.
-     */
-    getDate : function(y, m, d) {
-        var dt = null;
-        if (YAHOO.lang.isUndefined(d)) {
-            d = 1;
-        }
-        if (y >= 100) {
-            dt = new Date(y, m, d);
-        } else {
-            dt = new Date();
-            dt.setFullYear(y);
-            dt.setMonth(m);
-            dt.setDate(d);
-            dt.setHours(0,0,0,0);
-        }
-        return dt;
-    }
-};
-/**
-* The Calendar component is a UI control that enables users to choose one or more dates from a graphical calendar presented in a one-month or
-* multi-month interface. Calendars are generated entirely via script and can be navigated without any page refreshes.
-* @module    calendar
-* @title    Calendar
-* @namespace  YAHOO.widget
-* @requires  yahoo,dom,event
-*/
-(function(){
-
-    var Dom = YAHOO.util.Dom,
-        Event = YAHOO.util.Event,
-        Lang = YAHOO.lang,
-        DateMath = YAHOO.widget.DateMath;
-
-/**
-* Calendar is the base class for the Calendar widget. In its most basic
-* implementation, it has the ability to render a calendar widget on the page
-* that can be manipulated to select a single date, move back and forth between
-* months and years.
-* <p>To construct the placeholder for the calendar widget, the code is as
-* follows:
-*   <xmp>
-*       <div id="calContainer"></div>
-*   </xmp>
-* </p>
-* <p>
-* <strong>NOTE: As of 2.4.0, the constructor's ID argument is optional.</strong>
-* The Calendar can be constructed by simply providing a container ID string, 
-* or a reference to a container DIV HTMLElement (the element needs to exist 
-* in the document).
-* 
-* E.g.:
-*   <xmp>
-*       var c = new YAHOO.widget.Calendar("calContainer", configOptions);
-*   </xmp>
-* or:
-*   <xmp>
-*       var containerDiv = YAHOO.util.Dom.get("calContainer");
-*       var c = new YAHOO.widget.Calendar(containerDiv, configOptions);
-*   </xmp>
-* </p>
-* <p>
-* If not provided, the ID will be generated from the container DIV ID by adding an "_t" suffix.
-* For example if an ID is not provided, and the container's ID is "calContainer", the Calendar's ID will be set to "calContainer_t".
-* </p>
-* 
-* @namespace YAHOO.widget
-* @class Calendar
-* @constructor
-* @param {String} id optional The id of the table element that will represent the Calendar widget. As of 2.4.0, this argument is optional.
-* @param {String | HTMLElement} container The id of the container div element that will wrap the Calendar table, or a reference to a DIV element which exists in the document.
-* @param {Object} config optional The configuration object containing the initial configuration values for the Calendar.
-*/
-function Calendar(id, containerId, config) {
-    this.init.apply(this, arguments);
-}
-
-/**
-* The path to be used for images loaded for the Calendar
-* @property YAHOO.widget.Calendar.IMG_ROOT
-* @static
-* @deprecated   You can now customize images by overriding the calclose, calnavleft and calnavright default CSS classes for the close icon, left arrow and right arrow respectively
-* @type String
-*/
-Calendar.IMG_ROOT = null;
-
-/**
-* Type constant used for renderers to represent an individual date (M/D/Y)
-* @property YAHOO.widget.Calendar.DATE
-* @static
-* @final
-* @type String
-*/
-Calendar.DATE = "D";
-
-/**
-* Type constant used for renderers to represent an individual date across any year (M/D)
-* @property YAHOO.widget.Calendar.MONTH_DAY
-* @static
-* @final
-* @type String
-*/
-Calendar.MONTH_DAY = "MD";
-
-/**
-* Type constant used for renderers to represent a weekday
-* @property YAHOO.widget.Calendar.WEEKDAY
-* @static
-* @final
-* @type String
-*/
-Calendar.WEEKDAY = "WD";
-
-/**
-* Type constant used for renderers to represent a range of individual dates (M/D/Y-M/D/Y)
-* @property YAHOO.widget.Calendar.RANGE
-* @static
-* @final
-* @type String
-*/
-Calendar.RANGE = "R";
-
-/**
-* Type constant used for renderers to represent a month across any year
-* @property YAHOO.widget.Calendar.MONTH
-* @static
-* @final
-* @type String
-*/
-Calendar.MONTH = "M";
-
-/**
-* Constant that represents the total number of date cells that are displayed in a given month
-* @property YAHOO.widget.Calendar.DISPLAY_DAYS
-* @static
-* @final
-* @type Number
-*/
-Calendar.DISPLAY_DAYS = 42;
-
-/**
-* Constant used for halting the execution of the remainder of the render stack
-* @property YAHOO.widget.Calendar.STOP_RENDER
-* @static
-* @final
-* @type String
-*/
-Calendar.STOP_RENDER = "S";
-
-/**
-* Constant used to represent short date field string formats (e.g. Tu or Feb)
-* @property YAHOO.widget.Calendar.SHORT
-* @static
-* @final
-* @type String
-*/
-Calendar.SHORT = "short";
-
-/**
-* Constant used to represent long date field string formats (e.g. Monday or February)
-* @property YAHOO.widget.Calendar.LONG
-* @static
-* @final
-* @type String
-*/
-Calendar.LONG = "long";
-
-/**
-* Constant used to represent medium date field string formats (e.g. Mon)
-* @property YAHOO.widget.Calendar.MEDIUM
-* @static
-* @final
-* @type String
-*/
-Calendar.MEDIUM = "medium";
-
-/**
-* Constant used to represent single character date field string formats (e.g. M, T, W)
-* @property YAHOO.widget.Calendar.ONE_CHAR
-* @static
-* @final
-* @type String
-*/
-Calendar.ONE_CHAR = "1char";
-
-/**
-* The set of default Config property keys and values for the Calendar.
-*
-* <p>
-* NOTE: This property is made public in order to allow users to change 
-* the default values of configuration properties. Users should not 
-* modify the key string, unless they are overriding the Calendar implementation
-* </p>
-*
-* <p>
-* The property is an object with key/value pairs, the key being the 
-* uppercase configuration property name and the value being an object 
-* literal with a key string property, and a value property, specifying the 
-* default value of the property. To override a default value, you can set
-* the value property, for example, <code>YAHOO.widget.Calendar.DEFAULT_CONFIG.MULTI_SELECT.value = true;</code>
-* 
-* @property YAHOO.widget.Calendar.DEFAULT_CONFIG
-* @static
-* @type Object
-*/
-
-Calendar.DEFAULT_CONFIG = {
-    YEAR_OFFSET : {key:"year_offset", value:0, supercedes:["pagedate", "selected", "mindate","maxdate"]},
-    TODAY : {key:"today", value:new Date(), supercedes:["pagedate"]}, 
-    PAGEDATE : {key:"pagedate", value:null},
-    SELECTED : {key:"selected", value:[]},
-    TITLE : {key:"title", value:""},
-    CLOSE : {key:"close", value:false},
-    IFRAME : {key:"iframe", value:(YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) ? true : false},
-    MINDATE : {key:"mindate", value:null},
-    MAXDATE : {key:"maxdate", value:null},
-    MULTI_SELECT : {key:"multi_select", value:false},
-    OOM_SELECT : {key:"oom_select", value:false},
-    START_WEEKDAY : {key:"start_weekday", value:0},
-    SHOW_WEEKDAYS : {key:"show_weekdays", value:true},
-    SHOW_WEEK_HEADER : {key:"show_week_header", value:false},
-    SHOW_WEEK_FOOTER : {key:"show_week_footer", value:false},
-    HIDE_BLANK_WEEKS : {key:"hide_blank_weeks", value:false},
-    NAV_ARROW_LEFT: {key:"nav_arrow_left", value:null} ,
-    NAV_ARROW_RIGHT : {key:"nav_arrow_right", value:null} ,
-    MONTHS_SHORT : {key:"months_short", value:["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]},
-    MONTHS_LONG: {key:"months_long", value:["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]},
-    WEEKDAYS_1CHAR: {key:"weekdays_1char", value:["S", "M", "T", "W", "T", "F", "S"]},
-    WEEKDAYS_SHORT: {key:"weekdays_short", value:["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]},
-    WEEKDAYS_MEDIUM: {key:"weekdays_medium", value:["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]},
-    WEEKDAYS_LONG: {key:"weekdays_long", value:["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]},
-    LOCALE_MONTHS:{key:"locale_months", value:"long"},
-    LOCALE_WEEKDAYS:{key:"locale_weekdays", value:"short"},
-    DATE_DELIMITER:{key:"date_delimiter", value:","},
-    DATE_FIELD_DELIMITER:{key:"date_field_delimiter", value:"/"},
-    DATE_RANGE_DELIMITER:{key:"date_range_delimiter", value:"-"},
-    MY_MONTH_POSITION:{key:"my_month_position", value:1},
-    MY_YEAR_POSITION:{key:"my_year_position", value:2},
-    MD_MONTH_POSITION:{key:"md_month_position", value:1},
-    MD_DAY_POSITION:{key:"md_day_position", value:2},
-    MDY_MONTH_POSITION:{key:"mdy_month_position", value:1},
-    MDY_DAY_POSITION:{key:"mdy_day_position", value:2},
-    MDY_YEAR_POSITION:{key:"mdy_year_position", value:3},
-    MY_LABEL_MONTH_POSITION:{key:"my_label_month_position", value:1},
-    MY_LABEL_YEAR_POSITION:{key:"my_label_year_position", value:2},
-    MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix", value:" "},
-    MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix", value:""},
-    NAV: {key:"navigator", value: null},
-    STRINGS : { 
-        key:"strings",
-        value: {
-            previousMonth : "Previous Month",
-            nextMonth : "Next Month",
-            close: "Close"
-        },
-        supercedes : ["close", "title"]
-    }
-};
-
-/**
-* The set of default Config property keys and values for the Calendar
-* @property YAHOO.widget.Calendar._DEFAULT_CONFIG
-* @deprecated Made public. See the public DEFAULT_CONFIG property for details
-* @final
-* @static
-* @private
-* @type Object
-*/
-Calendar._DEFAULT_CONFIG = Calendar.DEFAULT_CONFIG;
-
-var DEF_CFG = Calendar.DEFAULT_CONFIG;
-
-/**
-* The set of Custom Event types supported by the Calendar
-* @property YAHOO.widget.Calendar._EVENT_TYPES
-* @final
-* @static
-* @private
-* @type Object
-*/
-Calendar._EVENT_TYPES = {
-    BEFORE_SELECT : "beforeSelect", 
-    SELECT : "select",
-    BEFORE_DESELECT : "beforeDeselect",
-    DESELECT : "deselect",
-    CHANGE_PAGE : "changePage",
-    BEFORE_RENDER : "beforeRender",
-    RENDER : "render",
-    BEFORE_DESTROY : "beforeDestroy",
-    DESTROY : "destroy",
-    RESET : "reset",
-    CLEAR : "clear",
-    BEFORE_HIDE : "beforeHide",
-    HIDE : "hide",
-    BEFORE_SHOW : "beforeShow",
-    SHOW : "show",
-    BEFORE_HIDE_NAV : "beforeHideNav",
-    HIDE_NAV : "hideNav",
-    BEFORE_SHOW_NAV : "beforeShowNav",
-    SHOW_NAV : "showNav",
-    BEFORE_RENDER_NAV : "beforeRenderNav",
-    RENDER_NAV : "renderNav"
-};
-
-/**
-* The set of default style constants for the Calendar
-* @property YAHOO.widget.Calendar.STYLES
-* @static
-* @type Object An object with name/value pairs for the class name identifier/value.
-*/
-Calendar.STYLES = {
-    CSS_ROW_HEADER: "calrowhead",
-    CSS_ROW_FOOTER: "calrowfoot",
-    CSS_CELL : "calcell",
-    CSS_CELL_SELECTOR : "selector",
-    CSS_CELL_SELECTED : "selected",
-    CSS_CELL_SELECTABLE : "selectable",
-    CSS_CELL_RESTRICTED : "restricted",
-    CSS_CELL_TODAY : "today",
-    CSS_CELL_OOM : "oom",
-    CSS_CELL_OOB : "previous",
-    CSS_HEADER : "calheader",
-    CSS_HEADER_TEXT : "calhead",
-    CSS_BODY : "calbody",
-    CSS_WEEKDAY_CELL : "calweekdaycell",
-    CSS_WEEKDAY_ROW : "calweekdayrow",
-    CSS_FOOTER : "calfoot",
-    CSS_CALENDAR : "yui-calendar",
-    CSS_SINGLE : "single",
-    CSS_CONTAINER : "yui-calcontainer",
-    CSS_NAV_LEFT : "calnavleft",
-    CSS_NAV_RIGHT : "calnavright",
-    CSS_NAV : "calnav",
-    CSS_CLOSE : "calclose",
-    CSS_CELL_TOP : "calcelltop",
-    CSS_CELL_LEFT : "calcellleft",
-    CSS_CELL_RIGHT : "calcellright",
-    CSS_CELL_BOTTOM : "calcellbottom",
-    CSS_CELL_HOVER : "calcellhover",
-    CSS_CELL_HIGHLIGHT1 : "highlight1",
-    CSS_CELL_HIGHLIGHT2 : "highlight2",
-    CSS_CELL_HIGHLIGHT3 : "highlight3",
-    CSS_CELL_HIGHLIGHT4 : "highlight4",
-    CSS_WITH_TITLE: "withtitle",
-    CSS_FIXED_SIZE: "fixedsize",
-    CSS_LINK_CLOSE: "link-close"
-};
-
-/**
-* The set of default style constants for the Calendar
-* @property YAHOO.widget.Calendar._STYLES
-* @deprecated Made public. See the public STYLES property for details
-* @final
-* @static
-* @private
-* @type Object
-*/
-Calendar._STYLES = Calendar.STYLES;
-
-Calendar.prototype = {
-
-    /**
-    * The configuration object used to set up the calendars various locale and style options.
-    * @property Config
-    * @private
-    * @deprecated Configuration properties should be set by calling Calendar.cfg.setProperty.
-    * @type Object
-    */
-    Config : null,
-
-    /**
-    * The parent CalendarGroup, only to be set explicitly by the parent group
-    * @property parent
-    * @type CalendarGroup
-    */ 
-    parent : null,
-
-    /**
-    * The index of this item in the parent group
-    * @property index
-    * @type Number
-    */
-    index : -1,
-
-    /**
-    * The collection of calendar table cells
-    * @property cells
-    * @type HTMLTableCellElement[]
-    */
-    cells : null,
-
-    /**
-    * The collection of calendar cell dates that is parallel to the cells collection. The array contains dates field arrays in the format of [YYYY, M, D].
-    * @property cellDates
-    * @type Array[](Number[])
-    */
-    cellDates : null,
-
-    /**
-    * The id that uniquely identifies this Calendar.
-    * @property id
-    * @type String
-    */
-    id : null,
-
-    /**
-    * The unique id associated with the Calendar's container
-    * @property containerId
-    * @type String
-    */
-    containerId: null,
-
-    /**
-    * The DOM element reference that points to this calendar's container element. The calendar will be inserted into this element when the shell is rendered.
-    * @property oDomContainer
-    * @type HTMLElement
-    */
-    oDomContainer : null,
-
-    /**
-    * A Date object representing today's date.
-    * @deprecated Use the "today" configuration property
-    * @property today
-    * @type Date
-    */
-    today : null,
-
-    /**
-    * The list of render functions, along with required parameters, used to render cells. 
-    * @property renderStack
-    * @type Array[]
-    */
-    renderStack : null,
-
-    /**
-    * A copy of the initial render functions created before rendering.
-    * @property _renderStack
-    * @private
-    * @type Array
-    */
-    _renderStack : null,
-
-    /**
-    * A reference to the CalendarNavigator instance created for this Calendar.
-    * Will be null if the "navigator" configuration property has not been set
-    * @property oNavigator
-    * @type CalendarNavigator
-    */
-    oNavigator : null,
-
-    /**
-    * The private list of initially selected dates.
-    * @property _selectedDates
-    * @private
-    * @type Array
-    */
-    _selectedDates : null,
-
-    /**
-    * A map of DOM event handlers to attach to cells associated with specific CSS class names
-    * @property domEventMap
-    * @type Object
-    */
-    domEventMap : null,
-
-    /**
-     * Protected helper used to parse Calendar constructor/init arguments.
-     *
-     * As of 2.4.0, Calendar supports a simpler constructor 
-     * signature. This method reconciles arguments
-     * received in the pre 2.4.0 and 2.4.0 formats.
-     * 
-     * @protected
-     * @method _parseArgs
-     * @param {Array} Function "arguments" array
-     * @return {Object} Object with id, container, config properties containing
-     * the reconciled argument values.
-     **/
-    _parseArgs : function(args) {
-        /*
-           2.4.0 Constructors signatures
-
-           new Calendar(String)
-           new Calendar(HTMLElement)
-           new Calendar(String, ConfigObject)
-           new Calendar(HTMLElement, ConfigObject)
-
-           Pre 2.4.0 Constructor signatures
-
-           new Calendar(String, String)
-           new Calendar(String, HTMLElement)
-           new Calendar(String, String, ConfigObject)
-           new Calendar(String, HTMLElement, ConfigObject)
-         */
-        var nArgs = {id:null, container:null, config:null};
-
-        if (args && args.length && args.length > 0) {
-            switch (args.length) {
-                case 1:
-                    nArgs.id = null;
-                    nArgs.container = args[0];
-                    nArgs.config = null;
-                    break;
-                case 2:
-                    if (Lang.isObject(args[1]) && !args[1].tagName && !(args[1] instanceof String)) {
-                        nArgs.id = null;
-                        nArgs.container = args[0];
-                        nArgs.config = args[1];
-                    } else {
-                        nArgs.id = args[0];
-                        nArgs.container = args[1];
-                        nArgs.config = null;
-                    }
-                    break;
-                default: // 3+
-                    nArgs.id = args[0];
-                    nArgs.container = args[1];
-                    nArgs.config = args[2];
-                    break;
-            }
-        } else {
-        }
-        return nArgs;
-    },
-
-    /**
-    * Initializes the Calendar widget.
-    * @method init
-    *
-    * @param {String} id optional The id of the table element that will represent the Calendar widget. As of 2.4.0, this argument is optional.
-    * @param {String | HTMLElement} container The id of the container div element that will wrap the Calendar table, or a reference to a DIV element which exists in the document.
-    * @param {Object} config optional The configuration object containing the initial configuration values for the Calendar.
-    */
-    init : function(id, container, config) {
-        // Normalize 2.4.0, pre 2.4.0 args
-        var nArgs = this._parseArgs(arguments);
-
-        id = nArgs.id;
-        container = nArgs.container;
-        config = nArgs.config;
-
-        this.oDomContainer = Dom.get(container);
-
-        this._oDoc = this.oDomContainer.ownerDocument;
-
-        if (!this.oDomContainer.id) {
-            this.oDomContainer.id = Dom.generateId();
-        }
-
-        if (!id) {
-            id = this.oDomContainer.id + "_t";
-        }
-
-        this.id = id;
-        this.containerId = this.oDomContainer.id;
-
-        this.initEvents();
-
-        /**
-        * The Config object used to hold the configuration variables for the Calendar
-        * @property cfg
-        * @type YAHOO.util.Config
-        */
-        this.cfg = new YAHOO.util.Config(this);
-
-        /**
-        * The local object which contains the Calendar's options
-        * @property Options
-        * @type Object
-        */
-        this.Options = {};
-
-        /**
-        * The local object which contains the Calendar's locale settings
-        * @property Locale
-        * @type Object
-        */
-        this.Locale = {};
-
-        this.initStyles();
-
-        Dom.addClass(this.oDomContainer, this.Style.CSS_CONTAINER);
-        Dom.addClass(this.oDomContainer, this.Style.CSS_SINGLE);
-
-        this.cellDates = [];
-        this.cells = [];
-        this.renderStack = [];
-        this._renderStack = [];
-
-        this.setupConfig();
-
-        if (config) {
-            this.cfg.applyConfig(config, true);
-        }
-
-        this.cfg.fireQueue();
-
-        this.today = this.cfg.getProperty("today");
-    },
-
-    /**
-    * Default Config listener for the iframe property. If the iframe config property is set to true, 
-    * renders the built-in IFRAME shim if the container is relatively or absolutely positioned.
-    * 
-    * @method configIframe
-    */
-    configIframe : function(type, args, obj) {
-        var useIframe = args[0];
-    
-        if (!this.parent) {
-            if (Dom.inDocument(this.oDomContainer)) {
-                if (useIframe) {
-                    var pos = Dom.getStyle(this.oDomContainer, "position");
-                    
-                    if (pos == "absolute" || pos == "relative") {
-                        
-                        if (!Dom.inDocument(this.iframe)) {
-                            this.iframe = document.createElement("iframe");
-                            this.iframe.src = "javascript:false;";
-    
-                            Dom.setStyle(this.iframe, "opacity", "0");
-    
-                            if (YAHOO.env.ua.ie && YAHOO.env.ua.ie <= 6) {
-                                Dom.addClass(this.iframe, this.Style.CSS_FIXED_SIZE);
-                            }
-    
-                            this.oDomContainer.insertBefore(this.iframe, this.oDomContainer.firstChild);
-                        }
-                    }
-                } else {
-                    if (this.iframe) {
-                        if (this.iframe.parentNode) {
-                            this.iframe.parentNode.removeChild(this.iframe);
-                        }
-                        this.iframe = null;
-                    }
-                }
-            }
-        }
-    },
-
-    /**
-    * Default handler for the "title" property
-    * @method configTitle
-    */
-    configTitle : function(type, args, obj) {
-        var title = args[0];
-
-        // "" disables title bar
-        if (title) {
-            this.createTitleBar(title);
-        } else {
-            var close = this.cfg.getProperty(DEF_CFG.CLOSE.key);
-            if (!close) {
-                this.removeTitleBar();
-            } else {
-                this.createTitleBar("&#160;");
-            }
-        }
-    },
-    
-    /**
-    * Default handler for the "close" property
-    * @method configClose
-    */
-    configClose : function(type, args, obj) {
-        var close = args[0],
-            title = this.cfg.getProperty(DEF_CFG.TITLE.key);
-    
-        if (close) {
-            if (!title) {
-                this.createTitleBar("&#160;");
-            }
-            this.createCloseButton();
-        } else {
-            this.removeCloseButton();
-            if (!title) {
-                this.removeTitleBar();
-            }
-        }
-    },
-
-    /**
-    * Initializes Calendar's built-in CustomEvents
-    * @method initEvents
-    */
-    initEvents : function() {
-
-        var defEvents = Calendar._EVENT_TYPES,
-            CE = YAHOO.util.CustomEvent,
-            cal = this; // To help with minification
-
-        /**
-        * Fired before a date selection is made
-        * @event beforeSelectEvent
-        */
-        cal.beforeSelectEvent = new CE(defEvents.BEFORE_SELECT); 
-
-        /**
-        * Fired when a date selection is made
-        * @event selectEvent
-        * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
-        */
-        cal.selectEvent = new CE(defEvents.SELECT);
-
-        /**
-        * Fired before a date or set of dates is deselected
-        * @event beforeDeselectEvent
-        */
-        cal.beforeDeselectEvent = new CE(defEvents.BEFORE_DESELECT);
-
-        /**
-        * Fired when a date or set of dates is deselected
-        * @event deselectEvent
-        * @param {Array} Array of Date field arrays in the format [YYYY, MM, DD].
-        */
-        cal.deselectEvent = new CE(defEvents.DESELECT);
-    
-        /**
-        * Fired when the Calendar page is changed
-        * @event changePageEvent
-        * @param {Date} prevDate The date before the page was changed
-        * @param {Date} newDate The date after the page was changed
-        */
-        cal.changePageEvent = new CE(defEvents.CHANGE_PAGE);
-    
-        /**
-        * Fired before the Calendar is rendered
-        * @event beforeRenderEvent
-        */
-        cal.beforeRenderEvent = new CE(defEvents.BEFORE_RENDER);
-    
-        /**
-        * Fired when the Calendar is rendered
-        * @event renderEvent
-        */
-        cal.renderEvent = new CE(defEvents.RENDER);
-
-        /**
-        * Fired just before the Calendar is to be destroyed
-        * @event beforeDestroyEvent
-        */
-        cal.beforeDestroyEvent = new CE(defEvents.BEFORE_DESTROY);
-
-        /**
-        * Fired after the Calendar is destroyed. This event should be used
-        * for notification only. When this event is fired, important Calendar instance
-        * properties, dom references and event listeners have already been 
-        * removed/dereferenced, and hence the Calendar instance is not in a usable 
-        * state.
-        *
-        * @event destroyEvent
-        */
-        cal.destroyEvent = new CE(defEvents.DESTROY);
-
-        /**
-        * Fired when the Calendar is reset
-        * @event resetEvent
-        */
-        cal.resetEvent = new CE(defEvents.RESET);
-
-        /**
-        * Fired when the Calendar is cleared
-        * @event clearEvent
-        */
-        cal.clearEvent = new CE(defEvents.CLEAR);
-
-        /**
-        * Fired just before the Calendar is to be shown
-        * @event beforeShowEvent
-        */
-        cal.beforeShowEvent = new CE(defEvents.BEFORE_SHOW);
-
-        /**
-        * Fired after the Calendar is shown
-        * @event showEvent
-        */
-        cal.showEvent = new CE(defEvents.SHOW);
-
-        /**
-        * Fired just before the Calendar is to be hidden
-        * @event beforeHideEvent
-        */
-        cal.beforeHideEvent = new CE(defEvents.BEFORE_HIDE);
-
-        /**
-        * Fired after the Calendar is hidden
-        * @event hideEvent
-        */
-        cal.hideEvent = new CE(defEvents.HIDE);
-
-        /**
-        * Fired just before the CalendarNavigator is to be shown
-        * @event beforeShowNavEvent
-        */
-        cal.beforeShowNavEvent = new CE(defEvents.BEFORE_SHOW_NAV);
-    
-        /**
-        * Fired after the CalendarNavigator is shown
-        * @event showNavEvent
-        */
-        cal.showNavEvent = new CE(defEvents.SHOW_NAV);
-    
-        /**
-        * Fired just before the CalendarNavigator is to be hidden
-        * @event beforeHideNavEvent
-        */
-        cal.beforeHideNavEvent = new CE(defEvents.BEFORE_HIDE_NAV);
-    
-        /**
-        * Fired after the CalendarNavigator is hidden
-        * @event hideNavEvent
-        */
-        cal.hideNavEvent = new CE(defEvents.HIDE_NAV);
-
-        /**
-        * Fired just before the CalendarNavigator is to be rendered
-        * @event beforeRenderNavEvent
-        */
-        cal.beforeRenderNavEvent = new CE(defEvents.BEFORE_RENDER_NAV);
-
-        /**
-        * Fired after the CalendarNavigator is rendered
-        * @event renderNavEvent
-        */
-        cal.renderNavEvent = new CE(defEvents.RENDER_NAV);
-
-        cal.beforeSelectEvent.subscribe(cal.onBeforeSelect, this, true);
-        cal.selectEvent.subscribe(cal.onSelect, this, true);
-        cal.beforeDeselectEvent.subscribe(cal.onBeforeDeselect, this, true);
-        cal.deselectEvent.subscribe(cal.onDeselect, this, true);
-        cal.changePageEvent.subscribe(cal.onChangePage, this, true);
-        cal.renderEvent.subscribe(cal.onRender, this, true);
-        cal.resetEvent.subscribe(cal.onReset, this, true);
-        cal.clearEvent.subscribe(cal.onClear, this, true);
-    },
-
-    /**
-    * The default event handler for clicks on the "Previous Month" navigation UI
-    *
-    * @method doPreviousMonthNav
-    * @param {DOMEvent} e The DOM event
-    * @param {Calendar} cal A reference to the calendar
-    */
-    doPreviousMonthNav : function(e, cal) {
-        Event.preventDefault(e);
-        // previousMonth invoked in a timeout, to allow
-        // event to bubble up, with correct target. Calling
-        // previousMonth, will call render which will remove 
-        // HTML which generated the event, resulting in an 
-        // invalid event target in certain browsers.
-        setTimeout(function() {
-            cal.previousMonth();
-            var navs = Dom.getElementsByClassName(cal.Style.CSS_NAV_LEFT, "a", cal.oDomContainer);
-            if (navs && navs[0]) {
-                try {
-                    navs[0].focus();
-                } catch (ex) {
-                    // ignore
-                }
-            }
-        }, 0);
-    },
-
-    /**
-     * The default event handler for clicks on the "Next Month" navigation UI
-     *
-     * @method doNextMonthNav
-     * @param {DOMEvent} e The DOM event
-     * @param {Calendar} cal A reference to the calendar
-     */
-    doNextMonthNav : function(e, cal) {
-        Event.preventDefault(e);
-        setTimeout(function() {
-            cal.nextMonth();
-            var navs = Dom.getElementsByClassName(cal.Style.CSS_NAV_RIGHT, "a", cal.oDomContainer);
-            if (navs && navs[0]) {
-                try {
-                    navs[0].focus();
-                } catch (ex) {
-                    // ignore
-                }
-            }
-        }, 0);
-    },
-
-    /**
-    * The default event handler for date cell selection. Currently attached to 
-    * the Calendar's bounding box, referenced by it's <a href="#property_oDomContainer">oDomContainer</a> property.
-    *
-    * @method doSelectCell
-    * @param {DOMEvent} e The DOM event
-    * @param {Calendar} cal A reference to the calendar
-    */
-    doSelectCell : function(e, cal) {
-        var cell, d, date, index;
-
-        var target = Event.getTarget(e),
-            tagName = target.tagName.toLowerCase(),
-            defSelector = false;
-
-        while (tagName != "td" && !Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-
-            if (!defSelector && tagName == "a" && Dom.hasClass(target, cal.Style.CSS_CELL_SELECTOR)) {
-                defSelector = true;
-            }
-
-            target = target.parentNode;
-            tagName = target.tagName.toLowerCase();
-
-            if (target == this.oDomContainer || tagName == "html") {
-                return;
-            }
-        }
-
-        if (defSelector) {
-            // Stop link href navigation for default renderer
-            Event.preventDefault(e);
-        }
-    
-        cell = target;
-
-        if (Dom.hasClass(cell, cal.Style.CSS_CELL_SELECTABLE)) {
-            index = cal.getIndexFromId(cell.id);
-            if (index > -1) {
-                d = cal.cellDates[index];
-                if (d) {
-                    date = DateMath.getDate(d[0],d[1]-1,d[2]);
-                
-                    var link;
-
-                    if (cal.Options.MULTI_SELECT) {
-                        link = cell.getElementsByTagName("a")[0];
-                        if (link) {
-                            link.blur();
-                        }
-
-                        var cellDate = cal.cellDates[index];
-                        var cellDateIndex = cal._indexOfSelectedFieldArray(cellDate);
-
-                        if (cellDateIndex > -1) { 
-                            cal.deselectCell(index);
-                        } else {
-                            cal.selectCell(index);
-                        }
-
-                    } else {
-                        link = cell.getElementsByTagName("a")[0];
-                        if (link) {
-                            link.blur();
-                        }
-                        cal.selectCell(index);
-                    }
-                }
-            }
-        }
-    },
-
-    /**
-    * The event that is executed when the user hovers over a cell
-    * @method doCellMouseOver
-    * @param {DOMEvent} e The event
-    * @param {Calendar} cal A reference to the calendar passed by the Event utility
-    */
-    doCellMouseOver : function(e, cal) {
-        var target;
-        if (e) {
-            target = Event.getTarget(e);
-        } else {
-            target = this;
-        }
-
-        while (target.tagName && target.tagName.toLowerCase() != "td") {
-            target = target.parentNode;
-            if (!target.tagName || target.tagName.toLowerCase() == "html") {
-                return;
-            }
-        }
-
-        if (Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-            Dom.addClass(target, cal.Style.CSS_CELL_HOVER);
-        }
-    },
-
-    /**
-    * The event that is executed when the user moves the mouse out of a cell
-    * @method doCellMouseOut
-    * @param {DOMEvent} e The event
-    * @param {Calendar} cal A reference to the calendar passed by the Event utility
-    */
-    doCellMouseOut : function(e, cal) {
-        var target;
-        if (e) {
-            target = Event.getTarget(e);
-        } else {
-            target = this;
-        }
-
-        while (target.tagName && target.tagName.toLowerCase() != "td") {
-            target = target.parentNode;
-            if (!target.tagName || target.tagName.toLowerCase() == "html") {
-                return;
-            }
-        }
-
-        if (Dom.hasClass(target, cal.Style.CSS_CELL_SELECTABLE)) {
-            Dom.removeClass(target, cal.Style.CSS_CELL_HOVER);
-        }
-    },
-
-    setupConfig : function() {
-
-        var cfg = this.cfg;
-
-        /**
-        * The date to use to represent "Today".
-        *
-        * @config today
-        * @type Date
-        * @default The client side date (new Date()) when the Calendar is instantiated.
-        */
-        cfg.addProperty(DEF_CFG.TODAY.key, { value: new Date(DEF_CFG.TODAY.value.getTime()), supercedes:DEF_CFG.TODAY.supercedes, handler:this.configToday, suppressEvent:true } );
-
-        /**
-        * The month/year representing the current visible Calendar date (mm/yyyy)
-        * @config pagedate
-        * @type String | Date
-        * @default Today's date
-        */
-        cfg.addProperty(DEF_CFG.PAGEDATE.key, { value: DEF_CFG.PAGEDATE.value || new Date(DEF_CFG.TODAY.value.getTime()), handler:this.configPageDate } );
-
-        /**
-        * The date or range of dates representing the current Calendar selection
-        * @config selected
-        * @type String
-        * @default []
-        */
-        cfg.addProperty(DEF_CFG.SELECTED.key, { value:DEF_CFG.SELECTED.value.concat(), handler:this.configSelected } );
-
-        /**
-        * The title to display above the Calendar's month header. The title is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.   
-        * @config title
-        * @type HTML
-        * @default ""
-        */
-        cfg.addProperty(DEF_CFG.TITLE.key, { value:DEF_CFG.TITLE.value, handler:this.configTitle } );
-
-        /**
-        * Whether or not a close button should be displayed for this Calendar
-        * @config close
-        * @type Boolean
-        * @default false
-        */
-        cfg.addProperty(DEF_CFG.CLOSE.key, { value:DEF_CFG.CLOSE.value, handler:this.configClose } );
-
-        /**
-        * Whether or not an iframe shim should be placed under the Calendar to prevent select boxes from bleeding through in Internet Explorer 6 and below.
-        * This property is enabled by default for IE6 and below. It is disabled by default for other browsers for performance reasons, but can be 
-        * enabled if required.
-        * 
-        * @config iframe
-        * @type Boolean
-        * @default true for IE6 and below, false for all other browsers
-        */
-        cfg.addProperty(DEF_CFG.IFRAME.key, { value:DEF_CFG.IFRAME.value, handler:this.configIframe, validator:cfg.checkBoolean } );
-
-        /**
-        * The minimum selectable date in the current Calendar (mm/dd/yyyy)
-        * @config mindate
-        * @type String | Date
-        * @default null
-        */
-        cfg.addProperty(DEF_CFG.MINDATE.key, { value:DEF_CFG.MINDATE.value, handler:this.configMinDate } );
-
-        /**
-        * The maximum selectable date in the current Calendar (mm/dd/yyyy)
-        * @config maxdate
-        * @type String | Date
-        * @default null
-        */
-        cfg.addProperty(DEF_CFG.MAXDATE.key, { value:DEF_CFG.MAXDATE.value, handler:this.configMaxDate } );
-
-        // Options properties
-    
-        /**
-        * True if the Calendar should allow multiple selections. False by default.
-        * @config MULTI_SELECT
-        * @type Boolean
-        * @default false
-        */
-        cfg.addProperty(DEF_CFG.MULTI_SELECT.key, { value:DEF_CFG.MULTI_SELECT.value, handler:this.configOptions, validator:cfg.checkBoolean } );
-
-        /**
-        * True if the Calendar should allow selection of out-of-month dates. False by default.
-        * @config OOM_SELECT
-        * @type Boolean
-        * @default false
-        */
-        cfg.addProperty(DEF_CFG.OOM_SELECT.key, { value:DEF_CFG.OOM_SELECT.value, handler:this.configOptions, validator:cfg.checkBoolean } );
-
-        /**
-        * The weekday the week begins on. Default is 0 (Sunday = 0, Monday = 1 ... Saturday = 6).
-        * @config START_WEEKDAY
-        * @type number
-        * @default 0
-        */
-        cfg.addProperty(DEF_CFG.START_WEEKDAY.key, { value:DEF_CFG.START_WEEKDAY.value, handler:this.configOptions, validator:cfg.checkNumber  } );
-    
-        /**
-        * True if the Calendar should show weekday labels. True by default.
-        * @config SHOW_WEEKDAYS
-        * @type Boolean
-        * @default true
-        */
-        cfg.addProperty(DEF_CFG.SHOW_WEEKDAYS.key, { value:DEF_CFG.SHOW_WEEKDAYS.value, handler:this.configOptions, validator:cfg.checkBoolean  } );
-    
-        /**
-        * True if the Calendar should show week row headers. False by default.
-        * @config SHOW_WEEK_HEADER
-        * @type Boolean
-        * @default false
-        */
-        cfg.addProperty(DEF_CFG.SHOW_WEEK_HEADER.key, { value:DEF_CFG.SHOW_WEEK_HEADER.value, handler:this.configOptions, validator:cfg.checkBoolean } );
-    
-        /**
-        * True if the Calendar should show week row footers. False by default.
-        * @config SHOW_WEEK_FOOTER
-        * @type Boolean
-        * @default false
-        */ 
-        cfg.addProperty(DEF_CFG.SHOW_WEEK_FOOTER.key,{ value:DEF_CFG.SHOW_WEEK_FOOTER.value, handler:this.configOptions, validator:cfg.checkBoolean } );
-    
-        /**
-        * True if the Calendar should suppress weeks that are not a part of the current month. False by default.
-        * @config HIDE_BLANK_WEEKS
-        * @type Boolean
-        * @default false
-        */ 
-        cfg.addProperty(DEF_CFG.HIDE_BLANK_WEEKS.key, { value:DEF_CFG.HIDE_BLANK_WEEKS.value, handler:this.configOptions, validator:cfg.checkBoolean } );
-        
-        /**
-        * The image URL that should be used for the left navigation arrow. The image URL is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config NAV_ARROW_LEFT
-        * @type String
-        * @deprecated You can customize the image by overriding the default CSS class for the left arrow - "calnavleft"  
-        * @default null
-        */ 
-        cfg.addProperty(DEF_CFG.NAV_ARROW_LEFT.key, { value:DEF_CFG.NAV_ARROW_LEFT.value, handler:this.configOptions } );
-    
-        /**
-        * The image URL that should be used for the right navigation arrow. The image URL is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config NAV_ARROW_RIGHT
-        * @type String
-        * @deprecated You can customize the image by overriding the default CSS class for the right arrow - "calnavright"
-        * @default null
-        */ 
-        cfg.addProperty(DEF_CFG.NAV_ARROW_RIGHT.key, { value:DEF_CFG.NAV_ARROW_RIGHT.value, handler:this.configOptions } );
-    
-        // Locale properties
-    
-        /**
-        * The short month labels for the current locale. The month labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config MONTHS_SHORT
-        * @type HTML[]
-        * @default ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
-        */
-        cfg.addProperty(DEF_CFG.MONTHS_SHORT.key, { value:DEF_CFG.MONTHS_SHORT.value, handler:this.configLocale } );
-
-        /**
-        * The long month labels for the current locale. The month labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config MONTHS_LONG
-        * @type HTML[]
-        * @default ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
-        */ 
-        cfg.addProperty(DEF_CFG.MONTHS_LONG.key,  { value:DEF_CFG.MONTHS_LONG.value, handler:this.configLocale } );
-
-        /**
-        * The 1-character weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config WEEKDAYS_1CHAR
-        * @type HTML[]
-        * @default ["S", "M", "T", "W", "T", "F", "S"]
-        */ 
-        cfg.addProperty(DEF_CFG.WEEKDAYS_1CHAR.key, { value:DEF_CFG.WEEKDAYS_1CHAR.value, handler:this.configLocale } );
-        
-        /**
-        * The short weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config WEEKDAYS_SHORT
-        * @type HTML[]
-        * @default ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
-        */ 
-        cfg.addProperty(DEF_CFG.WEEKDAYS_SHORT.key, { value:DEF_CFG.WEEKDAYS_SHORT.value, handler:this.configLocale } );
-        
-        /**
-        * The medium weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config WEEKDAYS_MEDIUM
-        * @type HTML[]
-        * @default ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]
-        */ 
-        cfg.addProperty(DEF_CFG.WEEKDAYS_MEDIUM.key, { value:DEF_CFG.WEEKDAYS_MEDIUM.value, handler:this.configLocale } );
-        
-        /**
-        * The long weekday labels for the current locale. The weekday labels are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config WEEKDAYS_LONG
-        * @type HTML[]
-        * @default ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
-        */ 
-        cfg.addProperty(DEF_CFG.WEEKDAYS_LONG.key, { value:DEF_CFG.WEEKDAYS_LONG.value, handler:this.configLocale } );
-
-        /**
-        * Refreshes the locale values used to build the Calendar.
-        * @method refreshLocale
-        * @private
-        */
-        var refreshLocale = function() {
-            cfg.refireEvent(DEF_CFG.LOCALE_MONTHS.key);
-            cfg.refireEvent(DEF_CFG.LOCALE_WEEKDAYS.key);
-        };
-    
-        cfg.subscribeToConfigEvent(DEF_CFG.START_WEEKDAY.key, refreshLocale, this, true);
-        cfg.subscribeToConfigEvent(DEF_CFG.MONTHS_SHORT.key, refreshLocale, this, true);
-        cfg.subscribeToConfigEvent(DEF_CFG.MONTHS_LONG.key, refreshLocale, this, true);
-        cfg.subscribeToConfigEvent(DEF_CFG.WEEKDAYS_1CHAR.key, refreshLocale, this, true);
-        cfg.subscribeToConfigEvent(DEF_CFG.WEEKDAYS_SHORT.key, refreshLocale, this, true);
-        cfg.subscribeToConfigEvent(DEF_CFG.WEEKDAYS_MEDIUM.key, refreshLocale, this, true);
-        cfg.subscribeToConfigEvent(DEF_CFG.WEEKDAYS_LONG.key, refreshLocale, this, true);
-       
-        /**
-        * The setting that determines which length of month labels should be used. Possible values are "short" and "long".
-        * @config LOCALE_MONTHS
-        * @type String
-        * @default "long"
-        */ 
-        cfg.addProperty(DEF_CFG.LOCALE_MONTHS.key, { value:DEF_CFG.LOCALE_MONTHS.value, handler:this.configLocaleValues } );
-        
-        /**
-        * The setting that determines which length of weekday labels should be used. Possible values are "1char", "short", "medium", and "long".
-        * @config LOCALE_WEEKDAYS
-        * @type String
-        * @default "short"
-        */ 
-        cfg.addProperty(DEF_CFG.LOCALE_WEEKDAYS.key, { value:DEF_CFG.LOCALE_WEEKDAYS.value, handler:this.configLocaleValues } );
-
-        /**
-        * The positive or negative year offset from the Gregorian calendar year (assuming a January 1st rollover) to 
-        * be used when displaying and parsing dates. NOTE: All JS Date objects returned by methods, or expected as input by
-        * methods will always represent the Gregorian year, in order to maintain date/month/week values. 
-        *
-        * @config YEAR_OFFSET
-        * @type Number
-        * @default 0
-        */
-        cfg.addProperty(DEF_CFG.YEAR_OFFSET.key, { value:DEF_CFG.YEAR_OFFSET.value, supercedes:DEF_CFG.YEAR_OFFSET.supercedes, handler:this.configLocale  } );
-    
-        /**
-        * The value used to delimit individual dates in a date string passed to various Calendar functions.
-        * @config DATE_DELIMITER
-        * @type String
-        * @default ","
-        */ 
-        cfg.addProperty(DEF_CFG.DATE_DELIMITER.key,  { value:DEF_CFG.DATE_DELIMITER.value, handler:this.configLocale } );
-    
-        /**
-        * The value used to delimit date fields in a date string passed to various Calendar functions.
-        * @config DATE_FIELD_DELIMITER
-        * @type String
-        * @default "/"
-        */ 
-        cfg.addProperty(DEF_CFG.DATE_FIELD_DELIMITER.key, { value:DEF_CFG.DATE_FIELD_DELIMITER.value, handler:this.configLocale } );
-    
-        /**
-        * The value used to delimit date ranges in a date string passed to various Calendar functions.
-        * @config DATE_RANGE_DELIMITER
-        * @type String
-        * @default "-"
-        */
-        cfg.addProperty(DEF_CFG.DATE_RANGE_DELIMITER.key, { value:DEF_CFG.DATE_RANGE_DELIMITER.value, handler:this.configLocale } );
-    
-        /**
-        * The position of the month in a month/year date string
-        * @config MY_MONTH_POSITION
-        * @type Number
-        * @default 1
-        */
-        cfg.addProperty(DEF_CFG.MY_MONTH_POSITION.key, { value:DEF_CFG.MY_MONTH_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } );
-    
-        /**
-        * The position of the year in a month/year date string
-        * @config MY_YEAR_POSITION
-        * @type Number
-        * @default 2
-        */
-        cfg.addProperty(DEF_CFG.MY_YEAR_POSITION.key, { value:DEF_CFG.MY_YEAR_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } );
-    
-        /**
-        * The position of the month in a month/day date string
-        * @config MD_MONTH_POSITION
-        * @type Number
-        * @default 1
-        */
-        cfg.addProperty(DEF_CFG.MD_MONTH_POSITION.key, { value:DEF_CFG.MD_MONTH_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } );
-    
-        /**
-        * The position of the day in a month/year date string
-        * @config MD_DAY_POSITION
-        * @type Number
-        * @default 2
-        */
-        cfg.addProperty(DEF_CFG.MD_DAY_POSITION.key,  { value:DEF_CFG.MD_DAY_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } );
-    
-        /**
-        * The position of the month in a month/day/year date string
-        * @config MDY_MONTH_POSITION
-        * @type Number
-        * @default 1
-        */
-        cfg.addProperty(DEF_CFG.MDY_MONTH_POSITION.key, { value:DEF_CFG.MDY_MONTH_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } );
-    
-        /**
-        * The position of the day in a month/day/year date string
-        * @config MDY_DAY_POSITION
-        * @type Number
-        * @default 2
-        */
-        cfg.addProperty(DEF_CFG.MDY_DAY_POSITION.key, { value:DEF_CFG.MDY_DAY_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } );
-    
-        /**
-        * The position of the year in a month/day/year date string
-        * @config MDY_YEAR_POSITION
-        * @type Number
-        * @default 3
-        */
-        cfg.addProperty(DEF_CFG.MDY_YEAR_POSITION.key, { value:DEF_CFG.MDY_YEAR_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } );
-        
-        /**
-        * The position of the month in the month year label string used as the Calendar header
-        * @config MY_LABEL_MONTH_POSITION
-        * @type Number
-        * @default 1
-        */
-        cfg.addProperty(DEF_CFG.MY_LABEL_MONTH_POSITION.key, { value:DEF_CFG.MY_LABEL_MONTH_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } );
-    
-        /**
-        * The position of the year in the month year label string used as the Calendar header
-        * @config MY_LABEL_YEAR_POSITION
-        * @type Number
-        * @default 2
-        */
-        cfg.addProperty(DEF_CFG.MY_LABEL_YEAR_POSITION.key, { value:DEF_CFG.MY_LABEL_YEAR_POSITION.value, handler:this.configLocale, validator:cfg.checkNumber } );
-        
-        /**
-        * The suffix used after the month when rendering the Calendar header. The suffix is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config MY_LABEL_MONTH_SUFFIX
-        * @type HTML
-        * @default " "
-        */
-        cfg.addProperty(DEF_CFG.MY_LABEL_MONTH_SUFFIX.key, { value:DEF_CFG.MY_LABEL_MONTH_SUFFIX.value, handler:this.configLocale } );
-        
-        /**
-        * The suffix used after the year when rendering the Calendar header. The suffix is inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source.
-        * @config MY_LABEL_YEAR_SUFFIX
-        * @type HTML
-        * @default ""
-        */
-        cfg.addProperty(DEF_CFG.MY_LABEL_YEAR_SUFFIX.key, { value:DEF_CFG.MY_LABEL_YEAR_SUFFIX.value, handler:this.configLocale } );
-
-        /**
-        * Configuration for the Month/Year CalendarNavigator UI which allows the user to jump directly to a 
-        * specific Month/Year without having to scroll sequentially through months.
-        * <p>
-        * Setting this property to null (default value) or false, will disable the CalendarNavigator UI.
-        * </p>
-        * <p>
-        * Setting this property to true will enable the CalendarNavigatior UI with the default CalendarNavigator configuration values.
-        * </p>
-        * <p>
-        * This property can also be set to an object literal containing configuration properties for the CalendarNavigator UI.
-        * The configuration object expects the the following case-sensitive properties, with the "strings" property being a nested object.
-        * Any properties which are not provided will use the default values (defined in the CalendarNavigator class).
-        * </p>
-        * <dl>
-        * <dt>strings</dt>
-        * <dd><em>Object</em> :  An object with the properties shown below, defining the string labels to use in the Navigator's UI. The strings are inserted into the DOM as HTML, and should be escaped by the implementor if coming from an external source. 
-        *     <dl>
-        *         <dt>month</dt><dd><em>HTML</em> : The markup to use for the month label. Defaults to "Month".</dd>
-        *         <dt>year</dt><dd><em>HTML</em> : The markup to use for the year label. Defaults to "Year".</dd>
-        *         <dt>submit</dt><dd><em>HTML</em> : The markup to use for the submit button label. Defaults to "Okay".</dd>
-        *         <dt>cancel</dt><dd><em>HTML</em> : The markup to use for the cancel button label. Defaults to "Cancel".</dd>
-        *         <dt>invalidYear</dt><dd><em>HTML</em> : The markup to use for invalid year values. Defaults to "Year needs to be a number".</dd>
-        *     </dl>
-        * </dd>
-        * <dt>monthFormat</dt><dd><em>String</em> : The month for

<TRUNCATED>

[04/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesPage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesPage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesPage.java
deleted file mode 100644
index dadad43..0000000
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesPage.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * 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.wicket.examples.dates;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-
-import org.apache.wicket.Session;
-import org.apache.wicket.datetime.StyleDateConverter;
-import org.apache.wicket.datetime.markup.html.form.DateTextField;
-import org.apache.wicket.examples.WicketExamplePage;
-import org.apache.wicket.extensions.yui.calendar.DatePicker;
-import org.apache.wicket.extensions.yui.calendar.DateTimeField;
-import org.apache.wicket.extensions.yui.calendar.TimeField;
-import org.apache.wicket.markup.html.form.ChoiceRenderer;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.form.FormComponentUpdatingBehavior;
-import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.markup.html.panel.FeedbackPanel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.PropertyModel;
-
-/**
- * Demonstrates components from the wicket-date project and a bunch of locale fiddling.
- */
-public class DatesPage extends WicketExamplePage
-{
-	/**
-	 * Choice for a locale.
-	 */
-	private final class LocaleChoiceRenderer extends ChoiceRenderer<Locale>
-	{
-		/**
-		 * Constructor.
-		 */
-		public LocaleChoiceRenderer()
-		{
-		}
-
-		@Override
-		public Object getDisplayValue(Locale locale)
-		{
-			String enName = locale.getDisplayName(LOCALE_EN);
-			String localizedName = locale.getDisplayName(selectedLocale);
-			return localizedName + (!enName.equals(localizedName) ? (" (" + enName + ")") : "");
-		}
-	}
-
-	/**
-	 * Dropdown with Locales.
-	 */
-	private final class LocaleDropDownChoice extends DropDownChoice<Locale>
-	{
-		/**
-		 * Construct.
-		 * 
-		 * @param id
-		 *            component id
-		 */
-		public LocaleDropDownChoice(String id)
-		{
-			super(id);
-			// sort locales on strings of selected locale
-			setChoices(new IModel<List<Locale>>()
-			{
-				@Override
-				public List<Locale> getObject()
-				{
-					List<Locale> locales = new ArrayList<>(LOCALES);
-					Collections.sort(locales, new Comparator<Locale>()
-					{
-						@Override
-						public int compare(Locale o1, Locale o2)
-						{
-							return o1.getDisplayName(selectedLocale).compareTo(
-								o2.getDisplayName(selectedLocale));
-						}
-					});
-					return locales;
-				}
-			});
-			setChoiceRenderer(new LocaleChoiceRenderer());
-			setDefaultModel(new PropertyModel<>(DatesPage.this, "selectedLocale"));
-			
-			add(new FormComponentUpdatingBehavior());
-		}
-	}
-
-	private static final Locale LOCALE_EN = new Locale("en");
-
-	private static final List<Locale> LOCALES;
-	static
-	{
-		LOCALES = Arrays.asList(Locale.getAvailableLocales());
-	}
-
-	/** the backing object for DateTextField demo */
-	private final Date date = new Date();
-
-	/** the backing object for DateTimeField demo */
-	private final Date date2 = new Date();
-
-	/** the backing object for TimeField demo */
-	private final Date time = new Date();
-
-	private Locale selectedLocale = LOCALE_EN;
-
-	/**
-	 * Constructor
-	 */
-	public DatesPage()
-	{
-		selectedLocale = Session.get().getLocale();
-		Form<?> localeForm = new Form<>("localeForm");
-		localeForm.add(new LocaleDropDownChoice("localeSelect"));
-		localeForm.add(new Link<Void>("localeUSLink")
-		{
-			@Override
-			public void onClick()
-			{
-				selectedLocale = LOCALE_EN;
-			}
-		});
-		add(localeForm);
-		DateTextField dateTextField = new DateTextField("dateTextField", new PropertyModel<>(
-			this, "date"), new StyleDateConverter("S-", true))
-		{
-			@Override
-			public Locale getLocale()
-			{
-				return selectedLocale;
-			}
-		};
-		Form<?> form = new Form<Void>("form")
-		{
-			@Override
-			protected void onSubmit()
-			{
-				info("set date to " + date);
-			}
-		};
-		add(form);
-		form.add(dateTextField);
-
-		DatePicker datePicker = new DatePicker()
-		{
-			@Override
-			protected String getAdditionalJavaScript()
-			{
-				return "${calendar}.cfg.setProperty(\"navigator\",true,false); ${calendar}.render();";
-			}
-		};
-		datePicker.setShowOnFieldClick(true);
-		datePicker.setAutoHide(true);
-		dateTextField.add(datePicker);
-		add(new FeedbackPanel("feedback"));
-
-		Form<?> form2 = new Form<Void>("form2")
-		{
-			@Override
-			protected void onSubmit()
-			{
-				info("set date2 to " + date2);
-			}
-		};
-		add(form2);
-		form2.add(new DateTimeField("dateTimeField", new PropertyModel<>(this, "date2")));
-
-
-		Form<?> form3 = new Form<Void>("form3")
-		{
-			@Override
-			protected void onSubmit()
-			{
-				info("set time to " + time);
-			}
-		};
-		add(form3);
-		form3.add(new TimeField("timeField", new PropertyModel<>(this, "time")));
-	}
-
-	/**
-	 * @return the selected locale
-	 */
-	public final Locale getSelectedLocale()
-	{
-		return selectedLocale;
-	}
-
-	/**
-	 * @param selectedLocale
-	 */
-	public final void setSelectedLocale(Locale selectedLocale)
-	{
-		this.selectedLocale = selectedLocale;
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
new file mode 100644
index 0000000..7dc4282
--- /dev/null
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
@@ -0,0 +1,33 @@
+/*
+ * 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.wicket.examples.datetime;
+
+import org.apache.wicket.Page;
+import org.apache.wicket.examples.WicketExampleApplication;
+
+/**
+ * Application class for the DateTime example.
+ * 
+ */
+public class DateTimeApplication extends WicketExampleApplication
+{
+	@Override
+	public Class< ? extends Page> getHomePage()
+	{
+		return DateTimePage.class;
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
new file mode 100644
index 0000000..eed5878
--- /dev/null
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:wicket="http://wicket.apache.org" xml:lang="en" lang="en">
+	<head>
+		<title>Wicket Examples - DateTime</title>
+		<link rel="stylesheet" type="text/css" href="style.css" />
+	</head>
+	<body>
+		<span wicket:id="mainNavigation" />
+
+		<h3>Demo for short style time</h3>
+		<span wicket:id="time1"></span><br/>
+
+		<hr/>
+
+		<h3>Demo for Full style time</h3>
+		<span wicket:id="time2"></span><br/>
+
+		<hr/>
+
+		<h3>Demo for Short style time with 24-hours</h3>
+		<span wicket:id="time3"></span><br/>
+
+		<hr/>
+
+		<form wicket:id="form">
+			<h3>Demo for default Local Date Time in Form</h3>
+			<span wicket:id="datetime1"></span><br/>
+			<input wicket:id="submit" type="submit" value="Submit"/>
+			<div wicket:id="feedback"></div>
+		</form>
+	</body>
+</html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
new file mode 100644
index 0000000..6294863
--- /dev/null
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
@@ -0,0 +1,79 @@
+/*
+ * 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.wicket.examples.datetime;
+
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+
+import org.apache.wicket.ajax.AjaxRequestTarget;
+import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.examples.WicketExamplePage;
+import org.apache.wicket.extensions.markup.html.form.datetime.DateTimeField;
+import org.apache.wicket.extensions.markup.html.form.datetime.StyleTimeConverter;
+import org.apache.wicket.extensions.markup.html.form.datetime.TimeField;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.panel.FeedbackPanel;
+import org.apache.wicket.model.Model;
+
+/**
+ * DateTime example page.
+ * 
+ */
+public class DateTimePage extends WicketExamplePage
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Constructor.
+	 */
+	public DateTimePage()
+	{
+		add(TimeField.forShortStyle("time1", Model.of(LocalTime.of(22, 15))));
+		add(TimeField.forTimeStyle("time2", Model.of(LocalTime.of(22, 15)), "F"));
+		add(new TimeField("time3", Model.of(LocalTime.of(22, 15)), new StyleTimeConverter("S")) {
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected boolean use12HourFormat() {
+				return false;
+			}
+		});
+		final DateTimeField datetime1 = new DateTimeField("datetime1", Model.of(LocalDateTime.now()));
+		final FeedbackPanel feedback = new FeedbackPanel("feedback");
+		Form<String> form = new Form<>("form");
+		add(form.add(datetime1)
+				.add(feedback.setOutputMarkupId(true))
+				.add(new AjaxButton("submit")
+				{
+					private static final long serialVersionUID = 1L;
+
+					@Override
+					protected void onSubmit(AjaxRequestTarget target)
+					{
+						form.info(String.format("DateTime was just submitted: %s", datetime1.getModelObject()));
+						target.add(feedback);
+					}
+
+					@Override
+					protected void onError(AjaxRequestTarget target)
+					{
+						target.add(feedback);
+					}
+				})
+			);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/resources/META-INF/NOTICE b/wicket-examples/src/main/resources/META-INF/NOTICE
index c5b1958..619dd91 100644
--- a/wicket-examples/src/main/resources/META-INF/NOTICE
+++ b/wicket-examples/src/main/resources/META-INF/NOTICE
@@ -32,9 +32,6 @@
    This product includes ASM, released under a BSD style license (http://asm.objectweb.org).
    Copyright (c) 2000-2005 INRIA, France Telecom
 
-   This product includes software developed by
-   Joda.org (http://www.joda.org/).
-
    This product includes jhighlight (https://jhighlight.dev.java.net/)
    which is released under CDDL 1.0 license (http://www.opensource.org/licenses/cddl1.php).
 

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html b/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html
index 1175eab..8e91b60 100644
--- a/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html
+++ b/wicket-examples/src/main/resources/org/apache/wicket/examples/homepage/HomePage.html
@@ -50,7 +50,7 @@
         <tr><td align="right"><a href="breadcrumb">breadcrumb</a></td><td> - Don't get lost, use bread-crumbs.</td></tr>
 		<tr><td align="right"><a href="captcha">captcha</a></td><td> - Image-based "captcha" to distinguish humans from spammers.</td></tr>
         <tr><td align="right"><a href="kitten-captcha">kitten-captcha</a></td><td> - Another approach to captchas</td></tr>
-		<tr><td align="right"><a href="dates">dates</a></td><td> - Date component example from the wicket-date project.</td></tr>
+		<tr><td align="right"><a href="datetime">dates and times</a></td><td> - Date components example.</td></tr>
 		
         <tr class="section"><td align="right"><a href="stock">stockquote</a></td><td> - Stock quote example.</td></tr>
         <tr><td align="right"><a href="guestbook">guestbook</a></td><td> - A blog-like multi-user guestbook.</td></tr>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/webapp/WEB-INF/web.xml b/wicket-examples/src/main/webapp/WEB-INF/web.xml
index 67f11f4..e530a05 100644
--- a/wicket-examples/src/main/webapp/WEB-INF/web.xml
+++ b/wicket-examples/src/main/webapp/WEB-INF/web.xml
@@ -409,15 +409,6 @@
 		</init-param>
 	</filter>
 
-	<filter>
-		<filter-name>DatesApplication</filter-name>
-		<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
-		<init-param>
-			<param-name>applicationClassName</param-name>
-			<param-value>org.apache.wicket.examples.dates.DatesApplication</param-value>
-		</init-param>
-	</filter>
-
 	<!-- The WicketSesionFilter can be used to provide thread local access to servlets/ JSPs/ etc -->
 	<filter>
 		<filter-name>WicketSessionFilter</filter-name>
@@ -750,13 +741,6 @@
 	</filter-mapping>	
 
 	<filter-mapping>
-		<filter-name>DatesApplication</filter-name>
-		<url-pattern>/dates/*</url-pattern>
-		<dispatcher>REQUEST</dispatcher>
-		<dispatcher>INCLUDE</dispatcher>
-	</filter-mapping>
-
-	<filter-mapping>
 		<filter-name>RequestMapperApplication</filter-name>
 		<url-pattern>/mappers/*</url-pattern>
 		<dispatcher>REQUEST</dispatcher>
@@ -831,6 +815,19 @@
         <url-pattern>/bean-validation/*</url-pattern>
     </filter-mapping>
 
+	<filter>
+		<filter-name>DateTimeApplication</filter-name>
+		<filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+		<init-param>
+			<param-name>applicationClassName</param-name>
+			<param-value>org.apache.wicket.examples.datetime.DateTimeApplication</param-value>
+		</init-param>
+	</filter>
+	<filter-mapping>
+		<filter-name>DateTimeApplication</filter-name>
+		<url-pattern>/datetime/*</url-pattern>
+	</filter-mapping>
+
 	<!--
 	 Parameter used by Spring to locate its context configuration used for creating
 	 a WebApplicationContext.

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.html
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.html b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.html
new file mode 100644
index 0000000..d92f2ce
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.html
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+   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.
+-->
+<wicket:panel xmlns:wicket="http://wicket.apache.org">
+  <span style="white-space: nowrap;">
+    <input type="text" wicket:id="date" size="12" />
+    <span wicket:id="time" />
+  </span>
+</wicket:panel>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
new file mode 100644
index 0000000..5ec27a6
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
@@ -0,0 +1,244 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.temporal.Temporal;
+import java.util.Date;
+import java.util.Locale;
+
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.form.FormComponentPanel;
+import org.apache.wicket.model.IModel;
+
+/**
+ * Works on a {@link java.time.ZonedDateTime} object. Displays a date field and a DatePicker, a field
+ * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field
+ * depends on the time format of this {@link AbstractDateTimeField}'s {@link Locale}, as does the visibility
+ * of the AM/PM field (see {@link AbstractDateTimeField#use12HourFormat}).
+ * <p>
+ * <strong>Ajaxifying the DateTimeField</strong>: If you want to update a DateTimeField with an
+ * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained
+ * {@link DateField} by overriding {@link #newDateTextField(String, IModel)} and calling
+ * {@link #processInput()}:
+ * 
+ * <pre>{@code
+ *  DateTimeField dateTimeField = new DateTimeField(...) {
+ *    protected DateTextField newDateTextField(String id, PropertyModel<Date> dateFieldModel)
+ *    {
+ *      DateTextField dateField = super.newDateTextField(id, dateFieldModel);     
+ *      dateField.add(new AjaxFormComponentUpdatingBehavior("change") {
+ *        protected void onUpdate(AjaxRequestTarget target) {
+ *          processInput(); // let DateTimeField process input too
+ *
+ *          ...
+ *        }
+ *      });
+ *      return recorder;
+ *    }
+ *  }
+ * }</pre>
+ * 
+ * @author eelcohillenius
+ * @see DateField for a variant with just the date field and date picker
+ */
+abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPanel<T>
+{
+	private static final long serialVersionUID = 1L;
+
+	// Component-IDs
+	protected static final String DATE = "date";
+	protected static final String TIME = "time";
+
+	// The date TextField and it's associated model object
+	// Note that any time information in date will be ignored
+	private DateField dateField;
+	private TimeField timeField;
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 */
+	public AbstractDateTimeField(final String id)
+	{
+		this(id, null);
+	}
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 * @param model
+	 */
+	public AbstractDateTimeField(final String id, final IModel<T> model)
+	{
+		super(id, model);
+
+		// Create and add the date TextField
+		add(dateField = newDateField(DATE, new DateModel()));
+		add(timeField = newTimeField(TIME, new TimeModel()));
+	}
+
+	/**
+	 * 
+	 * @return The date TextField
+	 */
+	protected final DateField getDateField()
+	{
+		return dateField;
+	}
+
+	/**
+	 * 
+	 * @return The date TextField
+	 */
+	protected final TimeField getTimeField()
+	{
+		return timeField;
+	}
+
+	@Override
+	public String getInput()
+	{
+		// since we override convertInput, we can let this method return a value
+		// that is just suitable for error reporting
+		return String.format("%s, %s", dateField.getInput(), timeField.getInput());
+	}
+
+	/**
+	 * Sets the converted input, which is an instance of {@link Date}, possibly null. It combines
+	 * the inputs of the nested date, hours, minutes and am/pm fields and constructs a date from it.
+	 * <p>
+	 * Note that overriding this method is a better option than overriding {@link #updateModel()}
+	 * like the first versions of this class did. The reason for that is that this method can be
+	 * used by form validators without having to depend on the actual model being updated, and this
+	 * method is called by the default implementation of {@link #updateModel()} anyway (so we don't
+	 * have to override that anymore).
+	 */
+	@Override
+	public void convertInput()
+	{
+		try
+		{
+			// Get the converted input values
+			LocalDate localDate = dateField.getConvertedInput();
+
+			if (localDate == null)
+			{
+				return;
+			}
+
+			// Use the input to create a date object with proper timezone
+			LocalTime localTime = timeField.getConvertedInput();
+
+			// The date will be in the server's timezone
+			setConvertedInput(performConvert(localDate, localTime));
+		}
+		catch (RuntimeException e)
+		{
+			AbstractDateTimeField.this.error(e.getMessage());
+			invalid();
+		}
+	}
+
+	abstract T performConvert(LocalDate date, LocalTime time);
+
+	abstract void prepareObject();
+
+	/**
+	 * create a new {@link DateField} instance to be added to this panel.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param dateFieldModel
+	 *            model that should be used by the {@link DateField}
+	 * @return a new date text field instance
+	 */
+	protected DateField newDateField(String id, IModel<LocalDate> dateFieldModel)
+	{
+		return DateField.forShortStyle(id, dateFieldModel);
+	}
+
+	/**
+	 * create a new {@link TimeField} instance to be added to this panel.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param timeFieldModel
+	 *            model that should be used by the {@link TimeField}
+	 * @return a new time text field instance
+	 */
+	protected TimeField newTimeField(String id, IModel<LocalTime> timeFieldModel)
+	{
+		return TimeField.forShortStyle(id, timeFieldModel);
+	}
+
+	/**
+	 * @see org.apache.wicket.Component#onBeforeRender()
+	 */
+	@Override
+	protected void onBeforeRender()
+	{
+		dateField.setRequired(isRequired());
+		timeField.setRequired(isRequired());
+
+		prepareObject();
+
+		super.onBeforeRender();
+	}
+
+	abstract LocalDate getLocalDate();
+	abstract void setLocalDate(LocalDate date);
+	abstract LocalTime getLocalTime();
+	abstract void setLocalTime(LocalTime time);
+
+	protected class DateModel implements IModel<LocalDate>
+	{
+		private static final long serialVersionUID = 1L;
+
+		@Override
+		public LocalDate getObject()
+		{
+			return getLocalDate();
+		}
+
+		@Override
+		public void setObject(LocalDate date)
+		{
+			setLocalDate(date);
+		}
+	}
+
+	protected class TimeModel implements IModel<LocalTime>
+	{
+		private static final long serialVersionUID = 1L;
+
+		@Override
+		public LocalTime getObject()
+		{
+			return getLocalTime();
+		}
+
+		@Override
+		public void setObject(LocalTime time)
+		{
+			setLocalTime(time);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateField.java
new file mode 100644
index 0000000..895c0c6
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateField.java
@@ -0,0 +1,252 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.format.FormatStyle;
+
+import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.lang.Args;
+
+/**
+ * A TextField that is mapped to a <code>java.time.LocalDate</code> object and that uses java.time time to
+ * parse and format values.
+ * <p>
+ * You should use on of the factory methods to construct the kind you want or use the public
+ * constructor and pass in the converter to use.
+ * </p>
+ * <p>
+ * This component tries to apply the time zone difference between the client and server. See the
+ * {@link ZonedDateTimeConverter#getApplyTimeZoneDifference() date converter} of this package for more
+ * information on that.
+ * </p>
+ * 
+ * @see StyleZonedDateTimeConverter
+ * @see java.time.ZonedDateTime
+ * @see java.time.format.DateTimeFormatter
+ * @see java.time.ZoneId
+ * 
+ * @author eelcohillenius
+ */
+public class DateField extends TextField<LocalDate> implements ITextFormatProvider
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Creates a new DateField defaulting to using a short date pattern
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param model
+	 *            The model
+	 * @param datePattern
+	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
+	 *            patterns.
+	 * @return DateField
+	 */
+	public static DateField forDatePattern(String id, IModel<LocalDate> model, String datePattern)
+	{
+		return new DateField(id, model, new PatternDateConverter(datePattern));
+	}
+
+	/**
+	 * Creates a new DateField defaulting to using a short date pattern
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param datePattern
+	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
+	 *            patterns.
+	 * @return DateField
+	 */
+	public static DateField forDatePattern(String id, String datePattern)
+	{
+		return forDatePattern(id, null, datePattern);
+	}
+
+	/**
+	 * Creates a new DateField using the provided date style.
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param model
+	 *            The model
+	 * @param dateStyle
+	 *            Date style to use. The first character is the date style, and the second character
+	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
+	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
+	 *            character '-'. See {@link org.joda.time.DateTimeFormat#forStyle(String)}.
+	 * @return DateField
+	 */
+	public static DateField forDateStyle(String id, IModel<LocalDate> model, String dateStyle)
+	{
+		return new DateField(id, model, new StyleDateConverter(dateStyle));
+	}
+
+	/**
+	 * Creates a new DateField using the provided date style.
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param dateStyle
+	 *            Date style to use. The first character is the date style, and the second character
+	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
+	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
+	 *            character '-'. See {@link org.joda.time.DateTimeFormat#forStyle(String)}.
+	 * @return DateField
+	 */
+	public static DateField forDateStyle(String id, String dateStyle)
+	{
+		return forDateStyle(id, null, dateStyle);
+	}
+
+	/**
+	 * Creates a new DateField defaulting to using a short date pattern
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @return DateField
+	 */
+	public static DateField forShortStyle(String id)
+	{
+		return forShortStyle(id, null);
+	}
+
+	/**
+	 * Creates a new DateField defaulting to using a short date pattern
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param model
+	 *            The model
+	 * @return DateField
+	 */
+	public static DateField forShortStyle(String id, IModel<LocalDate> model)
+	{
+		return new DateField(id, model, new StyleDateConverter());
+	}
+
+	/**
+	 * Creates a new DateField using the provided converter.
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param converter
+	 *            the date converter
+	 * @return DateField
+	 */
+	public static DateField withConverter(String id, LocalDateConverter converter)
+	{
+		return withConverter(id, null, converter);
+	}
+
+	/**
+	 * Creates a new DateField using the provided converter.
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param model
+	 *            The model
+	 * @param converter
+	 *            the date converter
+	 * @return DateField
+	 */
+	public static DateField withConverter(String id, IModel<LocalDate> model, LocalDateConverter converter)
+	{
+		return new DateField(id, model, converter);
+	}
+
+	/**
+	 * The converter for the TextField
+	 */
+	private final LocalDateConverter converter;
+
+	/**
+	 * Construct with a converter.
+	 * 
+	 * @param id
+	 *            The component id
+	 * @param model
+	 *            The model
+	 * @param converter
+	 *            The converter to use
+	 */
+	public DateField(String id, IModel<LocalDate> model, LocalDateConverter converter)
+	{
+		super(id, model, LocalDate.class);
+
+		Args.notNull(converter, "converter");
+		this.converter = converter;
+	}
+
+	/**
+	 * Construct with a converter, and a null model.
+	 * 
+	 * @param id
+	 *            The component id
+	 * @param converter
+	 *            The converter to use
+	 */
+	public DateField(String id, LocalDateConverter converter)
+	{
+		this(id, null, converter);
+	}
+
+	/**
+	 * @return The specialized converter.
+	 * @see org.apache.wicket.Component#createConverter(java.lang.Class)
+	 */
+	@Override
+	protected IConverter<?> createConverter(Class<?> clazz)
+	{
+		if (LocalDate.class.isAssignableFrom(clazz))
+		{
+			return converter;
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider#getTextFormat()
+	 */
+	@Override
+	public final String getTextFormat()
+	{
+		return converter.getPattern(getLocale());
+	}
+
+	public static FormatStyle parseFormatStyle(char style)
+	{
+		switch (style)
+		{
+			case 'S':
+				return FormatStyle.SHORT;
+			case 'M':
+				return FormatStyle.MEDIUM;
+			case 'L':
+				return FormatStyle.LONG;
+			case 'F':
+				return FormatStyle.FULL;
+			default:
+				return null;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
new file mode 100644
index 0000000..8ff825a
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
@@ -0,0 +1,123 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.temporal.ChronoField;
+import java.util.Locale;
+
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.model.IModel;
+
+/**
+ * Works on a {@link java.time.LocalDateTimeTime} object. Displays a date field and a DatePicker, a field
+ * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field
+ * depends on the time format of this {@link DateTimeField}'s {@link Locale}, as does the visibility
+ * of the AM/PM field (see {@link DateTimeField#use12HourFormat}).
+ * <p>
+ * <strong>Ajaxifying the DateTimeField</strong>: If you want to update a DateTimeField with an
+ * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained
+ * {@link DateField} by overriding {@link #newDateTextField(String, IModel)} and calling
+ * {@link #processInput()}:
+ * 
+ * <pre>{@code
+ *  DateTimeField dateTimeField = new DateTimeField(...) {
+ *    protected DateTextField newDateTextField(String id, PropertyModel<Date> dateFieldModel)
+ *    {
+ *      DateTextField dateField = super.newDateTextField(id, dateFieldModel);     
+ *      dateField.add(new AjaxFormComponentUpdatingBehavior("change") {
+ *        protected void onUpdate(AjaxRequestTarget target) {
+ *          processInput(); // let DateTimeField process input too
+ *
+ *          ...
+ *        }
+ *      });
+ *      return recorder;
+ *    }
+ *  }
+ * }</pre>
+ * 
+ * @author eelcohillenius
+ * @see DateField for a variant with just the date field and date picker
+ */
+public class DateTimeField extends AbstractDateTimeField<LocalDateTime>
+{
+	private static final long serialVersionUID = 1L;
+
+	private LocalDateTime dateTime = LocalDateTime.now();
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 */
+	public DateTimeField(final String id)
+	{
+		this(id, null);
+	}
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 * @param model
+	 */
+	public DateTimeField(final String id, final IModel<LocalDateTime> model)
+	{
+		super(id, model);
+
+		// Sets the type that will be used when updating the model for this component.
+		setType(LocalDateTime.class);
+	}
+
+	LocalDateTime performConvert(LocalDate date, LocalTime time) {
+		return LocalDateTime.of(date, time);
+	}
+
+	@Override
+	void prepareObject() {
+		if (getModelObject() == null)
+		{
+			dateTime = null;
+		}
+	}
+
+	LocalDate getLocalDate()
+	{
+		return dateTime.toLocalDate();
+	}
+
+	void setLocalDate(LocalDate date)
+	{
+		dateTime = dateTime.with(ChronoField.YEAR, date.getYear())
+				.with(ChronoField.MONTH_OF_YEAR, date.getMonthValue())
+				.with(ChronoField.DAY_OF_YEAR, date.getDayOfMonth());
+	}
+
+	LocalTime getLocalTime()
+	{
+		return dateTime.toLocalTime();
+	}
+
+	void setLocalTime(LocalTime time)
+	{
+		dateTime = dateTime.with(ChronoField.HOUR_OF_DAY, time.getHour())
+				.with(ChronoField.MINUTE_OF_HOUR, time.getMinute());
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateConverter.java
new file mode 100644
index 0000000..95e1a47
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateConverter.java
@@ -0,0 +1,104 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.Locale;
+
+import org.apache.wicket.util.convert.ConversionException;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.lang.Args;
+import org.apache.wicket.util.string.Strings;
+
+
+/**
+ * Base class for java.time based date converters. It contains the logic to parse and format,
+ * optionally taking the time zone difference between clients and the server into account.
+ * <p>
+ * Converters of this class are best suited for per-component use.
+ * </p>
+ * 
+ * @author eelcohillenius
+ */
+public abstract class LocalDateConverter implements IConverter<LocalDate>
+{
+	private static final long serialVersionUID = 1L;
+
+	public LocalDate convertToObject(String value, DateTimeFormatter format, Locale locale) {
+		try
+		{
+			// parse date retaining the time of the submission
+			return LocalDate.parse(value, format);
+		}
+		catch (RuntimeException e)
+		{
+			throw newConversionException(e, locale);
+		}
+	}
+
+	@Override
+	public LocalDate convertToObject(String value, Locale locale)
+	{
+		if (Strings.isEmpty(value))
+		{
+			return null;
+		}
+
+		DateTimeFormatter format = getFormat(locale);
+		Args.notNull(format, "format");
+
+		return convertToObject(value, format, locale);
+	}
+
+	/**
+	 * Creates a ConversionException and sets additional context information to it.
+	 *
+	 * @param cause
+	 *            - {@link RuntimeException} cause
+	 * @param locale
+	 *            - {@link Locale} used to set 'format' variable with localized pattern
+	 * @return {@link ConversionException}
+	 */
+	ConversionException newConversionException(RuntimeException cause, Locale locale)
+	{
+		return new ConversionException(cause)
+				.setVariable("format", getPattern(locale));
+	}
+
+	@Override
+	public String convertToString(LocalDate dateTime, Locale locale)
+	{
+		DateTimeFormatter format = getFormat(locale);
+		return format.format(dateTime);
+	}
+
+	/**
+	 * @param locale
+	 *            The locale used to convert the value
+	 * @return Gets the pattern that is used for printing and parsing
+	 */
+	public abstract String getPattern(Locale locale);
+
+	/**
+	 * @param locale
+	 *            The locale used to convert the value
+	 * 
+	 * @return formatter The formatter for the current conversion
+	 */
+	public abstract DateTimeFormatter getFormat(Locale locale);
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeConverter.java
new file mode 100644
index 0000000..1597ab6
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeConverter.java
@@ -0,0 +1,104 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Locale;
+
+import org.apache.wicket.util.convert.ConversionException;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.lang.Args;
+import org.apache.wicket.util.string.Strings;
+
+
+/**
+ * Base class for java.time based date converters. It contains the logic to parse and format,
+ * optionally taking the time zone difference between clients and the server into account.
+ * <p>
+ * Converters of this class are best suited for per-component use.
+ * </p>
+ * 
+ * @author eelcohillenius
+ */
+public abstract class LocalTimeConverter implements IConverter<LocalTime>
+{
+	private static final long serialVersionUID = 1L;
+
+	public LocalTime convertToObject(String value, DateTimeFormatter format, Locale locale) {
+		try
+		{
+			// parse date retaining the time of the submission
+			return LocalTime.parse(value, format);
+		}
+		catch (RuntimeException e)
+		{
+			throw newConversionException(e, locale);
+		}
+	}
+
+	@Override
+	public LocalTime convertToObject(String value, Locale locale)
+	{
+		if (Strings.isEmpty(value))
+		{
+			return null;
+		}
+
+		DateTimeFormatter format = getFormat(locale);
+		Args.notNull(format, "format");
+
+		return convertToObject(value, format, locale);
+	}
+
+	/**
+	 * Creates a ConversionException and sets additional context information to it.
+	 *
+	 * @param cause
+	 *            - {@link RuntimeException} cause
+	 * @param locale
+	 *            - {@link Locale} used to set 'format' variable with localized pattern
+	 * @return {@link ConversionException}
+	 */
+	ConversionException newConversionException(RuntimeException cause, Locale locale)
+	{
+		return new ConversionException(cause)
+				.setVariable("format", getPattern(locale));
+	}
+
+	@Override
+	public String convertToString(LocalTime time, Locale locale)
+	{
+		DateTimeFormatter format = getFormat(locale);
+		return format.format(time);
+	}
+
+	/**
+	 * @param locale
+	 *            The locale used to convert the value
+	 * @return Gets the pattern that is used for printing and parsing
+	 */
+	public abstract String getPattern(Locale locale);
+
+	/**
+	 * @param locale
+	 *            The locale used to convert the value
+	 * 
+	 * @return formatter The formatter for the current conversion
+	 */
+	public abstract DateTimeFormatter getFormat(Locale locale);
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternDateConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternDateConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternDateConverter.java
new file mode 100644
index 0000000..54ea179
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternDateConverter.java
@@ -0,0 +1,85 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.text.SimpleDateFormat;
+import java.time.format.DateTimeFormatter;
+import java.util.Locale;
+
+import org.apache.wicket.util.lang.Args;
+
+
+/**
+ * Date converter that uses javax.time and can be configured to take the time zone difference between
+ * clients and server into account. This converter is hard coded to use the provided custom date
+ * pattern, no matter what current locale is used. See {@link SimpleDateFormat} for available
+ * patterns.
+ * <p>
+ * This converter is especially suited on a per-component base.
+ * </p>
+ * 
+ * @see SimpleDateFormat
+ * @see StyleDateConverter
+ * @see org.apache.wicket.extensions.markup.html.form.DateTextField
+ * @see java.time.LocalDate
+ * @see DateTimeFormatter
+ * 
+ * @author eelcohillenius
+ */
+public class PatternDateConverter extends LocalDateConverter
+{
+
+	private static final long serialVersionUID = 1L;
+
+	/** pattern to use. */
+	private final String datePattern;
+
+	/**
+	 * Construct.
+	 * 
+	 * @param datePattern
+	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
+	 *            patterns.
+	 * @throws IllegalArgumentException
+	 *             in case the date pattern is null
+	 */
+	public PatternDateConverter(String datePattern)
+	{
+		super();
+		this.datePattern = Args.notNull(datePattern, "datePattern");
+	}
+
+	/**
+	 * Gets the optional date pattern.
+	 * 
+	 * @return datePattern
+	 */
+	@Override
+	public final String getPattern(Locale locale)
+	{
+		return datePattern;
+	}
+
+	/**
+	 * @return formatter The formatter for the current conversion
+	 */
+	@Override
+	public DateTimeFormatter getFormat(Locale locale)
+	{
+		return DateTimeFormatter.ofPattern(datePattern).withLocale(locale);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternTimeConverter.java
new file mode 100644
index 0000000..021f500
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternTimeConverter.java
@@ -0,0 +1,85 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.text.SimpleDateFormat;
+import java.time.format.DateTimeFormatter;
+import java.util.Locale;
+
+import org.apache.wicket.util.lang.Args;
+
+
+/**
+ * Date converter that uses javax.time and can be configured to take the time zone difference between
+ * clients and server into account. This converter is hard coded to use the provided custom date
+ * pattern, no matter what current locale is used. See {@link SimpleDateFormat} for available
+ * patterns.
+ * <p>
+ * This converter is especially suited on a per-component base.
+ * </p>
+ * 
+ * @see SimpleDateFormat
+ * @see StyleDateConverter
+ * @see org.apache.wicket.extensions.markup.html.form.DateTextField
+ * @see java.time.LocalTime
+ * @see DateTimeFormatter
+ * 
+ * @author eelcohillenius
+ */
+public class PatternTimeConverter extends LocalTimeConverter
+{
+
+	private static final long serialVersionUID = 1L;
+
+	/** pattern to use. */
+	private final String timePattern;
+
+	/**
+	 * Construct.
+	 * 
+	 * @param timePattern
+	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
+	 *            patterns.
+	 * @throws IllegalArgumentException
+	 *             in case the date pattern is null
+	 */
+	public PatternTimeConverter(String timePattern)
+	{
+		super();
+		this.timePattern = Args.notNull(timePattern, "timePattern");
+	}
+
+	/**
+	 * Gets the optional date pattern.
+	 * 
+	 * @return datePattern
+	 */
+	@Override
+	public final String getPattern(Locale locale)
+	{
+		return timePattern;
+	}
+
+	/**
+	 * @return formatter The formatter for the current conversion
+	 */
+	@Override
+	public DateTimeFormatter getFormat(Locale locale)
+	{
+		return DateTimeFormatter.ofPattern(timePattern).withLocale(locale);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternZonedDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternZonedDateTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternZonedDateTimeConverter.java
new file mode 100644
index 0000000..c432d90
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternZonedDateTimeConverter.java
@@ -0,0 +1,97 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.text.SimpleDateFormat;
+import java.time.format.DateTimeFormatter;
+import java.util.Locale;
+
+import org.apache.wicket.util.lang.Args;
+
+
+/**
+ * Date converter that uses javax.time and can be configured to take the time zone difference between
+ * clients and server into account. This converter is hard coded to use the provided custom date
+ * pattern, no matter what current locale is used. See {@link SimpleDateFormat} for available
+ * patterns.
+ * <p>
+ * This converter is especially suited on a per-component base.
+ * </p>
+ * 
+ * @see SimpleDateFormat
+ * @see StyleZonedDateTimeConverter
+ * @see org.apache.wicket.extensions.markup.html.form.DateTextField
+ * @see java.time.ZonedDateTime
+ * @see DateTimeFormatter
+ * @see java.time.ZoneId
+ * 
+ * @author eelcohillenius
+ */
+public class PatternZonedDateTimeConverter extends ZonedDateTimeConverter
+{
+
+	private static final long serialVersionUID = 1L;
+
+	/** pattern to use. */
+	private final String datePattern;
+
+	/**
+	 * Construct.
+	 * </p>
+	 * When applyTimeZoneDifference is true, the current time is applied on the parsed date, and the
+	 * date will be corrected for the time zone difference between the server and the client. For
+	 * instance, if I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9
+	 * hours ahead. So, if I'm inputting say 12/24 at a couple of hours before midnight, at the
+	 * server it is already 12/25. If this boolean is true, it will be transformed to 12/25, while
+	 * the client sees 12/24.
+	 * </p>
+	 * 
+	 * @param datePattern
+	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
+	 *            patterns.
+	 * @param applyTimeZoneDifference
+	 *            whether to apply the difference in time zones between client and server
+	 * @throws IllegalArgumentException
+	 *             in case the date pattern is null
+	 */
+	public PatternZonedDateTimeConverter(String datePattern, boolean applyTimeZoneDifference)
+	{
+
+		super(applyTimeZoneDifference);
+		this.datePattern = Args.notNull(datePattern, "datePattern");
+	}
+
+	/**
+	 * Gets the optional date pattern.
+	 * 
+	 * @return datePattern
+	 */
+	@Override
+	public final String getPattern(Locale locale)
+	{
+		return datePattern;
+	}
+
+	/**
+	 * @return formatter The formatter for the current conversion
+	 */
+	@Override
+	public DateTimeFormatter getFormat(Locale locale)
+	{
+		return DateTimeFormatter.ofPattern(datePattern).withLocale(locale);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleDateConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleDateConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleDateConverter.java
new file mode 100644
index 0000000..79decad
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleDateConverter.java
@@ -0,0 +1,118 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDate;
+import java.time.chrono.IsoChronology;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.FormatStyle;
+import java.util.Locale;
+
+/**
+ * Date converter that uses javax.time and can be configured to take the time zone difference between
+ * clients and server into account, and that is configured for a certain date style. The pattern
+ * will always be locale specific.
+ * <p>
+ * This converter is especially suited on a per-component base.
+ * </p>
+ * 
+ * @see org.apache.wicket.extensions.markup.html.form.DateTextField
+ * @see java.time.LocalDate
+ * @see DateTimeFormatter
+ * 
+ * @author eelcohillenius
+ */
+public class StyleDateConverter extends LocalDateConverter
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Date style to use. See {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}.
+	 */
+	private final FormatStyle dateStyle;
+
+	/**
+	 * Construct. The dateStyle 'S-' (which is the same as {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}) will
+	 * be used for constructing the date format for the current locale.
+	 * 
+	 */
+	public StyleDateConverter()
+	{
+		this(FormatStyle.SHORT);
+	}
+
+	/**
+	 * Construct. The provided pattern will be used as the base format (but they will be localized
+	 * for the current locale) and if null, {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)} will be used.
+	 * 
+	 * @param dateStyle
+	 *            Date style to use. See {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}.
+	 * @throws IllegalArgumentException
+	 *             in case dateStyle is null
+	 */
+	public StyleDateConverter(FormatStyle dateStyle)
+	{
+		super();
+		this.dateStyle = dateStyle;
+	}
+
+	public StyleDateConverter(String dateStyle)
+	{
+		this(parseFormatStyle(dateStyle.charAt(0)));
+	}
+
+	/**
+	 * Gets the optional date pattern.
+	 * 
+	 * @return datePattern
+	 */
+	@Override
+	public final String getPattern(Locale locale)
+	{
+		return DateTimeFormatterBuilder.getLocalizedDateTimePattern(dateStyle, null, IsoChronology.INSTANCE, locale);
+	}
+
+	/**
+	 * @return formatter The formatter for the current conversion
+	 */
+	@Override
+	public DateTimeFormatter getFormat(Locale locale)
+	{
+		return dateStyle == null ? null : DateTimeFormatter.ofLocalizedDate(dateStyle).withLocale(locale);
+	}
+
+	public static FormatStyle parseFormatStyle(char style)
+	{
+		return DateField.parseFormatStyle(style);
+	}
+
+	@Override
+	public LocalDate convertToObject(String value, DateTimeFormatter format, Locale locale) {
+		if (format == null) {
+			return null;
+		}
+		try
+		{
+			return LocalDate.parse(value, format);
+		}
+		catch (RuntimeException e)
+		{
+			throw newConversionException(e, locale);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleTimeConverter.java
new file mode 100644
index 0000000..e95725b
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleTimeConverter.java
@@ -0,0 +1,114 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalTime;
+import java.time.chrono.IsoChronology;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.FormatStyle;
+import java.util.Locale;
+
+/**
+ * Date converter that uses javax.time and can be configured to take the time zone difference between
+ * clients and server into account, and that is configured for a certain date style. The pattern
+ * will always be locale specific.
+ * <p>
+ * This converter is especially suited on a per-component base.
+ * </p>
+ * 
+ * @see org.apache.wicket.extensions.markup.html.form.DateTextField
+ */
+public class StyleTimeConverter extends LocalTimeConverter
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Date style to use. See {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)}.
+	 */
+	private final FormatStyle timeStyle;
+
+	/**
+	 * Construct. The dateStyle 'S-' (which is the same as {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)}) will
+	 * be used for constructing the date format for the current locale.
+	 * 
+	 */
+	public StyleTimeConverter()
+	{
+		this(FormatStyle.SHORT);
+	}
+
+	/**
+	 * Construct. The provided pattern will be used as the base format (but they will be localized
+	 * for the current locale) and if null, {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)} will be used.
+	 * 
+	 * @param timeStyle
+	 *            Date style to use. See {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)}.
+	 * @throws IllegalArgumentException
+	 *             in case dateStyle is null
+	 */
+	public StyleTimeConverter(FormatStyle timeStyle)
+	{
+		super();
+		this.timeStyle = timeStyle;
+	}
+
+	public StyleTimeConverter(String timeStyle)
+	{
+		this(parseFormatStyle(timeStyle.charAt(0)));
+	}
+
+	/**
+	 * Gets the optional time pattern.
+	 * 
+	 * @return timePattern
+	 */
+	@Override
+	public final String getPattern(Locale locale)
+	{
+		return DateTimeFormatterBuilder.getLocalizedDateTimePattern(null, timeStyle, IsoChronology.INSTANCE, locale);
+	}
+
+	/**
+	 * @return formatter The formatter for the current conversion
+	 */
+	@Override
+	public DateTimeFormatter getFormat(Locale locale)
+	{
+		return timeStyle == null ? null : DateTimeFormatter.ofLocalizedTime(timeStyle).withLocale(locale);
+	}
+
+	public static FormatStyle parseFormatStyle(char style)
+	{
+		return TimeField.parseFormatStyle(style);
+	}
+
+	@Override
+	public LocalTime convertToObject(String value, DateTimeFormatter format, Locale locale) {
+		if (format == null) {
+			return null;
+		}
+		try
+		{
+			return LocalTime.parse(value, format);
+		}
+		catch (RuntimeException e)
+		{
+			throw newConversionException(e, locale);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleZonedDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleZonedDateTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleZonedDateTimeConverter.java
new file mode 100644
index 0000000..c186cfe
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/StyleZonedDateTimeConverter.java
@@ -0,0 +1,168 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDate;
+import java.time.ZonedDateTime;
+import java.time.chrono.IsoChronology;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.FormatStyle;
+import java.util.Locale;
+
+/**
+ * Date converter that uses javax.time and can be configured to take the time zone difference between
+ * clients and server into account, and that is configured for a certain date style. The pattern
+ * will always be locale specific.
+ * <p>
+ * This converter is especially suited on a per-component base.
+ * </p>
+ * 
+ * @see org.apache.wicket.extensions.markup.html.form.DateTextField
+ * @see java.time.ZonedDateTime
+ * @see DateTimeFormatter
+ * @see java.time.ZoneId
+ * 
+ * @author eelcohillenius
+ */
+public class StyleZonedDateTimeConverter extends ZonedDateTimeConverter
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Date style to use. See {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}.
+	 */
+	private final FormatStyle dateStyle;
+
+	private final FormatStyle timeStyle;
+
+	/**
+	 * Construct. The dateStyle 'S-' (which is the same as {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}) will
+	 * be used for constructing the date format for the current locale. </p> When
+	 * applyTimeZoneDifference is true, the current time is applied on the parsed date, and the date
+	 * will be corrected for the time zone difference between the server and the client. For
+	 * instance, if I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9
+	 * hours ahead. So, if I'm inputting say 12/24 at a couple of hours before midnight, at the
+	 * server it is already 12/25. If this boolean is true, it will be transformed to 12/25, while
+	 * the client sees 12/24. </p>
+	 * 
+	 * @param applyTimeZoneDifference
+	 *            whether to apply the difference in time zones between client and server
+	 */
+	public StyleZonedDateTimeConverter(boolean applyTimeZoneDifference)
+	{
+		this(FormatStyle.SHORT, null, applyTimeZoneDifference);
+	}
+
+	/**
+	 * Construct. The provided pattern will be used as the base format (but they will be localized
+	 * for the current locale) and if null, {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)} will be used. </p>
+	 * When applyTimeZoneDifference is true, the current time is applied on the parsed date, and the
+	 * date will be corrected for the time zone difference between the server and the client. For
+	 * instance, if I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9
+	 * hours ahead. So, if I'm inputting say 12/24 at a couple of hours before midnight, at the
+	 * server it is already 12/25. If this boolean is true, it will be transformed to 12/25, while
+	 * the client sees 12/24. </p>
+	 * 
+	 * @param dateStyle
+	 *            Date style to use. See {@link DateTimeFormatter#ofLocalizedDate(FormatStyle)}.
+	 * @param timeStyle
+	 *            Time style to use. See {@link DateTimeFormatter#ofLocalizedTime(FormatStyle)}
+	 * @param applyTimeZoneDifference
+	 *            whether to apply the difference in time zones between client and server
+	 * @throws IllegalArgumentException
+	 *             in case dateStyle is null
+	 */
+	public StyleZonedDateTimeConverter(FormatStyle dateStyle, FormatStyle timeStyle, boolean applyTimeZoneDifference)
+	{
+		super(applyTimeZoneDifference);
+		this.dateStyle = dateStyle;
+		this.timeStyle = timeStyle;
+	}
+
+	public StyleZonedDateTimeConverter(String dateTimeStyle, boolean applyTimeZoneDifference)
+	{
+		this(parseFormatStyle(dateTimeStyle.charAt(0)), parseFormatStyle(dateTimeStyle.charAt(1)), applyTimeZoneDifference);
+	}
+
+	/**
+	 * Gets the optional date pattern.
+	 * 
+	 * @return datePattern
+	 */
+	@Override
+	public final String getPattern(Locale locale)
+	{
+		String localizedDateTimePattern = DateTimeFormatterBuilder.getLocalizedDateTimePattern(dateStyle, timeStyle, IsoChronology.INSTANCE, locale);
+		return localizedDateTimePattern;
+	}
+
+	/**
+	 * @return formatter The formatter for the current conversion
+	 */
+	@Override
+	public DateTimeFormatter getFormat(Locale locale)
+	{
+		DateTimeFormatter df = null;
+		if (dateStyle == null && timeStyle == null) {
+			return df;
+		}
+		if (timeStyle == null)
+		{
+			df = DateTimeFormatter.ofLocalizedDate(dateStyle);
+		}
+		else if (dateStyle == null)
+		{
+			df = DateTimeFormatter.ofLocalizedTime(timeStyle);
+		}
+		else
+		{
+			df = DateTimeFormatter.ofLocalizedDateTime(dateStyle, timeStyle);
+		}
+		return df.withLocale(locale);
+	}
+
+	public static FormatStyle parseFormatStyle(char style)
+	{
+		return DateField.parseFormatStyle(style);
+	}
+
+	@Override
+	public ZonedDateTime convertToObject(String value, DateTimeFormatter format, Locale locale) {
+		if (format == null) {
+			return null;
+		}
+		try
+		{
+			if (timeStyle == null)
+			{
+				LocalDate d = LocalDate.parse(value, format);
+				return ZonedDateTime.of(d.atStartOfDay(), getTimeZone());
+			}
+			else if (dateStyle == null)
+			{
+				// not sure how we can get ZonedDateTime from time
+				return null;
+			}
+			return super.convertToObject(value, format, locale);
+		}
+		catch (RuntimeException e)
+		{
+			throw newConversionException(e, locale);
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.html
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.html b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.html
new file mode 100644
index 0000000..82cb00d
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.html
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+   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.
+-->
+<wicket:panel xmlns:wicket="http://wicket.apache.org">
+  <span style="white-space: nowrap;">
+    <input type="number" wicket:id="hours" size="2" maxlength="2" />
+    <span wicket:id="hoursSeparator">&#160;:</span>
+    <input type="number" wicket:id="minutes" size="2" maxlength="2" />
+    <select wicket:id="amOrPmChoice"></select>
+  </span>
+</wicket:panel>


[09/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/event/event.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/event/event.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/event/event.js
deleted file mode 100644
index 3b5c86d..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/event/event.js
+++ /dev/null
@@ -1,2537 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-
-/**
- * The CustomEvent class lets you define events for your application
- * that can be subscribed to by one or more independent component.
- *
- * @param {String}  type The type of event, which is passed to the callback
- *                  when the event fires
- * @param {Object}  context The context the event will fire from.  "this" will
- *                  refer to this object in the callback.  Default value:
- *                  the window object.  The listener can override this.
- * @param {boolean} silent pass true to prevent the event from writing to
- *                  the debugsystem
- * @param {int}     signature the signature that the custom event subscriber
- *                  will receive. YAHOO.util.CustomEvent.LIST or
- *                  YAHOO.util.CustomEvent.FLAT.  The default is
- *                  YAHOO.util.CustomEvent.LIST.
- * @param fireOnce {boolean} If configured to fire once, the custom event
- * will only notify subscribers a single time regardless of how many times
- * the event is fired.  In addition, new subscribers will be notified
- * immediately if the event has already been fired.
- * @namespace YAHOO.util
- * @class CustomEvent
- * @constructor
- */
-YAHOO.util.CustomEvent = function(type, context, silent, signature, fireOnce) {
-
-    /**
-     * The type of event, returned to subscribers when the event fires
-     * @property type
-     * @type string
-     */
-    this.type = type;
-
-    /**
-     * The context the event will fire from by default. Defaults to the window obj.
-     * @property scope
-     * @type object
-     */
-    this.scope = context || window;
-
-    /**
-     * By default all custom events are logged in the debug build. Set silent to true
-     * to disable debug output for this event.
-     * @property silent
-     * @type boolean
-     */
-    this.silent = silent;
-
-    /**
-     * If configured to fire once, the custom event will only notify subscribers
-     * a single time regardless of how many times the event is fired.  In addition,
-     * new subscribers will be notified immediately if the event has already been
-     * fired.
-     * @property fireOnce
-     * @type boolean
-     * @default false
-     */
-    this.fireOnce = fireOnce;
-
-    /**
-     * Indicates whether or not this event has ever been fired.
-     * @property fired
-     * @type boolean
-     * @default false
-     */
-    this.fired = false;
-
-    /**
-     * For fireOnce events the arguments the event was fired with are stored
-     * so that new subscribers get the proper payload.
-     * @property firedWith
-     * @type Array
-     */
-    this.firedWith = null;
-
-    /**
-     * Custom events support two styles of arguments provided to the event
-     * subscribers.
-     * <ul>
-     * <li>YAHOO.util.CustomEvent.LIST:
-     *   <ul>
-     *   <li>param1: event name</li>
-     *   <li>param2: array of arguments sent to fire</li>
-     *   <li>param3: <optional> a custom object supplied by the subscriber</li>
-     *   </ul>
-     * </li>
-     * <li>YAHOO.util.CustomEvent.FLAT
-     *   <ul>
-     *   <li>param1: the first argument passed to fire.  If you need to
-     *           pass multiple parameters, use and array or object literal</li>
-     *   <li>param2: <optional> a custom object supplied by the subscriber</li>
-     *   </ul>
-     * </li>
-     * </ul>
-     *   @property signature
-     *   @type int
-     */
-    this.signature = signature || YAHOO.util.CustomEvent.LIST;
-
-    /**
-     * The subscribers to this event
-     * @property subscribers
-     * @type Subscriber[]
-     */
-    this.subscribers = [];
-
-    if (!this.silent) {
-    }
-
-    var onsubscribeType = "_YUICEOnSubscribe";
-
-    // Only add subscribe events for events that are not generated by
-    // CustomEvent
-    if (type !== onsubscribeType) {
-
-        /**
-         * Custom events provide a custom event that fires whenever there is
-         * a new subscriber to the event.  This provides an opportunity to
-         * handle the case where there is a non-repeating event that has
-         * already fired has a new subscriber.
-         *
-         * @event subscribeEvent
-         * @type YAHOO.util.CustomEvent
-         * @param fn {Function} The function to execute
-         * @param obj <Object> An object to be passed along when the event fires.
-         * Defaults to the custom event.
-         * @param override <boolean|Object> If true, the obj passed in becomes the
-         * execution context of the listener. If an object, that object becomes
-         * the execution context. Defaults to the custom event.
-         */
-        this.subscribeEvent =
-                new YAHOO.util.CustomEvent(onsubscribeType, this, true);
-
-    }
-
-
-    /**
-     * In order to make it possible to execute the rest of the subscriber
-     * stack when one thows an exception, the subscribers exceptions are
-     * caught.  The most recent exception is stored in this property
-     * @property lastError
-     * @type Error
-     */
-    this.lastError = null;
-};
-
-/**
- * Subscriber listener sigature constant.  The LIST type returns three
- * parameters: the event type, the array of args passed to fire, and
- * the optional custom object
- * @property YAHOO.util.CustomEvent.LIST
- * @static
- * @type int
- */
-YAHOO.util.CustomEvent.LIST = 0;
-
-/**
- * Subscriber listener sigature constant.  The FLAT type returns two
- * parameters: the first argument passed to fire and the optional
- * custom object
- * @property YAHOO.util.CustomEvent.FLAT
- * @static
- * @type int
- */
-YAHOO.util.CustomEvent.FLAT = 1;
-
-YAHOO.util.CustomEvent.prototype = {
-
-    /**
-     * Subscribes the caller to this event
-     * @method subscribe
-     * @param {Function} fn        The function to execute
-     * @param {Object}   obj       An object to be passed along when the event
-     * fires.
-     * @param {boolean|Object} overrideContext If true, the obj passed in
-     * becomes the execution.
-     * context of the listener. If an object, that object becomes the execution
-     * context.
-     */
-    subscribe: function(fn, obj, overrideContext) {
-
-        if (!fn) {
-throw new Error("Invalid callback for subscriber to '" + this.type + "'");
-        }
-
-        if (this.subscribeEvent) {
-            this.subscribeEvent.fire(fn, obj, overrideContext);
-        }
-
-        var s = new YAHOO.util.Subscriber(fn, obj, overrideContext);
-
-        if (this.fireOnce && this.fired) {
-            this.notify(s, this.firedWith);
-        } else {
-            this.subscribers.push(s);
-        }
-    },
-
-    /**
-     * Unsubscribes subscribers.
-     * @method unsubscribe
-     * @param {Function} fn  The subscribed function to remove, if not supplied
-     *                       all will be removed
-     * @param {Object}   obj  The custom object passed to subscribe.  This is
-     *                        optional, but if supplied will be used to
-     *                        disambiguate multiple listeners that are the same
-     *                        (e.g., you subscribe many object using a function
-     *                        that lives on the prototype)
-     * @return {boolean} True if the subscriber was found and detached.
-     */
-    unsubscribe: function(fn, obj) {
-
-        if (!fn) {
-            return this.unsubscribeAll();
-        }
-
-        var found = false;
-        for (var i=0, len=this.subscribers.length; i<len; ++i) {
-            var s = this.subscribers[i];
-            if (s && s.contains(fn, obj)) {
-                this._delete(i);
-                found = true;
-            }
-        }
-
-        return found;
-    },
-
-    /**
-     * Notifies the subscribers.  The callback functions will be executed
-     * from the context specified when the event was created, and with the
-     * following parameters:
-     *   <ul>
-     *   <li>The type of event</li>
-     *   <li>All of the arguments fire() was executed with as an array</li>
-     *   <li>The custom object (if any) that was passed into the subscribe()
-     *       method</li>
-     *   </ul>
-     * @method fire
-     * @param {Object*} arguments an arbitrary set of parameters to pass to
-     *                            the handler.
-     * @return {boolean} false if one of the subscribers returned false,
-     *                   true otherwise
-     */
-    fire: function() {
-
-        this.lastError = null;
-
-        var errors = [],
-            len=this.subscribers.length;
-
-
-        var args=[].slice.call(arguments, 0), ret=true, i, rebuild=false;
-
-        if (this.fireOnce) {
-            if (this.fired) {
-                return true;
-            } else {
-                this.firedWith = args;
-            }
-        }
-
-        this.fired = true;
-
-        if (!len && this.silent) {
-            return true;
-        }
-
-        if (!this.silent) {
-        }
-
-        // make a copy of the subscribers so that there are
-        // no index problems if one subscriber removes another.
-        var subs = this.subscribers.slice();
-
-        for (i=0; i<len; ++i) {
-            var s = subs[i];
-            if (!s || !s.fn) {
-                rebuild=true;
-            } else {
-
-                ret = this.notify(s, args);
-
-                if (false === ret) {
-                    if (!this.silent) {
-                    }
-
-                    break;
-                }
-            }
-        }
-
-        return (ret !== false);
-    },
-
-    notify: function(s, args) {
-
-        var ret, param=null, scope = s.getScope(this.scope),
-                 throwErrors = YAHOO.util.Event.throwErrors;
-
-        if (!this.silent) {
-        }
-
-        if (this.signature == YAHOO.util.CustomEvent.FLAT) {
-
-            if (args.length > 0) {
-                param = args[0];
-            }
-
-            try {
-                ret = s.fn.call(scope, param, s.obj);
-            } catch(e) {
-                this.lastError = e;
-                // errors.push(e);
-                if (throwErrors) {
-                    throw e;
-                }
-            }
-        } else {
-            try {
-                ret = s.fn.call(scope, this.type, args, s.obj);
-            } catch(ex) {
-                this.lastError = ex;
-                if (throwErrors) {
-                    throw ex;
-                }
-            }
-        }
-
-        return ret;
-    },
-
-    /**
-     * Removes all listeners
-     * @method unsubscribeAll
-     * @return {int} The number of listeners unsubscribed
-     */
-    unsubscribeAll: function() {
-        var l = this.subscribers.length, i;
-        for (i=l-1; i>-1; i--) {
-            this._delete(i);
-        }
-
-        this.subscribers=[];
-
-        return l;
-    },
-
-    /**
-     * @method _delete
-     * @private
-     */
-    _delete: function(index) {
-        var s = this.subscribers[index];
-        if (s) {
-            delete s.fn;
-            delete s.obj;
-        }
-
-        // this.subscribers[index]=null;
-        this.subscribers.splice(index, 1);
-    },
-
-    /**
-     * @method toString
-     */
-    toString: function() {
-         return "CustomEvent: " + "'" + this.type  + "', " +
-             "context: " + this.scope;
-
-    }
-};
-
-/////////////////////////////////////////////////////////////////////
-
-/**
- * Stores the subscriber information to be used when the event fires.
- * @param {Function} fn       The function to execute
- * @param {Object}   obj      An object to be passed along when the event fires
- * @param {boolean}  overrideContext If true, the obj passed in becomes the execution
- *                            context of the listener
- * @class Subscriber
- * @constructor
- */
-YAHOO.util.Subscriber = function(fn, obj, overrideContext) {
-
-    /**
-     * The callback that will be execute when the event fires
-     * @property fn
-     * @type function
-     */
-    this.fn = fn;
-
-    /**
-     * An optional custom object that will passed to the callback when
-     * the event fires
-     * @property obj
-     * @type object
-     */
-    this.obj = YAHOO.lang.isUndefined(obj) ? null : obj;
-
-    /**
-     * The default execution context for the event listener is defined when the
-     * event is created (usually the object which contains the event).
-     * By setting overrideContext to true, the execution context becomes the custom
-     * object passed in by the subscriber.  If overrideContext is an object, that
-     * object becomes the context.
-     * @property overrideContext
-     * @type boolean|object
-     */
-    this.overrideContext = overrideContext;
-
-};
-
-/**
- * Returns the execution context for this listener.  If overrideContext was set to true
- * the custom obj will be the context.  If overrideContext is an object, that is the
- * context, otherwise the default context will be used.
- * @method getScope
- * @param {Object} defaultScope the context to use if this listener does not
- *                              override it.
- */
-YAHOO.util.Subscriber.prototype.getScope = function(defaultScope) {
-    if (this.overrideContext) {
-        if (this.overrideContext === true) {
-            return this.obj;
-        } else {
-            return this.overrideContext;
-        }
-    }
-    return defaultScope;
-};
-
-/**
- * Returns true if the fn and obj match this objects properties.
- * Used by the unsubscribe method to match the right subscriber.
- *
- * @method contains
- * @param {Function} fn the function to execute
- * @param {Object} obj an object to be passed along when the event fires
- * @return {boolean} true if the supplied arguments match this
- *                   subscriber's signature.
- */
-YAHOO.util.Subscriber.prototype.contains = function(fn, obj) {
-    if (obj) {
-        return (this.fn == fn && this.obj == obj);
-    } else {
-        return (this.fn == fn);
-    }
-};
-
-/**
- * @method toString
- */
-YAHOO.util.Subscriber.prototype.toString = function() {
-    return "Subscriber { obj: " + this.obj  +
-           ", overrideContext: " +  (this.overrideContext || "no") + " }";
-};
-
-/**
- * The Event Utility provides utilities for managing DOM Events and tools
- * for building event systems
- *
- * @module event
- * @title Event Utility
- * @namespace YAHOO.util
- * @requires yahoo
- */
-
-// The first instance of Event will win if it is loaded more than once.
-// @TODO this needs to be changed so that only the state data that needs to
-// be preserved is kept, while methods are overwritten/added as needed.
-// This means that the module pattern can't be used.
-if (!YAHOO.util.Event) {
-
-/**
- * The event utility provides functions to add and remove event listeners,
- * event cleansing.  It also tries to automatically remove listeners it
- * registers during the unload event.
- *
- * @class Event
- * @static
- */
-    YAHOO.util.Event = function() {
-
-        /**
-         * True after the onload event has fired
-         * @property loadComplete
-         * @type boolean
-         * @static
-         * @private
-         */
-        var loadComplete =  false,
-
-        /**
-         * Cache of wrapped listeners
-         * @property listeners
-         * @type array
-         * @static
-         * @private
-         */
-        listeners = [],
-
-
-        /**
-         * User-defined unload function that will be fired before all events
-         * are detached
-         * @property unloadListeners
-         * @type array
-         * @static
-         * @private
-         */
-        unloadListeners = [],
-
-        /**
-         * The number of times to poll after window.onload.  This number is
-         * increased if additional late-bound handlers are requested after
-         * the page load.
-         * @property retryCount
-         * @static
-         * @private
-         */
-        retryCount = 0,
-
-        /**
-         * onAvailable listeners
-         * @property onAvailStack
-         * @static
-         * @private
-         */
-        onAvailStack = [],
-
-        /**
-         * Counter for auto id generation
-         * @property counter
-         * @static
-         * @private
-         */
-        counter = 0,
-
-        /**
-         * Normalized keycodes for webkit/safari
-         * @property webkitKeymap
-         * @type {int: int}
-         * @private
-         * @static
-         * @final
-         */
-         webkitKeymap = {
-            63232: 38, // up
-            63233: 40, // down
-            63234: 37, // left
-            63235: 39, // right
-            63276: 33, // page up
-            63277: 34, // page down
-            25: 9      // SHIFT-TAB (Safari provides a different key code in
-                       // this case, even though the shiftKey modifier is set)
-        },
-
-        isIE = YAHOO.env.ua.ie,
-
-        // String constants used by the addFocusListener and removeFocusListener methods
-
-        FOCUSIN = "focusin",
-        FOCUSOUT = "focusout";
-
-        return {
-
-            /**
-             * The number of times we should look for elements that are not
-             * in the DOM at the time the event is requested after the document
-             * has been loaded.  The default is 500@amp;40 ms, so it will poll
-             * for 20 seconds or until all outstanding handlers are bound
-             * (whichever comes first).
-             * @property POLL_RETRYS
-             * @type int
-             * @static
-             * @final
-             */
-            POLL_RETRYS: 500,
-
-            /**
-             * The poll interval in milliseconds
-             * @property POLL_INTERVAL
-             * @type int
-             * @static
-             * @final
-             */
-            POLL_INTERVAL: 40,
-
-            /**
-             * Element to bind, int constant
-             * @property EL
-             * @type int
-             * @static
-             * @final
-             */
-            EL: 0,
-
-            /**
-             * Type of event, int constant
-             * @property TYPE
-             * @type int
-             * @static
-             * @final
-             */
-            TYPE: 1,
-
-            /**
-             * Function to execute, int constant
-             * @property FN
-             * @type int
-             * @static
-             * @final
-             */
-            FN: 2,
-
-            /**
-             * Function wrapped for context correction and cleanup, int constant
-             * @property WFN
-             * @type int
-             * @static
-             * @final
-             */
-            WFN: 3,
-
-            /**
-             * Object passed in by the user that will be returned as a
-             * parameter to the callback, int constant.  Specific to
-             * unload listeners
-             * @property OBJ
-             * @type int
-             * @static
-             * @final
-             */
-            UNLOAD_OBJ: 3,
-
-            /**
-             * Adjusted context, either the element we are registering the event
-             * on or the custom object passed in by the listener, int constant
-             * @property ADJ_SCOPE
-             * @type int
-             * @static
-             * @final
-             */
-            ADJ_SCOPE: 4,
-
-            /**
-             * The original obj passed into addListener
-             * @property OBJ
-             * @type int
-             * @static
-             * @final
-             */
-            OBJ: 5,
-
-            /**
-             * The original context parameter passed into addListener
-             * @property OVERRIDE
-             * @type int
-             * @static
-             * @final
-             */
-            OVERRIDE: 6,
-
-            /**
-             * The original capture parameter passed into addListener
-             * @property CAPTURE
-             * @type int
-             * @static
-             * @final
-             */
-            CAPTURE: 7,
-
-            /**
-             * addListener/removeListener can throw errors in unexpected scenarios.
-             * These errors are suppressed, the method returns false, and this property
-             * is set
-             * @property lastError
-             * @static
-             * @type Error
-             */
-            lastError: null,
-
-            /**
-             * Safari detection
-             * @property isSafari
-             * @private
-             * @static
-             * @deprecated use YAHOO.env.ua.webkit
-             */
-            isSafari: YAHOO.env.ua.webkit,
-
-            /**
-             * webkit version
-             * @property webkit
-             * @type string
-             * @private
-             * @static
-             * @deprecated use YAHOO.env.ua.webkit
-             */
-            webkit: YAHOO.env.ua.webkit,
-
-            /**
-             * IE detection
-             * @property isIE
-             * @private
-             * @static
-             * @deprecated use YAHOO.env.ua.ie
-             */
-            isIE: isIE,
-
-            /**
-             * poll handle
-             * @property _interval
-             * @static
-             * @private
-             */
-            _interval: null,
-
-            /**
-             * document readystate poll handle
-             * @property _dri
-             * @static
-             * @private
-             */
-             _dri: null,
-
-
-            /**
-             * Map of special event types
-             * @property _specialTypes
-             * @static
-             * @private
-             */
-            _specialTypes: {
-                focusin: (isIE ? "focusin" : "focus"),
-                focusout: (isIE ? "focusout" : "blur")
-            },
-
-
-            /**
-             * True when the document is initially usable
-             * @property DOMReady
-             * @type boolean
-             * @static
-             */
-            DOMReady: false,
-
-            /**
-             * Errors thrown by subscribers of custom events are caught
-             * and the error message is written to the debug console.  If
-             * this property is set to true, it will also re-throw the
-             * error.
-             * @property throwErrors
-             * @type boolean
-             * @default false
-             */
-            throwErrors: false,
-
-
-            /**
-             * @method startInterval
-             * @static
-             * @private
-             */
-            startInterval: function() {
-                if (!this._interval) {
-                    // var self = this;
-                    // var callback = function() { self._tryPreloadAttach(); };
-                    // this._interval = setInterval(callback, this.POLL_INTERVAL);
-                    this._interval = YAHOO.lang.later(this.POLL_INTERVAL, this, this._tryPreloadAttach, null, true);
-                }
-            },
-
-            /**
-             * Executes the supplied callback when the item with the supplied
-             * id is found.  This is meant to be used to execute behavior as
-             * soon as possible as the page loads.  If you use this after the
-             * initial page load it will poll for a fixed time for the element.
-             * The number of times it will poll and the frequency are
-             * configurable.  By default it will poll for 10 seconds.
-             *
-             * <p>The callback is executed with a single parameter:
-             * the custom object parameter, if provided.</p>
-             *
-             * @method onAvailable
-             *
-             * @param {string||string[]}   id the id of the element, or an array
-             * of ids to look for.
-             * @param {function} fn what to execute when the element is found.
-             * @param {object}   obj an optional object to be passed back as
-             *                   a parameter to fn.
-             * @param {boolean|object}  overrideContext If set to true, fn will execute
-             *                   in the context of obj, if set to an object it
-             *                   will execute in the context of that object
-             * @param checkContent {boolean} check child node readiness (onContentReady)
-             * @static
-             */
-            onAvailable: function(id, fn, obj, overrideContext, checkContent) {
-
-                var a = (YAHOO.lang.isString(id)) ? [id] : id;
-
-                for (var i=0; i<a.length; i=i+1) {
-                    onAvailStack.push({id:         a[i],
-                                       fn:         fn,
-                                       obj:        obj,
-                                       overrideContext:   overrideContext,
-                                       checkReady: checkContent });
-                }
-
-                retryCount = this.POLL_RETRYS;
-
-                this.startInterval();
-            },
-
-            /**
-             * Works the same way as onAvailable, but additionally checks the
-             * state of sibling elements to determine if the content of the
-             * available element is safe to modify.
-             *
-             * <p>The callback is executed with a single parameter:
-             * the custom object parameter, if provided.</p>
-             *
-             * @method onContentReady
-             *
-             * @param {string}   id the id of the element to look for.
-             * @param {function} fn what to execute when the element is ready.
-             * @param {object}   obj an optional object to be passed back as
-             *                   a parameter to fn.
-             * @param {boolean|object}  overrideContext If set to true, fn will execute
-             *                   in the context of obj.  If an object, fn will
-             *                   exectute in the context of that object
-             *
-             * @static
-             */
-            onContentReady: function(id, fn, obj, overrideContext) {
-                this.onAvailable(id, fn, obj, overrideContext, true);
-            },
-
-            /**
-             * Executes the supplied callback when the DOM is first usable.  This
-             * will execute immediately if called after the DOMReady event has
-             * fired.   @todo the DOMContentReady event does not fire when the
-             * script is dynamically injected into the page.  This means the
-             * DOMReady custom event will never fire in FireFox or Opera when the
-             * library is injected.  It _will_ fire in Safari, and the IE
-             * implementation would allow for us to fire it if the defered script
-             * is not available.  We want this to behave the same in all browsers.
-             * Is there a way to identify when the script has been injected
-             * instead of included inline?  Is there a way to know whether the
-             * window onload event has fired without having had a listener attached
-             * to it when it did so?
-             *
-             * <p>The callback is a CustomEvent, so the signature is:</p>
-             * <p>type &lt;string&gt;, args &lt;array&gt;, customobject &lt;object&gt;</p>
-             * <p>For DOMReady events, there are no fire argments, so the
-             * signature is:</p>
-             * <p>"DOMReady", [], obj</p>
-             *
-             *
-             * @method onDOMReady
-             *
-             * @param {function} fn what to execute when the element is found.
-             * @param {object}   obj an optional object to be passed back as
-             *                   a parameter to fn.
-             * @param {boolean|object}  overrideContext If set to true, fn will execute
-             *                   in the context of obj, if set to an object it
-             *                   will execute in the context of that object
-             *
-             * @static
-             */
-            // onDOMReady: function(fn, obj, overrideContext) {
-            onDOMReady: function() {
-                this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent, arguments);
-            },
-
-
-            /**
-             * Appends an event handler
-             *
-             * @method _addListener
-             *
-             * @param {String|HTMLElement|Array|NodeList} el An id, an element
-             *  reference, or a collection of ids and/or elements to assign the
-             *  listener to.
-             * @param {String}   sType     The type of event to append
-             * @param {Function} fn        The method the event invokes
-             * @param {Object}   obj    An arbitrary object that will be
-             *                             passed as a parameter to the handler
-             * @param {Boolean|object}  overrideContext  If true, the obj passed in becomes
-             *                             the execution context of the listener. If an
-             *                             object, this object becomes the execution
-             *                             context.
-             * @param {boolen}      capture capture or bubble phase
-             * @return {Boolean} True if the action was successful or defered,
-             *                        false if one or more of the elements
-             *                        could not have the listener attached,
-             *                        or if the operation throws an exception.
-             * @private
-             * @static
-             */
-            _addListener: function(el, sType, fn, obj, overrideContext, bCapture) {
-
-                if (!fn || !fn.call) {
-                    return false;
-                }
-
-                // The el argument can be an array of elements or element ids.
-                if ( this._isValidCollection(el)) {
-                    var ok = true;
-                    for (var i=0,len=el.length; i<len; ++i) {
-                        ok = this.on(el[i],
-                                       sType,
-                                       fn,
-                                       obj,
-                                       overrideContext) && ok;
-                    }
-                    return ok;
-
-                } else if (YAHOO.lang.isString(el)) {
-                    var oEl = this.getEl(el);
-                    // If the el argument is a string, we assume it is
-                    // actually the id of the element.  If the page is loaded
-                    // we convert el to the actual element, otherwise we
-                    // defer attaching the event until onload event fires
-
-                    // check to see if we need to delay hooking up the event
-                    // until after the page loads.
-                    if (oEl) {
-                        el = oEl;
-                    } else {
-                        // defer adding the event until the element is available
-                        this.onAvailable(el, function() {
-                           YAHOO.util.Event._addListener(el, sType, fn, obj, overrideContext, bCapture);
-                        });
-
-                        return true;
-                    }
-                }
-
-                // Element should be an html element or an array if we get
-                // here.
-                if (!el) {
-                    return false;
-                }
-
-                // we need to make sure we fire registered unload events
-                // prior to automatically unhooking them.  So we hang on to
-                // these instead of attaching them to the window and fire the
-                // handles explicitly during our one unload event.
-                if ("unload" == sType && obj !== this) {
-                    unloadListeners[unloadListeners.length] =
-                            [el, sType, fn, obj, overrideContext];
-                    return true;
-                }
-
-
-                // if the user chooses to override the context, we use the custom
-                // object passed in, otherwise the executing context will be the
-                // HTML element that the event is registered on
-                var context = el;
-                if (overrideContext) {
-                    if (overrideContext === true) {
-                        context = obj;
-                    } else {
-                        context = overrideContext;
-                    }
-                }
-
-                // wrap the function so we can return the obj object when
-                // the event fires;
-                var wrappedFn = function(e) {
-                        return fn.call(context, YAHOO.util.Event.getEvent(e, el),
-                                obj);
-                    };
-
-                var li = [el, sType, fn, wrappedFn, context, obj, overrideContext, bCapture];
-                var index = listeners.length;
-                // cache the listener so we can try to automatically unload
-                listeners[index] = li;
-
-                try {
-                    this._simpleAdd(el, sType, wrappedFn, bCapture);
-                } catch(ex) {
-                    // handle an error trying to attach an event.  If it fails
-                    // we need to clean up the cache
-                    this.lastError = ex;
-                    this.removeListener(el, sType, fn);
-                    return false;
-                }
-
-                return true;
-
-            },
-
-            /**
-             * Checks to see if the type requested is a special type
-             * (as defined by the _specialTypes hash), and (if so) returns
-             * the special type name.
-             *
-             * @method _getType
-             *
-             * @param {String}   sType     The type to look up
-             * @private
-             */
-            _getType: function (type) {
-
-                return this._specialTypes[type] || type;
-
-            },
-
-
-            /**
-             * Appends an event handler
-             *
-             * @method addListener
-             *
-             * @param {String|HTMLElement|Array|NodeList} el An id, an element
-             *  reference, or a collection of ids and/or elements to assign the
-             *  listener to.
-             * @param {String}   sType     The type of event to append
-             * @param {Function} fn        The method the event invokes
-             * @param {Object}   obj    An arbitrary object that will be
-             *                             passed as a parameter to the handler
-             * @param {Boolean|object}  overrideContext  If true, the obj passed in becomes
-             *                             the execution context of the listener. If an
-             *                             object, this object becomes the execution
-             *                             context.
-             * @return {Boolean} True if the action was successful or defered,
-             *                        false if one or more of the elements
-             *                        could not have the listener attached,
-             *                        or if the operation throws an exception.
-             * @static
-             */
-            addListener: function (el, sType, fn, obj, overrideContext) {
-
-                var capture = ((sType == FOCUSIN || sType == FOCUSOUT) && !YAHOO.env.ua.ie) ? true : false;
-
-                return this._addListener(el, this._getType(sType), fn, obj, overrideContext, capture);
-
-            },
-
-
-            /**
-             * Attaches a focusin event listener to the specified element for
-             * the purpose of listening for the focus event on the element's
-             * descendants.
-             * @method addFocusListener
-             *
-             * @param {String|HTMLElement|Array|NodeList} el An id, an element
-             *  reference, or a collection of ids and/or elements to assign the
-             *  listener to.
-             * @param {Function} fn        The method the event invokes
-             * @param {Object}   obj    An arbitrary object that will be
-             *                             passed as a parameter to the handler
-             * @param {Boolean|object}  overrideContext  If true, the obj passed in becomes
-             *                             the execution context of the listener. If an
-             *                             object, this object becomes the execution
-             *                             context.
-             * @return {Boolean} True if the action was successful or defered,
-             *                        false if one or more of the elements
-             *                        could not have the listener attached,
-             *                        or if the operation throws an exception.
-             * @static
-            * @deprecated use YAHOO.util.Event.on and specify "focusin" as the event type.
-             */
-            addFocusListener: function (el, fn, obj, overrideContext) {
-                return this.on(el, FOCUSIN, fn, obj, overrideContext);
-            },
-
-
-            /**
-             * Removes a focusin event listener to the specified element for
-             * the purpose of listening for the focus event on the element's
-             * descendants.
-             *
-             * @method removeFocusListener
-             *
-             * @param {String|HTMLElement|Array|NodeList} el An id, an element
-             *  reference, or a collection of ids and/or elements to remove
-             *  the listener from.
-             * @param {Function} fn the method the event invokes.  If fn is
-             *  undefined, then all event handlers for the type of event are
-             *  removed.
-             * @return {boolean} true if the unbind was successful, false
-             *  otherwise.
-             * @static
-             * @deprecated use YAHOO.util.Event.removeListener and specify "focusin" as the event type.
-             */
-            removeFocusListener: function (el, fn) {
-                return this.removeListener(el, FOCUSIN, fn);
-            },
-
-            /**
-             * Attaches a focusout event listener to the specified element for
-             * the purpose of listening for the blur event on the element's
-             * descendants.
-             *
-             * @method addBlurListener
-             *
-             * @param {String|HTMLElement|Array|NodeList} el An id, an element
-             *  reference, or a collection of ids and/or elements to assign the
-             *  listener to.
-             * @param {Function} fn        The method the event invokes
-             * @param {Object}   obj    An arbitrary object that will be
-             *                             passed as a parameter to the handler
-             * @param {Boolean|object}  overrideContext  If true, the obj passed in becomes
-             *                             the execution context of the listener. If an
-             *                             object, this object becomes the execution
-             *                             context.
-             * @return {Boolean} True if the action was successful or defered,
-             *                        false if one or more of the elements
-             *                        could not have the listener attached,
-             *                        or if the operation throws an exception.
-             * @static
-             * @deprecated use YAHOO.util.Event.on and specify "focusout" as the event type.
-             */
-            addBlurListener: function (el, fn, obj, overrideContext) {
-                return this.on(el, FOCUSOUT, fn, obj, overrideContext);
-            },
-
-            /**
-             * Removes a focusout event listener to the specified element for
-             * the purpose of listening for the blur event on the element's
-             * descendants.
-             *
-             * @method removeBlurListener
-             *
-             * @param {String|HTMLElement|Array|NodeList} el An id, an element
-             *  reference, or a collection of ids and/or elements to remove
-             *  the listener from.
-             * @param {Function} fn the method the event invokes.  If fn is
-             *  undefined, then all event handlers for the type of event are
-             *  removed.
-             * @return {boolean} true if the unbind was successful, false
-             *  otherwise.
-             * @static
-             * @deprecated use YAHOO.util.Event.removeListener and specify "focusout" as the event type.
-             */
-            removeBlurListener: function (el, fn) {
-                return this.removeListener(el, FOCUSOUT, fn);
-            },
-
-            /**
-             * Removes an event listener
-             *
-             * @method removeListener
-             *
-             * @param {String|HTMLElement|Array|NodeList} el An id, an element
-             *  reference, or a collection of ids and/or elements to remove
-             *  the listener from.
-             * @param {String} sType the type of event to remove.
-             * @param {Function} fn the method the event invokes.  If fn is
-             *  undefined, then all event handlers for the type of event are
-             *  removed.
-             * @return {boolean} true if the unbind was successful, false
-             *  otherwise.
-             * @static
-             */
-            removeListener: function(el, sType, fn) {
-                var i, len, li;
-
-                sType = this._getType(sType);
-
-                // The el argument can be a string
-                if (typeof el == "string") {
-                    el = this.getEl(el);
-                // The el argument can be an array of elements or element ids.
-                } else if ( this._isValidCollection(el)) {
-                    var ok = true;
-                    for (i=el.length-1; i>-1; i--) {
-                        ok = ( this.removeListener(el[i], sType, fn) && ok );
-                    }
-                    return ok;
-                }
-
-                if (!fn || !fn.call) {
-                    //return false;
-                    return this.purgeElement(el, false, sType);
-                }
-
-                if ("unload" == sType) {
-
-                    for (i=unloadListeners.length-1; i>-1; i--) {
-                        li = unloadListeners[i];
-                        if (li &&
-                            li[0] == el &&
-                            li[1] == sType &&
-                            li[2] == fn) {
-                                unloadListeners.splice(i, 1);
-                                // unloadListeners[i]=null;
-                                return true;
-                        }
-                    }
-
-                    return false;
-                }
-
-                var cacheItem = null;
-
-                // The index is a hidden parameter; needed to remove it from
-                // the method signature because it was tempting users to
-                // try and take advantage of it, which is not possible.
-                var index = arguments[3];
-
-                if ("undefined" === typeof index) {
-                    index = this._getCacheIndex(listeners, el, sType, fn);
-                }
-
-                if (index >= 0) {
-                    cacheItem = listeners[index];
-                }
-
-                if (!el || !cacheItem) {
-                    return false;
-                }
-
-
-                var bCapture = cacheItem[this.CAPTURE] === true ? true : false;
-
-                try {
-                    this._simpleRemove(el, sType, cacheItem[this.WFN], bCapture);
-                } catch(ex) {
-                    this.lastError = ex;
-                    return false;
-                }
-
-                // removed the wrapped handler
-                delete listeners[index][this.WFN];
-                delete listeners[index][this.FN];
-                listeners.splice(index, 1);
-                // listeners[index]=null;
-
-                return true;
-
-            },
-
-            /**
-             * Returns the event's target element.  Safari sometimes provides
-             * a text node, and this is automatically resolved to the text
-             * node's parent so that it behaves like other browsers.
-             * @method getTarget
-             * @param {Event} ev the event
-             * @param {boolean} resolveTextNode when set to true the target's
-             *                  parent will be returned if the target is a
-             *                  text node.  @deprecated, the text node is
-             *                  now resolved automatically
-             * @return {HTMLElement} the event's target
-             * @static
-             */
-            getTarget: function(ev, resolveTextNode) {
-                var t = ev.target || ev.srcElement;
-                return this.resolveTextNode(t);
-            },
-
-            /**
-             * In some cases, some browsers will return a text node inside
-             * the actual element that was targeted.  This normalizes the
-             * return value for getTarget and getRelatedTarget.
-             *
-             * If accessing a property of the node throws an error, this is
-             * probably the anonymous div wrapper Gecko adds inside text
-             * nodes.  This likely will only occur when attempting to access
-             * the relatedTarget.  In this case, we now return null because
-             * the anonymous div is completely useless and we do not know
-             * what the related target was because we can't even get to
-             * the element's parent node.
-             *
-             * @method resolveTextNode
-             * @param {HTMLElement} node node to resolve
-             * @return {HTMLElement} the normized node
-             * @static
-             */
-            resolveTextNode: function(n) {
-                try {
-                    if (n && 3 == n.nodeType) {
-                        return n.parentNode;
-                    }
-                } catch(e) {
-                    return null;
-                }
-
-                return n;
-            },
-
-            /**
-             * Returns the event's pageX
-             * @method getPageX
-             * @param {Event} ev the event
-             * @return {int} the event's pageX
-             * @static
-             */
-            getPageX: function(ev) {
-                var x = ev.pageX;
-                if (!x && 0 !== x) {
-                    x = ev.clientX || 0;
-
-                    if ( this.isIE ) {
-                        x += this._getScrollLeft();
-                    }
-                }
-
-                return x;
-            },
-
-            /**
-             * Returns the event's pageY
-             * @method getPageY
-             * @param {Event} ev the event
-             * @return {int} the event's pageY
-             * @static
-             */
-            getPageY: function(ev) {
-                var y = ev.pageY;
-                if (!y && 0 !== y) {
-                    y = ev.clientY || 0;
-
-                    if ( this.isIE ) {
-                        y += this._getScrollTop();
-                    }
-                }
-
-
-                return y;
-            },
-
-            /**
-             * Returns the pageX and pageY properties as an indexed array.
-             * @method getXY
-             * @param {Event} ev the event
-             * @return {[x, y]} the pageX and pageY properties of the event
-             * @static
-             */
-            getXY: function(ev) {
-                return [this.getPageX(ev), this.getPageY(ev)];
-            },
-
-            /**
-             * Returns the event's related target
-             * @method getRelatedTarget
-             * @param {Event} ev the event
-             * @return {HTMLElement} the event's relatedTarget
-             * @static
-             */
-            getRelatedTarget: function(ev) {
-                var t = ev.relatedTarget;
-                if (!t) {
-                    if (ev.type == "mouseout") {
-                        t = ev.toElement;
-                    } else if (ev.type == "mouseover") {
-                        t = ev.fromElement;
-                    }
-                }
-
-                return this.resolveTextNode(t);
-            },
-
-            /**
-             * Returns the time of the event.  If the time is not included, the
-             * event is modified using the current time.
-             * @method getTime
-             * @param {Event} ev the event
-             * @return {Date} the time of the event
-             * @static
-             */
-            getTime: function(ev) {
-                if (!ev.time) {
-                    var t = new Date().getTime();
-                    try {
-                        ev.time = t;
-                    } catch(ex) {
-                        this.lastError = ex;
-                        return t;
-                    }
-                }
-
-                return ev.time;
-            },
-
-            /**
-             * Convenience method for stopPropagation + preventDefault
-             * @method stopEvent
-             * @param {Event} ev the event
-             * @static
-             */
-            stopEvent: function(ev) {
-                this.stopPropagation(ev);
-                this.preventDefault(ev);
-            },
-
-            /**
-             * Stops event propagation
-             * @method stopPropagation
-             * @param {Event} ev the event
-             * @static
-             */
-            stopPropagation: function(ev) {
-                if (ev.stopPropagation) {
-                    ev.stopPropagation();
-                } else {
-                    ev.cancelBubble = true;
-                }
-            },
-
-            /**
-             * Prevents the default behavior of the event
-             * @method preventDefault
-             * @param {Event} ev the event
-             * @static
-             */
-            preventDefault: function(ev) {
-                if (ev.preventDefault) {
-                    ev.preventDefault();
-                } else {
-                    ev.returnValue = false;
-                }
-            },
-
-            /**
-             * Finds the event in the window object, the caller's arguments, or
-             * in the arguments of another method in the callstack.  This is
-             * executed automatically for events registered through the event
-             * manager, so the implementer should not normally need to execute
-             * this function at all.
-             * @method getEvent
-             * @param {Event} e the event parameter from the handler
-             * @param {HTMLElement} boundEl the element the listener is attached to
-             * @return {Event} the event
-             * @static
-             */
-            getEvent: function(e, boundEl) {
-                var ev = e || window.event;
-
-                if (!ev) {
-                    var c = this.getEvent.caller;
-                    while (c) {
-                        ev = c.arguments[0];
-                        if (ev && Event == ev.constructor) {
-                            break;
-                        }
-                        c = c.caller;
-                    }
-                }
-
-                return ev;
-            },
-
-            /**
-             * Returns the charcode for an event
-             * @method getCharCode
-             * @param {Event} ev the event
-             * @return {int} the event's charCode
-             * @static
-             */
-            getCharCode: function(ev) {
-                var code = ev.keyCode || ev.charCode || 0;
-
-                // webkit key normalization
-                if (YAHOO.env.ua.webkit && (code in webkitKeymap)) {
-                    code = webkitKeymap[code];
-                }
-                return code;
-            },
-
-            /**
-             * Locating the saved event handler data by function ref
-             *
-             * @method _getCacheIndex
-             * @static
-             * @private
-             */
-            _getCacheIndex: function(a, el, sType, fn) {
-                for (var i=0, l=a.length; i<l; i=i+1) {
-                    var li = a[i];
-                    if ( li                 &&
-                         li[this.FN] == fn  &&
-                         li[this.EL] == el  &&
-                         li[this.TYPE] == sType ) {
-                        return i;
-                    }
-                }
-
-                return -1;
-            },
-
-            /**
-             * Generates an unique ID for the element if it does not already
-             * have one.
-             * @method generateId
-             * @param el the element to create the id for
-             * @return {string} the resulting id of the element
-             * @static
-             */
-            generateId: function(el) {
-                var id = el.id;
-
-                if (!id) {
-                    id = "yuievtautoid-" + counter;
-                    ++counter;
-                    el.id = id;
-                }
-
-                return id;
-            },
-
-
-            /**
-             * We want to be able to use getElementsByTagName as a collection
-             * to attach a group of events to.  Unfortunately, different
-             * browsers return different types of collections.  This function
-             * tests to determine if the object is array-like.  It will also
-             * fail if the object is an array, but is empty.
-             * @method _isValidCollection
-             * @param o the object to test
-             * @return {boolean} true if the object is array-like and populated
-             * @static
-             * @private
-             */
-            _isValidCollection: function(o) {
-                try {
-                    return ( o                     && // o is something
-                             typeof o !== "string" && // o is not a string
-                             o.length              && // o is indexed
-                             !o.tagName            && // o is not an HTML element
-                             !o.alert              && // o is not a window
-                             typeof o[0] !== "undefined" );
-                } catch(ex) {
-                    return false;
-                }
-
-            },
-
-            /**
-             * @private
-             * @property elCache
-             * DOM element cache
-             * @static
-             * @deprecated Elements are not cached due to issues that arise when
-             * elements are removed and re-added
-             */
-            elCache: {},
-
-            /**
-             * We cache elements bound by id because when the unload event
-             * fires, we can no longer use document.getElementById
-             * @method getEl
-             * @static
-             * @private
-             * @deprecated Elements are not cached any longer
-             */
-            getEl: function(id) {
-                return (typeof id === "string") ? document.getElementById(id) : id;
-            },
-
-            /**
-             * Clears the element cache
-             * @deprecated Elements are not cached any longer
-             * @method clearCache
-             * @static
-             * @private
-             */
-            clearCache: function() { },
-
-            /**
-             * Custom event the fires when the dom is initially usable
-             * @event DOMReadyEvent
-             */
-            DOMReadyEvent: new YAHOO.util.CustomEvent("DOMReady", YAHOO, 0, 0, 1),
-
-            /**
-             * hook up any deferred listeners
-             * @method _load
-             * @static
-             * @private
-             */
-            _load: function(e) {
-
-                if (!loadComplete) {
-                    loadComplete = true;
-                    var EU = YAHOO.util.Event;
-
-                    // Just in case DOMReady did not go off for some reason
-                    EU._ready();
-
-                    // Available elements may not have been detected before the
-                    // window load event fires. Try to find them now so that the
-                    // the user is more likely to get the onAvailable notifications
-                    // before the window load notification
-                    EU._tryPreloadAttach();
-
-                }
-            },
-
-            /**
-             * Fires the DOMReady event listeners the first time the document is
-             * usable.
-             * @method _ready
-             * @static
-             * @private
-             */
-            _ready: function(e) {
-                var EU = YAHOO.util.Event;
-                if (!EU.DOMReady) {
-                    EU.DOMReady=true;
-
-                    // Fire the content ready custom event
-                    EU.DOMReadyEvent.fire();
-
-                    // Remove the DOMContentLoaded (FF/Opera)
-                    EU._simpleRemove(document, "DOMContentLoaded", EU._ready);
-                }
-            },
-
-            /**
-             * Polling function that runs before the onload event fires,
-             * attempting to attach to DOM Nodes as soon as they are
-             * available
-             * @method _tryPreloadAttach
-             * @static
-             * @private
-             */
-            _tryPreloadAttach: function() {
-
-                if (onAvailStack.length === 0) {
-                    retryCount = 0;
-                    if (this._interval) {
-                        // clearInterval(this._interval);
-                        this._interval.cancel();
-                        this._interval = null;
-                    }
-                    return;
-                }
-
-                if (this.locked) {
-                    return;
-                }
-
-                if (this.isIE) {
-                    // Hold off if DOMReady has not fired and check current
-                    // readyState to protect against the IE operation aborted
-                    // issue.
-                    if (!this.DOMReady) {
-                        this.startInterval();
-                        return;
-                    }
-                }
-
-                this.locked = true;
-
-
-                // keep trying until after the page is loaded.  We need to
-                // check the page load state prior to trying to bind the
-                // elements so that we can be certain all elements have been
-                // tested appropriately
-                var tryAgain = !loadComplete;
-                if (!tryAgain) {
-                    tryAgain = (retryCount > 0 && onAvailStack.length > 0);
-                }
-
-                // onAvailable
-                var notAvail = [];
-
-                var executeItem = function (el, item) {
-                    var context = el;
-                    if (item.overrideContext) {
-                        if (item.overrideContext === true) {
-                            context = item.obj;
-                        } else {
-                            context = item.overrideContext;
-                        }
-                    }
-                    item.fn.call(context, item.obj);
-                };
-
-                var i, len, item, el, ready=[];
-
-                // onAvailable onContentReady
-                for (i=0, len=onAvailStack.length; i<len; i=i+1) {
-                    item = onAvailStack[i];
-                    if (item) {
-                        el = this.getEl(item.id);
-                        if (el) {
-                            if (item.checkReady) {
-                                if (loadComplete || el.nextSibling || !tryAgain) {
-                                    ready.push(item);
-                                    onAvailStack[i] = null;
-                                }
-                            } else {
-                                executeItem(el, item);
-                                onAvailStack[i] = null;
-                            }
-                        } else {
-                            notAvail.push(item);
-                        }
-                    }
-                }
-
-                // make sure onContentReady fires after onAvailable
-                for (i=0, len=ready.length; i<len; i=i+1) {
-                    item = ready[i];
-                    executeItem(this.getEl(item.id), item);
-                }
-
-
-                retryCount--;
-
-                if (tryAgain) {
-                    for (i=onAvailStack.length-1; i>-1; i--) {
-                        item = onAvailStack[i];
-                        if (!item || !item.id) {
-                            onAvailStack.splice(i, 1);
-                        }
-                    }
-
-                    this.startInterval();
-                } else {
-                    if (this._interval) {
-                        // clearInterval(this._interval);
-                        this._interval.cancel();
-                        this._interval = null;
-                    }
-                }
-
-                this.locked = false;
-
-            },
-
-            /**
-             * Removes all listeners attached to the given element via addListener.
-             * Optionally, the node's children can also be purged.
-             * Optionally, you can specify a specific type of event to remove.
-             * @method purgeElement
-             * @param {HTMLElement} el the element to purge
-             * @param {boolean} recurse recursively purge this element's children
-             * as well.  Use with caution.
-             * @param {string} sType optional type of listener to purge. If
-             * left out, all listeners will be removed
-             * @static
-             */
-            purgeElement: function(el, recurse, sType) {
-                var oEl = (YAHOO.lang.isString(el)) ? this.getEl(el) : el;
-                var elListeners = this.getListeners(oEl, sType), i, len;
-                if (elListeners) {
-                    for (i=elListeners.length-1; i>-1; i--) {
-                        var l = elListeners[i];
-                        this.removeListener(oEl, l.type, l.fn);
-                    }
-                }
-
-                if (recurse && oEl && oEl.childNodes) {
-                    for (i=0,len=oEl.childNodes.length; i<len ; ++i) {
-                        this.purgeElement(oEl.childNodes[i], recurse, sType);
-                    }
-                }
-            },
-
-            /**
-             * Returns all listeners attached to the given element via addListener.
-             * Optionally, you can specify a specific type of event to return.
-             * @method getListeners
-             * @param el {HTMLElement|string} the element or element id to inspect
-             * @param sType {string} optional type of listener to return. If
-             * left out, all listeners will be returned
-             * @return {Object} the listener. Contains the following fields:
-             * &nbsp;&nbsp;type:   (string)   the type of event
-             * &nbsp;&nbsp;fn:     (function) the callback supplied to addListener
-             * &nbsp;&nbsp;obj:    (object)   the custom object supplied to addListener
-             * &nbsp;&nbsp;adjust: (boolean|object)  whether or not to adjust the default context
-             * &nbsp;&nbsp;scope: (boolean)  the derived context based on the adjust parameter
-             * &nbsp;&nbsp;index:  (int)      its position in the Event util listener cache
-             * @static
-             */
-            getListeners: function(el, sType) {
-                var results=[], searchLists;
-                if (!sType) {
-                    searchLists = [listeners, unloadListeners];
-                } else if (sType === "unload") {
-                    searchLists = [unloadListeners];
-                } else {
-                    sType = this._getType(sType);
-                    searchLists = [listeners];
-                }
-
-                var oEl = (YAHOO.lang.isString(el)) ? this.getEl(el) : el;
-
-                for (var j=0;j<searchLists.length; j=j+1) {
-                    var searchList = searchLists[j];
-                    if (searchList) {
-                        for (var i=0,len=searchList.length; i<len ; ++i) {
-                            var l = searchList[i];
-                            if ( l  && l[this.EL] === oEl &&
-                                    (!sType || sType === l[this.TYPE]) ) {
-                                results.push({
-                                    type:   l[this.TYPE],
-                                    fn:     l[this.FN],
-                                    obj:    l[this.OBJ],
-                                    adjust: l[this.OVERRIDE],
-                                    scope:  l[this.ADJ_SCOPE],
-                                    index:  i
-                                });
-                            }
-                        }
-                    }
-                }
-
-                return (results.length) ? results : null;
-            },
-
-            /**
-             * Removes all listeners registered by pe.event.  Called
-             * automatically during the unload event.
-             * @method _unload
-             * @static
-             * @private
-             */
-            _unload: function(e) {
-
-                var EU = YAHOO.util.Event, i, j, l, len, index,
-                         ul = unloadListeners.slice(), context;
-
-                // execute and clear stored unload listeners
-                for (i=0, len=unloadListeners.length; i<len; ++i) {
-                    l = ul[i];
-                    if (l) {
-                        try {
-                            context = window;
-                            if (l[EU.ADJ_SCOPE]) {
-                                if (l[EU.ADJ_SCOPE] === true) {
-                                    context = l[EU.UNLOAD_OBJ];
-                                } else {
-                                    context = l[EU.ADJ_SCOPE];
-                                }
-                            }
-                            l[EU.FN].call(context, EU.getEvent(e, l[EU.EL]), l[EU.UNLOAD_OBJ] );
-                        } catch(e1) {}
-                        ul[i] = null;
-                    }
-                }
-
-                l = null;
-                context = null;
-                unloadListeners = null;
-
-                // Remove listeners to handle IE memory leaks
-                // 2.5.0 listeners are removed for all browsers again.  FireFox preserves
-                // at least some listeners between page refreshes, potentially causing
-                // errors during page load (mouseover listeners firing before they
-                // should if the user moves the mouse at the correct moment).
-                if (listeners) {
-                    for (j=listeners.length-1; j>-1; j--) {
-                        l = listeners[j];
-                        if (l) {
-                            try {
-                                EU.removeListener(l[EU.EL], l[EU.TYPE], l[EU.FN], j);
-                            } catch(e2) {}
-                        }
-                    }
-                    l=null;
-                }
-
-                try {
-                    EU._simpleRemove(window, "unload", EU._unload);
-                    EU._simpleRemove(window, "load", EU._load);
-                } catch(e3) {}
-
-            },
-
-            /**
-             * Returns scrollLeft
-             * @method _getScrollLeft
-             * @static
-             * @private
-             */
-            _getScrollLeft: function() {
-                return this._getScroll()[1];
-            },
-
-            /**
-             * Returns scrollTop
-             * @method _getScrollTop
-             * @static
-             * @private
-             */
-            _getScrollTop: function() {
-                return this._getScroll()[0];
-            },
-
-            /**
-             * Returns the scrollTop and scrollLeft.  Used to calculate the
-             * pageX and pageY in Internet Explorer
-             * @method _getScroll
-             * @static
-             * @private
-             */
-            _getScroll: function() {
-                var dd = document.documentElement, db = document.body;
-                if (dd && (dd.scrollTop || dd.scrollLeft)) {
-                    return [dd.scrollTop, dd.scrollLeft];
-                } else if (db) {
-                    return [db.scrollTop, db.scrollLeft];
-                } else {
-                    return [0, 0];
-                }
-            },
-
-            /**
-             * Used by old versions of CustomEvent, restored for backwards
-             * compatibility
-             * @method regCE
-             * @private
-             * @static
-             * @deprecated still here for backwards compatibility
-             */
-            regCE: function() {},
-
-            /**
-             * Adds a DOM event directly without the caching, cleanup, context adj, etc
-             *
-             * @method _simpleAdd
-             * @param {HTMLElement} el      the element to bind the handler to
-             * @param {string}      sType   the type of event handler
-             * @param {function}    fn      the callback to invoke
-             * @param {boolen}      capture capture or bubble phase
-             * @static
-             * @private
-             */
-            _simpleAdd: function () {
-                if (window.addEventListener) {
-                    return function(el, sType, fn, capture) {
-                        el.addEventListener(sType, fn, (capture));
-                    };
-                } else if (window.attachEvent) {
-                    return function(el, sType, fn, capture) {
-                        el.attachEvent("on" + sType, fn);
-                    };
-                } else {
-                    return function(){};
-                }
-            }(),
-
-            /**
-             * Basic remove listener
-             *
-             * @method _simpleRemove
-             * @param {HTMLElement} el      the element to bind the handler to
-             * @param {string}      sType   the type of event handler
-             * @param {function}    fn      the callback to invoke
-             * @param {boolen}      capture capture or bubble phase
-             * @static
-             * @private
-             */
-            _simpleRemove: function() {
-                if (window.removeEventListener) {
-                    return function (el, sType, fn, capture) {
-                        el.removeEventListener(sType, fn, (capture));
-                    };
-                } else if (window.detachEvent) {
-                    return function (el, sType, fn) {
-                        el.detachEvent("on" + sType, fn);
-                    };
-                } else {
-                    return function(){};
-                }
-            }()
-        };
-
-    }();
-
-    (function() {
-        var EU = YAHOO.util.Event;
-
-        /**
-         * Appends an event handler.  This is an alias for <code>addListener</code>
-         *
-         * @method on
-         *
-         * @param {String|HTMLElement|Array|NodeList} el An id, an element
-         *  reference, or a collection of ids and/or elements to assign the
-         *  listener to.
-         * @param {String}   sType     The type of event to append
-         * @param {Function} fn        The method the event invokes
-         * @param {Object}   obj    An arbitrary object that will be
-         *                             passed as a parameter to the handler
-         * @param {Boolean|object}  overrideContext  If true, the obj passed in becomes
-         *                             the execution context of the listener. If an
-         *                             object, this object becomes the execution
-         *                             context.
-         * @return {Boolean} True if the action was successful or defered,
-         *                        false if one or more of the elements
-         *                        could not have the listener attached,
-         *                        or if the operation throws an exception.
-         * @static
-         */
-        EU.on = EU.addListener;
-
-        /**
-         * YAHOO.util.Event.onFocus is an alias for addFocusListener
-         * @method onFocus
-         * @see addFocusListener
-         * @static
-         * @deprecated use YAHOO.util.Event.on and specify "focusin" as the event type.
-         */
-        EU.onFocus = EU.addFocusListener;
-
-        /**
-         * YAHOO.util.Event.onBlur is an alias for addBlurListener
-         * @method onBlur
-         * @see addBlurListener
-         * @static
-         * @deprecated use YAHOO.util.Event.on and specify "focusout" as the event type.
-         */
-        EU.onBlur = EU.addBlurListener;
-
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-
-        // Internet Explorer: use the readyState of a defered script.
-        // This isolates what appears to be a safe moment to manipulate
-        // the DOM prior to when the document's readyState suggests
-        // it is safe to do so.
-        if (EU.isIE) {
-            if (self !== self.top) {
-                document.onreadystatechange = function() {
-                    if (document.readyState == 'complete') {
-                        document.onreadystatechange = null;
-                        EU._ready();
-                    }
-                };
-            } else {
-
-                // Process onAvailable/onContentReady items when the
-                // DOM is ready.
-                YAHOO.util.Event.onDOMReady(
-                        YAHOO.util.Event._tryPreloadAttach,
-                        YAHOO.util.Event, true);
-
-                var n = document.createElement('p');
-
-                EU._dri = setInterval(function() {
-                    try {
-                        // throws an error if doc is not ready
-                        n.doScroll('left');
-                        clearInterval(EU._dri);
-                        EU._dri = null;
-                        EU._ready();
-                        n = null;
-                    } catch (ex) {
-                    }
-                }, EU.POLL_INTERVAL);
-            }
-
-        // The document's readyState in Safari currently will
-        // change to loaded/complete before images are loaded.
-        } else if (EU.webkit && EU.webkit < 525) {
-
-            EU._dri = setInterval(function() {
-                var rs=document.readyState;
-                if ("loaded" == rs || "complete" == rs) {
-                    clearInterval(EU._dri);
-                    EU._dri = null;
-                    EU._ready();
-                }
-            }, EU.POLL_INTERVAL);
-
-        // FireFox and Opera: These browsers provide a event for this
-        // moment.  The latest WebKit releases now support this event.
-        } else {
-
-            EU._simpleAdd(document, "DOMContentLoaded", EU._ready);
-
-        }
-        /////////////////////////////////////////////////////////////
-
-
-        EU._simpleAdd(window, "load", EU._load);
-        EU._simpleAdd(window, "unload", EU._unload);
-        EU._tryPreloadAttach();
-    })();
-
-}
-/**
- * EventProvider is designed to be used with YAHOO.augment to wrap
- * CustomEvents in an interface that allows events to be subscribed to
- * and fired by name.  This makes it possible for implementing code to
- * subscribe to an event that either has not been created yet, or will
- * not be created at all.
- *
- * @Class EventProvider
- */
-YAHOO.util.EventProvider = function() { };
-
-YAHOO.util.EventProvider.prototype = {
-
-    /**
-     * Private storage of custom events
-     * @property __yui_events
-     * @type Object[]
-     * @private
-     */
-    __yui_events: null,
-
-    /**
-     * Private storage of custom event subscribers
-     * @property __yui_subscribers
-     * @type Object[]
-     * @private
-     */
-    __yui_subscribers: null,
-
-    /**
-     * Subscribe to a CustomEvent by event type
-     *
-     * @method subscribe
-     * @param p_type     {string}   the type, or name of the event
-     * @param p_fn       {function} the function to exectute when the event fires
-     * @param p_obj      {Object}   An object to be passed along when the event
-     *                              fires
-     * @param overrideContext {boolean}  If true, the obj passed in becomes the
-     *                              execution scope of the listener
-     */
-    subscribe: function(p_type, p_fn, p_obj, overrideContext) {
-
-        this.__yui_events = this.__yui_events || {};
-        var ce = this.__yui_events[p_type];
-
-        if (ce) {
-            ce.subscribe(p_fn, p_obj, overrideContext);
-        } else {
-            this.__yui_subscribers = this.__yui_subscribers || {};
-            var subs = this.__yui_subscribers;
-            if (!subs[p_type]) {
-                subs[p_type] = [];
-            }
-            subs[p_type].push(
-                { fn: p_fn, obj: p_obj, overrideContext: overrideContext } );
-        }
-    },
-
-    /**
-     * Unsubscribes one or more listeners the from the specified event
-     * @method unsubscribe
-     * @param p_type {string}   The type, or name of the event.  If the type
-     *                          is not specified, it will attempt to remove
-     *                          the listener from all hosted events.
-     * @param p_fn   {Function} The subscribed function to unsubscribe, if not
-     *                          supplied, all subscribers will be removed.
-     * @param p_obj  {Object}   The custom object passed to subscribe.  This is
-     *                        optional, but if supplied will be used to
-     *                        disambiguate multiple listeners that are the same
-     *                        (e.g., you subscribe many object using a function
-     *                        that lives on the prototype)
-     * @return {boolean} true if the subscriber was found and detached.
-     */
-    unsubscribe: function(p_type, p_fn, p_obj) {
-        this.__yui_events = this.__yui_events || {};
-        var evts = this.__yui_events;
-        if (p_type) {
-            var ce = evts[p_type];
-            if (ce) {
-                return ce.unsubscribe(p_fn, p_obj);
-            }
-        } else {
-            var ret = true;
-            for (var i in evts) {
-                if (YAHOO.lang.hasOwnProperty(evts, i)) {
-                    ret = ret && evts[i].unsubscribe(p_fn, p_obj);
-                }
-            }
-            return ret;
-        }
-
-        return false;
-    },
-
-    /**
-     * Removes all listeners from the specified event.  If the event type
-     * is not specified, all listeners from all hosted custom events will
-     * be removed.
-     * @method unsubscribeAll
-     * @param p_type {string}   The type, or name of the event
-     */
-    unsubscribeAll: function(p_type) {
-        return this.unsubscribe(p_type);
-    },
-
-    /**
-     * Creates a new custom event of the specified type.  If a custom event
-     * by that name already exists, it will not be re-created.  In either
-     * case the custom event is returned.
-     *
-     * @method createEvent
-     *
-     * @param p_type {string} the type, or name of the event
-     * @param p_config {object} optional config params.  Valid properties are:
-     *
-     *  <ul>
-     *    <li>
-     *      scope: defines the default execution scope.  If not defined
-     *      the default scope will be this instance.
-     *    </li>
-     *    <li>
-     *      silent: if true, the custom event will not generate log messages.
-     *      This is false by default.
-     *    </li>
-     *    <li>
-     *      fireOnce: if true, the custom event will only notify subscribers
-     *      once regardless of the number of times the event is fired.  In
-     *      addition, new subscribers will be executed immediately if the
-     *      event has already fired.
-     *      This is false by default.
-     *    </li>
-     *    <li>
-     *      onSubscribeCallback: specifies a callback to execute when the
-     *      event has a new subscriber.  This will fire immediately for
-     *      each queued subscriber if any exist prior to the creation of
-     *      the event.
-     *    </li>
-     *  </ul>
-     *
-     *  @return {CustomEvent} the custom event
-     *
-     */
-    createEvent: function(p_type, p_config) {
-
-        this.__yui_events = this.__yui_events || {};
-        var opts = p_config || {},
-            events = this.__yui_events, ce;
-
-        if (events[p_type]) {
-        } else {
-
-            ce = new YAHOO.util.CustomEvent(p_type, opts.scope || this, opts.silent,
-                         YAHOO.util.CustomEvent.FLAT, opts.fireOnce);
-
-            events[p_type] = ce;
-
-            if (opts.onSubscribeCallback) {
-                ce.subscribeEvent.subscribe(opts.onSubscribeCallback);
-            }
-
-            this.__yui_subscribers = this.__yui_subscribers || {};
-            var qs = this.__yui_subscribers[p_type];
-
-            if (qs) {
-                for (var i=0; i<qs.length; ++i) {
-                    ce.subscribe(qs[i].fn, qs[i].obj, qs[i].overrideContext);
-                }
-            }
-        }
-
-        return events[p_type];
-    },
-
-
-   /**
-     * Fire a custom event by name.  The callback functions will be executed
-     * from the scope specified when the event was created, and with the
-     * following parameters:
-     *   <ul>
-     *   <li>The first argument fire() was executed with</li>
-     *   <li>The custom object (if any) that was passed into the subscribe()
-     *       method</li>
-     *   </ul>
-     * @method fireEvent
-     * @param p_type    {string}  the type, or name of the event
-     * @param arguments {Object*} an arbitrary set of parameters to pass to
-     *                            the handler.
-     * @return {boolean} the return value from CustomEvent.fire
-     *
-     */
-    fireEvent: function(p_type) {
-
-        this.__yui_events = this.__yui_events || {};
-        var ce = this.__yui_events[p_type];
-
-        if (!ce) {
-            return null;
-        }
-
-        var args = [];
-        for (var i=1; i<arguments.length; ++i) {
-            args.push(arguments[i]);
-        }
-        return ce.fire.apply(ce, args);
-    },
-
-    /**
-     * Returns true if the custom event of the provided type has been created
-     * with createEvent.
-     * @method hasEvent
-     * @param type {string} the type, or name of the event
-     */
-    hasEvent: function(type) {
-        if (this.__yui_events) {
-            if (this.__yui_events[type]) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-};
-
-(function() {
-
-    var Event = YAHOO.util.Event, Lang = YAHOO.lang;
-
-/**
-* KeyListener is a utility that provides an easy interface for listening for
-* keydown/keyup events fired against DOM elements.
-* @namespace YAHOO.util
-* @class KeyListener
-* @constructor
-* @param {HTMLElement} attachTo The element or element ID to which the key
-*                               event should be attached
-* @param {String}      attachTo The element or element ID to which the key
-*                               event should be attached
-* @param {Object}      keyData  The object literal representing the key(s)
-*                               to detect. Possible attributes are
-*                               shift(boolean), alt(boolean), ctrl(boolean)
-*                               and keys(either an int or an array of ints
-*                               representing keycodes).
-* @param {Function}    handler  The CustomEvent handler to fire when the
-*                               key event is detected
-* @param {Object}      handler  An object literal representing the handler.
-* @param {String}      event    Optional. The event (keydown or keyup) to
-*                               listen for. Defaults automatically to keydown.
-*
-* @knownissue the "keypress" event is completely broken in Safari 2.x and below.
-*             the workaround is use "keydown" for key listening.  However, if
-*             it is desired to prevent the default behavior of the keystroke,
-*             that can only be done on the keypress event.  This makes key
-*             handling quite ugly.
-* @knownissue keydown is also broken in Safari 2.x and below for the ESC key.
-*             There currently is no workaround other than choosing another
-*             key to listen for.
-*/
-YAHOO.util.KeyListener = function(attachTo, keyData, handler, event) {
-    if (!attachTo) {
-    } else if (!keyData) {
-    } else if (!handler) {
-    }
-
-    if (!event) {
-        event = YAHOO.util.KeyListener.KEYDOWN;
-    }
-
-    /**
-    * The CustomEvent fired internally when a key is pressed
-    * @event keyEvent
-    * @private
-    * @param {Object} keyData The object literal representing the key(s) to
-    *                         detect. Possible attributes are shift(boolean),
-    *                         alt(boolean), ctrl(boolean) and keys(either an
-    *                         int or an array of ints representing keycodes).
-    */
-    var keyEvent = new YAHOO.util.CustomEvent("keyPressed");
-
-    /**
-    * The CustomEvent fired when the KeyListener is enabled via the enable()
-    * function
-    * @event enabledEvent
-    * @param {Object} keyData The object literal representing the key(s) to
-    *                         detect. Possible attributes are shift(boolean),
-    *                         alt(boolean), ctrl(boolean) and keys(either an
-    *                         int or an array of ints representing keycodes).
-    */
-    this.enabledEvent = new YAHOO.util.CustomEvent("enabled");
-
-    /**
-    * The CustomEvent fired when the KeyListener is disabled via the
-    * disable() function
-    * @event disabledEvent
-    * @param {Object} keyData The object literal representing the key(s) to
-    *                         detect. Possible attributes are shift(boolean),
-    *                         alt(boolean), ctrl(boolean) and keys(either an
-    *                         int or an array of ints representing keycodes).
-    */
-    this.disabledEvent = new YAHOO.util.CustomEvent("disabled");
-
-    if (Lang.isString(attachTo)) {
-        attachTo = document.getElementById(attachTo); // No Dom util
-    }
-
-    if (Lang.isFunction(handler)) {
-        keyEvent.subscribe(handler);
-    } else {
-        keyEvent.subscribe(handler.fn, handler.scope, handler.correctScope);
-    }
-
-    /**
-    * Handles the key event when a key is pressed.
-    * @method handleKeyPress
-    * @param {DOMEvent} e   The keypress DOM event
-    * @param {Object}   obj The DOM event scope object
-    * @private
-    */
-    function handleKeyPress(e, obj) {
-        if (! keyData.shift) {
-            keyData.shift = false;
-        }
-        if (! keyData.alt) {
-            keyData.alt = false;
-        }
-        if (! keyData.ctrl) {
-            keyData.ctrl = false;
-        }
-
-        // check held down modifying keys first
-        if (e.shiftKey == keyData.shift &&
-            e.altKey   == keyData.alt &&
-            e.ctrlKey  == keyData.ctrl) { // if we pass this, all modifiers match
-
-            var dataI

<TRUNCATED>

[05/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/resources/META-INF/NOTICE
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/resources/META-INF/NOTICE b/wicket-datetime/src/main/resources/META-INF/NOTICE
deleted file mode 100644
index 932e9eb..0000000
--- a/wicket-datetime/src/main/resources/META-INF/NOTICE
+++ /dev/null
@@ -1,14 +0,0 @@
-   Apache Wicket Date Time
-   Copyright 2006-2016 Apache Software Foundation
-
-   This product includes software developed at
-   The Apache Software Foundation (http://www.apache.org/).
-   
-   Contains code of the Yahoo User Interface library (version: 2.8.2r1),
-   released under the BSD License:
-   http://developer.yahoo.net/yui/license.txt
-   Copyright (c) 2010, Yahoo! Inc.
-
-   This product includes software developed by
-   Joda.org (http://www.joda.org/).
-   
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/log4j.properties
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/log4j.properties b/wicket-datetime/src/test/java/log4j.properties
deleted file mode 100644
index e3bc2c7..0000000
--- a/wicket-datetime/src/test/java/log4j.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-log4j.debug=false
-
-log4j.rootLogger=INFO,Stdout
-
-# please keep this setting FATAL to avoid questions from users
-# why there are stacktraces in the test output. You can turn it
-# down if you need to when testing, but don't check it in. (eelco)
-
-# changing back to ERROR. Looks like in some cases the log4j.properties
-# in wicket gets picked which results in not printing the exceptions
-# and that can be a bit dangerous (matej)
-log4j.logger.org.apache.wicket=ERROR
-#log4j.logger.org.apache.wicket.resource=FATAL
-#log4j.logger.org.apache.wicket.Localizer=FATAL
-
-log4j.appender.Stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.Stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.Stdout.layout.conversionPattern=%-5p - %-26.26c{1} - %m\n

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/datetime/DateConverterTest.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/datetime/DateConverterTest.java b/wicket-datetime/src/test/java/org/apache/wicket/datetime/DateConverterTest.java
deleted file mode 100644
index 5c9c4df..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/datetime/DateConverterTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.wicket.datetime;
-
-import java.util.Calendar;
-import java.util.Locale;
-
-import org.apache.wicket.util.convert.converter.CalendarConverter;
-import org.joda.time.format.DateTimeFormatter;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests for {@link DateConverter} and subclasses.
- * 
- * @author akiraly
- */
-public class DateConverterTest
-{
-	/**
-	 * WICKET-3598
-	 */
-	@Test
-	public void testLocaleUsed()
-	{
-		Locale locale = Locale.GERMAN;
-
-		StyleDateConverter styleDateConverter = new StyleDateConverter("F-", false);
-		DateTimeFormatter styleFormatter = styleDateConverter.getFormat(locale);
-
-		Assert.assertEquals(locale, styleFormatter.getLocale());
-
-		PatternDateConverter patternDateConverter = new PatternDateConverter(
-			styleDateConverter.getDatePattern(locale), false);
-		DateTimeFormatter patternFormatter = patternDateConverter.getFormat(locale);
-
-		Assert.assertEquals(locale, patternFormatter.getLocale());
-
-		Calendar now = Calendar.getInstance();
-
-		String actual = styleDateConverter.convertToString(now.getTime(), locale);
-		String expected = patternDateConverter.convertToString(now.getTime(), locale);
-
-		Assert.assertEquals(expected, actual);
-	}
-
-	/**
-	 * WICKET-3658
-	 */
-	@Test
-	public void testCalendarConverterWithDelegate()
-	{
-		Locale locale = Locale.GERMAN;
-
-		Calendar input = Calendar.getInstance(locale);
-		input.clear();
-		input.set(2011, Calendar.MAY, 7);
-
-		StyleDateConverter styleDateConverter = new StyleDateConverter("F-", false);
-
-		CalendarConverter calendarConverter = new CalendarConverter(styleDateConverter);
-
-		String expected = styleDateConverter.convertToString(input.getTime(), locale);
-		String actual = calendarConverter.convertToString(input, locale);
-
-		Assert.assertEquals(expected, actual);
-
-		Calendar revert = calendarConverter.convertToObject(actual, locale);
-
-		Assert.assertEquals(input, revert);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatePickerTest.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatePickerTest.java b/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatePickerTest.java
deleted file mode 100644
index 478d7d4..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatePickerTest.java
+++ /dev/null
@@ -1,763 +0,0 @@
-/*
- * 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.wicket.extensions.yui.calendar;
-
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.Locale;
-import java.util.TimeZone;
-
-import org.apache.wicket.Page;
-import org.apache.wicket.datetime.StyleDateConverter;
-import org.apache.wicket.extensions.yui.calendar.DateTimeField.AM_PM;
-import org.apache.wicket.protocol.http.request.WebClientInfo;
-import org.apache.wicket.util.tester.DiffUtil;
-import org.apache.wicket.util.tester.FormTester;
-import org.apache.wicket.util.tester.WicketTestCase;
-import org.joda.time.DateTimeFieldType;
-import org.joda.time.DateTimeZone;
-import org.joda.time.MutableDateTime;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
-import org.junit.After;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * 
- */
-public class DatePickerTest extends WicketTestCase
-{
-	/** log. */
-	private static final Logger log = LoggerFactory.getLogger(DatePickerTest.class);
-
-	private TimeZone defaultTz = TimeZone.getDefault();
-
-	/**
-	 * @see org.apache.wicket.util.tester.WicketTestCase#tearDown()
-	 */
-	@Override
-	@After
-	public void commonAfter()
-	{
-		TimeZone.setDefault(defaultTz);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(defaultTz));
-
-		super.commonAfter();
-	}
-
-	/**
-	 * 
-	 * @throws Exception
-	 */
-	@Test
-	public void test1() throws Exception
-	{
-		log.debug("=========== test1() =================");
-		myTestExecution(DatesPage1.class, "DatesPage1_ExpectedResult.html");
-	}
-
-	/**
-	 * Tests conversion of input for DateTimeField and DateField.
-	 * 
-	 * @throws Exception
-	 */
-	@Test
-	public void testDateFieldInput() throws Exception
-	{
-		log.debug("=========== testDateFieldInput() =================");
-		Class<? extends Page> pageClass = DatesPage2.class;
-		Date date = new GregorianCalendar(2010, 10, 6, 0, 0).getTime();
-		tester.getSession().setLocale(Locale.GERMAN);
-		tester.startPage(pageClass);
-		tester.assertRenderedPage(pageClass);
-		FormTester formTester = tester.newFormTester("form");
-		formTester.setValue("dateTimeField:date", "06.11.2010");
-		formTester.setValue("dateTimeField:hours", "00");
-		formTester.setValue("dateTimeField:minutes", "00");
-		formTester.setValue("dateField:date", "06.11.2010");
-		formTester.submit();
-		DatesPage2 page = (DatesPage2)tester.getLastRenderedPage();
-
-		log.debug("orig: " + date.getTime() + "; date: " + page.date.getTime() + "; dateTime: " +
-			page.dateTime.getTime());
-		log.debug("orig: " + date + "; date: " + page.date + "; dateTime: " + page.dateTime);
-		assertEquals(0, date.compareTo(page.dateTime));
-		assertEquals(0, date.compareTo(page.date));
-	}
-
-	/**
-	 * Tests conversion of input for DateTimeField and DateField when the client and server are in
-	 * different time zones.
-	 * 
-	 * @throws Exception
-	 */
-	@Test
-	public void testDateFieldInputTimezone() throws Exception
-	{
-		log.debug("=========== testDateFieldInputTimezone() =================");
-		TimeZone tzClient = TimeZone.getTimeZone("America/Los_Angeles");
-		TimeZone tzServer = TimeZone.getTimeZone("Europe/Berlin");
-
-		TimeZone.setDefault(tzServer);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer));
-
-		Class<? extends Page> pageClass = DatesPage2.class;
-		MutableDateTime dt = new MutableDateTime(DateTimeZone.forTimeZone(tzClient));
-		dt.setDateTime(2010, 11, 6, 0, 0, 0, 0);
-		Date date = new Date(dt.getMillis());
-
-		WebClientInfo clientInfo = (WebClientInfo)tester.getSession().getClientInfo();
-		clientInfo.getProperties().setTimeZone(tzClient);
-
-		tester.getSession().setLocale(Locale.GERMANY);
-		tester.startPage(pageClass);
-		tester.assertRenderedPage(pageClass);
-		FormTester formTester = tester.newFormTester("form");
-		formTester.setValue("dateTimeField:date", "06.11.2010");
-		formTester.setValue("dateTimeField:hours", "00");
-		formTester.setValue("dateTimeField:minutes", "00");
-		formTester.setValue("dateField:date", "06.11.2010");
-		formTester.submit();
-
-		DatesPage2 page = (DatesPage2)tester.getLastRenderedPage();
-
-		log.debug("orig: " + date.getTime() + "; date: " + page.date.getTime() + "; dateTime: " +
-			page.dateTime.getTime());
-		log.debug("orig: " + date + "; date: " + page.date + "; dateTime: " + page.dateTime);
-		assertEquals(0, date.compareTo(page.dateTime));
-		assertEquals(0, date.compareTo(page.date));
-	}
-
-	/**
-	 * Tests joda & jvm default time zone handling
-	 */
-	@Test
-	public void testJodaTimeDefaultTimeZone()
-	{
-		TimeZone origJvmDef = TimeZone.getDefault();
-		DateTimeZone origJodaDef = DateTimeZone.getDefault();
-
-		// lets find a timezone different from current default
-		String newId = null;
-		for (String id : TimeZone.getAvailableIDs())
-		{
-			if (!id.equals(origJvmDef.getID()))
-			{
-				newId = id;
-				break;
-			}
-		}
-
-		assertNotNull(newId);
-
-		TimeZone.setDefault(TimeZone.getTimeZone(newId));
-
-		TimeZone newJvmDef = TimeZone.getDefault();
-		DateTimeZone newJodaDef = DateTimeZone.getDefault();
-
-		// if this fails we are under security manager
-		// and we have no right to set default timezone
-		assertNotSame(origJvmDef, newJvmDef);
-
-		// this should be true because joda caches the
-		// default timezone and even for the first
-		// lookup it uses a System property if possible
-		// for more info see org.joda.time.DateTimeZone.getDefault()
-		assertSame(origJodaDef, newJodaDef);
-	}
-
-	/**
-	 * Test date conversion with the server's time zone having a different current date than the
-	 * client time zone.
-	 * 
-	 * @throws ParseException
-	 */
-	@Test
-	public void testDifferentDateTimeZoneConversion() throws ParseException
-	{
-		log.debug("=========== testDifferentDateTimeZoneConversion() =================");
-		TimeZone origJvmDef = TimeZone.getDefault();
-		DateTimeZone origJodaDef = DateTimeZone.getDefault();
-		TimeZone tzClient = TimeZone.getTimeZone("GMT+14");
-		TimeZone tzServer = TimeZone.getTimeZone("GMT-12");
-
-		TimeZone.setDefault(tzServer);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer));
-
-		Class<? extends Page> pageClass = DatesPage2.class;
-		MutableDateTime dt = new MutableDateTime(DateTimeZone.forTimeZone(tzClient));
-		dt.setDateTime(2010, 11, 6, 0, 0, 0, 0);
-		Date date = new Date(dt.getMillis());
-
-		WebClientInfo clientInfo = (WebClientInfo)tester.getSession().getClientInfo();
-		clientInfo.getProperties().setTimeZone(tzClient);
-
-		tester.getSession().setLocale(Locale.GERMANY);
-		tester.startPage(pageClass);
-		tester.assertRenderedPage(pageClass);
-		FormTester formTester = tester.newFormTester("form");
-		formTester.setValue("dateTimeField:date", "06.11.2010");
-		formTester.setValue("dateTimeField:hours", "00");
-		formTester.setValue("dateTimeField:minutes", "00");
-		formTester.setValue("dateField:date", "06.11.2010");
-		formTester.submit();
-
-		DatesPage2 page = (DatesPage2)tester.getLastRenderedPage();
-
-		log.debug("orig: " + date.getTime() + "; date: " + page.date.getTime() + "; dateTime: " +
-			page.dateTime.getTime());
-		log.debug("orig: " + date + "; date: " + page.date + "; dateTime: " + page.dateTime);
-		assertEquals(0, date.compareTo(page.dateTime));
-		assertEquals(0, date.compareTo(page.date));
-
-		TimeZone.setDefault(origJvmDef);
-		DateTimeZone.setDefault(origJodaDef);
-	}
-
-	/**
-	 * Test date conversion with the server's time zone having a different current date than the
-	 * client time zone using a Locale with am/pm style time.
-	 */
-	@Test
-	public void testDifferentDateTimeZoneConversionAMPM()
-	{
-		TimeZone origJvmDef = TimeZone.getDefault();
-		DateTimeZone origJodaDef = DateTimeZone.getDefault();
-		TimeZone tzClient = TimeZone.getTimeZone("GMT+14");
-		TimeZone tzServer = TimeZone.getTimeZone("GMT-12");
-
-		TimeZone.setDefault(tzServer);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer));
-
-		Class<? extends Page> pageClass = DatesPage2.class;
-		MutableDateTime dt = new MutableDateTime(DateTimeZone.forTimeZone(tzClient));
-		dt.setDateTime(2010, 11, 6, 22, 0, 0, 0);
-		Date date = new Date(dt.getMillis());
-
-		WebClientInfo clientInfo = (WebClientInfo)tester.getSession().getClientInfo();
-		clientInfo.getProperties().setTimeZone(tzClient);
-
-		tester.getSession().setLocale(Locale.US);
-		tester.startPage(pageClass);
-		tester.assertRenderedPage(pageClass);
-		FormTester formTester = tester.newFormTester("form");
-		formTester.setValue("dateTimeField:date", "11/06/2010");
-		formTester.setValue("dateTimeField:hours", "10");
-		formTester.setValue("dateTimeField:minutes", "00");
-		formTester.setValue("dateTimeField:amOrPmChoice", "1");
-		formTester.submit();
-
-		DatesPage2 page = (DatesPage2)tester.getLastRenderedPage();
-
-		log.debug("orig: " + date.getTime() + "; dateTime: " + page.dateTime.getTime());
-		log.debug("orig: " + date + "; dateTime: " + page.dateTime);
-		assertEquals(0, date.compareTo(page.dateTime));
-
-		TimeZone.setDefault(origJvmDef);
-		DateTimeZone.setDefault(origJodaDef);
-	}
-
-	/**
-	 * Test time conversion for TimeField. The day, month, year of the TimeField model should not be
-	 * changed. The hours and minutes should be converted to the server's time zone based on the
-	 * day, month and year of the Date model.
-	 */
-	@Test
-	public void testTimeFieldDST()
-	{
-		TimeZone origJvmDef = TimeZone.getDefault();
-		DateTimeZone origJodaDef = DateTimeZone.getDefault();
-		TimeZone tzClient = TimeZone.getTimeZone("Canada/Eastern");
-		TimeZone tzServer = TimeZone.getTimeZone("GMT");
-
-		TimeZone.setDefault(tzServer);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer));
-		WebClientInfo clientInfo = (WebClientInfo)tester.getSession().getClientInfo();
-		clientInfo.getProperties().setTimeZone(tzClient);
-		tester.getSession().setLocale(Locale.GERMAN);
-
-		// Test with standard time (in client time zone)
-		MutableDateTime dt = new MutableDateTime(DateTimeZone.forTimeZone(tzClient));
-		dt.setDateTime(2010, 1, 15, 0, 0, 0, 0);
-		Date date = new Date(dt.getMillis());
-		DatesPage2 testPage = new DatesPage2();
-		testPage.time = date;
-		tester.startPage(testPage);
-		FormTester formTester = tester.newFormTester("form");
-		formTester.setValue("timeField:hours", "00");
-		formTester.setValue("timeField:minutes", "00");
-		formTester.submit();
-		assertEquals(date, testPage.time);
-
-		// Test with daylight savings time (in client time zone)
-		dt = new MutableDateTime(DateTimeZone.forTimeZone(tzClient));
-		dt.setDateTime(2010, 7, 15, 0, 0, 0, 0);
-		date = new Date(dt.getMillis());
-		testPage = new DatesPage2();
-		testPage.time = date;
-		tester.startPage(testPage);
-		formTester = tester.newFormTester("form");
-		formTester.setValue("timeField:hours", "00");
-		formTester.setValue("timeField:minutes", "00");
-		formTester.submit();
-		assertEquals(date, testPage.time);
-
-		TimeZone.setDefault(origJvmDef);
-		DateTimeZone.setDefault(origJodaDef);
-	}
-
-	/**
-	 * Test StyleDateConverter with the server's time zone having a different current date than the
-	 * client time zone.
-	 * 
-	 * @throws ParseException
-	 */
-	@Test
-	public void testStyleDateConverterTimeZoneDifference() throws ParseException
-	{
-		TimeZone origJvmDef = TimeZone.getDefault();
-		DateTimeZone origJodaDef = DateTimeZone.getDefault();
-
-		TimeZone tzClient = TimeZone.getTimeZone("GMT+14");
-		TimeZone tzServer = TimeZone.getTimeZone("GMT-12");
-
-		TimeZone.setDefault(tzServer);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer));
-
-		WebClientInfo clientInfo = (WebClientInfo)tester.getSession().getClientInfo();
-		clientInfo.getProperties().setTimeZone(tzClient);
-
-		StyleDateConverter converter = new StyleDateConverter(true);
-
-		Calendar cal = Calendar.getInstance(tzClient);
-		cal.set(2011, 10, 5, 0, 0, 0);
-		cal.set(Calendar.MILLISECOND, 0);
-
-		Date dateRef = cal.getTime();
-		Date date = converter.convertToObject("05.11.2011", Locale.GERMANY);
-		log.debug("ref: " + dateRef.getTime() + "; converted: " + date.getTime());
-		log.debug("ref: " + dateRef + "; date: " + date);
-		assertEquals(dateRef, date);
-
-		TimeZone.setDefault(origJvmDef);
-		DateTimeZone.setDefault(origJodaDef);
-	}
-
-	/**
-	 * Validates the "value" tags of the &ltinput&gt fields for DateTimeField, DateField and
-	 * TimeField when they are given Date models containing Date instances.
-	 */
-	@Test
-	public void testDateFieldsWithDateModels()
-	{
-		TimeZone origJvmDef = TimeZone.getDefault();
-		DateTimeZone origJodaDef = DateTimeZone.getDefault();
-
-		TimeZone tzClient = TimeZone.getTimeZone("GMT-12");
-		TimeZone tzServer = TimeZone.getTimeZone("GMT+14");
-
-		TimeZone.setDefault(tzServer);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer));
-		WebClientInfo clientInfo = (WebClientInfo)tester.getSession().getClientInfo();
-		clientInfo.getProperties().setTimeZone(tzClient);
-
-		Calendar cal = Calendar.getInstance(tzServer);
-		cal.set(2011, 5, 15, 10, 30, 0);
-		cal.set(Calendar.MILLISECOND, 0);
-		Date date = cal.getTime();
-
-		DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT, Locale.GERMAN);
-		format.setTimeZone(tzClient);
-		String dateRefString = format.format(date);
-		cal.setTimeZone(tzClient);
-		String hoursRefString = Integer.toString(cal.get(Calendar.HOUR_OF_DAY));
-		String minutesRefString = Integer.toString(cal.get(Calendar.MINUTE));
-
-		DatesPage2 testPage = new DatesPage2();
-		testPage.dateTime = date;
-		testPage.date = date;
-		testPage.time = date;
-		tester.getSession().setLocale(Locale.GERMAN);
-		tester.startPage(testPage);
-
-		String dateTimeFieldDateValue = tester.getTagByWicketId("dateTimeField")
-			.getChild("wicket:id", "date")
-			.getAttribute("value");
-		assertEquals(dateRefString, dateTimeFieldDateValue);
-		String dateTimeFieldHoursValue = tester.getTagByWicketId("dateTimeField")
-			.getChild("wicket:id", "hours")
-			.getAttribute("value");
-		assertEquals(hoursRefString, dateTimeFieldHoursValue);
-		String dateTimeFieldMinutesValue = tester.getTagByWicketId("dateTimeField")
-			.getChild("wicket:id", "minutes")
-			.getAttribute("value");
-		assertEquals(minutesRefString, dateTimeFieldMinutesValue);
-		String dateFieldValue = tester.getTagByWicketId("dateField")
-			.getChild("wicket:id", "date")
-			.getAttribute("value");
-		assertEquals(dateRefString, dateFieldValue);
-		String timeFieldHoursValue = tester.getTagByWicketId("timeField")
-			.getChild("wicket:id", "hours")
-			.getAttribute("value");
-		assertEquals(hoursRefString, timeFieldHoursValue);
-		String timeFieldMinutesValue = tester.getTagByWicketId("timeField")
-			.getChild("wicket:id", "minutes")
-			.getAttribute("value");
-		assertEquals(minutesRefString, timeFieldMinutesValue);
-
-		TimeZone.setDefault(origJvmDef);
-		DateTimeZone.setDefault(origJodaDef);
-	}
-
-	/**
-	 * 
-	 * @throws ParseException
-	 */
-	@Test
-	public void testDates1() throws ParseException
-	{
-		log.debug("=========== testDates1() =================");
-		TimeZone tzClient = TimeZone.getTimeZone("America/Los_Angeles");
-		TimeZone tzServer = TimeZone.getTimeZone("Europe/Berlin");
-
-		TimeZone.setDefault(tzServer);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer));
-		Locale.setDefault(Locale.GERMANY);
-
-// Date orig = convertDate("06.11.2010", null, null, null, false, tzClient);
-// Date origJoda = convertDateJoda("06.11.2010", null, null, null, false, tzClient);
-		Date orig3 = convertDateNew("06.11.2010", null, null, null, false, tzClient);
-
-		MutableDateTime dt = new MutableDateTime(DateTimeZone.forTimeZone(tzClient));
-		dt.setDateTime(2010, 11, 6, 0, 0, 0, 0);
-		Date date = new Date(dt.getMillis());
-
-		log.debug(/* "actual: " + orig.getTime() + "; joda: " + origJoda.getTime() + */"; origNew: " +
-			orig3.getTime() + "; expected: " + date.getTime());
-		log.debug(/* "actual: " + orig + "; joda: " + origJoda + */"; origNew: " + orig3 +
-			"; expected: " + date);
-		assertEquals(date.getTime(), orig3.getTime());
-// assertEquals(date.getTime(), orig.getTime());
-// assertEquals(origJoda.getTime(), orig.getTime());
-	}
-
-	/**
-	 * 
-	 * @throws ParseException
-	 */
-	@Test
-	public void testDates2() throws ParseException
-	{
-		log.debug("=========== testDates2() =================");
-		TimeZone tzClient = TimeZone.getTimeZone("America/Los_Angeles");
-		TimeZone tzServer = TimeZone.getTimeZone("Europe/Berlin");
-
-		TimeZone.setDefault(tzServer);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer));
-		Locale.setDefault(Locale.GERMANY);
-
-// Date orig = convertDate("06.11.2010", 0, 0, AM_PM.AM, false, tzClient);
-// Date origJoda = convertDateJoda("06.11.2010", 0, 0, AM_PM.AM, false, tzClient);
-		Date orig3 = convertDateNew("06.11.2010", 0, 0, AM_PM.AM, false, tzClient);
-
-		MutableDateTime dt = new MutableDateTime(DateTimeZone.forTimeZone(tzClient));
-		dt.setDateTime(2010, 11, 6, 0, 0, 0, 0);
-		Date date = new Date(dt.getMillis());
-
-		log.debug(/* "actual: " + orig.getTime() + "; joda: " + origJoda.getTime() + */"; origNew: " +
-			orig3.getTime() + "; expected: " + date.getTime());
-		log.debug(/* "actual: " + orig + "; joda: " + origJoda + */"; origNew: " + orig3 +
-			"; expected: " + date);
-		assertEquals(date.getTime(), orig3.getTime());
-// assertEquals(date.getTime(), orig.getTime());
-// assertEquals(origJoda.getTime(), orig.getTime());
-	}
-
-	/**
-	 * 
-	 * @throws ParseException
-	 */
-	@Test
-	public void testDates3() throws ParseException
-	{
-		log.debug("=========== testDates3() =================");
-		TimeZone tzClient = TimeZone.getTimeZone("America/Los_Angeles");
-		TimeZone tzServer = TimeZone.getTimeZone("Europe/Berlin");
-
-		TimeZone.setDefault(tzServer);
-		DateTimeZone.setDefault(DateTimeZone.forTimeZone(tzServer));
-		Locale.setDefault(Locale.GERMANY);
-
-// Date orig = convertDate("06.11.2010", 12, 0, null, false, tzClient);
-// Date origJoda = convertDateJoda("06.11.2010", 12, 0, null, false, tzClient);
-		Date orig3 = convertDateNew("06.11.2010", 12, 0, null, false, tzClient);
-
-		MutableDateTime dt = new MutableDateTime(DateTimeZone.forTimeZone(tzClient));
-		dt.setDateTime(2010, 11, 6, 12, 0, 0, 0);
-		Date date = new Date(dt.getMillis());
-
-		log.debug(/* "actual: " + orig.getTime() + "; joda: " + origJoda.getTime() + */"; origNew: " +
-			orig3.getTime() + "; expected: " + date.getTime());
-		log.debug(/* "actual: " + orig + "; joda: " + origJoda + */"; origNew: " + orig3 +
-			"; expected: " + date);
-		assertEquals(date.getTime(), orig3.getTime());
-// assertEquals(date.getTime(), orig.getTime());
-// assertEquals(origJoda.getTime(), orig.getTime());
-	}
-
-	/**
-	 * Simulate what DateTimeField does
-	 * 
-	 * @param dateStr
-	 * @param hours
-	 * @param minutes
-	 * @param amOrPm
-	 * @param use12HourFormat
-	 * @param tzClient
-	 * @return Date
-	 * @throws ParseException
-	 */
-	public Date convertDate(final String dateStr, final Integer hours, final Integer minutes,
-		final AM_PM amOrPm, final boolean use12HourFormat, final TimeZone tzClient)
-		throws ParseException
-	{
-		log.debug(">>> convertDate()");
-		Date dateFieldInput = (dateStr != null ? DateFormat.getDateInstance().parse(dateStr) : null);
-
-		// Default to today, if date entry was invisible
-		final MutableDateTime date;
-		if (dateFieldInput != null)
-		{
-			log.debug("1. dateFieldInput: " + dateFieldInput.getTime() + "  " + dateFieldInput);
-			date = new MutableDateTime(dateFieldInput);
-		}
-		else
-		{
-			log.debug("1. dateFieldInput: null");
-			// Current date
-			date = new MutableDateTime();
-		}
-		log.debug("2. mutable date: " + date.getMillis() + "  " + date);
-
-		// always set secs to 0
-		date.setSecondOfMinute(0);
-		log.debug("3. secs = 0: " + date.getMillis() + "  " + date);
-
-		// The AM/PM field
-		if (use12HourFormat)
-		{
-			date.set(DateTimeFieldType.halfdayOfDay(), amOrPm == AM_PM.PM ? 1 : 0);
-		}
-		log.debug("4. AM/PM: " + date.getMillis() + "  " + date);
-
-		// The hours
-		if (hours == null)
-		{
-			date.setHourOfDay(0);
-		}
-		else
-		{
-			date.set(DateTimeFieldType.hourOfDay(), hours % (use12HourFormat ? 12 : 24));
-		}
-		log.debug("5. hours: " + date.getMillis() + "  " + date);
-
-		// The minutes
-		if (minutes == null)
-		{
-			date.setMinuteOfHour(0);
-		}
-		else
-		{
-			date.setMinuteOfHour(minutes);
-		}
-		log.debug("6. minutes: " + date.getMillis() + "  " + date);
-
-		// Use the client timezone to properly calculate the millisecs
-		if (tzClient != null)
-		{
-			date.setZoneRetainFields(DateTimeZone.forTimeZone(tzClient));
-			log.debug("7. zone: " + date.getMillis() + "  " + date);
-		}
-
-		Date rtn = new Date(date.getMillis());
-		log.debug("8. final date: " + rtn.getTime() + "  " + rtn);
-		return rtn;
-	}
-
-	/**
-	 * Simulate what DateTimeField does
-	 * 
-	 * @param dateStr
-	 * @param hours
-	 * @param minutes
-	 * @param amOrPm
-	 * @param use12HourFormat
-	 * @param tzClient
-	 * @return Date
-	 * @throws ParseException
-	 */
-	private Date convertDateNew(final String dateStr, final Integer hours, final Integer minutes,
-		final AM_PM amOrPm, final boolean use12HourFormat, final TimeZone tzClient)
-		throws ParseException
-	{
-		log.debug(">>> convertDateNew()");
-		// This is what I get from field.getConvertedInput()
-		Date dateFieldInput = (dateStr != null ? DateFormat.getDateInstance().parse(dateStr) : null);
-
-		// Default with "now"
-		if (dateFieldInput == null)
-		{
-			dateFieldInput = new Date();
-		}
-
-		// Get year, month and day ignoring any timezone of the Date object
-		Calendar cal = Calendar.getInstance();
-		cal.setTime(dateFieldInput);
-		int year = cal.get(Calendar.YEAR);
-		int month = cal.get(Calendar.MONTH) + 1;
-		int day = cal.get(Calendar.DAY_OF_MONTH);
-		int iHours = (hours == null ? 0 : hours % 24);
-		int iMins = (minutes == null ? 0 : minutes);
-
-		// Use the input to create a date object with proper timezone
-		MutableDateTime date = new MutableDateTime(year, month, day, iHours, iMins, 0, 0,
-			DateTimeZone.forTimeZone(tzClient));
-
-		// Use the input to create a date object. Ignore the timezone provided by dateFieldInput and
-		// use tzClient instead. No re-calculation will happen. It should be the same as above.
-// MutableDateTime date = new MutableDateTime(dateFieldInput,
-// DateTimeZone.forTimeZone(tzClient));
-		log.debug("1. date: " + date.getMillis() + "  " + date);
-
-		// Adjust for halfday if needed
-		int halfday;
-		if (use12HourFormat)
-		{
-			halfday = (amOrPm == AM_PM.PM ? 1 : 0);
-			date.set(DateTimeFieldType.halfdayOfDay(), halfday);
-			date.set(DateTimeFieldType.hourOfDay(), iHours % 12);
-		}
-		log.debug("2. halfday adjustments: " + date.getMillis() + "  " + date);
-
-		Date rtn = new Date(date.getMillis());
-		log.debug("3. final date: " + rtn.getTime() + "  " + rtn);
-		return rtn;
-	}
-
-	/**
-	 * Simulate what DateTimeField does
-	 * 
-	 * @param dateStr
-	 * @param hours
-	 * @param minutes
-	 * @param amOrPm
-	 * @param use12HourFormat
-	 * @param tzClient
-	 * @return Date
-	 * @throws ParseException
-	 */
-	private Date convertDateJoda(final String dateStr, final Integer hours, final Integer minutes,
-		final AM_PM amOrPm, final boolean use12HourFormat, final TimeZone tzClient)
-		throws ParseException
-	{
-		log.debug(">>> convertDateJoda()");
-
-		DateTimeFormatter fmt = DateTimeFormat.shortDate();
-		// fmt.withZone(timeZone).parseDateTime("10/1/06 5:00 AM");
-		MutableDateTime date = (dateStr != null ? fmt.parseMutableDateTime(dateStr)
-			: new MutableDateTime());
-
-		log.debug("1. mutable date: " + date.getMillis() + "  " + date);
-
-		// always set secs to 0
-		date.setSecondOfMinute(0);
-		log.debug("2. secs = 0: " + date.getMillis() + "  " + date);
-
-		// The AM/PM field
-		if (use12HourFormat)
-		{
-			date.set(DateTimeFieldType.halfdayOfDay(), amOrPm == AM_PM.PM ? 1 : 0);
-		}
-		log.debug("3. AM/PM: " + date.getMillis() + "  " + date);
-
-		// The hours
-		if (hours == null)
-		{
-			date.setHourOfDay(0);
-		}
-		else
-		{
-			date.set(DateTimeFieldType.hourOfDay(), hours % (use12HourFormat ? 12 : 24));
-		}
-		log.debug("4. hours: " + date.getMillis() + "  " + date);
-
-		// The minutes
-		if (minutes == null)
-		{
-			date.setMinuteOfHour(0);
-		}
-		else
-		{
-			date.setMinuteOfHour(minutes);
-		}
-		log.debug("5. minutes: " + date.getMillis() + "  " + date);
-
-		// Use the client timezone to properly calculate the millisecs
-		if (tzClient != null)
-		{
-			date.setZoneRetainFields(DateTimeZone.forTimeZone(tzClient));
-		}
-		log.debug("6. timezone: " + date.getMillis() + "  " + date);
-
-		Date rtn = new Date(date.getMillis());
-		log.debug("7. final date: " + rtn.getTime() + "  " + rtn);
-		return rtn;
-	}
-
-	/**
-	 * Use <code>-Dwicket.replace.expected.results=true</code> to automatically replace the expected
-	 * output file.
-	 * 
-	 * @param <T>
-	 * 
-	 * @param pageClass
-	 * @param filename
-	 * @throws Exception
-	 */
-	protected <T extends Page> void myTestExecution(final Class<T> pageClass, final String filename)
-		throws Exception
-	{
-		System.out.println("=== " + pageClass.getName() + " ===");
-
-		tester.getSession().setLocale(Locale.ITALIAN);
-		tester.startPage(pageClass);
-		tester.assertRenderedPage(pageClass);
-
-		String document = tester.getLastResponseAsString();
-		document = document.replaceAll("\\d\\d\\.\\d\\d\\.\\d\\d", "xx.xx.xx");
-		document = document.replaceAll("\\d\\d/\\d\\d/\\d\\d\\d\\d", "xx/xx/xxxx");
-		document = document.replaceAll("\\d\\d/\\d\\d/\\d\\d", "xx/xx/xx");
-		document = document.replaceAll("\\d\\d/\\d\\d\\d\\d", "xx/xxxx");
-
-		DiffUtil.validatePage(document, pageClass, filename, true);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DateTimeFieldTest.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DateTimeFieldTest.java b/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DateTimeFieldTest.java
deleted file mode 100644
index c5f636b..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DateTimeFieldTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.wicket.extensions.yui.calendar;
-
-import java.util.TimeZone;
-
-import org.apache.wicket.model.Model;
-import org.apache.wicket.util.tester.WicketTestCase;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Tests for DateTimeField
- */
-public class DateTimeFieldTest extends WicketTestCase
-{
-	/**
-	 * https://issues.apache.org/jira/browse/WICKET-5204
-	 */
-	@Test
-	public void testTimeZones()
-	{
-		DateTimeZone defaultTimeZone = DateTimeZone.getDefault();
-
-		try
-		{
-			// The server is using UTC as it's default timezone
-			DateTimeZone.setDefault(DateTimeZone.forID("UTC"));
-
-			final String clientTimezone = "America/Toronto";
-
-			DateTime jan01_10am = new DateTime(2013, 01, 01, 10, 0, 0,
-				DateTimeZone.forID(clientTimezone));
-
-			DateTimeField dateTimeField = new DateTimeField("foo", Model.of(jan01_10am.toDate()))
-			{
-				@Override
-				protected TimeZone getClientTimeZone()
-				{
-					return TimeZone.getTimeZone(clientTimezone);
-				}
-			};
-
-			tester.startComponentInPage(dateTimeField);
-
-			Assert.assertEquals("The hour of day is incorrect!", jan01_10am.getHourOfDay(),
-				dateTimeField.getHours().intValue());
-		}
-		finally
-		{
-			DateTimeZone.setDefault(defaultTimeZone);
-		}
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1.html
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1.html b/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1.html
deleted file mode 100644
index 2288856..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>Wicket Examples - dates</title>
-<link rel="stylesheet" type="text/css" href="style.css" />
-<style type="text/css">
-th {
-	color: grey;
-}
-</style>
-</head>
-<body>
-<form wicket:id="localeForm">
-<p><select wicket:id="localeSelect" /> [<a href="#"
-	wicket:id="localeUSLink">set to english</a>]</p>
-</form>
-<p>
-<form wicket:id="form"><input type="text"
-	wicket:id="dateTextField" /> <input type="submit" value="submit" /></form>
-</p>
-<p>
-	<div wicket:id="feedback"></div>
-</p>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1.java b/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1.java
deleted file mode 100644
index a632e97..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * 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.wicket.extensions.yui.calendar;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-
-import org.apache.wicket.Session;
-import org.apache.wicket.datetime.StyleDateConverter;
-import org.apache.wicket.datetime.markup.html.form.DateTextField;
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.form.ChoiceRenderer;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.form.FormComponentUpdatingBehavior;
-import org.apache.wicket.markup.html.link.Link;
-import org.apache.wicket.markup.html.panel.FeedbackPanel;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.PropertyModel;
-
-/**
- * Demonstrates components from the wicket-date project and a bunch of locale fiddling.
- */
-public class DatesPage1 extends WebPage
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Choice for a locale.
-	 */
-	private final class LocaleChoiceRenderer extends ChoiceRenderer<Locale>
-	{
-		private static final long serialVersionUID = 1L;
-
-		/**
-		 * Constructor.
-		 */
-		public LocaleChoiceRenderer()
-		{
-		}
-
-		/**
-		 * @see org.apache.wicket.markup.html.form.IChoiceRenderer#getDisplayValue(Object)
-		 */
-		@Override
-		public Object getDisplayValue(Locale locale)
-		{
-			String enName = locale.getDisplayName(LOCALE_EN);
-			String localizedName = locale.getDisplayName(selectedLocale);
-			return localizedName + (!enName.equals(localizedName) ? (" (" + enName + ")") : "");
-		}
-	}
-
-	/**
-	 * Dropdown with Locales.
-	 */
-	private final class LocaleDropDownChoice extends DropDownChoice<Locale>
-	{
-		private static final long serialVersionUID = 1L;
-
-		/**
-		 * Construct.
-		 * 
-		 * @param id
-		 *            component id
-		 */
-		public LocaleDropDownChoice(String id)
-		{
-			super(id);
-			// sort locales on strings of selected locale
-			setChoices(new IModel<List<Locale>>()
-			{
-				private static final long serialVersionUID = 1L;
-
-				@Override
-				public List<Locale> getObject()
-				{
-					getSelectedLocale();
-					List<Locale> locales = new ArrayList<>(LOCALES);
-					Collections.sort(locales, new Comparator<Locale>()
-					{
-						@Override
-						public int compare(Locale o1, Locale o2)
-						{
-							return o1.getDisplayName(selectedLocale).compareTo(
-								o2.getDisplayName(selectedLocale));
-						}
-					});
-					return locales;
-				}
-			});
-			setChoiceRenderer(new LocaleChoiceRenderer());
-			setDefaultModel(new PropertyModel<>(DatesPage1.this, "selectedLocale"));
-			
-			add(new FormComponentUpdatingBehavior());
-		}
-
-		@Override
-		public String getModelValue()
-		{
-			return super.getModelValue();
-		}
-	}
-
-	private static final Locale LOCALE_EN = new Locale("en");
-
-	private static final List<Locale> LOCALES;
-	static
-	{
-		LOCALES = Arrays.asList(Locale.CANADA, Locale.CANADA_FRENCH, Locale.CHINA, Locale.ENGLISH,
-			Locale.FRANCE, Locale.FRENCH, Locale.GERMAN, Locale.GERMANY, Locale.ITALIAN,
-			Locale.ITALY, Locale.JAPAN, Locale.JAPANESE, Locale.KOREA, Locale.KOREAN, Locale.PRC,
-			Locale.SIMPLIFIED_CHINESE, Locale.TAIWAN, Locale.TRADITIONAL_CHINESE, Locale.UK,
-			Locale.US);
-	}
-
-	private final Date date = new Date();
-
-	private Locale selectedLocale = LOCALE_EN;
-
-	/**
-	 * Constructor
-	 */
-	public DatesPage1()
-	{
-		selectedLocale = Session.get().getLocale();
-		Form<?> localeForm = new Form<>("localeForm");
-		localeForm.add(new LocaleDropDownChoice("localeSelect"));
-		localeForm.add(new Link<Void>("localeUSLink")
-		{
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			public void onClick()
-			{
-				selectedLocale = LOCALE_EN;
-			}
-		});
-		add(localeForm);
-		DateTextField dateTextField = new DateTextField("dateTextField", new PropertyModel<Date>(
-			this, "date"), new StyleDateConverter("S-", true))
-		{
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			public Locale getLocale()
-			{
-				return selectedLocale;
-			}
-		};
-		Form<?> form = new Form<Void>("form")
-		{
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			protected void onSubmit()
-			{
-				info("set date to " + date);
-			}
-		};
-		add(form);
-		form.add(dateTextField);
-		dateTextField.add(new DatePicker());
-		add(new FeedbackPanel("feedback"));
-	}
-
-	/**
-	 * @return the selected locale
-	 */
-	public final Locale getSelectedLocale()
-	{
-		return selectedLocale;
-	}
-
-	/**
-	 * @param selectedLocale
-	 */
-	public final void setSelectedLocale(Locale selectedLocale)
-	{
-		this.selectedLocale = selectedLocale;
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1_ExpectedResult.html
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1_ExpectedResult.html b/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1_ExpectedResult.html
deleted file mode 100644
index 907ce6c..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage1_ExpectedResult.html
+++ /dev/null
@@ -1,142 +0,0 @@
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head><script type="text/javascript" src="../resource/org.apache.wicket.extensions.yui.YuiLib/yuiloader/yuiloader.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4.js"></script>
-<script type="text/javascript" src="../resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-event-jquery.js"></script>
-
-<title>Wicket Examples - dates</title>
-<link rel="stylesheet" type="text/css" href="../../style.css"/>
-<style type="text/css">
-/*<![CDATA[*/
-
-th {
-	color: grey;
-}
-
-/*]]>*/
-</style>
-<script type="text/javascript" >
-/*<![CDATA[*/
-Wicket.Event.add(window, "domready", function(event) { 
-/*
- * 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.
- */
-if (typeof(Wicket) === 'undefined') {
-	window.Wicket = {};
-}
-if (typeof(Wicket.DateTimeInit) === 'undefined') {
-	Wicket.DateTimeInit = {};
-}
-
-Wicket.DateTimeInit.CalendarInits = [];
-Wicket.DateTimeInit.CalendarInitFinished = false;
-Wicket.DateTimeInit.CalendarI18n = {};
-Wicket.DateTimeInit.CalendarAdd = function(initFn) {
-	if (Wicket.DateTimeInit.CalendarInitFinished) {
-		// when a DatePicker is added via ajax, the loader is already finished, so
-		// we call the init function directly.
-		initFn();
-	} else {
-		// when page is rendered, all calendar components will be initialized after
-		// the required js libraries have been loaded.
-		Wicket.DateTimeInit.CalendarInits.push(initFn);
-	}
-};
-
-Wicket.DateTimeInit.YuiLoader = new YAHOO.util.YUILoader({
-	base: "../resource/org.apache.wicket.extensions.yui.YuiLib/",
-	filter: "RAW",
-	allowRollup: false,
-	require: ["wicket-date"],
-	onSuccess: function() {
-		Wicket.DateTimeInit.CalendarInitFinished = true;
-		while (Wicket.DateTimeInit.CalendarInits.length > 0) {
-			Wicket.DateTimeInit.CalendarInits.pop()();
-		}
-	}
-});
-Wicket.DateTimeInit.YuiLoader.addModule({
-	name: "wicket-date",
-	type: "js",
-	requires: ["calendar"],
-	fullpath: "../resource/org.apache.wicket.extensions.yui.calendar.DatePicker/wicket-date.js"
-});
-Wicket.DateTimeInit.YuiLoader.insert();
-;
-Wicket.DateTimeInit.CalendarI18n["it"]={MONTHS_SHORT:["gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic"],MONTHS_LONG:["gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre"],WEEKDAYS_MEDIUM:["dom","lun","mar","mer","gio","ven","sab"],WEEKDAYS_LONG:["domenica","luned\u00EC","marted\u00EC","mercoled\u00EC","gioved\u00EC","venerd\u00EC","sabato"],START_WEEKDAY:1,WEEKDAYS_1CHAR:["d","l","m","m","g","v","s"],WEEKDAYS_SHORT:["do","lu","ma","me","gi","ve","sa"]};;
-/*
- * 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.
- */
-Wicket.DateTimeInit.CalendarAdd(function() {
-	Wicket.DateTime.init2("dateTextField1", "dateTextField1", {close:true,selected:"xx/xx/xxxx",pagedate:"xx/xxxx"}, "dd/MM/yy",
-			true, true, true, false, Wicket.DateTimeInit.CalendarI18n["it"], false, "");
-	
-});
-;
-Wicket.Event.publish(Wicket.Event.Topic.AJAX_HANDLERS_BOUND);
-;});
-/*]]>*/
-</script>
-</head>
-<body>
-<form wicket:id="localeForm" id="localeForm2" method="post" action="./org.apache.wicket.extensions.yui.calendar.DatesPage1?0-1.-localeForm">
-<p><select wicket:id="localeSelect" name="localeSelect" onchange="if (event.target.name !== &#039;localeSelect&#039;) return; var f = document.getElementById(&#039;localeForm2&#039;); f.action=&#039;./org.apache.wicket.extensions.yui.calendar.DatesPage1?0-1.0-localeForm-localeSelect&#039;;f.submit();">
-<option value="0">cinese (Cina) (Chinese (China))</option>
-<option value="1">cinese (Cina) (Chinese (China))</option>
-<option value="2">cinese (Cina) (Chinese (China))</option>
-<option value="3">cinese (Taiwan) (Chinese (Taiwan))</option>
-<option value="4">cinese (Taiwan) (Chinese (Taiwan))</option>
-<option value="5">coreano (Korean)</option>
-<option value="6">coreano (Corea del Sud) (Korean (South Korea))</option>
-<option value="7">francese (French)</option>
-<option value="8">francese (Canada) (French (Canada))</option>
-<option value="9">francese (Francia) (French (France))</option>
-<option value="10">giapponese (Japanese)</option>
-<option value="11">giapponese (Giappone) (Japanese (Japan))</option>
-<option value="12">inglese (English)</option>
-<option value="13">inglese (Canada) (English (Canada))</option>
-<option value="14">inglese (Regno Unito) (English (United Kingdom))</option>
-<option value="15">inglese (Stati Uniti) (English (United States))</option>
-<option selected="selected" value="16">italiano (Italian)</option>
-<option value="17">italiano (Italia) (Italian (Italy))</option>
-<option value="18">tedesco (German)</option>
-<option value="19">tedesco (Germania) (German (Germany))</option>
-</select> [<a href="./org.apache.wicket.extensions.yui.calendar.DatesPage1?0-1.-localeForm-localeUSLink" wicket:id="localeUSLink">set to english</a>]</p>
-</form>
-<p>
-<form wicket:id="form" id="form3" method="post" action="./org.apache.wicket.extensions.yui.calendar.DatesPage1?0-1.-form"><input type="text" wicket:id="dateTextField" value="xx/xx/xx" name="dateTextField" id="dateTextField1"/>
-<span class="yui-skin-sam">&nbsp;<span style="display:none;position:absolute;z-index: 99999;" id="dateTextField1Dp"></span><img style="cursor: pointer; border: none;" id="dateTextField1Icon" src="../resource/org.apache.wicket.extensions.yui.calendar.DatePicker/icon1.gif" alt="" title=""/></span> <input type="submit" value="submit" /></form>
-</p>
-<p>
-	<div wicket:id="feedback"><wicket:panel>
-  
-</wicket:panel></div>
-</p>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage2.html
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage2.html b/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage2.html
deleted file mode 100644
index 09bde3a..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage2.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html>
-<body>
-  <form wicket:id="form">
-    <span wicket:id="dateTimeField">[dateTime field]</span>
-    <span wicket:id="dateField">[date field]</span>
-    <span wicket:id="timeField">[time field]</span> 
-    <input type="submit" value="submit" />
-  </form>
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage2.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage2.java b/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage2.java
deleted file mode 100644
index 827d10d..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/extensions/yui/calendar/DatesPage2.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * 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.wicket.extensions.yui.calendar;
-
-import java.util.Date;
-
-import org.apache.wicket.markup.html.WebPage;
-import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.model.PropertyModel;
-
-/**
- * Demonstrates components from the wicket-date project and a bunch of locale fiddling.
- */
-public class DatesPage2 extends WebPage
-{
-	private static final long serialVersionUID = 1L;
-
-	/** */
-	public Date dateTime;
-
-	/** */
-	public Date date;
-
-	/** */
-	public Date time;
-
-	/**
-	 * Constructor
-	 */
-	public DatesPage2()
-	{
-		Form<?> form = new Form<>("form");
-		add(form);
-
-		form.add(new DateTimeField("dateTimeField", new PropertyModel<Date>(this, "dateTime")));
-		form.add(new DateField("dateField", new PropertyModel<Date>(this, "date")));
-		form.add(new TimeField("timeField", new PropertyModel<Date>(this, "time")));
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java b/wicket-datetime/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
deleted file mode 100644
index 23887a3..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/util/license/ApacheLicenceHeaderTest.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.wicket.util.license;
-
-/**
- * Test that the license headers are in place in this project. The tests are run from
- * {@link ApacheLicenseHeaderTestCase}, but you can add project specific tests here if needed.
- * 
- * @author Frank Bille Jensen (frankbille)
- */
-public class ApacheLicenceHeaderTest extends ApacheLicenseHeaderTestCase
-{
-	/**
-	 * Construct.
-	 */
-	public ApacheLicenceHeaderTest()
-	{
-		// addHeaders = true;
-
-		/*
-		 * See NOTICE.txt
-		 */
-		htmlIgnore.add("src/main/java/org/apache/wicket/util/diff");
-
-		/*
-		 * YUI lib. See NOTICE
-		 */
-		cssIgnore.add("src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css");
-		cssIgnore.add("src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css");
-
-		/*
-		 * YUI lib. See NOTICE
-		 */
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader-min.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo-min.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/event/event.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/event/event-min.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/dom/dom.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/dom/dom-min.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/calendar/calendar.js");
-		javaScriptIgnore.add("src/main/java/org/apache/wicket/extensions/yui/calendar/calendar-min.js");
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/test/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTest.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/test/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTest.java b/wicket-datetime/src/test/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTest.java
deleted file mode 100644
index a8e7628..0000000
--- a/wicket-datetime/src/test/java/org/apache/wicket/util/markup/xhtml/WellFormedXmlTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * 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.wicket.util.markup.xhtml;
-
-import org.junit.Test;
-
-/**
- * Checks that the html markup files are well formed xml-s.
- * 
- * @author akiraly
- */
-public class WellFormedXmlTest extends WellFormedXmlTestCase
-{
-	@Test
-	@Override
-	public void markupFiles()
-	{
-		super.markupFiles();
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/.tomcatplugin
----------------------------------------------------------------------
diff --git a/wicket-examples/.tomcatplugin b/wicket-examples/.tomcatplugin
index d0a1479..75ef825 100644
--- a/wicket-examples/.tomcatplugin
+++ b/wicket-examples/.tomcatplugin
@@ -10,7 +10,6 @@
     <webPath>/wicket</webPath>
     <webClassPathEntries>
         <webClassPathEntry>/wicket-auth-roles/target/classes</webClassPathEntry>
-        <webClassPathEntry>/wicket-datetime/target/classes</webClassPathEntry>
         <webClassPathEntry>/wicket-examples/target/classes</webClassPathEntry>
         <webClassPathEntry>/wicket-extensions/target/classes</webClassPathEntry>
         <webClassPathEntry>/wicket-guice/target/classes</webClassPathEntry>
@@ -28,7 +27,6 @@
         <webClassPathEntry>M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar</webClassPathEntry>
         <webClassPathEntry>M2_REPO/easymock/easymock/1.2_Java1.3/easymock-1.2_Java1.3.jar</webClassPathEntry>
         <webClassPathEntry>M2_REPO/javax/portlet/portlet-api/1.0/portlet-api-1.0.jar</webClassPathEntry>
-        <webClassPathEntry>M2_REPO/joda-time/joda-time/1.4/joda-time-1.4.jar</webClassPathEntry>
         <webClassPathEntry>M2_REPO/jtidy/jtidy/4aug2000r7-dev/jtidy-4aug2000r7-dev.jar</webClassPathEntry>
         <webClassPathEntry>M2_REPO/log4j/log4j/1.2.13/log4j-1.2.13.jar</webClassPathEntry>
         <webClassPathEntry>M2_REPO/logkit/logkit/1.0.1/logkit-1.0.1.jar</webClassPathEntry>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/pom.xml
----------------------------------------------------------------------
diff --git a/wicket-examples/pom.xml b/wicket-examples/pom.xml
index 76366e2..7849780 100644
--- a/wicket-examples/pom.xml
+++ b/wicket-examples/pom.xml
@@ -31,32 +31,32 @@
 		action.
 	</description>
 
-    <properties>
-        <docker-maven-plugin.version>1.0.0</docker-maven-plugin.version>
-    </properties>
+	<properties>
+		<docker-maven-plugin.version>1.0.0</docker-maven-plugin.version>
+	</properties>
 
 	<dependencyManagement>
-    	<dependencies>
-    		<dependency>
-    			<groupId>com.github.axet</groupId>
-    			<artifactId>kaptcha</artifactId>
-    			<version>0.0.9</version>
-    		</dependency>
-    		<dependency>
-    			<groupId>com.github.cage</groupId>
-    			<artifactId>cage</artifactId>
-    			<version>1.0</version>
-    		</dependency>
-    		<dependency>
-    			<groupId>org.codelibs</groupId>
-    			<artifactId>jhighlight</artifactId>
-    			<version>1.0.3</version>
-    			<exclusions>
-    				<exclusion>
-    					<groupId>javax.servlet</groupId>
-    					<artifactId>servlet-api</artifactId>
-    				</exclusion>
-    			</exclusions>
+		<dependencies>
+			<dependency>
+				<groupId>com.github.axet</groupId>
+				<artifactId>kaptcha</artifactId>
+				<version>0.0.9</version>
+			</dependency>
+			<dependency>
+				<groupId>com.github.cage</groupId>
+				<artifactId>cage</artifactId>
+				<version>1.0</version>
+			</dependency>
+			<dependency>
+				<groupId>org.codelibs</groupId>
+				<artifactId>jhighlight</artifactId>
+				<version>1.0.3</version>
+				<exclusions>
+					<exclusion>
+						<groupId>javax.servlet</groupId>
+						<artifactId>servlet-api</artifactId>
+					</exclusion>
+				</exclusions>
 			</dependency>
 		</dependencies>
 	</dependencyManagement>
@@ -120,10 +120,6 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.wicket</groupId>
-			<artifactId>wicket-datetime</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.wicket</groupId>
 			<artifactId>wicket-devutils</artifactId>
 		</dependency>
 		<dependency>
@@ -146,10 +142,10 @@
 			<groupId>org.apache.wicket</groupId>
 			<artifactId>wicket-velocity</artifactId>
 		</dependency>
-        <dependency>
-            <groupId>org.apache.wicket</groupId>
-            <artifactId>wicket-native-websocket-javax</artifactId>
-        </dependency>
+		<dependency>
+			<groupId>org.apache.wicket</groupId>
+			<artifactId>wicket-native-websocket-javax</artifactId>
+		</dependency>
 		<dependency>
 			<groupId>org.codelibs</groupId>
 			<artifactId>jhighlight</artifactId>
@@ -239,38 +235,38 @@
 		</plugins>
 		<pluginManagement>
 			<plugins>
-    			<plugin>
-    				<groupId>org.apache.maven.plugins</groupId>
-    				<artifactId>maven-javadoc-plugin</artifactId>
-    				<configuration>
-    					<skip>true</skip>
-    				</configuration>
-    			</plugin>
-    			<plugin>
-    				<groupId>org.apache.maven.plugins</groupId>
-    				<artifactId>maven-war-plugin</artifactId>
-    				<configuration>
-    					<!--  include the manifest entries so that we can emit the version of the examples. -->
-    					<archive>
-    						<manifest>
-    							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-    							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
-    						</manifest>
-    					</archive>
-    				</configuration>
-    			</plugin>
-    			<plugin>
-    				<groupId>org.mortbay.jetty</groupId>
-    				<artifactId>jetty-maven-plugin</artifactId>
-                    <version>${jetty.version}</version>
-                    <dependencies>
-                		<dependency>
-                			<groupId>javax.validation</groupId>
-                			<artifactId>validation-api</artifactId>
-                			<version>1.1.0.Final</version>
-                		</dependency>
-                    </dependencies>
-    			</plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-javadoc-plugin</artifactId>
+					<configuration>
+						<skip>true</skip>
+					</configuration>
+				</plugin>
+				<plugin>
+					<groupId>org.apache.maven.plugins</groupId>
+					<artifactId>maven-war-plugin</artifactId>
+					<configuration>
+						<!--  include the manifest entries so that we can emit the version of the examples. -->
+						<archive>
+							<manifest>
+								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+								<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
+							</manifest>
+						</archive>
+					</configuration>
+				</plugin>
+				<plugin>
+					<groupId>org.mortbay.jetty</groupId>
+					<artifactId>jetty-maven-plugin</artifactId>
+					<version>${jetty.version}</version>
+					<dependencies>
+						<dependency>
+							<groupId>javax.validation</groupId>
+							<artifactId>validation-api</artifactId>
+							<version>1.1.0.Final</version>
+						</dependency>
+					</dependencies>
+				</plugin>
 			</plugins>
 		</pluginManagement>
 	</build>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.html b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.html
index c5e8099..528940e 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.html
@@ -2,11 +2,11 @@
 <html xmlns:wicket="http://wicket.apache.org">
 	<head>
 		<title>This is modal window</title>
-		<style type="text/css">			
+		<style type="text/css">
 			body {
 				font-family: verdana, sans-serif;
 				font-size: 82%;
-				background-color: white;				
+				background-color: white;
 			}
 		</style>
 	</head>	
@@ -18,13 +18,11 @@
 		</p>
 		<p>
 			<div wicket:id="modal"></div>
-			<a wicket:id="open">Open another modal dialog</a>			
+			<a wicket:id="open">Open another modal dialog</a>
 		</p>
-		  
 		<p>
-		  <div>An example of a component that uses header contributions</div>
-		  <div wicket:id="dateTimeField" />
+			<div>An example of a component that uses header contributions</div>
+			<div wicket:id="dateTimeField" />
 		</p>
-		  
 	</body>
 </html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
index eb9d800..5c252e4 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
@@ -20,7 +20,7 @@ import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.extensions.yui.calendar.DateTimeField;
+import org.apache.wicket.extensions.markup.html.form.datetime.DateTimeField;
 import org.apache.wicket.markup.html.WebPage;
 
 
@@ -30,6 +30,7 @@ import org.apache.wicket.markup.html.WebPage;
  */
 public class ModalContent1Page extends WebPage
 {
+	private static final long serialVersionUID = 1L;
 
 	/**
 	 * 
@@ -40,6 +41,8 @@ public class ModalContent1Page extends WebPage
 	{
 		add(new AjaxLink<Void>("closeOK")
 		{
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public void onClick(AjaxRequestTarget target)
 			{
@@ -51,6 +54,8 @@ public class ModalContent1Page extends WebPage
 
 		add(new AjaxLink<Void>("closeCancel")
 		{
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public void onClick(AjaxRequestTarget target)
 			{
@@ -85,6 +90,8 @@ public class ModalContent1Page extends WebPage
 
 		add(new AjaxLink<Void>("open")
 		{
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public void onClick(AjaxRequestTarget target)
 			{

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent2Page.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent2Page.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent2Page.java
index 0189a93..4b668ac 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent2Page.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent2Page.java
@@ -28,6 +28,7 @@ import org.apache.wicket.markup.html.WebPage;
  */
 public class ModalContent2Page extends WebPage
 {
+	private static final long serialVersionUID = 1L;
 
 	/**
 	 * @param window

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
index 6a5f5ab..3a9389a 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
@@ -16,9 +16,7 @@
  */
 package org.apache.wicket.examples.ajax.builtin.modal;
 
-import java.util.Map;
-
-import org.apache.wicket.extensions.yui.calendar.DateTimeField;
+import org.apache.wicket.extensions.markup.html.form.datetime.DateTimeField;
 import org.apache.wicket.markup.html.panel.Panel;
 
 /**
@@ -26,6 +24,7 @@ import org.apache.wicket.markup.html.panel.Panel;
  */
 public class ModalPanel1 extends Panel
 {
+	private static final long serialVersionUID = 1L;
 
 	/**
 	 * @param id
@@ -33,20 +32,6 @@ public class ModalPanel1 extends Panel
 	public ModalPanel1(String id)
 	{
 		super(id);
-
-		add(new DateTimeField("dateTimeField")
-		{
-			/**
-			 * @see org.apache.wicket.extensions.yui.calendar.DateTimeField#configure(java.util.Map)
-			 */
-			@Override
-			protected void configure(Map<String, Object> widgetProperties)
-			{
-				super.configure(widgetProperties);
-				// IE 6 breaks layout with iframe - is that a YUI bug?
-				widgetProperties.put("iframe", false);
-			}
-		});
+		add(new DateTimeField("dateTimeField"));
 	}
-
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalWindowPage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalWindowPage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalWindowPage.java
index 7de1620..f8376ff 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalWindowPage.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalWindowPage.java
@@ -29,6 +29,8 @@ import org.apache.wicket.model.PropertyModel;
  */
 public class ModalWindowPage extends BasePage
 {
+	private static final long serialVersionUID = 1L;
+
 	public ModalWindowPage()
 	{
 		final Label result;
@@ -53,6 +55,8 @@ public class ModalWindowPage extends BasePage
 
 		add(new AjaxLink<Void>("showModal1")
 		{
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public void onClick(AjaxRequestTarget target)
 			{
@@ -80,6 +84,8 @@ public class ModalWindowPage extends BasePage
 
 		add(new AjaxLink<Void>("showModal2")
 		{
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			public void onClick(AjaxRequestTarget target)
 			{

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html
index a459fd9..db04a1c 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html
@@ -5,15 +5,17 @@
 <style>
 	.note { font-size:.8em; }
 	.required {font-weight: bold;}
+	table {border-collapse: collapse; border-spacing: 0;}
+	th, td {padding: 4px;}
 </style>
 </head>
 <body>
-	<span wicket:id="mainNavigation" />
+	<span wicket:id="mainNavigation"></span>
 
 	<div wicket:id="feedbackErrors"></div>
-	
+
 	<form wicket:id="form" novalidate="novalidate">
-		<table cellspacing="0" cellpadding="4">
+		<table style="border-collapse: collapse; border-spacing: 0;">
 			<tr>
 				<td><label wicket:for="name"><wicket:label>Name</wicket:label></label></td>
 				<td><input wicket:id="name" type="text" size="30"/></td>
@@ -35,11 +37,12 @@
 				<td><pre class="note">m/d/yyyy field with @Past</pre></td>
 			</tr>
 			<tr>
-                <td><label wicket:for="password"><wicket:label>Password</wicket:label></label></td>
-                <td><input wicket:id="password" type="text" size="10"/></td>
-                <td><pre class="note">Custom constraint @ValidPassword with custom message bundles.<br/>A valid password must contain only alphanumeric chars and at least two digits.</pre>
-                </td>
-            </tr>
+				<td><label wicket:for="password"><wicket:label>Password</wicket:label></label></td>
+				<td><input wicket:id="password" type="text" size="10"/></td>
+				<td>
+					<pre class="note">Custom constraint @ValidPassword with custom message bundles.<br/>A valid password must contain only alphanumeric chars and at least two digits.</pre>
+				</td>
+			</tr>
 			<tr>
 				<td></td>
 				<td>
@@ -49,6 +52,6 @@
 			</tr>
 		</table>
 	</form>
-    <div wicket:id="feedbackSuccess"></div>
+	<div wicket:id="feedbackSuccess"></div>
 </body>
 </html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java
index faec290..e1eb59d 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java
@@ -17,8 +17,8 @@
 package org.apache.wicket.examples.bean.validation;
 
 import org.apache.wicket.bean.validation.PropertyValidator;
-import org.apache.wicket.datetime.StyleDateConverter;
-import org.apache.wicket.datetime.markup.html.form.DateTextField;
+import org.apache.wicket.extensions.markup.html.form.datetime.DateField;
+import org.apache.wicket.extensions.markup.html.form.datetime.StyleDateConverter;
 import org.apache.wicket.examples.WicketExamplePage;
 import org.apache.wicket.feedback.ExactLevelFeedbackMessageFilter;
 import org.apache.wicket.feedback.FeedbackMessage;
@@ -29,7 +29,7 @@ import org.apache.wicket.model.PropertyModel;
 
 public class BeanValidationPage extends WicketExamplePage
 {
-
+	private static final long serialVersionUID = 1L;
 	Person person = new Person();
 
 	public BeanValidationPage()
@@ -37,6 +37,8 @@ public class BeanValidationPage extends WicketExamplePage
 		add(new FeedbackPanel("feedbackErrors", new ExactLevelFeedbackMessageFilter(FeedbackMessage.ERROR)));
 
 		Form<?> form = new Form<Void>("form") {
+			private static final long serialVersionUID = 1L;
+
 			@Override
 			protected void onSubmit()
 			{
@@ -50,8 +52,8 @@ public class BeanValidationPage extends WicketExamplePage
 		form.add(new TextField<>("name", new PropertyModel<String>(this, "person.name")).add(new PropertyValidator<>()));
 		form.add(new TextField<>("phone", new PropertyModel<String>(this, "person.phone")).add(new PropertyValidator<>()));
 		form.add(new TextField<>("email", new PropertyModel<String>(this, "person.email")).add(new PropertyValidator<>()));
-		form.add(new DateTextField("birthdate", new PropertyModel<>(this, "person.birthdate"),
-			new StyleDateConverter("S-", true)).add(new PropertyValidator<>()));
+		form.add(new DateField("birthdate", new PropertyModel<>(this, "person.birthdate"),
+			new StyleDateConverter("S-")).add(new PropertyValidator<>()));
 		form.add(new TextField<>("password", new PropertyModel<String>(this, "person.password")).add(new PropertyValidator<>()));
 		
 		add(new FeedbackPanel("feedbackSuccess", new ExactLevelFeedbackMessageFilter(FeedbackMessage.INFO)));

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/Person.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/Person.java b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/Person.java
index 59293dc..feb0564 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/Person.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/Person.java
@@ -17,18 +17,20 @@
 package org.apache.wicket.examples.bean.validation;
 
 import java.io.Serializable;
-import java.util.Date;
+import java.time.LocalDate;
 
+import javax.validation.constraints.Email;
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.Past;
 import javax.validation.constraints.Pattern;
 import javax.validation.constraints.Size;
 
 import org.apache.wicket.examples.bean.validation.constraint.ValidPassword;
-import org.hibernate.validator.constraints.Email;
 
 public class Person implements Serializable
 {
+	private static final long serialVersionUID = 1L;
+
 	@NotNull
 	@Size(min = 2, max = 30)
 	private String name;
@@ -41,7 +43,7 @@ public class Person implements Serializable
 	private String phone;
 
 	@Past
-	private Date birthdate;
+	private LocalDate birthdate;
 	
 	@ValidPassword
 	private String password;
@@ -76,12 +78,12 @@ public class Person implements Serializable
 		this.phone = phone;
 	}
 
-	public Date getBirthdate()
+	public LocalDate getBirthdate()
 	{
 		return birthdate;
 	}
 
-	public void setBirthdate(Date birthdate)
+	public void setBirthdate(LocalDate birthdate)
 	{
 		this.birthdate = birthdate;
 	}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesApplication.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesApplication.java b/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesApplication.java
deleted file mode 100644
index 2db0032..0000000
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesApplication.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * 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.wicket.examples.dates;
-
-import org.apache.wicket.Page;
-import org.apache.wicket.examples.WicketExampleApplication;
-
-/**
- * Application class for the dates example.
- */
-public class DatesApplication extends WicketExampleApplication
-{
-	@Override
-	public Class< ? extends Page> getHomePage()
-	{
-		return DatesPage.class;
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesPage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesPage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesPage.html
deleted file mode 100644
index ad22d67..0000000
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/dates/DatesPage.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org">
-	<head>
-		<title>Wicket Examples - dates</title>
-		<link rel="stylesheet" type="text/css" href="style.css" />
-		<style type="text/css">
-			th {
-				color: grey;
-			}
-		</style>
-	</head>
-	<body>
-		<span wicket:id="mainNavigation"></span>
-		<form wicket:id="localeForm">
-		<p><select wicket:id="localeSelect" /> [<a href="#"
-			wicket:id="localeUSLink">set to english</a>]</p>
-		</form>
-		<p>
-		Example using DateTextField (auto-hides the picker when clicking on the document):&#160;
-		<form wicket:id="form"><input type="text"
-			wicket:id="dateTextField" /> <input type="submit" value="submit" /></form>
-		</p>
-		
-		<br/>
-		<p>
-		Example using DateTimeField:&#160;
-		<form wicket:id="form2">
-		<span wicket:id="dateTimeField"></span>
-		<input type="submit" value="submit" />
-		</form>
-		</p>
-		
-		<br/>
-		<p>
-		Example using TimeField:&#160;
-		<form wicket:id="form3">
-			<span wicket:id="timeField"></span>
-			<input type="submit" value="submit" />
-		</form>
-		</p>		
-		
-		<p>
-			<div wicket:id="feedback"></div>
-		</p>
-		
-	</body>
-</html>


[15/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
WICKET-6105 Decommission wicket-datetime

Move DateLabel and all Date formatters from wicket-datetime to wicket-extensions module
WIP!

WIP: Move some more code from -datetime to -extensions while trying to keep old APIs (j.u.Date based ones) available for easier migration


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2bb684c1
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2bb684c1
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2bb684c1

Branch: refs/heads/master
Commit: 2bb684c11a1d8b91db5c3d3040da734ed357a2bc
Parents: 9e3e167
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Fri Feb 26 23:28:11 2016 +0100
Committer: Sven Meier <sv...@apache.org>
Committed: Tue Oct 17 22:32:39 2017 +0200

----------------------------------------------------------------------
 NOTICE                                          |    6 -
 README.md                                       |    4 -
 pom.xml                                         |    6 -
 testing/wicket-common-tests/pom.xml             |    5 -
 testing/wicket-js-tests/Gruntfile.js            |    4 -
 .../markup/html/form/FormComponentPanel.java    |    3 +-
 wicket-datetime/pom.xml                         |   64 -
 .../apache/wicket/datetime/DateConverter.java   |  219 -
 .../wicket/datetime/PatternDateConverter.java   |  104 -
 .../wicket/datetime/StyleDateConverter.java     |  122 -
 .../datetime/markup/html/basic/DateLabel.java   |  304 -
 .../markup/html/form/DateTextField.java         |  243 -
 .../org/apache/wicket/extensions/yui/VERSION    |    2 -
 .../apache/wicket/extensions/yui/YuiLib.java    |   71 -
 .../extensions/yui/assets/skins/sam/sprite.png  |  Bin 3745 -> 0 bytes
 .../yui/calendar/AbstractCalendar.java          |  260 -
 .../extensions/yui/calendar/DateField.java      |   81 -
 .../extensions/yui/calendar/DatePicker.java     |  890 ---
 .../extensions/yui/calendar/DatePicker.js       |   21 -
 .../extensions/yui/calendar/DatePickerInit.js   |   57 -
 .../extensions/yui/calendar/DateTimeField.html  |   26 -
 .../extensions/yui/calendar/DateTimeField.java  |  616 --
 .../extensions/yui/calendar/TimeField.java      |   71 -
 .../yui/calendar/assets/skins/sam/calendar.css  |    8 -
 .../extensions/yui/calendar/calendar-min.js     |   18 -
 .../wicket/extensions/yui/calendar/calendar.js  | 7390 ------------------
 .../wicket/extensions/yui/calendar/icon1.gif    |  Bin 970 -> 0 bytes
 .../wicket/extensions/yui/calendar/icon2.gif    |  Bin 1083 -> 0 bytes
 .../wicket/extensions/yui/calendar/icon3.gif    |  Bin 1086 -> 0 bytes
 .../extensions/yui/calendar/wicket-date.js      |  432 -
 .../apache/wicket/extensions/yui/dom/dom-min.js |    9 -
 .../org/apache/wicket/extensions/yui/dom/dom.js | 1846 -----
 .../wicket/extensions/yui/event/event-min.js    |   11 -
 .../apache/wicket/extensions/yui/event/event.js | 2537 ------
 .../wicket/extensions/yui/yahoo/yahoo-min.js    |    8 -
 .../apache/wicket/extensions/yui/yahoo/yahoo.js | 1229 ---
 .../yui/yahoodomevent/yahoo-dom-event.js        |   14 -
 .../extensions/yui/yuiloader/yuiloader-min.js   |   11 -
 .../extensions/yui/yuiloader/yuiloader.js       | 4065 ----------
 .../src/main/resources/META-INF/NOTICE          |   14 -
 wicket-datetime/src/test/java/log4j.properties  |   18 -
 .../wicket/datetime/DateConverterTest.java      |   86 -
 .../extensions/yui/calendar/DatePickerTest.java |  763 --
 .../yui/calendar/DateTimeFieldTest.java         |   71 -
 .../extensions/yui/calendar/DatesPage1.html     |   25 -
 .../extensions/yui/calendar/DatesPage1.java     |  201 -
 .../yui/calendar/DatesPage1_ExpectedResult.html |  142 -
 .../extensions/yui/calendar/DatesPage2.html     |   11 -
 .../extensions/yui/calendar/DatesPage2.java     |   53 -
 .../util/license/ApacheLicenceHeaderTest.java   |   60 -
 .../util/markup/xhtml/WellFormedXmlTest.java    |   34 -
 wicket-examples/.tomcatplugin                   |    2 -
 wicket-examples/pom.xml                         |  124 +-
 .../ajax/builtin/modal/ModalContent1Page.html   |   12 +-
 .../ajax/builtin/modal/ModalContent1Page.java   |    9 +-
 .../ajax/builtin/modal/ModalContent2Page.java   |    1 +
 .../ajax/builtin/modal/ModalPanel1.java         |   21 +-
 .../ajax/builtin/modal/ModalWindowPage.java     |    6 +
 .../bean/validation/BeanValidationPage.html     |   21 +-
 .../bean/validation/BeanValidationPage.java     |   12 +-
 .../wicket/examples/bean/validation/Person.java |   12 +-
 .../wicket/examples/dates/DatesApplication.java |   32 -
 .../apache/wicket/examples/dates/DatesPage.html |   47 -
 .../apache/wicket/examples/dates/DatesPage.java |  217 -
 .../examples/datetime/DateTimeApplication.java  |   33 +
 .../wicket/examples/datetime/DateTimePage.html  |   34 +
 .../wicket/examples/datetime/DateTimePage.java  |   79 +
 .../src/main/resources/META-INF/NOTICE          |    3 -
 .../wicket/examples/homepage/HomePage.html      |    2 +-
 wicket-examples/src/main/webapp/WEB-INF/web.xml |   29 +-
 .../form/datetime/AbstractDateTimeField.html    |   23 +
 .../form/datetime/AbstractDateTimeField.java    |  244 +
 .../markup/html/form/datetime/DateField.java    |  252 +
 .../html/form/datetime/DateTimeField.java       |  123 +
 .../html/form/datetime/LocalDateConverter.java  |  104 +
 .../html/form/datetime/LocalTimeConverter.java  |  104 +
 .../form/datetime/PatternDateConverter.java     |   85 +
 .../form/datetime/PatternTimeConverter.java     |   85 +
 .../datetime/PatternZonedDateTimeConverter.java |   97 +
 .../html/form/datetime/StyleDateConverter.java  |  118 +
 .../html/form/datetime/StyleTimeConverter.java  |  114 +
 .../datetime/StyleZonedDateTimeConverter.java   |  168 +
 .../markup/html/form/datetime/TimeField.html    |   25 +
 .../markup/html/form/datetime/TimeField.java    |  520 ++
 .../form/datetime/ZonedDateTimeConverter.java   |  203 +
 .../html/form/datetime/ZonedDateTimeField.java  |  154 +
 .../html/form/datetime/DateConverterTest.java   |  109 +
 .../html/form/datetime/DateTimeFieldTest.java   |  172 +
 .../main/asciidoc/helloWorld/helloWorld_1.adoc  |    1 -
 89 files changed, 2970 insertions(+), 22662 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index c2b4544..7cc91f9 100644
--- a/NOTICE
+++ b/NOTICE
@@ -59,9 +59,6 @@ src/./wicket-examples
    This product includes ASM, released under a BSD style license (http://asm.objectweb.org).
    Copyright (c) 2000-2005 INRIA, France Telecom
 
-   This product includes software developed by
-   Joda.org (http://www.joda.org/).
-
    This product includes jhighlight (https://jhighlight.dev.java.net/)
    which is released under CDDL 1.0 license (http://www.opensource.org/licenses/cddl1.php).
 
@@ -114,9 +111,6 @@ src/./wicket-datetime
    http://developer.yahoo.net/yui/license.txt
    Copyright (c) 2010, Yahoo! Inc.
 
-   This product includes software developed by
-   Joda.org (http://www.joda.org/).
-
 ---------------------------------------------------------------------------
 src/./wicket-metrics
 ---------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 3ff8f95..a17dd27 100644
--- a/README.md
+++ b/README.md
@@ -157,10 +157,6 @@ the src/ folder.
 	As the following projects all depend on wicket, they inherit these
     dependencies.
 
- - wicket-datetime:
-
- 	Joda-Time 2.4 (http://joda-time.sourceforge.net/)
-
  - wicket-velocity:
 
     Apache Velocity 1.7 (http://velocity.apache.org/) and it's dependencies

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a5cf4db..3c2657e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,7 +89,6 @@
 		<module>wicket</module>
 		<module>wicket-core</module>
 		<module>wicket-util</module>
-		<module>wicket-datetime</module>
 		<module>wicket-request</module>
 		<module>wicket-devutils</module>
 		<module>wicket-extensions</module>
@@ -248,11 +247,6 @@
 				<version>1</version>
 			</dependency>
 			<dependency>
-				<groupId>joda-time</groupId>
-				<artifactId>joda-time</artifactId>
-				<version>${joda-time.version}</version>
-			</dependency>
-			<dependency>
 				<groupId>log4j</groupId>
 				<artifactId>log4j</artifactId>
 				<version>1.2.17</version>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/testing/wicket-common-tests/pom.xml
----------------------------------------------------------------------
diff --git a/testing/wicket-common-tests/pom.xml b/testing/wicket-common-tests/pom.xml
index 62ccc61..a8a3750 100644
--- a/testing/wicket-common-tests/pom.xml
+++ b/testing/wicket-common-tests/pom.xml
@@ -59,11 +59,6 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.wicket</groupId>
-			<artifactId>wicket-datetime</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.wicket</groupId>
 			<artifactId>wicket-devutils</artifactId>
 			<scope>test</scope>
 		</dependency>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/testing/wicket-js-tests/Gruntfile.js
----------------------------------------------------------------------
diff --git a/testing/wicket-js-tests/Gruntfile.js b/testing/wicket-js-tests/Gruntfile.js
index 6cb79bd..29b746b 100644
--- a/testing/wicket-js-tests/Gruntfile.js
+++ b/testing/wicket-js-tests/Gruntfile.js
@@ -34,9 +34,6 @@ module.exports = function(grunt) {
 			"../../wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js",
 			"../../wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/repeater/data/table/filter/wicket-filterform.js"
 		],
-		datetimeJs = [
-			"../../wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js"
-		],
 		nativeWebSocketJs = [
 			"../../wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/res/js/wicket-websocket-jquery.js"
 		],
@@ -75,7 +72,6 @@ module.exports = function(grunt) {
 		jshint: {
 			core: coreJs,
 			extensions: extensionsJs,
-			datetime: datetimeJs,
 			nativeWebSocket: nativeWebSocketJs,
 			testsJs: testsJs,
 			gymTestsJs: gymTestsJs,

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java
index 0112614..c85772a 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponentPanel.java
@@ -40,8 +40,7 @@ import org.apache.wicket.util.visit.IVisitor;
  * <p>
  * Here is a simple example of a panel with two components that multiplies and sets that as the
  * master model object. Note that for this simple example, setting the model value wouldn't make
- * sense, as the lhs and rhs cannot be known. For more complete examples of using this class, see
- * the wicket-datetime project.
+ * sense, as the lhs and rhs cannot be known.
  * </p>
  * 
  * <pre>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/pom.xml
----------------------------------------------------------------------
diff --git a/wicket-datetime/pom.xml b/wicket-datetime/pom.xml
deleted file mode 100644
index 26330c3..0000000
--- a/wicket-datetime/pom.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.apache.wicket</groupId>
-		<artifactId>wicket-parent</artifactId>
-		<version>8.0.0-SNAPSHOT</version>
-		<relativePath>../pom.xml</relativePath>
-	</parent>
-	<artifactId>wicket-datetime</artifactId>
-	<packaging>bundle</packaging>
-	<name>Wicket Date/Time</name>
-	<description>Date/Time components and utilities for Wicket</description>
-	<dependencies>
-		<dependency>
-			<groupId>joda-time</groupId>
-			<artifactId>joda-time</artifactId>
-		</dependency>
-		<dependency>
-			<groupId>org.apache.wicket</groupId>
-			<artifactId>wicket-core</artifactId>
-		</dependency>
-	</dependencies>
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.apache.felix</groupId>
-				<artifactId>maven-bundle-plugin</artifactId>
-				<executions>
-					<execution>
-						<id>bundle-manifest</id>
-						<phase>process-classes</phase>
-						<goals>
-							<goal>manifest</goal>
-						</goals>
-						<configuration>
-							<instructions>
-								<Export-Package>
-									!org.apache.wicket.extensions.yui.yahoo-dom-event,* 
-								</Export-Package>
-							</instructions>
-						</configuration>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-</project>

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/datetime/DateConverter.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/datetime/DateConverter.java b/wicket-datetime/src/main/java/org/apache/wicket/datetime/DateConverter.java
deleted file mode 100644
index 1c752c6..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/datetime/DateConverter.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * 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.wicket.datetime;
-
-import java.util.Date;
-import java.util.Locale;
-import java.util.TimeZone;
-
-import org.apache.wicket.Session;
-import org.apache.wicket.core.request.ClientInfo;
-import org.apache.wicket.protocol.http.request.WebClientInfo;
-import org.apache.wicket.util.convert.ConversionException;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.string.Strings;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.format.DateTimeFormatter;
-
-
-/**
- * Base class for Joda Time based date converters. It contains the logic to parse and format,
- * optionally taking the time zone difference between clients and the server into account.
- * <p>
- * Converters of this class are best suited for per-component use.
- * </p>
- * 
- * @author eelcohillenius
- */
-public abstract class DateConverter implements IConverter<Date>
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Whether to apply the time zone difference when interpreting dates.
-	 */
-	private final boolean applyTimeZoneDifference;
-
-	/**
-	 * Construct. </p> When applyTimeZoneDifference is true, the current time is applied on the
-	 * parsed date, and the date will be corrected for the time zone difference between the server
-	 * and the client. For instance, if I'm in Seattle and the server I'm working on is in
-	 * Amsterdam, the server is 9 hours ahead. So, if I'm inputting say 12/24 at a couple of hours
-	 * before midnight, at the server it is already 12/25. If this boolean is true, it will be
-	 * transformed to 12/25, while the client sees 12/24. </p>
-	 * 
-	 * @param applyTimeZoneDifference
-	 *            whether to apply the difference in time zones between client and server
-	 */
-	public DateConverter(boolean applyTimeZoneDifference)
-	{
-		this.applyTimeZoneDifference = applyTimeZoneDifference;
-	}
-
-	/**
-	 * @see org.apache.wicket.util.convert.IConverter#convertToObject(java.lang.String,
-	 *      java.util.Locale)
-	 */
-	@Override
-	public Date convertToObject(String value, Locale locale)
-	{
-		if (Strings.isEmpty(value))
-		{
-			return null;
-		}
-
-		DateTimeFormatter format = getFormat(locale);
-		if (format == null)
-		{
-			throw new IllegalStateException("format must be not null");
-		}
-
-		if (applyTimeZoneDifference)
-		{
-			TimeZone zone = getClientTimeZone();
-			DateTime dateTime;
-
-			// set time zone for client
-			format = format.withZone(getTimeZone());
-
-			try
-			{
-				// parse date retaining the time of the submission
-				dateTime = format.parseDateTime(value);
-			}
-			catch (RuntimeException e)
-			{
-				throw newConversionException(e, locale);
-			}
-			// apply the server time zone to the parsed value
-			if (zone != null)
-			{
-				dateTime = dateTime.withZoneRetainFields(DateTimeZone.forTimeZone(zone));
-			}
-
-			return dateTime.toDate();
-		}
-		else
-		{
-			try
-			{
-				DateTime date = format.parseDateTime(value);
-				return date.toDate();
-			}
-			catch (RuntimeException e)
-			{
-				throw newConversionException(e, locale);
-			}
-		}
-	}
-
-	/**
-	 * Creates a ConversionException and sets additional context information to it.
-	 *
-	 * @param cause
-	 *            - {@link RuntimeException} cause
-	 * @param locale
-	 *            - {@link Locale} used to set 'format' variable with localized pattern
-	 * @return {@link ConversionException}
-	 */
-	private ConversionException newConversionException(RuntimeException cause, Locale locale)
-	{
-		return new ConversionException(cause)
-				.setVariable("format", getDatePattern(locale));
-	}
-
-	/**
-	 * @see org.apache.wicket.util.convert.IConverter#convertToString(java.lang.Object,
-	 *      java.util.Locale)
-	 */
-	@Override
-	public String convertToString(Date value, Locale locale)
-	{
-		DateTime dt = new DateTime(value.getTime(), getTimeZone());
-		DateTimeFormatter format = getFormat(locale);
-
-		if (applyTimeZoneDifference)
-		{
-			TimeZone zone = getClientTimeZone();
-			if (zone != null)
-			{
-				// apply time zone to formatter
-				format = format.withZone(DateTimeZone.forTimeZone(zone));
-			}
-		}
-		return format.print(dt);
-	}
-
-	/**
-	 * Gets whether to apply the time zone difference when interpreting dates.
-	 * 
-	 * </p> When true, the current time is applied on the parsed date, and the date will be
-	 * corrected for the time zone difference between the server and the client. For instance, if
-	 * I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9 hours ahead.
-	 * So, if I'm inputting say 12/24 at a couple of hours before midnight, at the server it is
-	 * already 12/25. If this boolean is true, it will be transformed to 12/25, while the client
-	 * sees 12/24. </p>
-	 * 
-	 * @return whether to apply the difference in time zones between client and server
-	 */
-	public final boolean getApplyTimeZoneDifference()
-	{
-		return applyTimeZoneDifference;
-	}
-
-	/**
-	 * @param locale
-	 *            The locale used to convert the value
-	 * @return Gets the pattern that is used for printing and parsing
-	 */
-	public abstract String getDatePattern(Locale locale);
-
-	/**
-	 * Gets the client's time zone.
-	 * 
-	 * @return The client's time zone or null
-	 */
-	protected TimeZone getClientTimeZone()
-	{
-		ClientInfo info = Session.get().getClientInfo();
-		if (info instanceof WebClientInfo)
-		{
-			return ((WebClientInfo)info).getProperties().getTimeZone();
-		}
-		return null;
-	}
-
-	/**
-	 * @param locale
-	 *            The locale used to convert the value
-	 * 
-	 * @return formatter The formatter for the current conversion
-	 */
-	protected abstract DateTimeFormatter getFormat(Locale locale);
-
-	/**
-	 * Gets the server time zone. Override this method if you want to fix to a certain time zone,
-	 * regardless of what actual time zone the server is in.
-	 * 
-	 * @return The server time zone
-	 */
-	protected DateTimeZone getTimeZone()
-	{
-		return DateTimeZone.getDefault();
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/datetime/PatternDateConverter.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/datetime/PatternDateConverter.java b/wicket-datetime/src/main/java/org/apache/wicket/datetime/PatternDateConverter.java
deleted file mode 100644
index 7b257cb..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/datetime/PatternDateConverter.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.wicket.datetime;
-
-import java.text.SimpleDateFormat;
-import java.util.Locale;
-
-import org.apache.wicket.datetime.markup.html.form.DateTextField;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
-
-
-/**
- * Date converter that uses Joda Time and can be configured to take the time zone difference between
- * clients and server into account. This converter is hard coded to use the provided custom date
- * pattern, no matter what current locale is used. See {@link SimpleDateFormat} for available
- * patterns.
- * <p>
- * This converter is especially suited on a per-component base.
- * </p>
- * 
- * @see SimpleDateFormat
- * @see StyleDateConverter
- * @see DateTextField
- * @see DateTime
- * @see DateTimeFormat
- * @see DateTimeZone
- * 
- * @author eelcohillenius
- */
-public class PatternDateConverter extends DateConverter
-{
-
-	private static final long serialVersionUID = 1L;
-
-	/** pattern to use. */
-	private final String datePattern;
-
-	/**
-	 * Construct.
-	 * </p>
-	 * When applyTimeZoneDifference is true, the current time is applied on the parsed date, and the
-	 * date will be corrected for the time zone difference between the server and the client. For
-	 * instance, if I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9
-	 * hours ahead. So, if I'm inputting say 12/24 at a couple of hours before midnight, at the
-	 * server it is already 12/25. If this boolean is true, it will be transformed to 12/25, while
-	 * the client sees 12/24.
-	 * </p>
-	 * 
-	 * @param datePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @param applyTimeZoneDifference
-	 *            whether to apply the difference in time zones between client and server
-	 * @throws IllegalArgumentException
-	 *             in case the date pattern is null
-	 */
-	public PatternDateConverter(String datePattern, boolean applyTimeZoneDifference)
-	{
-
-		super(applyTimeZoneDifference);
-		if (datePattern == null)
-		{
-			throw new IllegalArgumentException("datePattern must be not null");
-		}
-		this.datePattern = datePattern;
-	}
-
-	/**
-	 * Gets the optional date pattern.
-	 * 
-	 * @return datePattern
-	 */
-	@Override
-	public final String getDatePattern(Locale locale)
-	{
-		return datePattern;
-	}
-
-	/**
-	 * @return formatter The formatter for the current conversion
-	 */
-	@Override
-	protected DateTimeFormatter getFormat(Locale locale)
-	{
-		return DateTimeFormat.forPattern(datePattern).withLocale(locale).withPivotYear(2000);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java b/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java
deleted file mode 100644
index 317026e..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/datetime/StyleDateConverter.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * 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.wicket.datetime;
-
-import java.util.Locale;
-
-import org.apache.wicket.datetime.markup.html.form.DateTextField;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
-
-
-/**
- * Date converter that uses Joda Time and can be configured to take the time zone difference between
- * clients and server into account, and that is configured for a certain date style. The pattern
- * will always be locale specific.
- * <p>
- * This converter is especially suited on a per-component base.
- * </p>
- * 
- * @see DateTextField
- * @see DateTime
- * @see DateTimeFormat
- * @see DateTimeZone
- * 
- * @author eelcohillenius
- */
-public class StyleDateConverter extends DateConverter
-{
-
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Date style to use. See {@link DateTimeFormat#forStyle(String)}.
-	 */
-	private final String dateStyle;
-
-	/**
-	 * Construct. The dateStyle 'S-' (which is the same as {@link DateTimeFormat#shortDate()}) will
-	 * be used for constructing the date format for the current locale. </p> When
-	 * applyTimeZoneDifference is true, the current time is applied on the parsed date, and the date
-	 * will be corrected for the time zone difference between the server and the client. For
-	 * instance, if I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9
-	 * hours ahead. So, if I'm inputting say 12/24 at a couple of hours before midnight, at the
-	 * server it is already 12/25. If this boolean is true, it will be transformed to 12/25, while
-	 * the client sees 12/24. </p>
-	 * 
-	 * @param applyTimeZoneDifference
-	 *            whether to apply the difference in time zones between client and server
-	 */
-	public StyleDateConverter(boolean applyTimeZoneDifference)
-	{
-		this("S-", applyTimeZoneDifference);
-	}
-
-	/**
-	 * Construct. The provided pattern will be used as the base format (but they will be localized
-	 * for the current locale) and if null, {@link DateTimeFormat#shortDate()} will be used. </p>
-	 * When applyTimeZoneDifference is true, the current time is applied on the parsed date, and the
-	 * date will be corrected for the time zone difference between the server and the client. For
-	 * instance, if I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9
-	 * hours ahead. So, if I'm inputting say 12/24 at a couple of hours before midnight, at the
-	 * server it is already 12/25. If this boolean is true, it will be transformed to 12/25, while
-	 * the client sees 12/24. </p>
-	 * 
-	 * @param dateStyle
-	 *            Date style to use. The first character is the date style, and the second character
-	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
-	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
-	 *            character '-'. See {@link DateTimeFormat#forStyle(String)}.
-	 * @param applyTimeZoneDifference
-	 *            whether to apply the difference in time zones between client and server
-	 * @throws IllegalArgumentException
-	 *             in case dateStyle is null
-	 */
-	public StyleDateConverter(String dateStyle, boolean applyTimeZoneDifference)
-	{
-		super(applyTimeZoneDifference);
-		if (dateStyle == null)
-		{
-			throw new IllegalArgumentException("dateStyle must be not null");
-		}
-		this.dateStyle = dateStyle;
-	}
-
-	/**
-	 * Gets the optional date pattern.
-	 * 
-	 * @return datePattern
-	 */
-	@Override
-	public final String getDatePattern(Locale locale)
-	{
-		return DateTimeFormat.patternForStyle(dateStyle, locale);
-	}
-
-	/**
-	 * @return formatter The formatter for the current conversion
-	 */
-	@Override
-	protected DateTimeFormatter getFormat(Locale locale)
-	{
-		return DateTimeFormat.forPattern(getDatePattern(locale))
-			.withLocale(locale)
-			.withPivotYear(2000);
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/basic/DateLabel.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/basic/DateLabel.java b/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/basic/DateLabel.java
deleted file mode 100644
index 3459397..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/basic/DateLabel.java
+++ /dev/null
@@ -1,304 +0,0 @@
-/*
- * 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.wicket.datetime.markup.html.basic;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.apache.wicket.IGenericComponent;
-import org.apache.wicket.datetime.DateConverter;
-import org.apache.wicket.datetime.PatternDateConverter;
-import org.apache.wicket.datetime.StyleDateConverter;
-import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.MarkupStream;
-import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.util.convert.IConverter;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.format.DateTimeFormat;
-
-
-/**
- * A label that is mapped to a <code>java.util.Date</code> object and that uses Joda time to format
- * values.
- * <p>
- * You can provide a date pattern in two of the constructors. When not provided,
- * {@link DateTimeFormat#shortDate()} will be used.
- * </p>
- * <p>
- * A special option is applyTimeZoneDifference which is an option that says whether to correct for
- * the difference between the client's time zone and server's time zone. This is true by default.
- * </p>
- * 
- * @see DateTime
- * @see DateTimeFormat
- * @see DateTimeZone
- * 
- * @author eelcohillenius
- */
-public class DateLabel extends Label implements IGenericComponent<Date, DateLabel>
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Creates a new DateLabel defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param datePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @return new instance
-	 * 
-	 * @see org.apache.wicket.markup.html.form.TextField
-	 */
-	public static DateLabel forDatePattern(String id, IModel<Date> model, String datePattern)
-	{
-		return new DateLabel(id, model, new PatternDateConverter(datePattern, true));
-	}
-
-	/**
-	 * Creates a new DateLabel defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param datePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @return new instance
-	 * 
-	 * @see org.apache.wicket.markup.html.form.TextField
-	 */
-	public static DateLabel forDatePattern(String id, String datePattern)
-	{
-		return forDatePattern(id, null, datePattern);
-	}
-
-	/**
-	 * Creates a new DateLabel defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param dateStyle
-	 *            style to use in case no pattern is provided. Must be two characters from the set
-	 *            {"S", "M", "L", "F", "-"}. Must be not null. See
-	 *            {@link DateTimeFormat#forStyle(String)} for options.
-	 * @return new instance
-	 * 
-	 * @see org.apache.wicket.markup.html.form.TextField
-	 */
-	public static DateLabel forDateStyle(String id, IModel<Date> model, String dateStyle)
-	{
-		return new DateLabel(id, model, new StyleDateConverter(dateStyle, true));
-	}
-
-	/**
-	 * Creates a new DateLabel defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param dateStyle
-	 *            style to use in case no pattern is provided. Must be two characters from the set
-	 *            {"S", "M", "L", "F", "-"}. Must be not null. See
-	 *            {@link DateTimeFormat#forStyle(String)} for options.
-	 * @return new instance
-	 * 
-	 * @see org.apache.wicket.markup.html.form.TextField
-	 */
-	public static DateLabel forDateStyle(String id, String dateStyle)
-	{
-		return forDateStyle(id, null, dateStyle);
-	}
-
-	/**
-	 * Creates a new DateLabel defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @return new instance
-	 * 
-	 * @see org.apache.wicket.markup.html.form.TextField
-	 */
-	public static DateLabel forShortStyle(String id)
-	{
-		return forShortStyle(id, null);
-	}
-
-	/**
-	 * Creates a new DateLabel defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @return new instance
-	 * 
-	 * @see org.apache.wicket.markup.html.form.TextField
-	 */
-	public static DateLabel forShortStyle(String id, IModel<Date> model)
-	{
-		return new DateLabel(id, model, new StyleDateConverter(true));
-	}
-
-	/**
-	 * Creates a new DateLabel using the provided converter.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param converter
-	 *            the date converter
-	 * @return new instance
-	 * 
-	 * @see org.apache.wicket.markup.html.form.TextField
-	 */
-	public static DateLabel withConverter(String id, DateConverter converter)
-	{
-		return withConverter(id, null, converter);
-	}
-
-	/**
-	 * Creates a new DateLabel using the provided converter.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param converter
-	 *            the date converter
-	 * @return new instance
-	 * 
-	 * @see org.apache.wicket.markup.html.form.TextField
-	 */
-	public static DateLabel withConverter(String id, IModel<Date> model, DateConverter converter)
-	{
-		return new DateLabel(id, model, converter);
-	}
-
-	/** optionally prepend to label. */
-	private String after;
-
-	/** optionally append to label. */
-	private String before;
-
-	/**
-	 * The converter for the Label
-	 */
-	private final DateConverter converter;
-
-	/**
-	 * Construct with a converter.
-	 * 
-	 * @param id
-	 *            The component id
-	 * @param converter
-	 *            The converter to use
-	 */
-	public DateLabel(String id, DateConverter converter)
-	{
-		this(id, null, converter);
-	}
-
-	/**
-	 * Construct with a converter.
-	 * 
-	 * @param id
-	 *            The component id
-	 * @param model
-	 *            The model
-	 * @param converter
-	 *            The converter to use
-	 */
-	public DateLabel(String id, IModel<Date> model, DateConverter converter)
-	{
-		super(id, model);
-		if (converter == null)
-		{
-			throw new IllegalStateException("converter may not be null");
-		}
-		this.converter = converter;
-	}
-
-	/**
-	 * @return after append to label or null
-	 */
-	public String getAfter()
-	{
-		return after;
-	}
-
-	/**
-	 * @return before prepend to label or null
-	 */
-	public String getBefore()
-	{
-		return before;
-	}
-
-	/**
-	 * Returns the specialized converter.
-	 */
-	@Override
-	protected IConverter<?> createConverter(Class<?> type)
-	{
-		if (Date.class.isAssignableFrom(type))
-		{
-			return converter;
-		}
-		return null;
-	}
-
-	/**
-	 * @param after
-	 *            append to label
-	 */
-	public void setAfter(String after)
-	{
-		this.after = after;
-	}
-
-	/**
-	 * @param before
-	 *            prepend to label
-	 */
-	public void setBefore(String before)
-	{
-		this.before = before;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public void onComponentTagBody(MarkupStream markupStream, ComponentTag openTag)
-	{
-		String s = getDefaultModelObjectAsString();
-		if (before != null)
-		{
-			s = before + s;
-		}
-		if (after != null)
-		{
-			s = s + after;
-		}
-		replaceComponentTagBody(markupStream, openTag, s);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/form/DateTextField.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/form/DateTextField.java b/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/form/DateTextField.java
deleted file mode 100644
index f537653..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/datetime/markup/html/form/DateTextField.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * 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.wicket.datetime.markup.html.form;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.apache.wicket.datetime.DateConverter;
-import org.apache.wicket.datetime.PatternDateConverter;
-import org.apache.wicket.datetime.StyleDateConverter;
-import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
-import org.apache.wicket.markup.html.form.TextField;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.lang.Args;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.format.DateTimeFormat;
-
-/**
- * A TextField that is mapped to a <code>java.util.Date</code> object and that uses Joda time to
- * parse and format values.
- * <p>
- * You should use on of the factory methods to construct the kind you want or use the public
- * constructor and pass in the converter to use.
- * </p>
- * <p>
- * This component tries to apply the time zone difference between the client and server. See the
- * {@link DateConverter#getApplyTimeZoneDifference() date converter} of this package for more
- * information on that.
- * </p>
- * 
- * @see StyleDateConverter
- * @see DateTime
- * @see DateTimeFormat
- * @see DateTimeZone
- * 
- * @author eelcohillenius
- */
-public class DateTextField extends TextField<Date> implements ITextFormatProvider
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Creates a new DateTextField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param datePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @return DateTextField
-	 */
-	public static DateTextField forDatePattern(String id, IModel<Date> model, String datePattern)
-	{
-		return new DateTextField(id, model, new PatternDateConverter(datePattern, true));
-	}
-
-	/**
-	 * Creates a new DateTextField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param datePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @return DateTextField
-	 */
-	public static DateTextField forDatePattern(String id, String datePattern)
-	{
-		return forDatePattern(id, null, datePattern);
-	}
-
-	/**
-	 * Creates a new DateTextField using the provided date style.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param dateStyle
-	 *            Date style to use. The first character is the date style, and the second character
-	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
-	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
-	 *            character '-'. See {@link DateTimeFormat#forStyle(String)}.
-	 * @return DateTextField
-	 */
-	public static DateTextField forDateStyle(String id, IModel<Date> model, String dateStyle)
-	{
-		return new DateTextField(id, model, new StyleDateConverter(dateStyle, true));
-	}
-
-	/**
-	 * Creates a new DateTextField using the provided date style.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param dateStyle
-	 *            Date style to use. The first character is the date style, and the second character
-	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
-	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
-	 *            character '-'. See {@link DateTimeFormat#forStyle(String)}.
-	 * @return DateTextField
-	 */
-	public static DateTextField forDateStyle(String id, String dateStyle)
-	{
-		return forDateStyle(id, null, dateStyle);
-	}
-
-	/**
-	 * Creates a new DateTextField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @return DateTextField
-	 */
-	public static DateTextField forShortStyle(String id)
-	{
-		return forShortStyle(id, null, true);
-	}
-
-	/**
-	 * Creates a new DateTextField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param applyTimeZoneDifference
-	 *            Whether to apply the time zone difference between client and server
-	 * @return DateTextField
-	 */
-	public static DateTextField forShortStyle(String id, IModel<Date> model,
-		boolean applyTimeZoneDifference)
-	{
-		return new DateTextField(id, model, new StyleDateConverter(applyTimeZoneDifference));
-	}
-
-	/**
-	 * Creates a new DateTextField using the provided converter.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param converter
-	 *            the date converter
-	 * @return DateTextField
-	 */
-	public static DateTextField withConverter(String id, DateConverter converter)
-	{
-		return withConverter(id, null, converter);
-	}
-
-	/**
-	 * Creates a new DateTextField using the provided converter.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param converter
-	 *            the date converter
-	 * @return DateTextField
-	 */
-	public static DateTextField withConverter(String id, IModel<Date> model, DateConverter converter)
-	{
-		return new DateTextField(id, model, converter);
-	}
-
-	/**
-	 * The converter for the TextField
-	 */
-	private final DateConverter converter;
-
-	/**
-	 * Construct with a converter.
-	 * 
-	 * @param id
-	 *            The component id
-	 * @param model
-	 *            The model
-	 * @param converter
-	 *            The converter to use
-	 */
-	public DateTextField(String id, IModel<Date> model, DateConverter converter)
-	{
-		super(id, model, Date.class);
-
-		Args.notNull(converter, "converter");
-		this.converter = converter;
-	}
-
-	/**
-	 * Construct with a converter, and a null model.
-	 * 
-	 * @param id
-	 *            The component id
-	 * @param converter
-	 *            The converter to use
-	 */
-	public DateTextField(String id, DateConverter converter)
-	{
-		this(id, null, converter);
-	}
-
-	/**
-	 * @return The specialized converter.
-	 * @see org.apache.wicket.Component#createConverter(java.lang.Class)
-	 */
-	@Override
-	protected IConverter<?> createConverter(Class<?> clazz)
-	{
-		if (Date.class.isAssignableFrom(clazz))
-		{
-			return converter;
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider#getTextFormat()
-	 */
-	@Override
-	public final String getTextFormat()
-	{
-		return converter.getDatePattern(getLocale());
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/VERSION
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/VERSION b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/VERSION
deleted file mode 100644
index 094e00c..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/VERSION
+++ /dev/null
@@ -1,2 +0,0 @@
-http://developer.yahoo.com/yui/
-this version: 2.8.2r1

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/YuiLib.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/YuiLib.java b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/YuiLib.java
deleted file mode 100644
index f8cfec5..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/YuiLib.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.wicket.extensions.yui;
-
-import org.apache.wicket.Application;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.resource.PackageResourceReference;
-import org.apache.wicket.request.resource.ResourceReference;
-
-/**
- * Use the {@link #load(org.apache.wicket.markup.head.IHeaderResponse)} method to initialize the YUI library using the YUI loader.
- * It is OK to call this multiple times.
- * 
- * By default the resource stream gets gzipped. You may disable it via
- * Application.get().getResourceSettings().getDisableGZipCompression()
- * 
- * @author eelcohillenius
- */
-public final class YuiLib
-{
-	private static ResourceReference YUILOADER;
-
-	/**
-	 * Load the YUI loader script. After that, you can declare YUI dependencies using
-	 * YAHOO.util.YUILoader.
-	 * 
-	 * @param response
-	 *            header response
-	 */
-	public static void load(IHeaderResponse response)
-	{
-		response.render(JavaScriptHeaderItem.forReference(getYuiLoader()));
-	}
-
-	private static ResourceReference getYuiLoader()
-	{
-		if (YUILOADER == null)
-		{
-			StringBuilder sb = new StringBuilder("yuiloader/yuiloader");
-			if (Application.get().usesDeploymentConfig())
-			{
-				sb.append("-min");
-			}
-			sb.append(".js");
-			YUILOADER = new PackageResourceReference(YuiLib.class, sb.toString());
-		}
-		return YUILOADER;
-	}
-
-	/**
-	 * Prevent construction.
-	 */
-	private YuiLib()
-	{
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/assets/skins/sam/sprite.png
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/assets/skins/sam/sprite.png b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/assets/skins/sam/sprite.png
deleted file mode 100644
index 73634d6..0000000
Binary files a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/assets/skins/sam/sprite.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java
deleted file mode 100644
index b448196..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/AbstractCalendar.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * 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.wicket.extensions.yui.calendar;
-
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-
-import org.apache.wicket.extensions.yui.YuiLib;
-import org.apache.wicket.markup.head.CssHeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.markup.html.WebComponent;
-import org.apache.wicket.request.resource.PackageResourceReference;
-
-
-/**
- * Abstract calendar component based on the YUI (Yahoo User Interface library) javascript widget.
- * <p>
- * Although this component by itself is fully functional, it doesn't do much other than just
- * displaying the calendar. Hence, this class is abstract.
- * </p>
- * <p>
- * An easy way to build upon this component is to override
- * {@link #appendToInit(String, String, String, StringBuffer)} and add event handlers etc. in the
- * YUI widget's initialization function.
- * </p>
- * See <a href="http://developer.yahoo.com/yui/calendar/">YUI's calendar documentation</a> for more
- * info.
- * 
- * @author eelcohillenius
- * 
- * @see DatePicker
- */
-// TODO provide localization strings (base them on the messages of
-// JsDatePicker?)
-public abstract class AbstractCalendar extends WebComponent
-{
-	private static final long serialVersionUID = 1L;
-
-	private final boolean contributeDependencies;
-
-	/**
-	 * Construct. Contributes packaged dependencies.
-	 * 
-	 * @param id
-	 *            The component id
-	 */
-	public AbstractCalendar(String id)
-	{
-		this(id, true);
-	}
-
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 *            The component id
-	 * @param contributeDependencies
-	 *            Whether to contribute the packaged dependencies. Pass false in case you want to
-	 *            include the dependencies manually in your own page, e.g. when you want to keep
-	 *            them in your web application dir. To contribute yourself (in case you want to pass
-	 *            false), your page header should look like:
-	 * 
-	 *            <pre>
-	 * 	 &lt;script type=&quot;text/javascript&quot; src=&quot;yahoo.js&quot;&gt;&lt;/script&gt;
-	 * 	 &lt;script type=&quot;text/javascript&quot; src=&quot;dom.js&quot;&gt;&lt;/script&gt;
-	 * 	 &lt;script type=&quot;text/javascript&quot; src=&quot;event.js&quot;&gt;&lt;/script&gt;
-	 * 	 &lt;script type=&quot;text/javascript&quot; src=&quot;calendar.js&quot;&gt;&lt;/script&gt;
-	 * 	 &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;calendar.css&quot; /&gt;
-	 * </pre>
-	 */
-	public AbstractCalendar(String id, boolean contributeDependencies)
-	{
-
-		super(id);
-		setOutputMarkupId(true);
-		this.contributeDependencies = contributeDependencies;
-	}
-
-	/**
-	 * Gets the id of the javascript widget. Note that this is the non-namespaced id, so depending
-	 * on what you want to do with it, you may need to prepend 'YAHOO.wicket.' to it. Or you can
-	 * call {@link #getJavaScriptWidgetId()}.
-	 * 
-	 * @return The javascript id
-	 * @see #getJavaScriptWidgetId()
-	 */
-	public final String getJavaScriptId()
-	{
-		return getMarkupId() + "Js";
-	}
-
-	/**
-	 * The name spaced id of the widget.
-	 * 
-	 * @return The widget id
-	 * @see #getJavaScriptId()
-	 */
-	public final String getJavaScriptWidgetId()
-	{
-		return "YAHOO.wicket." + getJavaScriptId();
-	}
-
-	/**
-	 * add header contributions for packaged resources.
-	 * 
-	 * @param response
-	 *            the header response to contribute to
-	 */
-	private void contributeDependencies(IHeaderResponse response)
-	{
-		response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(
-				YuiLib.class, "yahoodomevent/yahoo-dom-event.js")));
-		response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(
-			AbstractCalendar.class, "calendar-min.js")));
-		response.render(CssHeaderItem.forReference(new PackageResourceReference(
-			AbstractCalendar.class, "assets/skins/sam/calendar.css")));
-	}
-
-	/**
-	 * Append javascript to the initialization function for the YUI widget. Can be used by
-	 * subclasses to conveniently extend configuration without having to write a separate
-	 * contribution.
-	 * 
-	 * @param markupId
-	 *            The markup id of the calendar component
-	 * @param javascriptId
-	 *            the non-name spaced javascript id of the widget
-	 * @param javascriptWidgetId
-	 *            the name space id of the widget
-	 * @param b
-	 *            the buffer to append the script to
-	 */
-	protected void appendToInit(String markupId, String javascriptId, String javascriptWidgetId,
-		StringBuilder b)
-	{
-	}
-
-	/**
-	 * Gives overriding classes the option of adding (or even changing/ removing) configuration
-	 * properties for the javascript widget. See <a
-	 * href="http://developer.yahoo.com/yui/calendar/">the widget's documentation</a> for the
-	 * available options. If you want to override/ remove properties, you obviously should call
-	 * <code>super.configureWidgetProperties(properties)</code>.
-	 * 
-	 * @param widgetProperties
-	 *            the current widget properties
-	 */
-	protected void configureWidgetProperties(Map<Object, Object> widgetProperties)
-	{
-	}
-
-	@Override
-	public void renderHead(IHeaderResponse response)
-	{
-		if (contributeDependencies)
-		{
-			contributeDependencies(response);
-		}
-
-
-		// not pretty to look at, but cheaper than using a template
-		String markupId = AbstractCalendar.this.getMarkupId();
-		String javascriptId = getJavaScriptId();
-		String javascriptWidgetId = getJavaScriptWidgetId();
-		StringBuilder b = new StringBuilder();
-		// initialize wicket namespace and register the init function
-		// for the YUI widget
-		b.append("YAHOO.namespace(\"wicket\");\nfunction init");
-		b.append(javascriptId);
-		b.append("() {\n");
-
-		// instantiate the calendar object
-		b.append("  ");
-		b.append(javascriptWidgetId);
-		b.append(" = new YAHOO.widget.Calendar(\"");
-		b.append(javascriptId);
-		b.append("\",\"");
-		b.append(markupId);
-
-		Properties p = new Properties();
-		configureWidgetProperties(p);
-		b.append("\", { ");
-		for (Iterator<Entry<Object, Object>> i = p.entrySet().iterator(); i.hasNext();)
-		{
-			Entry<Object, Object> entry = i.next();
-			b.append(entry.getKey());
-			Object value = entry.getValue();
-			if (value instanceof CharSequence)
-			{
-				b.append(":\"");
-				b.append(value);
-				b.append("\"");
-			}
-			else if (value instanceof CharSequence[])
-			{
-				b.append(":[");
-				CharSequence[] valueArray = (CharSequence[])value;
-				for (int j = 0; j < valueArray.length; j++)
-				{
-					CharSequence tmpValue = valueArray[j];
-					b.append("\"");
-					b.append(tmpValue);
-					b.append("\"");
-					if (j < valueArray.length - 1)
-					{
-						b.append(",");
-					}
-				}
-				b.append("]");
-			}
-			else
-			{
-				b.append(":");
-				b.append(value);
-			}
-			// TODO handle arrays
-			if (i.hasNext())
-			{
-				b.append(",");
-			}
-		}
-
-		b.append(" });\n");
-
-		// append the javascript we want for our init function; call
-		// this in an overridable method so that clients can add their
-		// stuff without needing a big ass API
-		appendToInit(markupId, javascriptId, javascriptWidgetId, b);
-
-		// trigger rendering
-		b.append("  ");
-		b.append(javascriptWidgetId);
-		b.append(".render();\n");
-
-		b.append("}\n");
-		// register the function for execution when the page is loaded
-		b.append("YAHOO.util.Event.addListener(window, \"load\", init");
-		b.append(javascriptId);
-		b.append(");");
-
-		response.render(JavaScriptHeaderItem.forScript(b, null));
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateField.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateField.java b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateField.java
deleted file mode 100644
index 5c08241..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateField.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * 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.wicket.extensions.yui.calendar;
-
-import java.util.Date;
-
-import org.apache.wicket.datetime.markup.html.form.DateTextField;
-import org.apache.wicket.model.IModel;
-
-/**
- * Works on a {@link java.util.Date} object. Displays a {@link DateTextField} and a
- * {@link DatePicker calendar popup}.<br/>
- * <p>
- * Note: {@link DateField} must <strong>not</strong> be associated with an
- * <code>&lt;input&gt;</code> tag, as opposed to {@link DateTextField}! The corresponding tag is
- * typically either a <code>&lt;div&gt;</code> or a <code>&lt;span&gt;</code> tag.
- * </p>
- * 
- * Example:
- * <p>
- * <u>Java:</u>
- * 
- * <pre>
- * DateField dateField = new DateField(&quot;birthday&quot;);
- * </pre>
- * 
- * </p>
- * <p>
- * <u>Markup:</u>
- * 
- * <pre>
- * &lt;div wicket:id=&quot;birthday&quot;&gt;&lt;/div&gt;
- * </pre>
- * 
- * </p>
- * 
- * @author eelcohillenius
- */
-public class DateField extends DateTimeField
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 */
-	public DateField(String id)
-	{
-		this(id, null);
-	}
-
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 * @param model
-	 */
-	public DateField(String id, IModel<Date> model)
-	{
-		super(id, model);
-
-		get(HOURS).setVisibilityAllowed(false);
-		get(MINUTES).setVisibilityAllowed(false);
-		get(AM_OR_PM_CHOICE).setVisibilityAllowed(false);
-	}
-}


[08/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo-min.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo-min.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo-min.js
deleted file mode 100644
index 4f18140..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo-min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0
 ,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=
 e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["to
 String","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.construc
 tor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.l
 ength>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+
 |\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo.js
deleted file mode 100644
index 6e33609..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoo/yahoo.js
+++ /dev/null
@@ -1,1229 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-/**
- * The YAHOO object is the single global object used by YUI Library.  It
- * contains utility function for setting up namespaces, inheritance, and
- * logging.  YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces
- * created automatically for and used by the library.
- * @module yahoo
- * @title  YAHOO Global
- */
-
-/**
- * YAHOO_config is not included as part of the library.  Instead it is an
- * object that can be defined by the implementer immediately before
- * including the YUI library.  The properties included in this object
- * will be used to configure global properties needed as soon as the
- * library begins to load.
- * @class YAHOO_config
- * @static
- */
-
-/**
- * A reference to a function that will be executed every time a YAHOO module
- * is loaded.  As parameter, this function will receive the version
- * information for the module. See <a href="YAHOO.env.html#getVersion">
- * YAHOO.env.getVersion</a> for the description of the version data structure.
- * @property listener
- * @type Function
- * @static
- * @default undefined
- */
-
-/**
- * Set to true if the library will be dynamically loaded after window.onload.
- * Defaults to false
- * @property injecting
- * @type boolean
- * @static
- * @default undefined
- */
-
-/**
- * Instructs the yuiloader component to dynamically load yui components and
- * their dependencies.  See the yuiloader documentation for more information
- * about dynamic loading
- * @property load
- * @static
- * @default undefined
- * @see yuiloader
- */
-
-/**
- * Forces the use of the supplied locale where applicable in the library
- * @property locale
- * @type string
- * @static
- * @default undefined
- */
-
-if (typeof YAHOO == "undefined" || !YAHOO) {
-    /**
-     * The YAHOO global namespace object.  If YAHOO is already defined, the
-     * existing YAHOO object will not be overwritten so that defined
-     * namespaces are preserved.
-     * @class YAHOO
-     * @static
-     */
-    var YAHOO = {};
-}
-
-/**
- * Returns the namespace specified and creates it if it doesn't exist
- * <pre>
- * YAHOO.namespace("property.package");
- * YAHOO.namespace("YAHOO.property.package");
- * </pre>
- * Either of the above would create YAHOO.property, then
- * YAHOO.property.package
- *
- * Be careful when naming packages. Reserved words may work in some browsers
- * and not others. For instance, the following will fail in Safari:
- * <pre>
- * YAHOO.namespace("really.long.nested.namespace");
- * </pre>
- * This fails because "long" is a future reserved word in ECMAScript
- *
- * For implementation code that uses YUI, do not create your components
- * in the namespaces defined by YUI (
- * <code>YAHOO.util</code>,
- * <code>YAHOO.widget</code>,
- * <code>YAHOO.lang</code>,
- * <code>YAHOO.tool</code>,
- * <code>YAHOO.example</code>,
- * <code>YAHOO.env</code>) -- create your own namespace (e.g., 'companyname').
- *
- * @method namespace
- * @static
- * @param  {String*} arguments 1-n namespaces to create
- * @return {Object}  A reference to the last namespace object created
- */
-YAHOO.namespace = function() {
-    var a=arguments, o=null, i, j, d;
-    for (i=0; i<a.length; i=i+1) {
-        d=(""+a[i]).split(".");
-        o=YAHOO;
-
-        // YAHOO is implied, so it is ignored if it is included
-        for (j=(d[0] == "YAHOO") ? 1 : 0; j<d.length; j=j+1) {
-            o[d[j]]=o[d[j]] || {};
-            o=o[d[j]];
-        }
-    }
-
-    return o;
-};
-
-/**
- * Uses YAHOO.widget.Logger to output a log message, if the widget is
- * available.
- * Note: LogReader adds the message, category, and source to the DOM as HTML.
- *
- * @method log
- * @static
- * @param  {HTML}  msg  The message to log.
- * @param  {HTML}  cat  The log category for the message.  Default
- *                        categories are "info", "warn", "error", time".
- *                        Custom categories can be used as well. (opt)
- * @param  {HTML}  src  The source of the the message (opt)
- * @return {Boolean}      True if the log operation was successful.
- */
-YAHOO.log = function(msg, cat, src) {
-    var l=YAHOO.widget.Logger;
-    if(l && l.log) {
-        return l.log(msg, cat, src);
-    } else {
-        return false;
-    }
-};
-
-/**
- * Registers a module with the YAHOO object
- * @method register
- * @static
- * @param {String}   name    the name of the module (event, slider, etc)
- * @param {Function} mainClass a reference to class in the module.  This
- *                             class will be tagged with the version info
- *                             so that it will be possible to identify the
- *                             version that is in use when multiple versions
- *                             have loaded
- * @param {Object}   data      metadata object for the module.  Currently it
- *                             is expected to contain a "version" property
- *                             and a "build" property at minimum.
- */
-YAHOO.register = function(name, mainClass, data) {
-    var mods = YAHOO.env.modules, m, v, b, ls, i;
-
-    if (!mods[name]) {
-        mods[name] = {
-            versions:[],
-            builds:[]
-        };
-    }
-
-    m  = mods[name];
-    v  = data.version;
-    b  = data.build;
-    ls = YAHOO.env.listeners;
-
-    m.name = name;
-    m.version = v;
-    m.build = b;
-    m.versions.push(v);
-    m.builds.push(b);
-    m.mainClass = mainClass;
-
-    // fire the module load listeners
-    for (i=0;i<ls.length;i=i+1) {
-        ls[i](m);
-    }
-    // label the main class
-    if (mainClass) {
-        mainClass.VERSION = v;
-        mainClass.BUILD = b;
-    } else {
-        YAHOO.log("mainClass is undefined for module " + name, "warn");
-    }
-};
-
-/**
- * YAHOO.env is used to keep track of what is known about the YUI library and
- * the browsing environment
- * @class YAHOO.env
- * @static
- */
-YAHOO.env = YAHOO.env || {
-
-    /**
-     * Keeps the version info for all YUI modules that have reported themselves
-     * @property modules
-     * @type Object[]
-     */
-    modules: [],
-
-    /**
-     * List of functions that should be executed every time a YUI module
-     * reports itself.
-     * @property listeners
-     * @type Function[]
-     */
-    listeners: []
-};
-
-/**
- * Returns the version data for the specified module:
- *      <dl>
- *      <dt>name:</dt>      <dd>The name of the module</dd>
- *      <dt>version:</dt>   <dd>The version in use</dd>
- *      <dt>build:</dt>     <dd>The build number in use</dd>
- *      <dt>versions:</dt>  <dd>All versions that were registered</dd>
- *      <dt>builds:</dt>    <dd>All builds that were registered.</dd>
- *      <dt>mainClass:</dt> <dd>An object that was was stamped with the
- *                 current version and build. If
- *                 mainClass.VERSION != version or mainClass.BUILD != build,
- *                 multiple versions of pieces of the library have been
- *                 loaded, potentially causing issues.</dd>
- *       </dl>
- *
- * @method getVersion
- * @static
- * @param {String}  name the name of the module (event, slider, etc)
- * @return {Object} The version info
- */
-YAHOO.env.getVersion = function(name) {
-    return YAHOO.env.modules[name] || null;
-};
-
-/**
- * Do not fork for a browser if it can be avoided.  Use feature detection when
- * you can.  Use the user agent as a last resort.  YAHOO.env.ua stores a version
- * number for the browser engine, 0 otherwise.  This value may or may not map
- * to the version number of the browser using the engine.  The value is
- * presented as a float so that it can easily be used for boolean evaluation
- * as well as for looking for a particular range of versions.  Because of this,
- * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9
- * reports 1.8).
- * @class YAHOO.env.ua
- * @static
- */
-
-/**
- * parses a user agent string (or looks for one in navigator to parse if
- * not supplied).
- * @method parseUA
- * @since 2.9.0
- * @static
- */
-YAHOO.env.parseUA = function(agent) {
-
-        var numberify = function(s) {
-            var c = 0;
-            return parseFloat(s.replace(/\./g, function() {
-                return (c++ == 1) ? '' : '.';
-            }));
-        },
-
-        nav = navigator,
-
-        o = {
-
-        /**
-         * Internet Explorer version number or 0.  Example: 6
-         * @property ie
-         * @type float
-         * @static
-         */
-        ie: 0,
-
-        /**
-         * Opera version number or 0.  Example: 9.2
-         * @property opera
-         * @type float
-         * @static
-         */
-        opera: 0,
-
-        /**
-         * Gecko engine revision number.  Will evaluate to 1 if Gecko
-         * is detected but the revision could not be found. Other browsers
-         * will be 0.  Example: 1.8
-         * <pre>
-         * Firefox 1.0.0.4: 1.7.8   <-- Reports 1.7
-         * Firefox 1.5.0.9: 1.8.0.9 <-- 1.8
-         * Firefox 2.0.0.3: 1.8.1.3 <-- 1.81
-         * Firefox 3.0   <-- 1.9
-         * Firefox 3.5   <-- 1.91
-         * </pre>
-         * @property gecko
-         * @type float
-         * @static
-         */
-        gecko: 0,
-
-        /**
-         * AppleWebKit version.  KHTML browsers that are not WebKit browsers
-         * will evaluate to 1, other browsers 0.  Example: 418.9
-         * <pre>
-         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the
-         *                                   latest available for Mac OSX 10.3.
-         * Safari 2.0.2:         416     <-- hasOwnProperty introduced
-         * Safari 2.0.4:         418     <-- preventDefault fixed
-         * Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run
-         *                                   different versions of webkit
-         * Safari 2.0.4 (419.3): 419     <-- Tiger installations that have been
-         *                                   updated, but not updated
-         *                                   to the latest patch.
-         * Webkit 212 nightly:   522+    <-- Safari 3.0 precursor (with native
-         * SVG and many major issues fixed).
-         * Safari 3.0.4 (523.12) 523.12  <-- First Tiger release - automatic
-         * update from 2.x via the 10.4.11 OS patch.
-         * Webkit nightly 1/2008:525+    <-- Supports DOMContentLoaded event.
-         *                                   yahoo.com user agent hack removed.
-         * </pre>
-         * http://en.wikipedia.org/wiki/Safari_version_history
-         * @property webkit
-         * @type float
-         * @static
-         */
-        webkit: 0,
-
-        /**
-         * Chrome will be detected as webkit, but this property will also
-         * be populated with the Chrome version number
-         * @property chrome
-         * @type float
-         * @static
-         */
-        chrome: 0,
-
-        /**
-         * The mobile property will be set to a string containing any relevant
-         * user agent information when a modern mobile browser is detected.
-         * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series
-         * devices with the WebKit-based browser, and Opera Mini.
-         * @property mobile
-         * @type string
-         * @static
-         */
-        mobile: null,
-
-        /**
-         * Adobe AIR version number or 0.  Only populated if webkit is detected.
-         * Example: 1.0
-         * @property air
-         * @type float
-         */
-        air: 0,
-        /**
-         * Detects Apple iPad's OS version
-         * @property ipad
-         * @type float
-         * @static
-         */
-        ipad: 0,
-        /**
-         * Detects Apple iPhone's OS version
-         * @property iphone
-         * @type float
-         * @static
-         */
-        iphone: 0,
-        /**
-         * Detects Apples iPod's OS version
-         * @property ipod
-         * @type float
-         * @static
-         */
-        ipod: 0,
-        /**
-         * General truthy check for iPad, iPhone or iPod
-         * @property ios
-         * @type float
-         * @static
-         */
-        ios: null,
-        /**
-         * Detects Googles Android OS version
-         * @property android
-         * @type float
-         * @static
-         */
-        android: 0,
-        /**
-         * Detects Palms WebOS version
-         * @property webos
-         * @type float
-         * @static
-         */
-        webos: 0,
-
-        /**
-         * Google Caja version number or 0.
-         * @property caja
-         * @type float
-         */
-        caja: nav && nav.cajaVersion,
-
-        /**
-         * Set to true if the page appears to be in SSL
-         * @property secure
-         * @type boolean
-         * @static
-         */
-        secure: false,
-
-        /**
-         * The operating system.  Currently only detecting windows or macintosh
-         * @property os
-         * @type string
-         * @static
-         */
-        os: null
-
-    },
-
-    ua = agent || (navigator && navigator.userAgent),
-
-    loc = window && window.location,
-
-    href = loc && loc.href,
-
-    m;
-
-    o.secure = href && (href.toLowerCase().indexOf("https") === 0);
-
-    if (ua) {
-
-        if ((/windows|win32/i).test(ua)) {
-            o.os = 'windows';
-        } else if ((/macintosh/i).test(ua)) {
-            o.os = 'macintosh';
-        } else if ((/rhino/i).test(ua)) {
-            o.os = 'rhino';
-        }
-
-        // Modern KHTML browsers should qualify as Safari X-Grade
-        if ((/KHTML/).test(ua)) {
-            o.webkit = 1;
-        }
-        // Modern WebKit browsers are at least X-Grade
-        m = ua.match(/AppleWebKit\/([^\s]*)/);
-        if (m && m[1]) {
-            o.webkit = numberify(m[1]);
-
-            // Mobile browser check
-            if (/ Mobile\//.test(ua)) {
-                o.mobile = 'Apple'; // iPhone or iPod Touch
-
-                m = ua.match(/OS ([^\s]*)/);
-                if (m && m[1]) {
-                    m = numberify(m[1].replace('_', '.'));
-                }
-                o.ios = m;
-                o.ipad = o.ipod = o.iphone = 0;
-
-                m = ua.match(/iPad|iPod|iPhone/);
-                if (m && m[0]) {
-                    o[m[0].toLowerCase()] = o.ios;
-                }
-            } else {
-                m = ua.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);
-                if (m) {
-                    // Nokia N-series, Android, webOS, ex: NokiaN95
-                    o.mobile = m[0];
-                }
-                if (/webOS/.test(ua)) {
-                    o.mobile = 'WebOS';
-                    m = ua.match(/webOS\/([^\s]*);/);
-                    if (m && m[1]) {
-                        o.webos = numberify(m[1]);
-                    }
-                }
-                if (/ Android/.test(ua)) {
-                    o.mobile = 'Android';
-                    m = ua.match(/Android ([^\s]*);/);
-                    if (m && m[1]) {
-                        o.android = numberify(m[1]);
-                    }
-
-                }
-            }
-
-            m = ua.match(/Chrome\/([^\s]*)/);
-            if (m && m[1]) {
-                o.chrome = numberify(m[1]); // Chrome
-            } else {
-                m = ua.match(/AdobeAIR\/([^\s]*)/);
-                if (m) {
-                    o.air = m[0]; // Adobe AIR 1.0 or better
-                }
-            }
-        }
-
-        if (!o.webkit) { // not webkit
-// @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr)
-            m = ua.match(/Opera[\s\/]([^\s]*)/);
-            if (m && m[1]) {
-                o.opera = numberify(m[1]);
-                m = ua.match(/Version\/([^\s]*)/);
-                if (m && m[1]) {
-                    o.opera = numberify(m[1]); // opera 10+
-                }
-                m = ua.match(/Opera Mini[^;]*/);
-                if (m) {
-                    o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
-                }
-            } else { // not opera or webkit
-                m = ua.match(/MSIE\s([^;]*)/);
-                if (m && m[1]) {
-                    o.ie = numberify(m[1]);
-                } else { // not opera, webkit, or ie
-                    m = ua.match(/Gecko\/([^\s]*)/);
-                    if (m) {
-                        o.gecko = 1; // Gecko detected, look for revision
-                        m = ua.match(/rv:([^\s\)]*)/);
-                        if (m && m[1]) {
-                            o.gecko = numberify(m[1]);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return o;
-};
-
-YAHOO.env.ua = YAHOO.env.parseUA();
-
-/*
- * Initializes the global by creating the default namespaces and applying
- * any new configuration information that is detected.  This is the setup
- * for env.
- * @method init
- * @static
- * @private
- */
-(function() {
-    YAHOO.namespace("util", "widget", "example");
-    /*global YAHOO_config*/
-    if ("undefined" !== typeof YAHOO_config) {
-        var l=YAHOO_config.listener, ls=YAHOO.env.listeners,unique=true, i;
-        if (l) {
-            // if YAHOO is loaded multiple times we need to check to see if
-            // this is a new config object.  If it is, add the new component
-            // load listener to the stack
-            for (i=0; i<ls.length; i++) {
-                if (ls[i] == l) {
-                    unique = false;
-                    break;
-                }
-            }
-
-            if (unique) {
-                ls.push(l);
-            }
-        }
-    }
-})();
-/**
- * Provides the language utilites and extensions used by the library
- * @class YAHOO.lang
- */
-YAHOO.lang = YAHOO.lang || {};
-
-(function() {
-
-
-var L = YAHOO.lang,
-
-    OP = Object.prototype,
-    ARRAY_TOSTRING = '[object Array]',
-    FUNCTION_TOSTRING = '[object Function]',
-    OBJECT_TOSTRING = '[object Object]',
-    NOTHING = [],
-
-    HTML_CHARS = {
-        '&': '&amp;',
-        '<': '&lt;',
-        '>': '&gt;',
-        '"': '&quot;',
-        "'": '&#x27;',
-        '/': '&#x2F;',
-        '`': '&#x60;'
-    },
-
-    // ADD = ["toString", "valueOf", "hasOwnProperty"],
-    ADD = ["toString", "valueOf"],
-
-    OB = {
-
-    /**
-     * Determines wheather or not the provided object is an array.
-     * @method isArray
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isArray: function(o) {
-        return OP.toString.apply(o) === ARRAY_TOSTRING;
-    },
-
-    /**
-     * Determines whether or not the provided object is a boolean
-     * @method isBoolean
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isBoolean: function(o) {
-        return typeof o === 'boolean';
-    },
-
-    /**
-     * Determines whether or not the provided object is a function.
-     * Note: Internet Explorer thinks certain functions are objects:
-     *
-     * var obj = document.createElement("object");
-     * YAHOO.lang.isFunction(obj.getAttribute) // reports false in IE
-     *
-     * var input = document.createElement("input"); // append to body
-     * YAHOO.lang.isFunction(input.focus) // reports false in IE
-     *
-     * You will have to implement additional tests if these functions
-     * matter to you.
-     *
-     * @method isFunction
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isFunction: function(o) {
-        return (typeof o === 'function') || OP.toString.apply(o) === FUNCTION_TOSTRING;
-    },
-
-    /**
-     * Determines whether or not the provided object is null
-     * @method isNull
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isNull: function(o) {
-        return o === null;
-    },
-
-    /**
-     * Determines whether or not the provided object is a legal number
-     * @method isNumber
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isNumber: function(o) {
-        return typeof o === 'number' && isFinite(o);
-    },
-
-    /**
-     * Determines whether or not the provided object is of type object
-     * or function
-     * @method isObject
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isObject: function(o) {
-return (o && (typeof o === 'object' || L.isFunction(o))) || false;
-    },
-
-    /**
-     * Determines whether or not the provided object is a string
-     * @method isString
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isString: function(o) {
-        return typeof o === 'string';
-    },
-
-    /**
-     * Determines whether or not the provided object is undefined
-     * @method isUndefined
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isUndefined: function(o) {
-        return typeof o === 'undefined';
-    },
-
-
-    /**
-     * IE will not enumerate native functions in a derived object even if the
-     * function was overridden.  This is a workaround for specific functions
-     * we care about on the Object prototype.
-     * @property _IEEnumFix
-     * @param {Function} r  the object to receive the augmentation
-     * @param {Function} s  the object that supplies the properties to augment
-     * @static
-     * @private
-     */
-    _IEEnumFix: (YAHOO.env.ua.ie) ? function(r, s) {
-            var i, fname, f;
-            for (i=0;i<ADD.length;i=i+1) {
-
-                fname = ADD[i];
-                f = s[fname];
-
-                if (L.isFunction(f) && f!=OP[fname]) {
-                    r[fname]=f;
-                }
-            }
-    } : function(){},
-
-    /**
-     * <p>
-     * Returns a copy of the specified string with special HTML characters
-     * escaped. The following characters will be converted to their
-     * corresponding character entities:
-     * <code>&amp; &lt; &gt; &quot; &#x27; &#x2F; &#x60;</code>
-     * </p>
-     *
-     * <p>
-     * This implementation is based on the
-     * <a href="http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet">OWASP
-     * HTML escaping recommendations</a>. In addition to the characters
-     * in the OWASP recommendation, we also escape the <code>&#x60;</code>
-     * character, since IE interprets it as an attribute delimiter when used in
-     * innerHTML.
-     * </p>
-     *
-     * @method escapeHTML
-     * @param {String} html String to escape.
-     * @return {String} Escaped string.
-     * @static
-     * @since 2.9.0
-     */
-    escapeHTML: function (html) {
-        return html.replace(/[&<>"'\/`]/g, function (match) {
-            return HTML_CHARS[match];
-        });
-    },
-
-    /**
-     * Utility to set up the prototype, constructor and superclass properties to
-     * support an inheritance strategy that can chain constructors and methods.
-     * Static members will not be inherited.
-     *
-     * @method extend
-     * @static
-     * @param {Function} subc   the object to modify
-     * @param {Function} superc the object to inherit
-     * @param {Object} overrides  additional properties/methods to add to the
-     *                              subclass prototype.  These will override the
-     *                              matching items obtained from the superclass
-     *                              if present.
-     */
-    extend: function(subc, superc, overrides) {
-        if (!superc||!subc) {
-            throw new Error("extend failed, please check that " +
-                            "all dependencies are included.");
-        }
-        var F = function() {}, i;
-        F.prototype=superc.prototype;
-        subc.prototype=new F();
-        subc.prototype.constructor=subc;
-        subc.superclass=superc.prototype;
-        if (superc.prototype.constructor == OP.constructor) {
-            superc.prototype.constructor=superc;
-        }
-
-        if (overrides) {
-            for (i in overrides) {
-                if (L.hasOwnProperty(overrides, i)) {
-                    subc.prototype[i]=overrides[i];
-                }
-            }
-
-            L._IEEnumFix(subc.prototype, overrides);
-        }
-    },
-
-    /**
-     * Applies all properties in the supplier to the receiver if the
-     * receiver does not have these properties yet.  Optionally, one or
-     * more methods/properties can be specified (as additional
-     * parameters).  This option will overwrite the property if receiver
-     * has it already.  If true is passed as the third parameter, all
-     * properties will be applied and _will_ overwrite properties in
-     * the receiver.
-     *
-     * @method augmentObject
-     * @static
-     * @since 2.3.0
-     * @param {Function} r  the object to receive the augmentation
-     * @param {Function} s  the object that supplies the properties to augment
-     * @param {String*|boolean}  arguments zero or more properties methods
-     *        to augment the receiver with.  If none specified, everything
-     *        in the supplier will be used unless it would
-     *        overwrite an existing property in the receiver. If true
-     *        is specified as the third parameter, all properties will
-     *        be applied and will overwrite an existing property in
-     *        the receiver
-     */
-    augmentObject: function(r, s) {
-        if (!s||!r) {
-            throw new Error("Absorb failed, verify dependencies.");
-        }
-        var a=arguments, i, p, overrideList=a[2];
-        if (overrideList && overrideList!==true) { // only absorb the specified properties
-            for (i=2; i<a.length; i=i+1) {
-                r[a[i]] = s[a[i]];
-            }
-        } else { // take everything, overwriting only if the third parameter is true
-            for (p in s) {
-                if (overrideList || !(p in r)) {
-                    r[p] = s[p];
-                }
-            }
-
-            L._IEEnumFix(r, s);
-        }
-
-        return r;
-    },
-
-    /**
-     * Same as YAHOO.lang.augmentObject, except it only applies prototype properties
-     * @see YAHOO.lang.augmentObject
-     * @method augmentProto
-     * @static
-     * @param {Function} r  the object to receive the augmentation
-     * @param {Function} s  the object that supplies the properties to augment
-     * @param {String*|boolean}  arguments zero or more properties methods
-     *        to augment the receiver with.  If none specified, everything
-     *        in the supplier will be used unless it would overwrite an existing
-     *        property in the receiver.  if true is specified as the third
-     *        parameter, all properties will be applied and will overwrite an
-     *        existing property in the receiver
-     */
-    augmentProto: function(r, s) {
-        if (!s||!r) {
-            throw new Error("Augment failed, verify dependencies.");
-        }
-        //var a=[].concat(arguments);
-        var a=[r.prototype,s.prototype], i;
-        for (i=2;i<arguments.length;i=i+1) {
-            a.push(arguments[i]);
-        }
-        L.augmentObject.apply(this, a);
-
-        return r;
-    },
-
-
-    /**
-     * Returns a simple string representation of the object or array.
-     * Other types of objects will be returned unprocessed.  Arrays
-     * are expected to be indexed.  Use object notation for
-     * associative arrays.
-     * @method dump
-     * @since 2.3.0
-     * @param o {Object} The object to dump
-     * @param d {int} How deep to recurse child objects, default 3
-     * @return {String} the dump result
-     */
-    dump: function(o, d) {
-        var i,len,s=[],OBJ="{...}",FUN="f(){...}",
-            COMMA=', ', ARROW=' => ';
-
-        // Cast non-objects to string
-        // Skip dates because the std toString is what we want
-        // Skip HTMLElement-like objects because trying to dump
-        // an element will cause an unhandled exception in FF 2.x
-        if (!L.isObject(o)) {
-            return o + "";
-        } else if (o instanceof Date || ("nodeType" in o && "tagName" in o)) {
-            return o;
-        } else if  (L.isFunction(o)) {
-            return FUN;
-        }
-
-        // dig into child objects the depth specifed. Default 3
-        d = (L.isNumber(d)) ? d : 3;
-
-        // arrays [1, 2, 3]
-        if (L.isArray(o)) {
-            s.push("[");
-            for (i=0,len=o.length;i<len;i=i+1) {
-                if (L.isObject(o[i])) {
-                    s.push((d > 0) ? L.dump(o[i], d-1) : OBJ);
-                } else {
-                    s.push(o[i]);
-                }
-                s.push(COMMA);
-            }
-            if (s.length > 1) {
-                s.pop();
-            }
-            s.push("]");
-        // objects {k1 => v1, k2 => v2}
-        } else {
-            s.push("{");
-            for (i in o) {
-                if (L.hasOwnProperty(o, i)) {
-                    s.push(i + ARROW);
-                    if (L.isObject(o[i])) {
-                        s.push((d > 0) ? L.dump(o[i], d-1) : OBJ);
-                    } else {
-                        s.push(o[i]);
-                    }
-                    s.push(COMMA);
-                }
-            }
-            if (s.length > 1) {
-                s.pop();
-            }
-            s.push("}");
-        }
-
-        return s.join("");
-    },
-
-    /**
-     * Does variable substitution on a string. It scans through the string
-     * looking for expressions enclosed in { } braces. If an expression
-     * is found, it is used a key on the object.  If there is a space in
-     * the key, the first word is used for the key and the rest is provided
-     * to an optional function to be used to programatically determine the
-     * value (the extra information might be used for this decision). If
-     * the value for the key in the object, or what is returned from the
-     * function has a string value, number value, or object value, it is
-     * substituted for the bracket expression and it repeats.  If this
-     * value is an object, it uses the Object's toString() if this has
-     * been overridden, otherwise it does a shallow dump of the key/value
-     * pairs.
-     *
-     * By specifying the recurse option, the string is rescanned after
-     * every replacement, allowing for nested template substitutions.
-     * The side effect of this option is that curly braces in the
-     * replacement content must be encoded.
-     *
-     * @method substitute
-     * @since 2.3.0
-     * @param s {String} The string that will be modified.
-     * @param o {Object} An object containing the replacement values
-     * @param f {Function} An optional function that can be used to
-     *                     process each match.  It receives the key,
-     *                     value, and any extra metadata included with
-     *                     the key inside of the braces.
-     * @param recurse {boolean} default true - if not false, the replaced
-     * string will be rescanned so that nested substitutions are possible.
-     * @return {String} the substituted string
-     */
-    substitute: function (s, o, f, recurse) {
-        var i, j, k, key, v, meta, saved=[], token, lidx=s.length,
-            DUMP='dump', SPACE=' ', LBRACE='{', RBRACE='}',
-            dump, objstr;
-
-        for (;;) {
-            i = s.lastIndexOf(LBRACE, lidx);
-            if (i < 0) {
-                break;
-            }
-            j = s.indexOf(RBRACE, i);
-            if (i + 1 > j) {
-                break;
-            }
-
-            //Extract key and meta info
-            token = s.substring(i + 1, j);
-            key = token;
-            meta = null;
-            k = key.indexOf(SPACE);
-            if (k > -1) {
-                meta = key.substring(k + 1);
-                key = key.substring(0, k);
-            }
-
-            // lookup the value
-            v = o[key];
-
-            // if a substitution function was provided, execute it
-            if (f) {
-                v = f(key, v, meta);
-            }
-
-            if (L.isObject(v)) {
-                if (L.isArray(v)) {
-                    v = L.dump(v, parseInt(meta, 10));
-                } else {
-                    meta = meta || "";
-
-                    // look for the keyword 'dump', if found force obj dump
-                    dump = meta.indexOf(DUMP);
-                    if (dump > -1) {
-                        meta = meta.substring(4);
-                    }
-
-                    objstr = v.toString();
-
-                    // use the toString if it is not the Object toString
-                    // and the 'dump' meta info was not found
-                    if (objstr === OBJECT_TOSTRING || dump > -1) {
-                        v = L.dump(v, parseInt(meta, 10));
-                    } else {
-                        v = objstr;
-                    }
-                }
-            } else if (!L.isString(v) && !L.isNumber(v)) {
-                // This {block} has no replace string. Save it for later.
-                v = "~-" + saved.length + "-~";
-                saved[saved.length] = token;
-
-                // break;
-            }
-
-            s = s.substring(0, i) + v + s.substring(j + 1);
-
-            if (recurse === false) {
-                lidx = i-1;
-            }
-
-        }
-
-        // restore saved {block}s
-        for (i=saved.length-1; i>=0; i=i-1) {
-            s = s.replace(new RegExp("~-" + i + "-~"), "{"  + saved[i] + "}", "g");
-        }
-
-        return s;
-    },
-
-
-    /**
-     * Returns a string without any leading or trailing whitespace.  If
-     * the input is not a string, the input will be returned untouched.
-     * @method trim
-     * @since 2.3.0
-     * @param s {string} the string to trim
-     * @return {string} the trimmed string
-     */
-    trim: function(s){
-        try {
-            return s.replace(/^\s+|\s+$/g, "");
-        } catch(e) {
-            return s;
-        }
-    },
-
-    /**
-     * Returns a new object containing all of the properties of
-     * all the supplied objects.  The properties from later objects
-     * will overwrite those in earlier objects.
-     * @method merge
-     * @since 2.3.0
-     * @param arguments {Object*} the objects to merge
-     * @return the new merged object
-     */
-    merge: function() {
-        var o={}, a=arguments, l=a.length, i;
-        for (i=0; i<l; i=i+1) {
-            L.augmentObject(o, a[i], true);
-        }
-        return o;
-    },
-
-    /**
-     * Executes the supplied function in the context of the supplied
-     * object 'when' milliseconds later.  Executes the function a
-     * single time unless periodic is set to true.
-     * @method later
-     * @since 2.4.0
-     * @param when {int} the number of milliseconds to wait until the fn
-     * is executed
-     * @param o the context object
-     * @param fn {Function|String} the function to execute or the name of
-     * the method in the 'o' object to execute
-     * @param data [Array] data that is provided to the function.  This accepts
-     * either a single item or an array.  If an array is provided, the
-     * function is executed with one parameter for each array item.  If
-     * you need to pass a single array parameter, it needs to be wrapped in
-     * an array [myarray]
-     * @param periodic {boolean} if true, executes continuously at supplied
-     * interval until canceled
-     * @return a timer object. Call the cancel() method on this object to
-     * stop the timer.
-     */
-    later: function(when, o, fn, data, periodic) {
-        when = when || 0;
-        o = o || {};
-        var m=fn, d=data, f, r;
-
-        if (L.isString(fn)) {
-            m = o[fn];
-        }
-
-        if (!m) {
-            throw new TypeError("method undefined");
-        }
-
-        if (!L.isUndefined(data) && !L.isArray(d)) {
-            d = [data];
-        }
-
-        f = function() {
-            m.apply(o, d || NOTHING);
-        };
-
-        r = (periodic) ? setInterval(f, when) : setTimeout(f, when);
-
-        return {
-            interval: periodic,
-            cancel: function() {
-                if (this.interval) {
-                    clearInterval(r);
-                } else {
-                    clearTimeout(r);
-                }
-            }
-        };
-    },
-
-    /**
-     * A convenience method for detecting a legitimate non-null value.
-     * Returns false for null/undefined/NaN, true for other values,
-     * including 0/false/''
-     * @method isValue
-     * @since 2.3.0
-     * @param o {any} the item to test
-     * @return {boolean} true if it is not null/undefined/NaN || false
-     */
-    isValue: function(o) {
-        // return (o || o === false || o === 0 || o === ''); // Infinity fails
-return (L.isObject(o) || L.isString(o) || L.isNumber(o) || L.isBoolean(o));
-    }
-
-};
-
-/**
- * Determines whether or not the property was added
- * to the object instance.  Returns false if the property is not present
- * in the object, or was inherited from the prototype.
- * This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
- * There is a discrepancy between YAHOO.lang.hasOwnProperty and
- * Object.prototype.hasOwnProperty when the property is a primitive added to
- * both the instance AND prototype with the same value:
- * <pre>
- * var A = function() {};
- * A.prototype.foo = 'foo';
- * var a = new A();
- * a.foo = 'foo';
- * alert(a.hasOwnProperty('foo')); // true
- * alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
- * </pre>
- * @method hasOwnProperty
- * @param {any} o The object being testing
- * @param prop {string} the name of the property to test
- * @return {boolean} the result
- */
-L.hasOwnProperty = (OP.hasOwnProperty) ?
-    function(o, prop) {
-        return o && o.hasOwnProperty && o.hasOwnProperty(prop);
-    } : function(o, prop) {
-        return !L.isUndefined(o[prop]) &&
-                o.constructor.prototype[prop] !== o[prop];
-    };
-
-// new lang wins
-OB.augmentObject(L, OB, true);
-
-/*
- * An alias for <a href="YAHOO.lang.html">YAHOO.lang</a>
- * @class YAHOO.util.Lang
- */
-YAHOO.util.Lang = L;
-
-/**
- * Same as YAHOO.lang.augmentObject, except it only applies prototype
- * properties.  This is an alias for augmentProto.
- * @see YAHOO.lang.augmentObject
- * @method augment
- * @static
- * @param {Function} r  the object to receive the augmentation
- * @param {Function} s  the object that supplies the properties to augment
- * @param {String*|boolean}  arguments zero or more properties methods to
- *        augment the receiver with.  If none specified, everything
- *        in the supplier will be used unless it would
- *        overwrite an existing property in the receiver.  if true
- *        is specified as the third parameter, all properties will
- *        be applied and will overwrite an existing property in
- *        the receiver
- */
-L.augment = L.augmentProto;
-
-/**
- * An alias for <a href="YAHOO.lang.html#augment">YAHOO.lang.augment</a>
- * @for YAHOO
- * @method augment
- * @static
- * @param {Function} r  the object to receive the augmentation
- * @param {Function} s  the object that supplies the properties to augment
- * @param {String*}  arguments zero or more properties methods to
- *        augment the receiver with.  If none specified, everything
- *        in the supplier will be used unless it would
- *        overwrite an existing property in the receiver
- */
-YAHOO.augment = L.augmentProto;
-
-/**
- * An alias for <a href="YAHOO.lang.html#extend">YAHOO.lang.extend</a>
- * @method extend
- * @static
- * @param {Function} subc   the object to modify
- * @param {Function} superc the object to inherit
- * @param {Object} overrides  additional properties/methods to add to the
- *        subclass prototype.  These will override the
- *        matching items obtained from the superclass if present.
- */
-YAHOO.extend = L.extend;
-
-})();
-YAHOO.register("yahoo", YAHOO, {version: "2.9.0", build: "2800"});

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js
deleted file mode 100644
index 46c58bf..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yahoodomevent/yahoo-dom-event.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var b=arguments,g=null,e,c,f;for(e=0;e<b.length;e=e+1){f=(""+b[e]).split(".");g=YAHOO;for(c=(f[0]=="YAHOO")?1:0;c<f.length;c=c+1){g[f[c]]=g[f[c]]||{};g=g[f[c]];}}return g;};YAHOO.log=function(d,a,c){var b=YAHOO.widget.Logger;if(b&&b.log){return b.log(d,a,c);}else{return false;}};YAHOO.register=function(a,f,e){var k=YAHOO.env.modules,c,j,h,g,d;if(!k[a]){k[a]={versions:[],builds:[]};}c=k[a];j=e.version;h=e.build;g=YAHOO.env.listeners;c.name=a;c.version=j;c.build=h;c.versions.push(j);c.builds.push(h);c.mainClass=f;for(d=0;d<g.length;d=d+1){g[d](c);}if(f){f.VERSION=j;f.BUILD=h;}else{YAHOO.log("mainClass is undefined for module "+a,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(a){return YAHOO.env.modules[a]||null;};YAHOO.env.parseUA=function(d){var e=function(i){var j=0;return parseFloat(i.replace(/\./g,function(){return(j++==1)?"":".";}));},h=navigator,g={ie:0,opera:0
 ,gecko:0,webkit:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,webos:0,caja:h&&h.cajaVersion,secure:false,os:null},c=d||(navigator&&navigator.userAgent),f=window&&window.location,b=f&&f.href,a;g.secure=b&&(b.toLowerCase().indexOf("https")===0);if(c){if((/windows|win32/i).test(c)){g.os="windows";}else{if((/macintosh/i).test(c)){g.os="macintosh";}else{if((/rhino/i).test(c)){g.os="rhino";}}}if((/KHTML/).test(c)){g.webkit=1;}a=c.match(/AppleWebKit\/([^\s]*)/);if(a&&a[1]){g.webkit=e(a[1]);if(/ Mobile\//.test(c)){g.mobile="Apple";a=c.match(/OS ([^\s]*)/);if(a&&a[1]){a=e(a[1].replace("_","."));}g.ios=a;g.ipad=g.ipod=g.iphone=0;a=c.match(/iPad|iPod|iPhone/);if(a&&a[0]){g[a[0].toLowerCase()]=g.ios;}}else{a=c.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);if(a){g.mobile=a[0];}if(/webOS/.test(c)){g.mobile="WebOS";a=c.match(/webOS\/([^\s]*);/);if(a&&a[1]){g.webos=e(a[1]);}}if(/ Android/.test(c)){g.mobile="Android";a=c.match(/Android ([^\s]*);/);if(a&&a[1]){g.android=
 e(a[1]);}}}a=c.match(/Chrome\/([^\s]*)/);if(a&&a[1]){g.chrome=e(a[1]);}else{a=c.match(/AdobeAIR\/([^\s]*)/);if(a){g.air=a[0];}}}if(!g.webkit){a=c.match(/Opera[\s\/]([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);a=c.match(/Version\/([^\s]*)/);if(a&&a[1]){g.opera=e(a[1]);}a=c.match(/Opera Mini[^;]*/);if(a){g.mobile=a[0];}}else{a=c.match(/MSIE\s([^;]*)/);if(a&&a[1]){g.ie=e(a[1]);}else{a=c.match(/Gecko\/([^\s]*)/);if(a){g.gecko=1;a=c.match(/rv:([^\s\)]*)/);if(a&&a[1]){g.gecko=e(a[1]);}}}}}}return g;};YAHOO.env.ua=YAHOO.env.parseUA();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var b=YAHOO_config.listener,a=YAHOO.env.listeners,d=true,c;if(b){for(c=0;c<a.length;c++){if(a[c]==b){d=false;break;}}if(d){a.push(b);}}}})();YAHOO.lang=YAHOO.lang||{};(function(){var f=YAHOO.lang,a=Object.prototype,c="[object Array]",h="[object Function]",i="[object Object]",b=[],g={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;","`":"&#x60;"},d=["to
 String","valueOf"],e={isArray:function(j){return a.toString.apply(j)===c;},isBoolean:function(j){return typeof j==="boolean";},isFunction:function(j){return(typeof j==="function")||a.toString.apply(j)===h;},isNull:function(j){return j===null;},isNumber:function(j){return typeof j==="number"&&isFinite(j);},isObject:function(j){return(j&&(typeof j==="object"||f.isFunction(j)))||false;},isString:function(j){return typeof j==="string";},isUndefined:function(j){return typeof j==="undefined";},_IEEnumFix:(YAHOO.env.ua.ie)?function(l,k){var j,n,m;for(j=0;j<d.length;j=j+1){n=d[j];m=k[n];if(f.isFunction(m)&&m!=a[n]){l[n]=m;}}}:function(){},escapeHTML:function(j){return j.replace(/[&<>"'\/`]/g,function(k){return g[k];});},extend:function(m,n,l){if(!n||!m){throw new Error("extend failed, please check that "+"all dependencies are included.");}var k=function(){},j;k.prototype=n.prototype;m.prototype=new k();m.prototype.constructor=m;m.superclass=n.prototype;if(n.prototype.constructor==a.construc
 tor){n.prototype.constructor=n;}if(l){for(j in l){if(f.hasOwnProperty(l,j)){m.prototype[j]=l[j];}}f._IEEnumFix(m.prototype,l);}},augmentObject:function(n,m){if(!m||!n){throw new Error("Absorb failed, verify dependencies.");}var j=arguments,l,o,k=j[2];if(k&&k!==true){for(l=2;l<j.length;l=l+1){n[j[l]]=m[j[l]];}}else{for(o in m){if(k||!(o in n)){n[o]=m[o];}}f._IEEnumFix(n,m);}return n;},augmentProto:function(m,l){if(!l||!m){throw new Error("Augment failed, verify dependencies.");}var j=[m.prototype,l.prototype],k;for(k=2;k<arguments.length;k=k+1){j.push(arguments[k]);}f.augmentObject.apply(this,j);return m;},dump:function(j,p){var l,n,r=[],t="{...}",k="f(){...}",q=", ",m=" => ";if(!f.isObject(j)){return j+"";}else{if(j instanceof Date||("nodeType" in j&&"tagName" in j)){return j;}else{if(f.isFunction(j)){return k;}}}p=(f.isNumber(p))?p:3;if(f.isArray(j)){r.push("[");for(l=0,n=j.length;l<n;l=l+1){if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}if(r.l
 ength>1){r.pop();}r.push("]");}else{r.push("{");for(l in j){if(f.hasOwnProperty(j,l)){r.push(l+m);if(f.isObject(j[l])){r.push((p>0)?f.dump(j[l],p-1):t);}else{r.push(j[l]);}r.push(q);}}if(r.length>1){r.pop();}r.push("}");}return r.join("");},substitute:function(x,y,E,l){var D,C,B,G,t,u,F=[],p,z=x.length,A="dump",r=" ",q="{",m="}",n,w;for(;;){D=x.lastIndexOf(q,z);if(D<0){break;}C=x.indexOf(m,D);if(D+1>C){break;}p=x.substring(D+1,C);G=p;u=null;B=G.indexOf(r);if(B>-1){u=G.substring(B+1);G=G.substring(0,B);}t=y[G];if(E){t=E(G,t,u);}if(f.isObject(t)){if(f.isArray(t)){t=f.dump(t,parseInt(u,10));}else{u=u||"";n=u.indexOf(A);if(n>-1){u=u.substring(4);}w=t.toString();if(w===i||n>-1){t=f.dump(t,parseInt(u,10));}else{t=w;}}}else{if(!f.isString(t)&&!f.isNumber(t)){t="~-"+F.length+"-~";F[F.length]=p;}}x=x.substring(0,D)+t+x.substring(C+1);if(l===false){z=D-1;}}for(D=F.length-1;D>=0;D=D-1){x=x.replace(new RegExp("~-"+D+"-~"),"{"+F[D]+"}","g");}return x;},trim:function(j){try{return j.replace(/^\s+
 |\s+$/g,"");}catch(k){return j;
-}},merge:function(){var n={},k=arguments,j=k.length,m;for(m=0;m<j;m=m+1){f.augmentObject(n,k[m],true);}return n;},later:function(t,k,u,n,p){t=t||0;k=k||{};var l=u,s=n,q,j;if(f.isString(u)){l=k[u];}if(!l){throw new TypeError("method undefined");}if(!f.isUndefined(n)&&!f.isArray(s)){s=[n];}q=function(){l.apply(k,s||b);};j=(p)?setInterval(q,t):setTimeout(q,t);return{interval:p,cancel:function(){if(this.interval){clearInterval(j);}else{clearTimeout(j);}}};},isValue:function(j){return(f.isObject(j)||f.isString(j)||f.isNumber(j)||f.isBoolean(j));}};f.hasOwnProperty=(a.hasOwnProperty)?function(j,k){return j&&j.hasOwnProperty&&j.hasOwnProperty(k);}:function(j,k){return !f.isUndefined(j[k])&&j.constructor.prototype[k]!==j[k];};e.augmentObject(f,e,true);YAHOO.util.Lang=f;f.augment=f.augmentProto;YAHOO.augment=f.augmentProto;YAHOO.extend=f.extend;})();YAHOO.register("yahoo",YAHOO,{version:"2.9.0",build:"2800"});(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO
 .lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.value===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=
 0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.style[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,v
 al:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;}if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},g
 etX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[null,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition
 (X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttribute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.
 batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAHOO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&
 &ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=
 function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);
 },getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});}
 ,_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]=
 =1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.
 min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTop
 Width",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i
 ;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",r
 ed:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnc
 e=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subscribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){retu
 rn true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHO
 O.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_dri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,th
 rowErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j[j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){retur
 n v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.call){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]=
 =l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:function(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtaut
 oid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.c
 all(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r
 ];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.s
 crollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e)
 ;}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YA
 HOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYD
 OWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});YAHOO.register("yahoo-dom-event", YAHOO, {version: "2.9.0", build: "2800"});
\ No newline at end of file


[11/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon1.gif
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon1.gif b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon1.gif
deleted file mode 100644
index c5e5c04..0000000
Binary files a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon1.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon2.gif
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon2.gif b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon2.gif
deleted file mode 100644
index b7d9077..0000000
Binary files a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon2.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon3.gif
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon3.gif b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon3.gif
deleted file mode 100644
index 45a2466..0000000
Binary files a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/icon3.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js
deleted file mode 100644
index 9a84fc3..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/wicket-date.js
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * 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.
- */
-
-/*
- * Wicket Date parse function for the Calendar/ Date picker component.
- */
-
-/*globals YAHOO: true */
-
-;(function (undefined) {
-	'use strict';
-
-	// Wicket Namespace
-
-	if (typeof(Wicket) === "undefined") {
-		window.Wicket = {};
-	}
-
-	Wicket.DateTime = {};
-
-	/**
-	 * Parses date from simple date pattern.
-	 *
-	 * Supports patterns built up from the following elements:
-	 * yy OR yyyy for year
-	 * M OR MM OR MMM OR MMMM for month
-	 * d OR dd for day
-	 * EEEE for weekday (optional)
-	 */
-	Wicket.DateTime.parseDate = function(cfg, value) {
-		var numbers = value.match(/(\d+)/g);
-		var pattern = cfg.datePattern;
-		if (!numbers) {
-			return NaN;
-		}
-
-		var day, month, year;
-		var arrayPos = 0;
-		for (var i = 0; i < pattern.length; i++) {
-			var c = pattern.charAt(i);
-			var len = 0;
-			while ((pattern.charAt(i) === c) && (i < pattern.length)) {
-				i++;
-				len++;
-			}
-			if (c === 'y') {
-				year = numbers[arrayPos++];
-			} else if (c === 'M') {
-				var nameArray;
-				switch (len) {
-				case 3:
-					nameArray = cfg.calendarInit.MONTHS_SHORT;
-					break;
-				case 4:
-					nameArray = cfg.calendarInit.MONTHS_LONG;
-					break;
-				default:
-					nameArray = null;
-				}
-				if (nameArray) {
-					for (var j = 0; j < nameArray.length; j++) {
-						if (value.indexOf(nameArray[j]) >= 0) {
-							month = j + 1;
-							break;
-						}
-					}
-				} else {
-					month = numbers[arrayPos++];
-				}
-			} else if (c === 'd') {
-				day = numbers[arrayPos++];
-			}
-			if (arrayPos > 2) {
-				break;
-			}
-		}
-		// TODO this is a bit crude. Make nicer some time.
-		if (year < 100) {
-			if (year < 70) {
-				year = year * 1 + 2000;
-			} else {
-				year = year * 1 + 1900;
-			}
-		}
-		var date = new Date();
-		date.setHours(0);
-		date.setMinutes(0);
-		date.setSeconds(0);
-		date.setMilliseconds(0);
-		date.setFullYear(year, (month - 1), day);
-
-		return date;
-	};
-
-	/**
-	 * Returns a string containing the value, with a leading zero if the value is < 10.
-	 */
-	Wicket.DateTime.padDateFragment = function(value) {
-		return (value < 10 ? "0" : "") + value;
-	};
-
-	/**
-	 * Gets the height of the displayed area of the window, as YAHOO.util.Dom.getViewportHeight()
-	 * has issues with Firefox.
-	 * See http://tech.groups.yahoo.com/group/ydn-javascript/message/5850
-	 * Implementation taken from: http://www.quirksmode.org/viewport/compatibility.html#link2
-	 */
-	Wicket.DateTime.getViewportHeight = function() {
-		var viewPortHeight;
-
-		if (window.innerHeight) {// all browsers except IE
-			viewPortHeight = window.innerHeight;
-		} else if (document.documentElement && document.documentElement.clientHeight) {// IE 6 strict mode
-			viewPortHeight = document.documentElement.clientHeight;
-		} else if (document.body) {// other IEs
-			viewPortHeight = document.body.clientHeight;
-		}
-		return viewPortHeight;
-	};
-
-	/**
-	 * Position subject relative to target top-left by default.
-	 * If there is too little space on the right side/bottom,
-	 * the datepicker's position is corrected so that the right side/bottom
-	 * is aligned with the display area's right side/bottom.
-	 * @param subject the dom element to has to be positioned
-	 * @param target id of the dom element to position relative to
-	 */
-	Wicket.DateTime.positionRelativeTo = function(subject, target) {
-
-		var targetPos = YAHOO.util.Dom.getXY(target);
-		var targetHeight = YAHOO.util.Dom.get(target).offsetHeight;
-		var subjectHeight = YAHOO.util.Dom.get(subject).offsetHeight;
-		var subjectWidth = YAHOO.util.Dom.get(subject).offsetWidth;
-
-		var viewPortHeight = Wicket.DateTime.getViewportHeight();
-		var viewPortWidth = YAHOO.util.Dom.getViewportWidth();
-
-		// also take scroll position into account
-		var scrollPos = [YAHOO.util.Dom.getDocumentScrollLeft(), YAHOO.util.Dom.getDocumentScrollTop()];
-
-		// correct datepicker's position so that it isn't rendered off screen on the right side or bottom
-		if (targetPos[0] + subjectWidth > scrollPos[0] + viewPortWidth) {
-			// correct horizontal position
-			YAHOO.util.Dom.setX(subject, Math.max(targetPos[0], viewPortWidth) - subjectWidth);
-		} else {
-			YAHOO.util.Dom.setX(subject, targetPos[0]);
-		}
-		if (targetPos[1] + targetHeight + 1 + subjectHeight > scrollPos[1] + viewPortHeight) {
-			// correct vertical position
-			YAHOO.util.Dom.setY(subject, Math.max(targetPos[1], viewPortHeight) - subjectHeight);
-		} else {
-			YAHOO.util.Dom.setY(subject, targetPos[1] + targetHeight + 1);
-		}
-	};
-
-	/**
-	 * Return the result of interpolating the value (datetime) argument with the date pattern.
-	 * The date has to be an array, where year is in the first, month in the second
-	 * and date (day of month) in the third slot.
-	 */
-	Wicket.DateTime.substituteDate = function(cfg, datetime) {
-		var day = datetime[2];
-		var month = datetime[1];
-		var year = datetime[0];
-
-		var date = new Date();
-		date.setHours(0);
-		date.setMinutes(0);
-		date.setSeconds(0);
-		date.setMilliseconds(0);
-		date.setFullYear(year, (month - 1), day);
-
-		var dayName = null;
-		var datePattern = cfg.datePattern;
-
-		// optionally do some padding to match the pattern
-		if(datePattern.match(/dd+/)) {
-			day = Wicket.DateTime.padDateFragment(day);
-		}
-		if (datePattern.match(/MMMM/)) {
-			month = cfg.calendarInit.MONTHS_LONG[month - 1];
-		}
-		else if (datePattern.match(/MMM/)) {
-			month = cfg.calendarInit.MONTHS_SHORT[month - 1];
-		}
-		else if(datePattern.match(/MM+/)) {
-			month = Wicket.DateTime.padDateFragment(month);
-		}
-		if(datePattern.match(/yyy+/)) {
-			year = Wicket.DateTime.padDateFragment(year);
-		} else if(datePattern.match(/yy+/)) {
-			year = Wicket.DateTime.padDateFragment(year % 100);
-		}
-		if (datePattern.match(/EEEE/)) {
-			// figure out which weekday it is...
-			var engDayName = date.toString().match(/(\S*)/)[0];
-			var engDayNames = ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];
-			for (var i = 0; i < engDayNames.length; i++) {
-				if (engDayName === engDayNames[i]) {
-					dayName = cfg.calendarInit.WEEKDAYS_LONG[i];
-					break;
-				}
-			}
-		}
-		// replace pattern with real values
-		var result = datePattern.replace(/d+/, day).replace(/y+/, year).replace(/M+/, month);
-
-		if (dayName != null) {
-			result = result.replace(/EEEE/, dayName);
-		}
-
-		return result;
-	};
-
-	/**
-	 * Display the YUI calendar widget. If the date is not null (should be a string) then it is parsed
-	 * using the provided date pattern, and set as the current date on the widget.
-	 */
-	Wicket.DateTime.showCalendar = function(widget, date, cfg) {
-		if (date) {
-			date = Wicket.DateTime.parseDate(cfg, date);
-			if (!isNaN(date)) {
-				widget.select(date);
-				var firstDate = widget.getSelectedDates()[0];
-				if (firstDate) {
-					widget.cfg.setProperty("pagedate", (firstDate.getMonth() + 1) + "/" + firstDate.getFullYear());
-					widget.render();
-				}
-			}
-		}
-		widget.show();
-	};
-
-	// configures a datepicker using the cfg object
-	Wicket.DateTime.init = function(cfg) {
-		cfg.dpJs = cfg.widgetId + "DpJs";
-		cfg.dp = cfg.widgetId + "Dp";
-		cfg.icon = cfg.widgetId +"Icon";
-		YAHOO.namespace("wicket");
-
-		if (cfg.calendarInit.pages && cfg.calendarInit.pages > 1) {
-			YAHOO.wicket[cfg.dpJs] = new YAHOO.widget.CalendarGroup(cfg.dpJs,cfg.dp, cfg.calendarInit);
-		} else {
-			YAHOO.wicket[cfg.dpJs] = new YAHOO.widget.Calendar(cfg.dpJs,cfg.dp, cfg.calendarInit);
-		}
-		YAHOO.wicket[cfg.dpJs].isVisible = function() { return YAHOO.wicket[cfg.dpJs].oDomContainer.style.display === 'block'; };
-
-		function showCalendar() {
-			if (YAHOO.wicket[cfg.dpJs].oDomContainer.style.display !== 'block') {
-				Wicket.DateTime.showCalendar(YAHOO.wicket[cfg.dpJs], YAHOO.util.Dom.get(cfg.componentId).value, cfg);
-				if (cfg.alignWithIcon) {
-					Wicket.DateTime.positionRelativeTo(YAHOO.wicket[cfg.dpJs].oDomContainer, cfg.icon);
-				}
-			}
-		}
-
-		YAHOO.util.Event.addListener(cfg.icon, "click", showCalendar, YAHOO.wicket[cfg.dpJs], true);
-
-		if (cfg.showOnFieldClick) {
-			YAHOO.util.Event.addListener(cfg.widgetId, "click", showCalendar, YAHOO.wicket[cfg.dpJs], true);
-		}
-
-		YAHOO.wicket[cfg.dpJs].cfg.setProperty(YAHOO.widget.Calendar.DEFAULT_CONFIG.STRINGS.key, {"close": cfg.closeLabel});
-
-		function selectHandler(type, args, cal) {
-			YAHOO.util.Dom.get(cfg.componentId).value = Wicket.DateTime.substituteDate(cfg, args[0][0]);
-			if (cal.isVisible()) {
-				if (cfg.hideOnSelect) {
-					cal.hide();
-				}
-				if (cfg.fireChangeEvent) {
-					var field = YAHOO.util.Dom.get(cfg.componentId);
-					if (field.onchangeoriginal) {
-						field.onchangeoriginal();
-					}
-					if (field.onchange) {
-						field.onchange();
-					}
-					Wicket.Event.fire(Wicket.$(cfg.componentId), 'change');
-				}
-			}
-		}
-
-		YAHOO.wicket[cfg.dpJs].selectEvent.subscribe(selectHandler, YAHOO.wicket[cfg.dpJs]);
-
-		if(cfg.autoHide) {
-			YAHOO.util.Event.on(document, "click", function(e) {
-
-				var el = YAHOO.util.Event.getTarget(e);
-				var dialogEl = document.getElementById(cfg.dp);
-				var showBtn = document.getElementById(cfg.icon);
-				var fieldEl = document.getElementById(cfg.componentId);
-
-				if (YAHOO.wicket[cfg.dpJs] &&
-					el !== dialogEl &&
-					el !== fieldEl &&
-					!YAHOO.util.Dom.isAncestor(dialogEl, el) &&
-					el !== showBtn &&
-					!YAHOO.util.Dom.isAncestor(showBtn, el))
-				{
-					YAHOO.wicket[cfg.dpJs].hide();
-				}
-	        });
-	    }
-	    YAHOO.wicket[cfg.dpJs].render();
-	};
-
-	/**
-	 * Checks that `str` ends with `suffix`
-	 * @param str The string to check
-	 * @param suffix The suffix with which the `srt` must end
-	 * @return {boolean} true if the `str` ends with `suffix`
-	 */
-	var endsWith = function(str, suffix) {
-	    return str.indexOf(suffix, str.length - suffix.length) !== -1;
-	};
-
-	/**
-	 * @param toDestroy An array of Wicket DateTime objects to destroy
-	 */
-	var destroyInternal = function (toDestroy) {
-	
-		// avoids creation of a function inside a loop (JSLint warning)
-		function scheduleDestroy(toDestroy2) {
-			window.setTimeout(function(){destroyInternal(toDestroy2);}, 5);
-		}
-
-		if (toDestroy && toDestroy.length > 1) {
-			var i = 0;
-			while (toDestroy.length > 0) {
-				var name = toDestroy.pop();
-				try {
-					if (YAHOO.wicket[name]) {
-						// this is expensive.
-						YAHOO.wicket[name].destroy();
-						delete YAHOO.wicket[name];
-					}
-				} catch (e) {
-					if (Wicket.Log) {
-						Wicket.Log.error(e);
-					}
-				}
-				i++;
-				if (i === 20) {
-					scheduleDestroy(toDestroy);
-					break;
-				}
-			}
-		}
-	};
-
-	/**
-	 * Schedules all YAHOO.wicket.** objects for destroy if their host HTML element
-	 * is no more in the DOM document.
-	 */
-	var destroy = function() {
-		if (!YAHOO.wicket) {
-			return;
-		}
-		var deleted = 0;
-		var available = 0;
-		var toDestroy = [];
-		for(var propertyName in YAHOO.wicket) {
-			if (endsWith(propertyName, "DpJs")) {
-				var id = propertyName.substring(0, propertyName.length - 4);
-				var e = Wicket.$(id);
-				available++;
-				if (e === null) {
-					try {
-						deleted++;
-						toDestroy.push(propertyName);
-					} catch (ex) {
-						if (Wicket.Log) {
-							Wicket.Log.error(ex);
-						}
-					}
-				}
-			}
-		}
-		if (Wicket.Log) {
-			Wicket.Log.info("Date pickers to delete="+deleted+", available="+available);
-		}
-		setTimeout(function(){destroyInternal(toDestroy);}, 5);
-	};
-
-	// init method variant that needs less character to invoke
-	Wicket.DateTime.init2 = function(widgetId, componentId, calendarInit, datePattern,
-			alignWithIcon, fireChangeEvent, hideOnSelect, showOnFieldClick, i18n, autoHide, closeLabel) {
-		calendarInit.MONTHS_SHORT = i18n.MONTHS_SHORT;
-		calendarInit.MONTHS_LONG = i18n.MONTHS_LONG;
-		calendarInit.WEEKDAYS_MEDIUM = i18n.WEEKDAYS_MEDIUM;
-		calendarInit.WEEKDAYS_LONG = i18n.WEEKDAYS_LONG;
-		calendarInit.START_WEEKDAY = i18n.START_WEEKDAY;
-		calendarInit.WEEKDAYS_1CHAR = i18n.WEEKDAYS_1CHAR;
-		calendarInit.WEEKDAYS_SHORT = i18n.WEEKDAYS_SHORT;
-
-		Wicket.DateTime.init({
-			widgetId: widgetId,
-			componentId: componentId,
-			calendarInit: calendarInit,
-			datePattern: datePattern,
-			alignWithIcon: alignWithIcon,
-			fireChangeEvent: fireChangeEvent,
-			hideOnSelect: hideOnSelect,
-			showOnFieldClick: showOnFieldClick,
-			autoHide: autoHide,
-			closeLabel: closeLabel
-		});
-	};
-
-	YAHOO.register("wicket-date", Wicket.DateTime, {version: "6.7.0", build: "1"});
-
-	// register a listener to clean up YAHOO.wicket cache.
-	Wicket.Event.subscribe('/ajax/call/complete', function(jqEvent, attributes, jqXHR, errorThrown, textStatus) {
-		window.setTimeout(function(){destroy();}, 10);
-	});
-})();

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/dom/dom-min.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/dom/dom-min.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/dom/dom-min.js
deleted file mode 100644
index 194f1e8..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/dom/dom-min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-(function(){YAHOO.env._id_counter=YAHOO.env._id_counter||0;var e=YAHOO.util,k=YAHOO.lang,L=YAHOO.env.ua,a=YAHOO.lang.trim,B={},F={},m=/^t(?:able|d|h)$/i,w=/color$/i,j=window.document,v=j.documentElement,C="ownerDocument",M="defaultView",U="documentElement",S="compatMode",z="offsetLeft",o="offsetTop",T="offsetParent",x="parentNode",K="nodeType",c="tagName",n="scrollLeft",H="scrollTop",p="getBoundingClientRect",V="getComputedStyle",y="currentStyle",l="CSS1Compat",A="BackCompat",E="class",f="className",i="",b=" ",R="(?:^|\\s)",J="(?= |$)",t="g",O="position",D="fixed",u="relative",I="left",N="top",Q="medium",P="borderLeftWidth",q="borderTopWidth",d=L.opera,h=L.webkit,g=L.gecko,s=L.ie;e.Dom={CUSTOM_ATTRIBUTES:(!v.hasAttribute)?{"for":"htmlFor","class":f}:{"htmlFor":"for","className":E},DOT_ATTRIBUTES:{checked:true},get:function(aa){var ac,X,ab,Z,W,G,Y=null;if(aa){if(typeof aa=="string"||typeof aa=="number"){ac=aa+"";aa=j.getElementById(aa);G=(aa)?aa.attributes:null;if(aa&&G&&G.id&&G.id.v
 alue===ac){return aa;}else{if(aa&&j.all){aa=null;X=j.all[ac];if(X&&X.length){for(Z=0,W=X.length;Z<W;++Z){if(X[Z].id===ac){return X[Z];}}}}}}else{if(e.Element&&aa instanceof e.Element){aa=aa.get("element");}else{if(!aa.nodeType&&"length" in aa){ab=[];for(Z=0,W=aa.length;Z<W;++Z){ab[ab.length]=e.Dom.get(aa[Z]);}aa=ab;}}}Y=aa;}return Y;},getComputedStyle:function(G,W){if(window[V]){return G[C][M][V](G,null)[W];}else{if(G[y]){return e.Dom.IE_ComputedStyle.get(G,W);}}},getStyle:function(G,W){return e.Dom.batch(G,e.Dom._getStyle,W);},_getStyle:function(){if(window[V]){return function(G,Y){Y=(Y==="float")?Y="cssFloat":e.Dom._toCamel(Y);var X=G.style[Y],W;if(!X){W=G[C][M][V](G,null);if(W){X=W[Y];}}return X;};}else{if(v[y]){return function(G,Y){var X;switch(Y){case"opacity":X=100;try{X=G.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(Z){try{X=G.filters("alpha").opacity;}catch(W){}}return X/100;case"float":Y="styleFloat";default:Y=e.Dom._toCamel(Y);X=G[y]?G[y][Y]:null;return(G.sty
 le[Y]||X);}};}}}(),setStyle:function(G,W,X){e.Dom.batch(G,e.Dom._setStyle,{prop:W,val:X});},_setStyle:function(){if(!window.getComputedStyle&&j.documentElement.currentStyle){return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){switch(X){case"opacity":if(Y===""||Y===null||Y===1){W.style.removeAttribute("filter");}else{if(k.isString(W.style.filter)){W.style.filter="alpha(opacity="+Y*100+")";if(!W[y]||!W[y].hasLayout){W.style.zoom=1;}}}break;case"float":X="styleFloat";default:W.style[X]=Y;}}else{}};}else{return function(W,G){var X=e.Dom._toCamel(G.prop),Y=G.val;if(W){if(X=="float"){X="cssFloat";}W.style[X]=Y;}else{}};}}(),getXY:function(G){return e.Dom.batch(G,e.Dom._getXY);},_canPosition:function(G){return(e.Dom._getStyle(G,"display")!=="none"&&e.Dom._inDoc(G));},_getXY:function(W){var X,G,Z,ab,Y,aa,ac=Math.round,ad=false;if(e.Dom._canPosition(W)){Z=W[p]();ab=W[C];X=e.Dom.getDocumentScrollLeft(ab);G=e.Dom.getDocumentScrollTop(ab);ad=[Z[I],Z[N]];if(Y||aa){ad[0]-=aa;ad[1]-=Y;
 }if((G||X)){ad[0]+=X;ad[1]+=G;}ad[0]=ac(ad[0]);ad[1]=ac(ad[1]);}else{}return ad;},getX:function(G){var W=function(X){return e.Dom.getXY(X)[0];};return e.Dom.batch(G,W,e.Dom,true);},getY:function(G){var W=function(X){return e.Dom.getXY(X)[1];};return e.Dom.batch(G,W,e.Dom,true);},setXY:function(G,X,W){e.Dom.batch(G,e.Dom._setXY,{pos:X,noRetry:W});},_setXY:function(G,Z){var aa=e.Dom._getStyle(G,O),Y=e.Dom.setStyle,ad=Z.pos,W=Z.noRetry,ab=[parseInt(e.Dom.getComputedStyle(G,I),10),parseInt(e.Dom.getComputedStyle(G,N),10)],ac,X;ac=e.Dom._getXY(G);if(!ad||ac===false){return false;}if(aa=="static"){aa=u;Y(G,O,aa);}if(isNaN(ab[0])){ab[0]=(aa==u)?0:G[z];}if(isNaN(ab[1])){ab[1]=(aa==u)?0:G[o];}if(ad[0]!==null){Y(G,I,ad[0]-ac[0]+ab[0]+"px");}if(ad[1]!==null){Y(G,N,ad[1]-ac[1]+ab[1]+"px");}if(!W){X=e.Dom._getXY(G);if((ad[0]!==null&&X[0]!=ad[0])||(ad[1]!==null&&X[1]!=ad[1])){e.Dom._setXY(G,{pos:ad,noRetry:true});}}},setX:function(W,G){e.Dom.setXY(W,[G,null]);},setY:function(G,W){e.Dom.setXY(G,[n
 ull,W]);},getRegion:function(G){var W=function(X){var Y=false;if(e.Dom._canPosition(X)){Y=e.Region.getRegion(X);}else{}return Y;};return e.Dom.batch(G,W,e.Dom,true);},getClientWidth:function(){return e.Dom.getViewportWidth();},getClientHeight:function(){return e.Dom.getViewportHeight();},getElementsByClassName:function(ab,af,ac,ae,X,ad){af=af||"*";ac=(ac)?e.Dom.get(ac):null||j;if(!ac){return[];}var W=[],G=ac.getElementsByTagName(af),Z=e.Dom.hasClass;for(var Y=0,aa=G.length;Y<aa;++Y){if(Z(G[Y],ab)){W[W.length]=G[Y];}}if(ae){e.Dom.batch(W,ae,X,ad);}return W;},hasClass:function(W,G){return e.Dom.batch(W,e.Dom._hasClass,G);},_hasClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(Y){Y=Y.replace(/\s+/g,b);}if(W.exec){G=W.test(Y);}else{G=W&&(b+Y+b).indexOf(b+W+b)>-1;}}else{}return G;},addClass:function(W,G){return e.Dom.batch(W,e.Dom._addClass,G);},_addClass:function(X,W){var G=false,Y;if(X&&W){Y=e.Dom._getAttribute(X,f)||i;if(!e.Dom._hasClass(X,W)){e.Dom.setAttrib
 ute(X,f,a(Y+b+W));G=true;}}else{}return G;},removeClass:function(W,G){return e.Dom.batch(W,e.Dom._removeClass,G);},_removeClass:function(Y,X){var W=false,aa,Z,G;if(Y&&X){aa=e.Dom._getAttribute(Y,f)||i;e.Dom.setAttribute(Y,f,aa.replace(e.Dom._getClassRegex(X),i));Z=e.Dom._getAttribute(Y,f);if(aa!==Z){e.Dom.setAttribute(Y,f,a(Z));W=true;if(e.Dom._getAttribute(Y,f)===""){G=(Y.hasAttribute&&Y.hasAttribute(E))?E:f;Y.removeAttribute(G);}}}else{}return W;},replaceClass:function(X,W,G){return e.Dom.batch(X,e.Dom._replaceClass,{from:W,to:G});},_replaceClass:function(Y,X){var W,ab,aa,G=false,Z;if(Y&&X){ab=X.from;aa=X.to;if(!aa){G=false;}else{if(!ab){G=e.Dom._addClass(Y,X.to);}else{if(ab!==aa){Z=e.Dom._getAttribute(Y,f)||i;W=(b+Z.replace(e.Dom._getClassRegex(ab),b+aa).replace(/\s+/g,b)).split(e.Dom._getClassRegex(aa));W.splice(1,0,b+aa);e.Dom.setAttribute(Y,f,a(W.join(i)));G=true;}}}}else{}return G;},generateId:function(G,X){X=X||"yui-gen";var W=function(Y){if(Y&&Y.id){return Y.id;}var Z=X+YAH
 OO.env._id_counter++;
-if(Y){if(Y[C]&&Y[C].getElementById(Z)){return e.Dom.generateId(Y,Z+X);}Y.id=Z;}return Z;};return e.Dom.batch(G,W,e.Dom,true)||W.apply(e.Dom,arguments);},isAncestor:function(W,X){W=e.Dom.get(W);X=e.Dom.get(X);var G=false;if((W&&X)&&(W[K]&&X[K])){if(W.contains&&W!==X){G=W.contains(X);}else{if(W.compareDocumentPosition){G=!!(W.compareDocumentPosition(X)&16);}}}else{}return G;},inDocument:function(G,W){return e.Dom._inDoc(e.Dom.get(G),W);},_inDoc:function(W,X){var G=false;if(W&&W[c]){X=X||W[C];G=e.Dom.isAncestor(X[U],W);}else{}return G;},getElementsBy:function(W,af,ab,ad,X,ac,ae){af=af||"*";ab=(ab)?e.Dom.get(ab):null||j;var aa=(ae)?null:[],G;if(ab){G=ab.getElementsByTagName(af);for(var Y=0,Z=G.length;Y<Z;++Y){if(W(G[Y])){if(ae){aa=G[Y];break;}else{aa[aa.length]=G[Y];}}}if(ad){e.Dom.batch(aa,ad,X,ac);}}return aa;},getElementBy:function(X,G,W){return e.Dom.getElementsBy(X,G,W,null,null,null,true);},batch:function(X,ab,aa,Z){var Y=[],W=(Z)?aa:null;X=(X&&(X[c]||X.item))?X:e.Dom.get(X);if(X&
 &ab){if(X[c]||X.length===undefined){return ab.call(W,X,aa);}for(var G=0;G<X.length;++G){Y[Y.length]=ab.call(W||X[G],X[G],aa);}}else{return false;}return Y;},getDocumentHeight:function(){var W=(j[S]!=l||h)?j.body.scrollHeight:v.scrollHeight,G=Math.max(W,e.Dom.getViewportHeight());return G;},getDocumentWidth:function(){var W=(j[S]!=l||h)?j.body.scrollWidth:v.scrollWidth,G=Math.max(W,e.Dom.getViewportWidth());return G;},getViewportHeight:function(){var G=self.innerHeight,W=j[S];if((W||s)&&!d){G=(W==l)?v.clientHeight:j.body.clientHeight;}return G;},getViewportWidth:function(){var G=self.innerWidth,W=j[S];if(W||s){G=(W==l)?v.clientWidth:j.body.clientWidth;}return G;},getAncestorBy:function(G,W){while((G=G[x])){if(e.Dom._testElement(G,W)){return G;}}return null;},getAncestorByClassName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=function(Y){return e.Dom.hasClass(Y,G);};return e.Dom.getAncestorBy(W,X);},getAncestorByTagName:function(W,G){W=e.Dom.get(W);if(!W){return null;}var X=
 function(Y){return Y[c]&&Y[c].toUpperCase()==G.toUpperCase();};return e.Dom.getAncestorBy(W,X);},getPreviousSiblingBy:function(G,W){while(G){G=G.previousSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getPreviousSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getPreviousSiblingBy(G);},getNextSiblingBy:function(G,W){while(G){G=G.nextSibling;if(e.Dom._testElement(G,W)){return G;}}return null;},getNextSibling:function(G){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getNextSiblingBy(G);},getFirstChildBy:function(G,X){var W=(e.Dom._testElement(G.firstChild,X))?G.firstChild:null;return W||e.Dom.getNextSiblingBy(G.firstChild,X);},getFirstChild:function(G,W){G=e.Dom.get(G);if(!G){return null;}return e.Dom.getFirstChildBy(G);},getLastChildBy:function(G,X){if(!G){return null;}var W=(e.Dom._testElement(G.lastChild,X))?G.lastChild:null;return W||e.Dom.getPreviousSiblingBy(G.lastChild,X);},getLastChild:function(G){G=e.Dom.get(G);return e.Dom.getLastChildBy(G);
 },getChildrenBy:function(W,Y){var X=e.Dom.getFirstChildBy(W,Y),G=X?[X]:[];e.Dom.getNextSiblingBy(X,function(Z){if(!Y||Y(Z)){G[G.length]=Z;}return false;});return G;},getChildren:function(G){G=e.Dom.get(G);if(!G){}return e.Dom.getChildrenBy(G);},getDocumentScrollLeft:function(G){G=G||j;return Math.max(G[U].scrollLeft,G.body.scrollLeft);},getDocumentScrollTop:function(G){G=G||j;return Math.max(G[U].scrollTop,G.body.scrollTop);},insertBefore:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}return G[x].insertBefore(W,G);},insertAfter:function(W,G){W=e.Dom.get(W);G=e.Dom.get(G);if(!W||!G||!G[x]){return null;}if(G.nextSibling){return G[x].insertBefore(W,G.nextSibling);}else{return G[x].appendChild(W);}},getClientRegion:function(){var X=e.Dom.getDocumentScrollTop(),W=e.Dom.getDocumentScrollLeft(),Y=e.Dom.getViewportWidth()+W,G=e.Dom.getViewportHeight()+X;return new e.Region(X,Y,G,W);},setAttribute:function(W,G,X){e.Dom.batch(W,e.Dom._setAttribute,{attr:G,val:X});}
 ,_setAttribute:function(X,W){var G=e.Dom._toCamel(W.attr),Y=W.val;if(X&&X.setAttribute){if(e.Dom.DOT_ATTRIBUTES[G]&&X.tagName&&X.tagName!="BUTTON"){X[G]=Y;}else{G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;X.setAttribute(G,Y);}}else{}},getAttribute:function(W,G){return e.Dom.batch(W,e.Dom._getAttribute,G);},_getAttribute:function(W,G){var X;G=e.Dom.CUSTOM_ATTRIBUTES[G]||G;if(e.Dom.DOT_ATTRIBUTES[G]){X=W[G];}else{if(W&&"getAttribute" in W){if(/^(?:href|src)$/.test(G)){X=W.getAttribute(G,2);}else{X=W.getAttribute(G);}}else{}}return X;},_toCamel:function(W){var X=B;function G(Y,Z){return Z.toUpperCase();}return X[W]||(X[W]=W.indexOf("-")===-1?W:W.replace(/-([a-z])/gi,G));},_getClassRegex:function(W){var G;if(W!==undefined){if(W.exec){G=W;}else{G=F[W];if(!G){W=W.replace(e.Dom._patterns.CLASS_RE_TOKENS,"\\$1");W=W.replace(/\s+/g,b);G=F[W]=new RegExp(R+W+J,t);}}}return G;},_patterns:{ROOT_TAG:/^body|html$/i,CLASS_RE_TOKENS:/([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g},_testElement:function(G,W){return G&&G[K]=
 =1&&(!W||W(G));},_calcBorders:function(X,Y){var W=parseInt(e.Dom[V](X,q),10)||0,G=parseInt(e.Dom[V](X,P),10)||0;if(g){if(m.test(X[c])){W=0;G=0;}}Y[0]+=G;Y[1]+=W;return Y;}};var r=e.Dom[V];if(L.opera){e.Dom[V]=function(W,G){var X=r(W,G);if(w.test(G)){X=e.Dom.Color.toRGB(X);}return X;};}if(L.webkit){e.Dom[V]=function(W,G){var X=r(W,G);if(X==="rgba(0, 0, 0, 0)"){X="transparent";}return X;};}if(L.ie&&L.ie>=8){e.Dom.DOT_ATTRIBUTES.type=true;}})();YAHOO.util.Region=function(d,e,a,c){this.top=d;this.y=d;this[1]=d;this.right=e;this.bottom=a;this.left=c;this.x=c;this[0]=c;this.width=this.right-this.left;this.height=this.bottom-this.top;};YAHOO.util.Region.prototype.contains=function(a){return(a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(f){var d=Math.max(this.top,f.top),e=Math.min(this.right,f.right),a=Math.
 min(this.bottom,f.bottom),c=Math.max(this.left,f.left);
-if(a>=d&&e>=c){return new YAHOO.util.Region(d,e,a,c);}else{return null;}};YAHOO.util.Region.prototype.union=function(f){var d=Math.min(this.top,f.top),e=Math.max(this.right,f.right),a=Math.max(this.bottom,f.bottom),c=Math.min(this.left,f.left);return new YAHOO.util.Region(d,e,a,c);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+", height: "+this.height+", width: "+this.width+"}");};YAHOO.util.Region.getRegion=function(e){var g=YAHOO.util.Dom.getXY(e),d=g[1],f=g[0]+e.offsetWidth,a=g[1]+e.offsetHeight,c=g[0];return new YAHOO.util.Region(d,f,a,c);};YAHOO.util.Point=function(a,b){if(YAHOO.lang.isArray(a)){b=a[1];a=a[0];}YAHOO.util.Point.superclass.constructor.call(this,b,a,b,a);};YAHOO.extend(YAHOO.util.Point,YAHOO.util.Region);(function(){var b=YAHOO.util,a="clientTop",f="clientLeft",j="parentNode",k="right",w="hasLayout",i="px",u="opacity",l="auto",d="borderLeftWidth",g="borderTop
 Width",p="borderRightWidth",v="borderBottomWidth",s="visible",q="transparent",n="height",e="width",h="style",t="currentStyle",r=/^width|height$/,o=/^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,m={get:function(x,z){var y="",A=x[t][z];if(z===u){y=b.Dom.getStyle(x,u);}else{if(!A||(A.indexOf&&A.indexOf(i)>-1)){y=A;}else{if(b.Dom.IE_COMPUTED[z]){y=b.Dom.IE_COMPUTED[z](x,z);}else{if(o.test(A)){y=b.Dom.IE.ComputedStyle.getPixel(x,z);}else{y=A;}}}}return y;},getOffset:function(z,E){var B=z[t][E],x=E.charAt(0).toUpperCase()+E.substr(1),C="offset"+x,y="pixel"+x,A="",D;if(B==l){D=z[C];if(D===undefined){A=0;}A=D;if(r.test(E)){z[h][E]=D;if(z[C]>D){A=D-(z[C]-D);}z[h][E]=l;}}else{if(!z[h][y]&&!z[h][E]){z[h][E]=B;}A=z[h][y];}return A+i;},getBorderWidth:function(x,z){var y=null;if(!x[t][w]){x[h].zoom=1;}switch(z){case g:y=x[a];break;case v:y=x.offsetHeight-x.clientHeight-x[a];break;case d:y=x[f];break;case p:y=x.offsetWidth-x.clientWidth-x[f];break;}return y+i
 ;},getPixel:function(y,x){var A=null,B=y[t][k],z=y[t][x];y[h][k]=z;A=y[h].pixelRight;y[h][k]=B;return A+i;},getMargin:function(y,x){var z;if(y[t][x]==l){z=0+i;}else{z=b.Dom.IE.ComputedStyle.getPixel(y,x);}return z;},getVisibility:function(y,x){var z;while((z=y[t])&&z[x]=="inherit"){y=y[j];}return(z)?z[x]:s;},getColor:function(y,x){return b.Dom.Color.toRGB(y[t][x])||q;},getBorderColor:function(y,x){var z=y[t],A=z[x]||z.color;return b.Dom.Color.toRGB(b.Dom.Color.toHex(A));}},c={};c.top=c.right=c.bottom=c.left=c[e]=c[n]=m.getOffset;c.color=m.getColor;c[g]=c[p]=c[v]=c[d]=m.getBorderWidth;c.marginTop=c.marginRight=c.marginBottom=c.marginLeft=m.getMargin;c.visibility=m.getVisibility;c.borderColor=c.borderTopColor=c.borderRightColor=c.borderBottomColor=c.borderLeftColor=m.getBorderColor;b.Dom.IE_COMPUTED=c;b.Dom.IE_ComputedStyle=m;})();(function(){var c="toString",a=parseInt,b=RegExp,d=YAHOO.util;d.Dom.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",r
 ed:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(e){if(!d.Dom.Color.re_RGB.test(e)){e=d.Dom.Color.toHex(e);}if(d.Dom.Color.re_hex.exec(e)){e="rgb("+[a(b.$1,16),a(b.$2,16),a(b.$3,16)].join(", ")+")";}return e;},toHex:function(f){f=d.Dom.Color.KEYWORDS[f]||f;if(d.Dom.Color.re_RGB.exec(f)){f=[Number(b.$1).toString(16),Number(b.$2).toString(16),Number(b.$3).toString(16)];for(var e=0;e<f.length;e++){if(f[e].length<2){f[e]="0"+f[e];}}f=f.join("");}if(f.length<6){f=f.replace(d.Dom.Color.re_hex3,"$1$1");}if(f!=="transparent"&&f.indexOf("#")<0){f="#"+f;}return f.toUpperCase();}};}());YAHOO.register("dom",YAHOO.util.Dom,{version:"2.9.0",build:"2800"});
\ No newline at end of file


[10/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/dom/dom.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/dom/dom.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/dom/dom.js
deleted file mode 100644
index 1ce4b23..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/dom/dom.js
+++ /dev/null
@@ -1,1846 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-/**
- * The dom module provides helper methods for manipulating Dom elements.
- * @module dom
- *
- */
-
-(function() {
-    // for use with generateId (global to save state if Dom is overwritten)
-    YAHOO.env._id_counter = YAHOO.env._id_counter || 0;
-
-    // internal shorthand
-    var Y = YAHOO.util,
-        lang = YAHOO.lang,
-        UA = YAHOO.env.ua,
-        trim = YAHOO.lang.trim,
-        propertyCache = {}, // for faster hyphen converts
-        reCache = {}, // cache className regexes
-        RE_TABLE = /^t(?:able|d|h)$/i, // for _calcBorders
-        RE_COLOR = /color$/i,
-
-        // DOM aliases 
-        document = window.document,     
-        documentElement = document.documentElement,
-
-        // string constants
-        OWNER_DOCUMENT = 'ownerDocument',
-        DEFAULT_VIEW = 'defaultView',
-        DOCUMENT_ELEMENT = 'documentElement',
-        COMPAT_MODE = 'compatMode',
-        OFFSET_LEFT = 'offsetLeft',
-        OFFSET_TOP = 'offsetTop',
-        OFFSET_PARENT = 'offsetParent',
-        PARENT_NODE = 'parentNode',
-        NODE_TYPE = 'nodeType',
-        TAG_NAME = 'tagName',
-        SCROLL_LEFT = 'scrollLeft',
-        SCROLL_TOP = 'scrollTop',
-        GET_BOUNDING_CLIENT_RECT = 'getBoundingClientRect',
-        GET_COMPUTED_STYLE = 'getComputedStyle',
-        CURRENT_STYLE = 'currentStyle',
-        CSS1_COMPAT = 'CSS1Compat',
-        _BACK_COMPAT = 'BackCompat',
-        _CLASS = 'class', // underscore due to reserved word
-        CLASS_NAME = 'className',
-        EMPTY = '',
-        SPACE = ' ',
-        C_START = '(?:^|\\s)',
-        C_END = '(?= |$)',
-        G = 'g',
-        POSITION = 'position',
-        FIXED = 'fixed',
-        RELATIVE = 'relative',
-        LEFT = 'left',
-        TOP = 'top',
-        MEDIUM = 'medium',
-        BORDER_LEFT_WIDTH = 'borderLeftWidth',
-        BORDER_TOP_WIDTH = 'borderTopWidth',
-    
-    // brower detection
-        isOpera = UA.opera,
-        isSafari = UA.webkit, 
-        isGecko = UA.gecko, 
-        isIE = UA.ie; 
-    
-    /**
-     * Provides helper methods for DOM elements.
-     * @namespace YAHOO.util
-     * @class Dom
-     * @requires yahoo, event
-     */
-    Y.Dom = {
-        CUSTOM_ATTRIBUTES: (!documentElement.hasAttribute) ? { // IE < 8
-            'for': 'htmlFor',
-            'class': CLASS_NAME
-        } : { // w3c
-            'htmlFor': 'for',
-            'className': _CLASS
-        },
-
-        DOT_ATTRIBUTES: {
-            checked: true 
-        },
-
-        /**
-         * Returns an HTMLElement reference.
-         * @method get
-         * @param {String | HTMLElement |Array} el Accepts a string to use as an ID for getting a DOM reference, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @return {HTMLElement | Array} A DOM reference to an HTML element or an array of HTMLElements.
-         */
-        get: function(el) {
-            var id, nodes, c, i, len, attr, ret = null;
-
-            if (el) {
-                if (typeof el == 'string' || typeof el == 'number') { // id
-                    id = el + '';
-                    el = document.getElementById(el);
-                    attr = (el) ? el.attributes : null;
-                    if (el && attr && attr.id && attr.id.value === id) { // IE: avoid false match on "name" attribute
-                        return el;
-                    } else if (el && document.all) { // filter by name
-                        el = null;
-                        nodes = document.all[id];
-                        if (nodes && nodes.length) {
-                            for (i = 0, len = nodes.length; i < len; ++i) {
-                                if (nodes[i].id === id) {
-                                    return nodes[i];
-                                }
-                            }
-                        }
-                    }
-                } else if (Y.Element && el instanceof Y.Element) {
-                    el = el.get('element');
-                } else if (!el.nodeType && 'length' in el) { // array-like 
-                    c = [];
-                    for (i = 0, len = el.length; i < len; ++i) {
-                        c[c.length] = Y.Dom.get(el[i]);
-                    }
-                    
-                    el = c;
-                }
-
-                ret = el;
-            }
-
-            return ret;
-        },
-    
-        getComputedStyle: function(el, property) {
-            if (window[GET_COMPUTED_STYLE]) {
-                return el[OWNER_DOCUMENT][DEFAULT_VIEW][GET_COMPUTED_STYLE](el, null)[property];
-            } else if (el[CURRENT_STYLE]) {
-                return Y.Dom.IE_ComputedStyle.get(el, property);
-            }
-        },
-
-        /**
-         * Normalizes currentStyle and ComputedStyle.
-         * @method getStyle
-         * @param {String | HTMLElement |Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @param {String} property The style property whose value is returned.
-         * @return {String | Array} The current value of the style property for the element(s).
-         */
-        getStyle: function(el, property) {
-            return Y.Dom.batch(el, Y.Dom._getStyle, property);
-        },
-
-        // branching at load instead of runtime
-        _getStyle: function() {
-            if (window[GET_COMPUTED_STYLE]) { // W3C DOM method
-                return function(el, property) {
-                    property = (property === 'float') ? property = 'cssFloat' :
-                            Y.Dom._toCamel(property);
-
-                    var value = el.style[property],
-                        computed;
-                    
-                    if (!value) {
-                        computed = el[OWNER_DOCUMENT][DEFAULT_VIEW][GET_COMPUTED_STYLE](el, null);
-                        if (computed) { // test computed before touching for safari
-                            value = computed[property];
-                        }
-                    }
-                    
-                    return value;
-                };
-            } else if (documentElement[CURRENT_STYLE]) {
-                return function(el, property) {                         
-                    var value;
-
-                    switch(property) {
-                        case 'opacity' :// IE opacity uses filter
-                            value = 100;
-                            try { // will error if no DXImageTransform
-                                value = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;
-
-                            } catch(e) {
-                                try { // make sure its in the document
-                                    value = el.filters('alpha').opacity;
-                                } catch(err) {
-                                }
-                            }
-                            return value / 100;
-                        case 'float': // fix reserved word
-                            property = 'styleFloat'; // fall through
-                        default: 
-                            property = Y.Dom._toCamel(property);
-                            value = el[CURRENT_STYLE] ? el[CURRENT_STYLE][property] : null;
-                            return ( el.style[property] || value );
-                    }
-                };
-            }
-        }(),
-    
-        /**
-         * Wrapper for setting style properties of HTMLElements.  Normalizes "opacity" across modern browsers.
-         * @method setStyle
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @param {String} property The style property to be set.
-         * @param {String} val The value to apply to the given property.
-         */
-        setStyle: function(el, property, val) {
-            Y.Dom.batch(el, Y.Dom._setStyle, { prop: property, val: val });
-        },
-
-        _setStyle: function() {
-            if (!window.getComputedStyle && document.documentElement.currentStyle) {
-                return function(el, args) {
-                    var property = Y.Dom._toCamel(args.prop),
-                        val = args.val;
-
-                    if (el) {
-                        switch (property) {
-                            case 'opacity':
-                                // remove filter if unsetting or full opacity
-                                if (val === '' || val === null || val === 1) {
-                                    el.style.removeAttribute('filter');
-                                } else if ( lang.isString(el.style.filter) ) { // in case not appended
-                                    el.style.filter = 'alpha(opacity=' + val * 100 + ')';
-                                    
-                                    if (!el[CURRENT_STYLE] || !el[CURRENT_STYLE].hasLayout) {
-                                        el.style.zoom = 1; // when no layout or cant tell
-                                    }
-                                }
-                                break;
-                            case 'float':
-                                property = 'styleFloat';
-                            default:
-                            el.style[property] = val;
-                        }
-                    } else {
-                    }
-                };
-            } else {
-                return function(el, args) {
-                    var property = Y.Dom._toCamel(args.prop),
-                        val = args.val;
-                    if (el) {
-                        if (property == 'float') {
-                            property = 'cssFloat';
-                        }
-                        el.style[property] = val;
-                    } else {
-                    }
-                };
-            }
-
-        }(),
-        
-        /**
-         * Gets the current position of an element based on page coordinates. 
-         * Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method getXY
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM
-         * reference, or an Array of IDs and/or HTMLElements
-         * @return {Array} The XY position of the element(s)
-         */
-        getXY: function(el) {
-            return Y.Dom.batch(el, Y.Dom._getXY);
-        },
-
-        _canPosition: function(el) {
-            return ( Y.Dom._getStyle(el, 'display') !== 'none' && Y.Dom._inDoc(el) );
-        },
-
-        _getXY: function(node) {
-            var scrollLeft, scrollTop, box, doc,
-                clientTop, clientLeft,
-                round = Math.round, // TODO: round?
-                xy = false;
-
-            if (Y.Dom._canPosition(node)) {
-                box = node[GET_BOUNDING_CLIENT_RECT]();
-                doc = node[OWNER_DOCUMENT];
-                scrollLeft = Y.Dom.getDocumentScrollLeft(doc);
-                scrollTop = Y.Dom.getDocumentScrollTop(doc);
-                xy = [box[LEFT], box[TOP]];
-
-                // remove IE default documentElement offset (border)
-                if (clientTop || clientLeft) {
-                    xy[0] -= clientLeft;
-                    xy[1] -= clientTop;
-                }
-
-                if ((scrollTop || scrollLeft)) {
-                    xy[0] += scrollLeft;
-                    xy[1] += scrollTop;
-                }
-
-                // gecko may return sub-pixel (non-int) values
-                xy[0] = round(xy[0]);
-                xy[1] = round(xy[1]);
-            } else {
-            }
-
-            return xy;
-        },
-        
-        /**
-         * Gets the current X position of an element based on page coordinates.  The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method getX
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
-         * @return {Number | Array} The X position of the element(s)
-         */
-        getX: function(el) {
-            var f = function(el) {
-                return Y.Dom.getXY(el)[0];
-            };
-            
-            return Y.Dom.batch(el, f, Y.Dom, true);
-        },
-        
-        /**
-         * Gets the current Y position of an element based on page coordinates.  Element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method getY
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
-         * @return {Number | Array} The Y position of the element(s)
-         */
-        getY: function(el) {
-            var f = function(el) {
-                return Y.Dom.getXY(el)[1];
-            };
-            
-            return Y.Dom.batch(el, f, Y.Dom, true);
-        },
-        
-        /**
-         * Set the position of an html element in page coordinates, regardless of how the element is positioned.
-         * The element(s) must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method setXY
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements
-         * @param {Array} pos Contains X & Y values for new position (coordinates are page-based)
-         * @param {Boolean} noRetry By default we try and set the position a second time if the first fails
-         */
-        setXY: function(el, pos, noRetry) {
-            Y.Dom.batch(el, Y.Dom._setXY, { pos: pos, noRetry: noRetry });
-        },
-
-        _setXY: function(node, args) {
-            var pos = Y.Dom._getStyle(node, POSITION),
-                setStyle = Y.Dom.setStyle,
-                xy = args.pos,
-                noRetry = args.noRetry,
-
-                delta = [ // assuming pixels; if not we will have to retry
-                    parseInt( Y.Dom.getComputedStyle(node, LEFT), 10 ),
-                    parseInt( Y.Dom.getComputedStyle(node, TOP), 10 )
-                ],
-
-                currentXY,
-                newXY;
-        
-            currentXY = Y.Dom._getXY(node);
-
-            if (!xy || currentXY === false) { // has to be part of doc to have xy
-                return false; 
-            }
-            
-            if (pos == 'static') { // default to relative
-                pos = RELATIVE;
-                setStyle(node, POSITION, pos);
-            }
-
-            if ( isNaN(delta[0]) ) {// in case of 'auto'
-                delta[0] = (pos == RELATIVE) ? 0 : node[OFFSET_LEFT];
-            } 
-            if ( isNaN(delta[1]) ) { // in case of 'auto'
-                delta[1] = (pos == RELATIVE) ? 0 : node[OFFSET_TOP];
-            } 
-
-            if (xy[0] !== null) { // from setX
-                setStyle(node, LEFT, xy[0] - currentXY[0] + delta[0] + 'px');
-            }
-
-            if (xy[1] !== null) { // from setY
-                setStyle(node, TOP, xy[1] - currentXY[1] + delta[1] + 'px');
-            }
-          
-            if (!noRetry) {
-                newXY = Y.Dom._getXY(node);
-
-                // if retry is true, try one more time if we miss 
-               if ( (xy[0] !== null && newXY[0] != xy[0]) || 
-                    (xy[1] !== null && newXY[1] != xy[1]) ) {
-                   Y.Dom._setXY(node, { pos: xy, noRetry: true });
-               }
-            }        
-
-        },
-        
-        /**
-         * Set the X position of an html element in page coordinates, regardless of how the element is positioned.
-         * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method setX
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @param {Int} x The value to use as the X coordinate for the element(s).
-         */
-        setX: function(el, x) {
-            Y.Dom.setXY(el, [x, null]);
-        },
-        
-        /**
-         * Set the Y position of an html element in page coordinates, regardless of how the element is positioned.
-         * The element must be part of the DOM tree to have page coordinates (display:none or elements not appended return false).
-         * @method setY
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @param {Int} x To use as the Y coordinate for the element(s).
-         */
-        setY: function(el, y) {
-            Y.Dom.setXY(el, [null, y]);
-        },
-        
-        /**
-         * Returns the region position of the given element.
-         * The element must be part of the DOM tree to have a region (display:none or elements not appended return false).
-         * @method getRegion
-         * @param {String | HTMLElement | Array} el Accepts a string to use as an ID, an actual DOM reference, or an Array of IDs and/or HTMLElements.
-         * @return {Region | Array} A Region or array of Region instances containing "top, left, bottom, right" member data.
-         */
-        getRegion: function(el) {
-            var f = function(el) {
-                var region = false;
-                if ( Y.Dom._canPosition(el) ) {
-                    region = Y.Region.getRegion(el);
-                } else {
-                }
-
-                return region;
-            };
-            
-            return Y.Dom.batch(el, f, Y.Dom, true);
-        },
-        
-        /**
-         * Returns the width of the client (viewport).
-         * @method getClientWidth
-         * @deprecated Now using getViewportWidth.  This interface left intact for back compat.
-         * @return {Int} The width of the viewable area of the page.
-         */
-        getClientWidth: function() {
-            return Y.Dom.getViewportWidth();
-        },
-        
-        /**
-         * Returns the height of the client (viewport).
-         * @method getClientHeight
-         * @deprecated Now using getViewportHeight.  This interface left intact for back compat.
-         * @return {Int} The height of the viewable area of the page.
-         */
-        getClientHeight: function() {
-            return Y.Dom.getViewportHeight();
-        },
-
-        /**
-         * Returns an array of HTMLElements with the given class.
-         * For optimized performance, include a tag and/or root node when possible.
-         * Note: This method operates against a live collection, so modifying the 
-         * collection in the callback (removing/appending nodes, etc.) will have
-         * side effects.  Instead you should iterate the returned nodes array,
-         * as you would with the native "getElementsByTagName" method. 
-         * @method getElementsByClassName
-         * @param {String} className The class name to match against
-         * @param {String} tag (optional) The tag name of the elements being collected
-         * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point.
-         * This element is not included in the className scan.
-         * @param {Function} apply (optional) A function to apply to each element when found 
-         * @param {Any} o (optional) An optional arg that is passed to the supplied method
-         * @param {Boolean} overrides (optional) Whether or not to override the scope of "method" with "o"
-         * @return {Array} An array of elements that have the given class name
-         */
-        getElementsByClassName: function(className, tag, root, apply, o, overrides) {
-            tag = tag || '*';
-            root = (root) ? Y.Dom.get(root) : null || document; 
-            if (!root) {
-                return [];
-            }
-
-            var nodes = [],
-                elements = root.getElementsByTagName(tag),
-                hasClass = Y.Dom.hasClass;
-
-            for (var i = 0, len = elements.length; i < len; ++i) {
-                if ( hasClass(elements[i], className) ) {
-                    nodes[nodes.length] = elements[i];
-                }
-            }
-            
-            if (apply) {
-                Y.Dom.batch(nodes, apply, o, overrides);
-            }
-
-            return nodes;
-        },
-
-        /**
-         * Determines whether an HTMLElement has the given className.
-         * @method hasClass
-         * @param {String | HTMLElement | Array} el The element or collection to test
-         * @param {String | RegExp} className the class name to search for, or a regular
-         * expression to match against
-         * @return {Boolean | Array} A boolean value or array of boolean values
-         */
-        hasClass: function(el, className) {
-            return Y.Dom.batch(el, Y.Dom._hasClass, className);
-        },
-
-        _hasClass: function(el, className) {
-            var ret = false,
-                current;
-            
-            if (el && className) {
-                current = Y.Dom._getAttribute(el, CLASS_NAME) || EMPTY;
-                if (current) { // convert line breaks, tabs and other delims to spaces
-                    current = current.replace(/\s+/g, SPACE);
-                }
-
-                if (className.exec) {
-                    ret = className.test(current);
-                } else {
-                    ret = className && (SPACE + current + SPACE).
-                        indexOf(SPACE + className + SPACE) > -1;
-                }
-            } else {
-            }
-
-            return ret;
-        },
-    
-        /**
-         * Adds a class name to a given element or collection of elements.
-         * @method addClass         
-         * @param {String | HTMLElement | Array} el The element or collection to add the class to
-         * @param {String} className the class name to add to the class attribute
-         * @return {Boolean | Array} A pass/fail boolean or array of booleans
-         */
-        addClass: function(el, className) {
-            return Y.Dom.batch(el, Y.Dom._addClass, className);
-        },
-
-        _addClass: function(el, className) {
-            var ret = false,
-                current;
-
-            if (el && className) {
-                current = Y.Dom._getAttribute(el, CLASS_NAME) || EMPTY;
-                if ( !Y.Dom._hasClass(el, className) ) {
-                    Y.Dom.setAttribute(el, CLASS_NAME, trim(current + SPACE + className));
-                    ret = true;
-                }
-            } else {
-            }
-
-            return ret;
-        },
-    
-        /**
-         * Removes a class name from a given element or collection of elements.
-         * @method removeClass         
-         * @param {String | HTMLElement | Array} el The element or collection to remove the class from
-         * @param {String} className the class name to remove from the class attribute
-         * @return {Boolean | Array} A pass/fail boolean or array of booleans
-         */
-        removeClass: function(el, className) {
-            return Y.Dom.batch(el, Y.Dom._removeClass, className);
-        },
-        
-        _removeClass: function(el, className) {
-            var ret = false,
-                current,
-                newClass,
-                attr;
-
-            if (el && className) {
-                current = Y.Dom._getAttribute(el, CLASS_NAME) || EMPTY;
-                Y.Dom.setAttribute(el, CLASS_NAME, current.replace(Y.Dom._getClassRegex(className), EMPTY));
-
-                newClass = Y.Dom._getAttribute(el, CLASS_NAME);
-                if (current !== newClass) { // else nothing changed
-                    Y.Dom.setAttribute(el, CLASS_NAME, trim(newClass)); // trim after comparing to current class
-                    ret = true;
-
-                    if (Y.Dom._getAttribute(el, CLASS_NAME) === '') { // remove class attribute if empty
-                        attr = (el.hasAttribute && el.hasAttribute(_CLASS)) ? _CLASS : CLASS_NAME;
-                        el.removeAttribute(attr);
-                    }
-                }
-
-            } else {
-            }
-
-            return ret;
-        },
-        
-        /**
-         * Replace a class with another class for a given element or collection of elements.
-         * If no oldClassName is present, the newClassName is simply added.
-         * @method replaceClass  
-         * @param {String | HTMLElement | Array} el The element or collection to remove the class from
-         * @param {String} oldClassName the class name to be replaced
-         * @param {String} newClassName the class name that will be replacing the old class name
-         * @return {Boolean | Array} A pass/fail boolean or array of booleans
-         */
-        replaceClass: function(el, oldClassName, newClassName) {
-            return Y.Dom.batch(el, Y.Dom._replaceClass, { from: oldClassName, to: newClassName });
-        },
-
-        _replaceClass: function(el, classObj) {
-            var className,
-                from,
-                to,
-                ret = false,
-                current;
-
-            if (el && classObj) {
-                from = classObj.from;
-                to = classObj.to;
-
-                if (!to) {
-                    ret = false;
-                }  else if (!from) { // just add if no "from"
-                    ret = Y.Dom._addClass(el, classObj.to);
-                } else if (from !== to) { // else nothing to replace
-                    // May need to lead with DBLSPACE?
-                    current = Y.Dom._getAttribute(el, CLASS_NAME) || EMPTY;
-                    className = (SPACE + current.replace(Y.Dom._getClassRegex(from), SPACE + to).
-                            replace(/\s+/g, SPACE)). // normalize white space
-                            split(Y.Dom._getClassRegex(to));
-
-                    // insert to into what would have been the first occurrence slot
-                    className.splice(1, 0, SPACE + to);
-                    Y.Dom.setAttribute(el, CLASS_NAME, trim(className.join(EMPTY)));
-                    ret = true;
-                }
-            } else {
-            }
-
-            return ret;
-        },
-        
-        /**
-         * Returns an ID and applies it to the element "el", if provided.
-         * @method generateId  
-         * @param {String | HTMLElement | Array} el (optional) An optional element array of elements to add an ID to (no ID is added if one is already present).
-         * @param {String} prefix (optional) an optional prefix to use (defaults to "yui-gen").
-         * @return {String | Array} The generated ID, or array of generated IDs (or original ID if already present on an element)
-         */
-        generateId: function(el, prefix) {
-            prefix = prefix || 'yui-gen';
-
-            var f = function(el) {
-                if (el && el.id) { // do not override existing ID
-                    return el.id;
-                }
-
-                var id = prefix + YAHOO.env._id_counter++;
-
-                if (el) {
-                    if (el[OWNER_DOCUMENT] && el[OWNER_DOCUMENT].getElementById(id)) { // in case one already exists
-                        // use failed id plus prefix to help ensure uniqueness
-                        return Y.Dom.generateId(el, id + prefix);
-                    }
-                    el.id = id;
-                }
-                
-                return id;
-            };
-
-            // batch fails when no element, so just generate and return single ID
-            return Y.Dom.batch(el, f, Y.Dom, true) || f.apply(Y.Dom, arguments);
-        },
-        
-        /**
-         * Determines whether an HTMLElement is an ancestor of another HTML element in the DOM hierarchy.
-         * @method isAncestor
-         * @param {String | HTMLElement} haystack The possible ancestor
-         * @param {String | HTMLElement} needle The possible descendent
-         * @return {Boolean} Whether or not the haystack is an ancestor of needle
-         */
-        isAncestor: function(haystack, needle) {
-            haystack = Y.Dom.get(haystack);
-            needle = Y.Dom.get(needle);
-            
-            var ret = false;
-
-            if ( (haystack && needle) && (haystack[NODE_TYPE] && needle[NODE_TYPE]) ) {
-                if (haystack.contains && haystack !== needle) { // contains returns true when equal
-                    ret = haystack.contains(needle);
-                }
-                else if (haystack.compareDocumentPosition) { // gecko
-                    ret = !!(haystack.compareDocumentPosition(needle) & 16);
-                }
-            } else {
-            }
-            return ret;
-        },
-        
-        /**
-         * Determines whether an HTMLElement is present in the current document.
-         * @method inDocument         
-         * @param {String | HTMLElement} el The element to search for
-         * @param {Object} doc An optional document to search, defaults to element's owner document 
-         * @return {Boolean} Whether or not the element is present in the current document
-         */
-        inDocument: function(el, doc) {
-            return Y.Dom._inDoc(Y.Dom.get(el), doc);
-        },
-
-        _inDoc: function(el, doc) {
-            var ret = false;
-            if (el && el[TAG_NAME]) {
-                doc = doc || el[OWNER_DOCUMENT]; 
-                ret = Y.Dom.isAncestor(doc[DOCUMENT_ELEMENT], el);
-            } else {
-            }
-            return ret;
-        },
-        
-        /**
-         * Returns an array of HTMLElements that pass the test applied by supplied boolean method.
-         * For optimized performance, include a tag and/or root node when possible.
-         * Note: This method operates against a live collection, so modifying the 
-         * collection in the callback (removing/appending nodes, etc.) will have
-         * side effects.  Instead you should iterate the returned nodes array,
-         * as you would with the native "getElementsByTagName" method. 
-         * @method getElementsBy
-         * @param {Function} method - A boolean method for testing elements which receives the element as its only argument.
-         * @param {String} tag (optional) The tag name of the elements being collected
-         * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point 
-         * @param {Function} apply (optional) A function to apply to each element when found 
-         * @param {Any} o (optional) An optional arg that is passed to the supplied method
-         * @param {Boolean} overrides (optional) Whether or not to override the scope of "method" with "o"
-         * @return {Array} Array of HTMLElements
-         */
-        getElementsBy: function(method, tag, root, apply, o, overrides, firstOnly) {
-            tag = tag || '*';
-            root = (root) ? Y.Dom.get(root) : null || document; 
-
-                var ret = (firstOnly) ? null : [],
-                    elements;
-            
-            // in case Dom.get() returns null
-            if (root) {
-                elements = root.getElementsByTagName(tag);
-                for (var i = 0, len = elements.length; i < len; ++i) {
-                    if ( method(elements[i]) ) {
-                        if (firstOnly) {
-                            ret = elements[i]; 
-                            break;
-                        } else {
-                            ret[ret.length] = elements[i];
-                        }
-                    }
-                }
-
-                if (apply) {
-                    Y.Dom.batch(ret, apply, o, overrides);
-                }
-            }
-
-            
-            return ret;
-        },
-        
-        /**
-         * Returns the first HTMLElement that passes the test applied by the supplied boolean method.
-         * @method getElementBy
-         * @param {Function} method - A boolean method for testing elements which receives the element as its only argument.
-         * @param {String} tag (optional) The tag name of the elements being collected
-         * @param {String | HTMLElement} root (optional) The HTMLElement or an ID to use as the starting point 
-         * @return {HTMLElement}
-         */
-        getElementBy: function(method, tag, root) {
-            return Y.Dom.getElementsBy(method, tag, root, null, null, null, true); 
-        },
-
-        /**
-         * Runs the supplied method against each item in the Collection/Array.
-         * The method is called with the element(s) as the first arg, and the optional param as the second ( method(el, o) ).
-         * @method batch
-         * @param {String | HTMLElement | Array} el (optional) An element or array of elements to apply the method to
-         * @param {Function} method The method to apply to the element(s)
-         * @param {Any} o (optional) An optional arg that is passed to the supplied method
-         * @param {Boolean} overrides (optional) Whether or not to override the scope of "method" with "o"
-         * @return {Any | Array} The return value(s) from the supplied method
-         */
-        batch: function(el, method, o, overrides) {
-            var collection = [],
-                scope = (overrides) ? o : null;
-                
-            el = (el && (el[TAG_NAME] || el.item)) ? el : Y.Dom.get(el); // skip get() when possible
-            if (el && method) {
-                if (el[TAG_NAME] || el.length === undefined) { // element or not array-like 
-                    return method.call(scope, el, o);
-                } 
-
-                for (var i = 0; i < el.length; ++i) {
-                    collection[collection.length] = method.call(scope || el[i], el[i], o);
-                }
-            } else {
-                return false;
-            } 
-            return collection;
-        },
-        
-        /**
-         * Returns the height of the document.
-         * @method getDocumentHeight
-         * @return {Int} The height of the actual document (which includes the body and its margin).
-         */
-        getDocumentHeight: function() {
-            var scrollHeight = (document[COMPAT_MODE] != CSS1_COMPAT || isSafari) ? document.body.scrollHeight : documentElement.scrollHeight,
-                h = Math.max(scrollHeight, Y.Dom.getViewportHeight());
-
-            return h;
-        },
-        
-        /**
-         * Returns the width of the document.
-         * @method getDocumentWidth
-         * @return {Int} The width of the actual document (which includes the body and its margin).
-         */
-        getDocumentWidth: function() {
-            var scrollWidth = (document[COMPAT_MODE] != CSS1_COMPAT || isSafari) ? document.body.scrollWidth : documentElement.scrollWidth,
-                w = Math.max(scrollWidth, Y.Dom.getViewportWidth());
-            return w;
-        },
-
-        /**
-         * Returns the current height of the viewport.
-         * @method getViewportHeight
-         * @return {Int} The height of the viewable area of the page (excludes scrollbars).
-         */
-        getViewportHeight: function() {
-            var height = self.innerHeight, // Safari, Opera
-                mode = document[COMPAT_MODE];
-        
-            if ( (mode || isIE) && !isOpera ) { // IE, Gecko
-                height = (mode == CSS1_COMPAT) ?
-                        documentElement.clientHeight : // Standards
-                        document.body.clientHeight; // Quirks
-            }
-        
-            return height;
-        },
-        
-        /**
-         * Returns the current width of the viewport.
-         * @method getViewportWidth
-         * @return {Int} The width of the viewable area of the page (excludes scrollbars).
-         */
-        
-        getViewportWidth: function() {
-            var width = self.innerWidth,  // Safari
-                mode = document[COMPAT_MODE];
-            
-            if (mode || isIE) { // IE, Gecko, Opera
-                width = (mode == CSS1_COMPAT) ?
-                        documentElement.clientWidth : // Standards
-                        document.body.clientWidth; // Quirks
-            }
-            return width;
-        },
-
-       /**
-         * Returns the nearest ancestor that passes the test applied by supplied boolean method.
-         * For performance reasons, IDs are not accepted and argument validation omitted.
-         * @method getAncestorBy
-         * @param {HTMLElement} node The HTMLElement to use as the starting point 
-         * @param {Function} method - A boolean method for testing elements which receives the element as its only argument.
-         * @return {Object} HTMLElement or null if not found
-         */
-        getAncestorBy: function(node, method) {
-            while ( (node = node[PARENT_NODE]) ) { // NOTE: assignment
-                if ( Y.Dom._testElement(node, method) ) {
-                    return node;
-                }
-            } 
-
-            return null;
-        },
-        
-        /**
-         * Returns the nearest ancestor with the given className.
-         * @method getAncestorByClassName
-         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
-         * @param {String} className
-         * @return {Object} HTMLElement
-         */
-        getAncestorByClassName: function(node, className) {
-            node = Y.Dom.get(node);
-            if (!node) {
-                return null;
-            }
-            var method = function(el) { return Y.Dom.hasClass(el, className); };
-            return Y.Dom.getAncestorBy(node, method);
-        },
-
-        /**
-         * Returns the nearest ancestor with the given tagName.
-         * @method getAncestorByTagName
-         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
-         * @param {String} tagName
-         * @return {Object} HTMLElement
-         */
-        getAncestorByTagName: function(node, tagName) {
-            node = Y.Dom.get(node);
-            if (!node) {
-                return null;
-            }
-            var method = function(el) {
-                 return el[TAG_NAME] && el[TAG_NAME].toUpperCase() == tagName.toUpperCase();
-            };
-
-            return Y.Dom.getAncestorBy(node, method);
-        },
-
-        /**
-         * Returns the previous sibling that is an HTMLElement. 
-         * For performance reasons, IDs are not accepted and argument validation omitted.
-         * Returns the nearest HTMLElement sibling if no method provided.
-         * @method getPreviousSiblingBy
-         * @param {HTMLElement} node The HTMLElement to use as the starting point 
-         * @param {Function} method A boolean function used to test siblings
-         * that receives the sibling node being tested as its only argument
-         * @return {Object} HTMLElement or null if not found
-         */
-        getPreviousSiblingBy: function(node, method) {
-            while (node) {
-                node = node.previousSibling;
-                if ( Y.Dom._testElement(node, method) ) {
-                    return node;
-                }
-            }
-            return null;
-        }, 
-
-        /**
-         * Returns the previous sibling that is an HTMLElement 
-         * @method getPreviousSibling
-         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
-         * @return {Object} HTMLElement or null if not found
-         */
-        getPreviousSibling: function(node) {
-            node = Y.Dom.get(node);
-            if (!node) {
-                return null;
-            }
-
-            return Y.Dom.getPreviousSiblingBy(node);
-        }, 
-
-        /**
-         * Returns the next HTMLElement sibling that passes the boolean method. 
-         * For performance reasons, IDs are not accepted and argument validation omitted.
-         * Returns the nearest HTMLElement sibling if no method provided.
-         * @method getNextSiblingBy
-         * @param {HTMLElement} node The HTMLElement to use as the starting point 
-         * @param {Function} method A boolean function used to test siblings
-         * that receives the sibling node being tested as its only argument
-         * @return {Object} HTMLElement or null if not found
-         */
-        getNextSiblingBy: function(node, method) {
-            while (node) {
-                node = node.nextSibling;
-                if ( Y.Dom._testElement(node, method) ) {
-                    return node;
-                }
-            }
-            return null;
-        }, 
-
-        /**
-         * Returns the next sibling that is an HTMLElement 
-         * @method getNextSibling
-         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
-         * @return {Object} HTMLElement or null if not found
-         */
-        getNextSibling: function(node) {
-            node = Y.Dom.get(node);
-            if (!node) {
-                return null;
-            }
-
-            return Y.Dom.getNextSiblingBy(node);
-        }, 
-
-        /**
-         * Returns the first HTMLElement child that passes the test method. 
-         * @method getFirstChildBy
-         * @param {HTMLElement} node The HTMLElement to use as the starting point 
-         * @param {Function} method A boolean function used to test children
-         * that receives the node being tested as its only argument
-         * @return {Object} HTMLElement or null if not found
-         */
-        getFirstChildBy: function(node, method) {
-            var child = ( Y.Dom._testElement(node.firstChild, method) ) ? node.firstChild : null;
-            return child || Y.Dom.getNextSiblingBy(node.firstChild, method);
-        }, 
-
-        /**
-         * Returns the first HTMLElement child. 
-         * @method getFirstChild
-         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
-         * @return {Object} HTMLElement or null if not found
-         */
-        getFirstChild: function(node, method) {
-            node = Y.Dom.get(node);
-            if (!node) {
-                return null;
-            }
-            return Y.Dom.getFirstChildBy(node);
-        }, 
-
-        /**
-         * Returns the last HTMLElement child that passes the test method. 
-         * @method getLastChildBy
-         * @param {HTMLElement} node The HTMLElement to use as the starting point 
-         * @param {Function} method A boolean function used to test children
-         * that receives the node being tested as its only argument
-         * @return {Object} HTMLElement or null if not found
-         */
-        getLastChildBy: function(node, method) {
-            if (!node) {
-                return null;
-            }
-            var child = ( Y.Dom._testElement(node.lastChild, method) ) ? node.lastChild : null;
-            return child || Y.Dom.getPreviousSiblingBy(node.lastChild, method);
-        }, 
-
-        /**
-         * Returns the last HTMLElement child. 
-         * @method getLastChild
-         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
-         * @return {Object} HTMLElement or null if not found
-         */
-        getLastChild: function(node) {
-            node = Y.Dom.get(node);
-            return Y.Dom.getLastChildBy(node);
-        }, 
-
-        /**
-         * Returns an array of HTMLElement childNodes that pass the test method. 
-         * @method getChildrenBy
-         * @param {HTMLElement} node The HTMLElement to start from
-         * @param {Function} method A boolean function used to test children
-         * that receives the node being tested as its only argument
-         * @return {Array} A static array of HTMLElements
-         */
-        getChildrenBy: function(node, method) {
-            var child = Y.Dom.getFirstChildBy(node, method),
-                children = child ? [child] : [];
-
-            Y.Dom.getNextSiblingBy(child, function(node) {
-                if ( !method || method(node) ) {
-                    children[children.length] = node;
-                }
-                return false; // fail test to collect all children
-            });
-
-            return children;
-        },
- 
-        /**
-         * Returns an array of HTMLElement childNodes. 
-         * @method getChildren
-         * @param {String | HTMLElement} node The HTMLElement or an ID to use as the starting point 
-         * @return {Array} A static array of HTMLElements
-         */
-        getChildren: function(node) {
-            node = Y.Dom.get(node);
-            if (!node) {
-            }
-
-            return Y.Dom.getChildrenBy(node);
-        },
-
-        /**
-         * Returns the left scroll value of the document 
-         * @method getDocumentScrollLeft
-         * @param {HTMLDocument} document (optional) The document to get the scroll value of
-         * @return {Int}  The amount that the document is scrolled to the left
-         */
-        getDocumentScrollLeft: function(doc) {
-            doc = doc || document;
-            return Math.max(doc[DOCUMENT_ELEMENT].scrollLeft, doc.body.scrollLeft);
-        }, 
-
-        /**
-         * Returns the top scroll value of the document 
-         * @method getDocumentScrollTop
-         * @param {HTMLDocument} document (optional) The document to get the scroll value of
-         * @return {Int}  The amount that the document is scrolled to the top
-         */
-        getDocumentScrollTop: function(doc) {
-            doc = doc || document;
-            return Math.max(doc[DOCUMENT_ELEMENT].scrollTop, doc.body.scrollTop);
-        },
-
-        /**
-         * Inserts the new node as the previous sibling of the reference node 
-         * @method insertBefore
-         * @param {String | HTMLElement} newNode The node to be inserted
-         * @param {String | HTMLElement} referenceNode The node to insert the new node before 
-         * @return {HTMLElement} The node that was inserted (or null if insert fails) 
-         */
-        insertBefore: function(newNode, referenceNode) {
-            newNode = Y.Dom.get(newNode); 
-            referenceNode = Y.Dom.get(referenceNode); 
-            
-            if (!newNode || !referenceNode || !referenceNode[PARENT_NODE]) {
-                return null;
-            }       
-
-            return referenceNode[PARENT_NODE].insertBefore(newNode, referenceNode); 
-        },
-
-        /**
-         * Inserts the new node as the next sibling of the reference node 
-         * @method insertAfter
-         * @param {String | HTMLElement} newNode The node to be inserted
-         * @param {String | HTMLElement} referenceNode The node to insert the new node after 
-         * @return {HTMLElement} The node that was inserted (or null if insert fails) 
-         */
-        insertAfter: function(newNode, referenceNode) {
-            newNode = Y.Dom.get(newNode); 
-            referenceNode = Y.Dom.get(referenceNode); 
-            
-            if (!newNode || !referenceNode || !referenceNode[PARENT_NODE]) {
-                return null;
-            }       
-
-            if (referenceNode.nextSibling) {
-                return referenceNode[PARENT_NODE].insertBefore(newNode, referenceNode.nextSibling); 
-            } else {
-                return referenceNode[PARENT_NODE].appendChild(newNode);
-            }
-        },
-
-        /**
-         * Creates a Region based on the viewport relative to the document. 
-         * @method getClientRegion
-         * @return {Region} A Region object representing the viewport which accounts for document scroll
-         */
-        getClientRegion: function() {
-            var t = Y.Dom.getDocumentScrollTop(),
-                l = Y.Dom.getDocumentScrollLeft(),
-                r = Y.Dom.getViewportWidth() + l,
-                b = Y.Dom.getViewportHeight() + t;
-
-            return new Y.Region(t, r, b, l);
-        },
-
-        /**
-         * Provides a normalized attribute interface. 
-         * @method setAttribute
-         * @param {String | HTMLElement} el The target element for the attribute.
-         * @param {String} attr The attribute to set.
-         * @param {String} val The value of the attribute.
-         */
-        setAttribute: function(el, attr, val) {
-            Y.Dom.batch(el, Y.Dom._setAttribute, { attr: attr, val: val });
-        },
-
-        _setAttribute: function(el, args) {
-            var attr = Y.Dom._toCamel(args.attr),
-                val = args.val;
-
-            if (el && el.setAttribute) {
-                // set as DOM property, except for BUTTON, which errors on property setter
-                if (Y.Dom.DOT_ATTRIBUTES[attr] && el.tagName && el.tagName != 'BUTTON') {
-                    el[attr] = val;
-                } else {
-                    attr = Y.Dom.CUSTOM_ATTRIBUTES[attr] || attr;
-                    el.setAttribute(attr, val);
-                }
-            } else {
-            }
-        },
-
-        /**
-         * Provides a normalized attribute interface. 
-         * @method getAttribute
-         * @param {String | HTMLElement} el The target element for the attribute.
-         * @param {String} attr The attribute to get.
-         * @return {String} The current value of the attribute. 
-         */
-        getAttribute: function(el, attr) {
-            return Y.Dom.batch(el, Y.Dom._getAttribute, attr);
-        },
-
-
-        _getAttribute: function(el, attr) {
-            var val;
-            attr = Y.Dom.CUSTOM_ATTRIBUTES[attr] || attr;
-
-            if (Y.Dom.DOT_ATTRIBUTES[attr]) {
-                val = el[attr];
-            } else if (el && 'getAttribute' in el) {
-                if (/^(?:href|src)$/.test(attr)) { // use IE flag to return exact value
-                    val = el.getAttribute(attr, 2);
-                } else {
-                    val = el.getAttribute(attr);
-                }
-            } else {
-            }
-
-            return val;
-        },
-
-        _toCamel: function(property) {
-            var c = propertyCache;
-
-            function tU(x,l) {
-                return l.toUpperCase();
-            }
-
-            return c[property] || (c[property] = property.indexOf('-') === -1 ? 
-                                    property :
-                                    property.replace( /-([a-z])/gi, tU ));
-        },
-
-        _getClassRegex: function(className) {
-            var re;
-            if (className !== undefined) { // allow empty string to pass
-                if (className.exec) { // already a RegExp
-                    re = className;
-                } else {
-                    re = reCache[className];
-                    if (!re) {
-                        // escape special chars (".", "[", etc.)
-                        className = className.replace(Y.Dom._patterns.CLASS_RE_TOKENS, '\\$1');
-                        className = className.replace(/\s+/g, SPACE); // convert line breaks and other delims
-                        re = reCache[className] = new RegExp(C_START + className + C_END, G);
-                    }
-                }
-            }
-            return re;
-        },
-
-        _patterns: {
-            ROOT_TAG: /^body|html$/i, // body for quirks mode, html for standards,
-            CLASS_RE_TOKENS: /([\.\(\)\^\$\*\+\?\|\[\]\{\}\\])/g
-        },
-
-
-        _testElement: function(node, method) {
-            return node && node[NODE_TYPE] == 1 && ( !method || method(node) );
-        },
-
-        _calcBorders: function(node, xy2) {
-            var t = parseInt(Y.Dom[GET_COMPUTED_STYLE](node, BORDER_TOP_WIDTH), 10) || 0,
-                l = parseInt(Y.Dom[GET_COMPUTED_STYLE](node, BORDER_LEFT_WIDTH), 10) || 0;
-            if (isGecko) {
-                if (RE_TABLE.test(node[TAG_NAME])) {
-                    t = 0;
-                    l = 0;
-                }
-            }
-            xy2[0] += l;
-            xy2[1] += t;
-            return xy2;
-        }
-    };
-        
-    var _getComputedStyle = Y.Dom[GET_COMPUTED_STYLE];
-    // fix opera computedStyle default color unit (convert to rgb)
-    if (UA.opera) {
-        Y.Dom[GET_COMPUTED_STYLE] = function(node, att) {
-            var val = _getComputedStyle(node, att);
-            if (RE_COLOR.test(att)) {
-                val = Y.Dom.Color.toRGB(val);
-            }
-
-            return val;
-        };
-
-    }
-
-    // safari converts transparent to rgba(), others use "transparent"
-    if (UA.webkit) {
-        Y.Dom[GET_COMPUTED_STYLE] = function(node, att) {
-            var val = _getComputedStyle(node, att);
-
-            if (val === 'rgba(0, 0, 0, 0)') {
-                val = 'transparent'; 
-            }
-
-            return val;
-        };
-
-    }
-
-    if (UA.ie && UA.ie >= 8) {
-        Y.Dom.DOT_ATTRIBUTES.type = true; // IE 8 errors on input.setAttribute('type')
-    }
-})();
-/**
- * A region is a representation of an object on a grid.  It is defined
- * by the top, right, bottom, left extents, so is rectangular by default.  If 
- * other shapes are required, this class could be extended to support it.
- * @namespace YAHOO.util
- * @class Region
- * @param {Int} t the top extent
- * @param {Int} r the right extent
- * @param {Int} b the bottom extent
- * @param {Int} l the left extent
- * @constructor
- */
-YAHOO.util.Region = function(t, r, b, l) {
-
-    /**
-     * The region's top extent
-     * @property top
-     * @type Int
-     */
-    this.top = t;
-    
-    /**
-     * The region's top extent
-     * @property y
-     * @type Int
-     */
-    this.y = t;
-    
-    /**
-     * The region's top extent as index, for symmetry with set/getXY
-     * @property 1
-     * @type Int
-     */
-    this[1] = t;
-
-    /**
-     * The region's right extent
-     * @property right
-     * @type int
-     */
-    this.right = r;
-
-    /**
-     * The region's bottom extent
-     * @property bottom
-     * @type Int
-     */
-    this.bottom = b;
-
-    /**
-     * The region's left extent
-     * @property left
-     * @type Int
-     */
-    this.left = l;
-    
-    /**
-     * The region's left extent
-     * @property x
-     * @type Int
-     */
-    this.x = l;
-    
-    /**
-     * The region's left extent as index, for symmetry with set/getXY
-     * @property 0
-     * @type Int
-     */
-    this[0] = l;
-
-    /**
-     * The region's total width 
-     * @property width 
-     * @type Int
-     */
-    this.width = this.right - this.left;
-
-    /**
-     * The region's total height 
-     * @property height 
-     * @type Int
-     */
-    this.height = this.bottom - this.top;
-};
-
-/**
- * Returns true if this region contains the region passed in
- * @method contains
- * @param  {Region}  region The region to evaluate
- * @return {Boolean}        True if the region is contained with this region, 
- *                          else false
- */
-YAHOO.util.Region.prototype.contains = function(region) {
-    return ( region.left   >= this.left   && 
-             region.right  <= this.right  && 
-             region.top    >= this.top    && 
-             region.bottom <= this.bottom    );
-
-};
-
-/**
- * Returns the area of the region
- * @method getArea
- * @return {Int} the region's area
- */
-YAHOO.util.Region.prototype.getArea = function() {
-    return ( (this.bottom - this.top) * (this.right - this.left) );
-};
-
-/**
- * Returns the region where the passed in region overlaps with this one
- * @method intersect
- * @param  {Region} region The region that intersects
- * @return {Region}        The overlap region, or null if there is no overlap
- */
-YAHOO.util.Region.prototype.intersect = function(region) {
-    var t = Math.max( this.top,    region.top    ),
-        r = Math.min( this.right,  region.right  ),
-        b = Math.min( this.bottom, region.bottom ),
-        l = Math.max( this.left,   region.left   );
-    
-    if (b >= t && r >= l) {
-        return new YAHOO.util.Region(t, r, b, l);
-    } else {
-        return null;
-    }
-};
-
-/**
- * Returns the region representing the smallest region that can contain both
- * the passed in region and this region.
- * @method union
- * @param  {Region} region The region that to create the union with
- * @return {Region}        The union region
- */
-YAHOO.util.Region.prototype.union = function(region) {
-    var t = Math.min( this.top,    region.top    ),
-        r = Math.max( this.right,  region.right  ),
-        b = Math.max( this.bottom, region.bottom ),
-        l = Math.min( this.left,   region.left   );
-
-    return new YAHOO.util.Region(t, r, b, l);
-};
-
-/**
- * toString
- * @method toString
- * @return string the region properties
- */
-YAHOO.util.Region.prototype.toString = function() {
-    return ( "Region {"    +
-             "top: "       + this.top    + 
-             ", right: "   + this.right  + 
-             ", bottom: "  + this.bottom + 
-             ", left: "    + this.left   + 
-             ", height: "  + this.height + 
-             ", width: "    + this.width   + 
-             "}" );
-};
-
-/**
- * Returns a region that is occupied by the DOM element
- * @method getRegion
- * @param  {HTMLElement} el The element
- * @return {Region}         The region that the element occupies
- * @static
- */
-YAHOO.util.Region.getRegion = function(el) {
-    var p = YAHOO.util.Dom.getXY(el),
-        t = p[1],
-        r = p[0] + el.offsetWidth,
-        b = p[1] + el.offsetHeight,
-        l = p[0];
-
-    return new YAHOO.util.Region(t, r, b, l);
-};
-
-/////////////////////////////////////////////////////////////////////////////
-
-
-/**
- * A point is a region that is special in that it represents a single point on 
- * the grid.
- * @namespace YAHOO.util
- * @class Point
- * @param {Int} x The X position of the point
- * @param {Int} y The Y position of the point
- * @constructor
- * @extends YAHOO.util.Region
- */
-YAHOO.util.Point = function(x, y) {
-   if (YAHOO.lang.isArray(x)) { // accept input from Dom.getXY, Event.getXY, etc.
-      y = x[1]; // dont blow away x yet
-      x = x[0];
-   }
- 
-    YAHOO.util.Point.superclass.constructor.call(this, y, x, y, x);
-};
-
-YAHOO.extend(YAHOO.util.Point, YAHOO.util.Region);
-
-(function() {
-/**
- * Internal methods used to add style management functionality to DOM.
- * @module dom
- * @class IEStyle
- * @namespace YAHOO.util.Dom
- */
-
-var Y = YAHOO.util, 
-    CLIENT_TOP = 'clientTop',
-    CLIENT_LEFT = 'clientLeft',
-    PARENT_NODE = 'parentNode',
-    RIGHT = 'right',
-    HAS_LAYOUT = 'hasLayout',
-    PX = 'px',
-    OPACITY = 'opacity',
-    AUTO = 'auto',
-    BORDER_LEFT_WIDTH = 'borderLeftWidth',
-    BORDER_TOP_WIDTH = 'borderTopWidth',
-    BORDER_RIGHT_WIDTH = 'borderRightWidth',
-    BORDER_BOTTOM_WIDTH = 'borderBottomWidth',
-    VISIBLE = 'visible',
-    TRANSPARENT = 'transparent',
-    HEIGHT = 'height',
-    WIDTH = 'width',
-    STYLE = 'style',
-    CURRENT_STYLE = 'currentStyle',
-
-// IE getComputedStyle
-// TODO: unit-less lineHeight (e.g. 1.22)
-    re_size = /^width|height$/,
-    re_unit = /^(\d[.\d]*)+(em|ex|px|gd|rem|vw|vh|vm|ch|mm|cm|in|pt|pc|deg|rad|ms|s|hz|khz|%){1}?/i,
-
-    ComputedStyle = {
-        /**
-        * @method get
-        * @description Method used by DOM to get style information for IE
-        * @param {HTMLElement} el The element to check
-        * @param {String} property The property to check
-        * @returns {String} The computed style
-        */
-        get: function(el, property) {
-            var value = '',
-                current = el[CURRENT_STYLE][property];
-
-            if (property === OPACITY) {
-                value = Y.Dom.getStyle(el, OPACITY);        
-            } else if (!current || (current.indexOf && current.indexOf(PX) > -1)) { // no need to convert
-                value = current;
-            } else if (Y.Dom.IE_COMPUTED[property]) { // use compute function
-                value = Y.Dom.IE_COMPUTED[property](el, property);
-            } else if (re_unit.test(current)) { // convert to pixel
-                value = Y.Dom.IE.ComputedStyle.getPixel(el, property);
-            } else {
-                value = current;
-            }
-
-            return value;
-        },
-        /**
-        * @method getOffset
-        * @description Determine the offset of an element
-        * @param {HTMLElement} el The element to check
-        * @param {String} prop The property to check.
-        * @return {String} The offset
-        */
-        getOffset: function(el, prop) {
-            var current = el[CURRENT_STYLE][prop],                        // value of "width", "top", etc.
-                capped = prop.charAt(0).toUpperCase() + prop.substr(1), // "Width", "Top", etc.
-                offset = 'offset' + capped,                             // "offsetWidth", "offsetTop", etc.
-                pixel = 'pixel' + capped,                               // "pixelWidth", "pixelTop", etc.
-                value = '',
-                actual;
-
-            if (current == AUTO) {
-                actual = el[offset]; // offsetHeight/Top etc.
-                if (actual === undefined) { // likely "right" or "bottom"
-                    value = 0;
-                }
-
-                value = actual;
-                if (re_size.test(prop)) { // account for box model diff 
-                    el[STYLE][prop] = actual; 
-                    if (el[offset] > actual) {
-                        // the difference is padding + border (works in Standards & Quirks modes)
-                        value = actual - (el[offset] - actual);
-                    }
-                    el[STYLE][prop] = AUTO; // revert to auto
-                }
-            } else { // convert units to px
-                if (!el[STYLE][pixel] && !el[STYLE][prop]) { // need to map style.width to currentStyle (no currentStyle.pixelWidth)
-                    el[STYLE][prop] = current;              // no style.pixelWidth if no style.width
-                }
-                value = el[STYLE][pixel];
-            }
-            return value + PX;
-        },
-        /**
-        * @method getBorderWidth
-        * @description Try to determine the width of an elements border
-        * @param {HTMLElement} el The element to check
-        * @param {String} property The property to check
-        * @return {String} The elements border width
-        */
-        getBorderWidth: function(el, property) {
-            // clientHeight/Width = paddingBox (e.g. offsetWidth - borderWidth)
-            // clientTop/Left = borderWidth
-            var value = null;
-            if (!el[CURRENT_STYLE][HAS_LAYOUT]) { // TODO: unset layout?
-                el[STYLE].zoom = 1; // need layout to measure client
-            }
-
-            switch(property) {
-                case BORDER_TOP_WIDTH:
-                    value = el[CLIENT_TOP];
-                    break;
-                case BORDER_BOTTOM_WIDTH:
-                    value = el.offsetHeight - el.clientHeight - el[CLIENT_TOP];
-                    break;
-                case BORDER_LEFT_WIDTH:
-                    value = el[CLIENT_LEFT];
-                    break;
-                case BORDER_RIGHT_WIDTH:
-                    value = el.offsetWidth - el.clientWidth - el[CLIENT_LEFT];
-                    break;
-            }
-            return value + PX;
-        },
-        /**
-        * @method getPixel
-        * @description Get the pixel value from a style property
-        * @param {HTMLElement} node The element to check
-        * @param {String} att The attribute to check
-        * @return {String} The pixel value
-        */
-        getPixel: function(node, att) {
-            // use pixelRight to convert to px
-            var val = null,
-                styleRight = node[CURRENT_STYLE][RIGHT],
-                current = node[CURRENT_STYLE][att];
-
-            node[STYLE][RIGHT] = current;
-            val = node[STYLE].pixelRight;
-            node[STYLE][RIGHT] = styleRight; // revert
-
-            return val + PX;
-        },
-
-        /**
-        * @method getMargin
-        * @description Get the margin value from a style property
-        * @param {HTMLElement} node The element to check
-        * @param {String} att The attribute to check
-        * @return {String} The margin value
-        */
-        getMargin: function(node, att) {
-            var val;
-            if (node[CURRENT_STYLE][att] == AUTO) {
-                val = 0 + PX;
-            } else {
-                val = Y.Dom.IE.ComputedStyle.getPixel(node, att);
-            }
-            return val;
-        },
-
-        /**
-        * @method getVisibility
-        * @description Get the visibility of an element
-        * @param {HTMLElement} node The element to check
-        * @param {String} att The attribute to check
-        * @return {String} The value
-        */
-        getVisibility: function(node, att) {
-            var current;
-            while ( (current = node[CURRENT_STYLE]) && current[att] == 'inherit') { // NOTE: assignment in test
-                node = node[PARENT_NODE];
-            }
-            return (current) ? current[att] : VISIBLE;
-        },
-
-        /**
-        * @method getColor
-        * @description Get the color of an element
-        * @param {HTMLElement} node The element to check
-        * @param {String} att The attribute to check
-        * @return {String} The value
-        */
-        getColor: function(node, att) {
-            return Y.Dom.Color.toRGB(node[CURRENT_STYLE][att]) || TRANSPARENT;
-        },
-
-        /**
-        * @method getBorderColor
-        * @description Get the bordercolor of an element
-        * @param {HTMLElement} node The element to check
-        * @param {String} att The attribute to check
-        * @return {String} The value
-        */
-        getBorderColor: function(node, att) {
-            var current = node[CURRENT_STYLE],
-                val = current[att] || current.color;
-            return Y.Dom.Color.toRGB(Y.Dom.Color.toHex(val));
-        }
-
-    },
-
-//fontSize: getPixelFont,
-    IEComputed = {};
-
-IEComputed.top = IEComputed.right = IEComputed.bottom = IEComputed.left = 
-        IEComputed[WIDTH] = IEComputed[HEIGHT] = ComputedStyle.getOffset;
-
-IEComputed.color = ComputedStyle.getColor;
-
-IEComputed[BORDER_TOP_WIDTH] = IEComputed[BORDER_RIGHT_WIDTH] =
-        IEComputed[BORDER_BOTTOM_WIDTH] = IEComputed[BORDER_LEFT_WIDTH] =
-        ComputedStyle.getBorderWidth;
-
-IEComputed.marginTop = IEComputed.marginRight = IEComputed.marginBottom =
-        IEComputed.marginLeft = ComputedStyle.getMargin;
-
-IEComputed.visibility = ComputedStyle.getVisibility;
-IEComputed.borderColor = IEComputed.borderTopColor =
-        IEComputed.borderRightColor = IEComputed.borderBottomColor =
-        IEComputed.borderLeftColor = ComputedStyle.getBorderColor;
-
-Y.Dom.IE_COMPUTED = IEComputed;
-Y.Dom.IE_ComputedStyle = ComputedStyle;
-})();
-(function() {
-/**
- * Add style management functionality to DOM.
- * @module dom
- * @class Color
- * @namespace YAHOO.util.Dom
- */
-
-var TO_STRING = 'toString',
-    PARSE_INT = parseInt,
-    RE = RegExp,
-    Y = YAHOO.util;
-
-Y.Dom.Color = {
-    /**
-    * @property KEYWORDS
-    * @type Object
-    * @description Color keywords used when converting to Hex
-    */
-    KEYWORDS: {
-        black: '000',
-        silver: 'c0c0c0',
-        gray: '808080',
-        white: 'fff',
-        maroon: '800000',
-        red: 'f00',
-        purple: '800080',
-        fuchsia: 'f0f',
-        green: '008000',
-        lime: '0f0',
-        olive: '808000',
-        yellow: 'ff0',
-        navy: '000080',
-        blue: '00f',
-        teal: '008080',
-        aqua: '0ff'
-    },
-    /**
-    * @property re_RGB
-    * @private
-    * @type Regex
-    * @description Regex to parse rgb(0,0,0) formatted strings
-    */
-    re_RGB: /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,
-    /**
-    * @property re_hex
-    * @private
-    * @type Regex
-    * @description Regex to parse #123456 formatted strings
-    */
-    re_hex: /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,
-    /**
-    * @property re_hex3
-    * @private
-    * @type Regex
-    * @description Regex to parse #123 formatted strings
-    */
-    re_hex3: /([0-9A-F])/gi,
-    /**
-    * @method toRGB
-    * @description Converts a hex or color string to an rgb string: rgb(0,0,0)
-    * @param {String} val The string to convert to RGB notation.
-    * @returns {String} The converted string
-    */
-    toRGB: function(val) {
-        if (!Y.Dom.Color.re_RGB.test(val)) {
-            val = Y.Dom.Color.toHex(val);
-        }
-
-        if(Y.Dom.Color.re_hex.exec(val)) {
-            val = 'rgb(' + [
-                PARSE_INT(RE.$1, 16),
-                PARSE_INT(RE.$2, 16),
-                PARSE_INT(RE.$3, 16)
-            ].join(', ') + ')';
-        }
-        return val;
-    },
-    /**
-    * @method toHex
-    * @description Converts an rgb or color string to a hex string: #123456
-    * @param {String} val The string to convert to hex notation.
-    * @returns {String} The converted string
-    */
-    toHex: function(val) {
-        val = Y.Dom.Color.KEYWORDS[val] || val;
-        if (Y.Dom.Color.re_RGB.exec(val)) {
-            val = [
-                Number(RE.$1).toString(16),
-                Number(RE.$2).toString(16),
-                Number(RE.$3).toString(16)
-            ];
-
-            for (var i = 0; i < val.length; i++) {
-                if (val[i].length < 2) {
-                    val[i] = '0' + val[i];
-                }
-            }
-
-            val = val.join('');
-        }
-
-        if (val.length < 6) {
-            val = val.replace(Y.Dom.Color.re_hex3, '$1$1');
-        }
-
-        if (val !== 'transparent' && val.indexOf('#') < 0) {
-            val = '#' + val;
-        }
-
-        return val.toUpperCase();
-    }
-};
-}());
-YAHOO.register("dom", YAHOO.util.Dom, {version: "2.9.0", build: "2800"});

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/event/event-min.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/event/event-min.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/event/event-min.js
deleted file mode 100644
index f4a0f25..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/event/event-min.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-YAHOO.util.CustomEvent=function(d,c,b,a,e){this.type=d;this.scope=c||window;this.silent=b;this.fireOnce=e;this.fired=false;this.firedWith=null;this.signature=a||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var f="_YUICEOnSubscribe";if(d!==f){this.subscribeEvent=new YAHOO.util.CustomEvent(f,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(b,c,d){if(!b){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(b,c,d);}var a=new YAHOO.util.Subscriber(b,c,d);if(this.fireOnce&&this.fired){this.notify(a,this.firedWith);}else{this.subscribers.push(a);}},unsubscribe:function(d,f){if(!d){return this.unsubscribeAll();}var e=false;for(var b=0,a=this.subscribers.length;b<a;++b){var c=this.subscribers[b];if(c&&c.contains(d,f)){this._delete(b);e=true;}}return e;},fire:function(){this.lastError=null;var h=[],a=this.subs
 cribers.length;var d=[].slice.call(arguments,0),c=true,f,b=false;if(this.fireOnce){if(this.fired){return true;}else{this.firedWith=d;}}this.fired=true;if(!a&&this.silent){return true;}if(!this.silent){}var e=this.subscribers.slice();for(f=0;f<a;++f){var g=e[f];if(!g||!g.fn){b=true;}else{c=this.notify(g,d);if(false===c){if(!this.silent){}break;}}}return(c!==false);},notify:function(g,c){var b,i=null,f=g.getScope(this.scope),a=YAHOO.util.Event.throwErrors;if(!this.silent){}if(this.signature==YAHOO.util.CustomEvent.FLAT){if(c.length>0){i=c[0];}try{b=g.fn.call(f,i,g.obj);}catch(h){this.lastError=h;if(a){throw h;}}}else{try{b=g.fn.call(f,this.type,c,g.obj);}catch(d){this.lastError=d;if(a){throw d;}}}return b;},unsubscribeAll:function(){var a=this.subscribers.length,b;for(b=a-1;b>-1;b--){this._delete(b);}this.subscribers=[];return a;},_delete:function(a){var b=this.subscribers[a];if(b){delete b.fn;delete b.obj;}this.subscribers.splice(a,1);},toString:function(){return"CustomEvent: "+"'"+t
 his.type+"', "+"context: "+this.scope;}};YAHOO.util.Subscriber=function(a,b,c){this.fn=a;this.obj=YAHOO.lang.isUndefined(b)?null:b;this.overrideContext=c;};YAHOO.util.Subscriber.prototype.getScope=function(a){if(this.overrideContext){if(this.overrideContext===true){return this.obj;}else{return this.overrideContext;}}return a;};YAHOO.util.Subscriber.prototype.contains=function(a,b){if(b){return(this.fn==a&&this.obj==b);}else{return(this.fn==a);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", overrideContext: "+(this.overrideContext||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var g=false,h=[],j=[],a=0,e=[],b=0,c={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9},d=YAHOO.env.ua.ie,f="focusin",i="focusout";return{POLL_RETRYS:500,POLL_INTERVAL:40,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:d,_interval:null,_d
 ri:null,_specialTypes:{focusin:(d?"focusin":"focus"),focusout:(d?"focusout":"blur")},DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){this._interval=YAHOO.lang.later(this.POLL_INTERVAL,this,this._tryPreloadAttach,null,true);}},onAvailable:function(q,m,o,p,n){var k=(YAHOO.lang.isString(q))?[q]:q;for(var l=0;l<k.length;l=l+1){e.push({id:k[l],fn:m,obj:o,overrideContext:p,checkReady:n});}a=this.POLL_RETRYS;this.startInterval();},onContentReady:function(n,k,l,m){this.onAvailable(n,k,l,m,true);},onDOMReady:function(){this.DOMReadyEvent.subscribe.apply(this.DOMReadyEvent,arguments);},_addListener:function(m,k,v,p,t,y){if(!v||!v.call){return false;}if(this._isValidCollection(m)){var w=true;for(var q=0,s=m.length;q<s;++q){w=this.on(m[q],k,v,p,t)&&w;}return w;}else{if(YAHOO.lang.isString(m)){var o=this.getEl(m);if(o){m=o;}else{this.onAvailable(m,function(){YAHOO.util.Event._addListener(m,k,v,p,t,y);});return true;}}}if(!m){return false;}if("unload"==k&&p!==this){j
 [j.length]=[m,k,v,p,t];return true;}var l=m;if(t){if(t===true){l=p;}else{l=t;}}var n=function(z){return v.call(l,YAHOO.util.Event.getEvent(z,m),p);};var x=[m,k,v,n,l,p,t,y];var r=h.length;h[r]=x;try{this._simpleAdd(m,k,n,y);}catch(u){this.lastError=u;this.removeListener(m,k,v);return false;}return true;},_getType:function(k){return this._specialTypes[k]||k;},addListener:function(m,p,l,n,o){var k=((p==f||p==i)&&!YAHOO.env.ua.ie)?true:false;return this._addListener(m,this._getType(p),l,n,o,k);},addFocusListener:function(l,k,m,n){return this.on(l,f,k,m,n);},removeFocusListener:function(l,k){return this.removeListener(l,f,k);},addBlurListener:function(l,k,m,n){return this.on(l,i,k,m,n);},removeBlurListener:function(l,k){return this.removeListener(l,i,k);},removeListener:function(l,k,r){var m,p,u;k=this._getType(k);if(typeof l=="string"){l=this.getEl(l);}else{if(this._isValidCollection(l)){var s=true;for(m=l.length-1;m>-1;m--){s=(this.removeListener(l[m],k,r)&&s);}return s;}}if(!r||!r.ca
 ll){return this.purgeElement(l,false,k);}if("unload"==k){for(m=j.length-1;m>-1;m--){u=j[m];if(u&&u[0]==l&&u[1]==k&&u[2]==r){j.splice(m,1);return true;}}return false;}var n=null;var o=arguments[3];if("undefined"===typeof o){o=this._getCacheIndex(h,l,k,r);}if(o>=0){n=h[o];}if(!l||!n){return false;}var t=n[this.CAPTURE]===true?true:false;try{this._simpleRemove(l,k,n[this.WFN],t);}catch(q){this.lastError=q;return false;}delete h[o][this.WFN];delete h[o][this.FN];h.splice(o,1);return true;},getTarget:function(m,l){var k=m.target||m.srcElement;return this.resolveTextNode(k);},resolveTextNode:function(l){try{if(l&&3==l.nodeType){return l.parentNode;}}catch(k){return null;}return l;},getPageX:function(l){var k=l.pageX;if(!k&&0!==k){k=l.clientX||0;if(this.isIE){k+=this._getScrollLeft();}}return k;},getPageY:function(k){var l=k.pageY;if(!l&&0!==l){l=k.clientY||0;if(this.isIE){l+=this._getScrollTop();}}return l;},getXY:function(k){return[this.getPageX(k),this.getPageY(k)];},getRelatedTarget:fu
 nction(l){var k=l.relatedTarget;
-if(!k){if(l.type=="mouseout"){k=l.toElement;}else{if(l.type=="mouseover"){k=l.fromElement;}}}return this.resolveTextNode(k);},getTime:function(m){if(!m.time){var l=new Date().getTime();try{m.time=l;}catch(k){this.lastError=k;return l;}}return m.time;},stopEvent:function(k){this.stopPropagation(k);this.preventDefault(k);},stopPropagation:function(k){if(k.stopPropagation){k.stopPropagation();}else{k.cancelBubble=true;}},preventDefault:function(k){if(k.preventDefault){k.preventDefault();}else{k.returnValue=false;}},getEvent:function(m,k){var l=m||window.event;if(!l){var n=this.getEvent.caller;while(n){l=n.arguments[0];if(l&&Event==l.constructor){break;}n=n.caller;}}return l;},getCharCode:function(l){var k=l.keyCode||l.charCode||0;if(YAHOO.env.ua.webkit&&(k in c)){k=c[k];}return k;},_getCacheIndex:function(n,q,r,p){for(var o=0,m=n.length;o<m;o=o+1){var k=n[o];if(k&&k[this.FN]==p&&k[this.EL]==q&&k[this.TYPE]==r){return o;}}return -1;},generateId:function(k){var l=k.id;if(!l){l="yuievtaut
 oid-"+b;++b;k.id=l;}return l;},_isValidCollection:function(l){try{return(l&&typeof l!=="string"&&l.length&&!l.tagName&&!l.alert&&typeof l[0]!=="undefined");}catch(k){return false;}},elCache:{},getEl:function(k){return(typeof k==="string")?document.getElementById(k):k;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",YAHOO,0,0,1),_load:function(l){if(!g){g=true;var k=YAHOO.util.Event;k._ready();k._tryPreloadAttach();}},_ready:function(l){var k=YAHOO.util.Event;if(!k.DOMReady){k.DOMReady=true;k.DOMReadyEvent.fire();k._simpleRemove(document,"DOMContentLoaded",k._ready);}},_tryPreloadAttach:function(){if(e.length===0){a=0;if(this._interval){this._interval.cancel();this._interval=null;}return;}if(this.locked){return;}if(this.isIE){if(!this.DOMReady){this.startInterval();return;}}this.locked=true;var q=!g;if(!q){q=(a>0&&e.length>0);}var p=[];var r=function(t,u){var s=t;if(u.overrideContext){if(u.overrideContext===true){s=u.obj;}else{s=u.overrideContext;}}u.fn.c
 all(s,u.obj);};var l,k,o,n,m=[];for(l=0,k=e.length;l<k;l=l+1){o=e[l];if(o){n=this.getEl(o.id);if(n){if(o.checkReady){if(g||n.nextSibling||!q){m.push(o);e[l]=null;}}else{r(n,o);e[l]=null;}}else{p.push(o);}}}for(l=0,k=m.length;l<k;l=l+1){o=m[l];r(this.getEl(o.id),o);}a--;if(q){for(l=e.length-1;l>-1;l--){o=e[l];if(!o||!o.id){e.splice(l,1);}}this.startInterval();}else{if(this._interval){this._interval.cancel();this._interval=null;}}this.locked=false;},purgeElement:function(p,q,s){var n=(YAHOO.lang.isString(p))?this.getEl(p):p;var r=this.getListeners(n,s),o,k;if(r){for(o=r.length-1;o>-1;o--){var m=r[o];this.removeListener(n,m.type,m.fn);}}if(q&&n&&n.childNodes){for(o=0,k=n.childNodes.length;o<k;++o){this.purgeElement(n.childNodes[o],q,s);}}},getListeners:function(n,k){var q=[],m;if(!k){m=[h,j];}else{if(k==="unload"){m=[j];}else{k=this._getType(k);m=[h];}}var s=(YAHOO.lang.isString(n))?this.getEl(n):n;for(var p=0;p<m.length;p=p+1){var u=m[p];if(u){for(var r=0,t=u.length;r<t;++r){var o=u[r
 ];if(o&&o[this.EL]===s&&(!k||k===o[this.TYPE])){q.push({type:o[this.TYPE],fn:o[this.FN],obj:o[this.OBJ],adjust:o[this.OVERRIDE],scope:o[this.ADJ_SCOPE],index:r});}}}}return(q.length)?q:null;},_unload:function(s){var m=YAHOO.util.Event,p,o,n,r,q,t=j.slice(),k;for(p=0,r=j.length;p<r;++p){n=t[p];if(n){try{k=window;if(n[m.ADJ_SCOPE]){if(n[m.ADJ_SCOPE]===true){k=n[m.UNLOAD_OBJ];}else{k=n[m.ADJ_SCOPE];}}n[m.FN].call(k,m.getEvent(s,n[m.EL]),n[m.UNLOAD_OBJ]);}catch(w){}t[p]=null;}}n=null;k=null;j=null;if(h){for(o=h.length-1;o>-1;o--){n=h[o];if(n){try{m.removeListener(n[m.EL],n[m.TYPE],n[m.FN],o);}catch(v){}}}n=null;}try{m._simpleRemove(window,"unload",m._unload);m._simpleRemove(window,"load",m._load);}catch(u){}},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var k=document.documentElement,l=document.body;if(k&&(k.scrollTop||k.scrollLeft)){return[k.scrollTop,k.scrollLeft];}else{if(l){return[l.scrollTop,l.s
 crollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(m,n,l,k){m.addEventListener(n,l,(k));};}else{if(window.attachEvent){return function(m,n,l,k){m.attachEvent("on"+n,l);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(m,n,l,k){m.removeEventListener(n,l,(k));};}else{if(window.detachEvent){return function(l,m,k){l.detachEvent("on"+m,k);};}else{return function(){};}}}()};}();(function(){var a=YAHOO.util.Event;a.on=a.addListener;a.onFocus=a.addFocusListener;a.onBlur=a.addBlurListener;
-/*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
-if(a.isIE){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;a._ready();}};}else{YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var b=document.createElement("p");a._dri=setInterval(function(){try{b.doScroll("left");clearInterval(a._dri);a._dri=null;a._ready();b=null;}catch(c){}},a.POLL_INTERVAL);}}else{if(a.webkit&&a.webkit<525){a._dri=setInterval(function(){var c=document.readyState;if("loaded"==c||"complete"==c){clearInterval(a._dri);a._dri=null;a._ready();}},a.POLL_INTERVAL);}else{a._simpleAdd(document,"DOMContentLoaded",a._ready);}}a._simpleAdd(window,"load",a._load);a._simpleAdd(window,"unload",a._unload);a._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(a,c,f,e){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[a];if(d){d.subscribe(c,f,e)
 ;}else{this.__yui_subscribers=this.__yui_subscribers||{};var b=this.__yui_subscribers;if(!b[a]){b[a]=[];}b[a].push({fn:c,obj:f,overrideContext:e});}},unsubscribe:function(c,e,g){this.__yui_events=this.__yui_events||{};var a=this.__yui_events;if(c){var f=a[c];if(f){return f.unsubscribe(e,g);}}else{var b=true;for(var d in a){if(YAHOO.lang.hasOwnProperty(a,d)){b=b&&a[d].unsubscribe(e,g);
-}}return b;}return false;},unsubscribeAll:function(a){return this.unsubscribe(a);},createEvent:function(b,g){this.__yui_events=this.__yui_events||{};var e=g||{},d=this.__yui_events,f;if(d[b]){}else{f=new YAHOO.util.CustomEvent(b,e.scope||this,e.silent,YAHOO.util.CustomEvent.FLAT,e.fireOnce);d[b]=f;if(e.onSubscribeCallback){f.subscribeEvent.subscribe(e.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var a=this.__yui_subscribers[b];if(a){for(var c=0;c<a.length;++c){f.subscribe(a[c].fn,a[c].obj,a[c].overrideContext);}}}return d[b];},fireEvent:function(b){this.__yui_events=this.__yui_events||{};var d=this.__yui_events[b];if(!d){return null;}var a=[];for(var c=1;c<arguments.length;++c){a.push(arguments[c]);}return d.fire.apply(d,a);},hasEvent:function(a){if(this.__yui_events){if(this.__yui_events[a]){return true;}}return false;}};(function(){var a=YAHOO.util.Event,c=YAHOO.lang;YAHOO.util.KeyListener=function(d,i,e,f){if(!d){}else{if(!i){}else{if(!e){}}}if(!f){f=YA
 HOO.util.KeyListener.KEYDOWN;}var g=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(c.isString(d)){d=document.getElementById(d);}if(c.isFunction(e)){g.subscribe(e);}else{g.subscribe(e.fn,e.scope,e.correctScope);}function h(o,n){if(!i.shift){i.shift=false;}if(!i.alt){i.alt=false;}if(!i.ctrl){i.ctrl=false;}if(o.shiftKey==i.shift&&o.altKey==i.alt&&o.ctrlKey==i.ctrl){var j,m=i.keys,l;if(YAHOO.lang.isArray(m)){for(var k=0;k<m.length;k++){j=m[k];l=a.getCharCode(o);if(j==l){g.fire(l,o);break;}}}else{l=a.getCharCode(o);if(m==l){g.fire(l,o);}}}}this.enable=function(){if(!this.enabled){a.on(d,f,h);this.enabledEvent.fire(i);}this.enabled=true;};this.disable=function(){if(this.enabled){a.removeListener(d,f,h);this.disabledEvent.fire(i);}this.enabled=false;};this.toString=function(){return"KeyListener ["+i.keys+"] "+d.tagName+(d.id?"["+d.id+"]":"");};};var b=YAHOO.util.KeyListener;b.KEYD
 OWN="keydown";b.KEYUP="keyup";b.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};})();YAHOO.register("event",YAHOO.util.Event,{version:"2.9.0",build:"2800"});
\ No newline at end of file


[06/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader.js
deleted file mode 100644
index a63c6d9..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/yuiloader/yuiloader.js
+++ /dev/null
@@ -1,4065 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-/**
- * The YAHOO object is the single global object used by YUI Library.  It
- * contains utility function for setting up namespaces, inheritance, and
- * logging.  YAHOO.util, YAHOO.widget, and YAHOO.example are namespaces
- * created automatically for and used by the library.
- * @module yahoo
- * @title  YAHOO Global
- */
-
-/**
- * YAHOO_config is not included as part of the library.  Instead it is an
- * object that can be defined by the implementer immediately before
- * including the YUI library.  The properties included in this object
- * will be used to configure global properties needed as soon as the
- * library begins to load.
- * @class YAHOO_config
- * @static
- */
-
-/**
- * A reference to a function that will be executed every time a YAHOO module
- * is loaded.  As parameter, this function will receive the version
- * information for the module. See <a href="YAHOO.env.html#getVersion">
- * YAHOO.env.getVersion</a> for the description of the version data structure.
- * @property listener
- * @type Function
- * @static
- * @default undefined
- */
-
-/**
- * Set to true if the library will be dynamically loaded after window.onload.
- * Defaults to false
- * @property injecting
- * @type boolean
- * @static
- * @default undefined
- */
-
-/**
- * Instructs the yuiloader component to dynamically load yui components and
- * their dependencies.  See the yuiloader documentation for more information
- * about dynamic loading
- * @property load
- * @static
- * @default undefined
- * @see yuiloader
- */
-
-/**
- * Forces the use of the supplied locale where applicable in the library
- * @property locale
- * @type string
- * @static
- * @default undefined
- */
-
-if (typeof YAHOO == "undefined" || !YAHOO) {
-    /**
-     * The YAHOO global namespace object.  If YAHOO is already defined, the
-     * existing YAHOO object will not be overwritten so that defined
-     * namespaces are preserved.
-     * @class YAHOO
-     * @static
-     */
-    var YAHOO = {};
-}
-
-/**
- * Returns the namespace specified and creates it if it doesn't exist
- * <pre>
- * YAHOO.namespace("property.package");
- * YAHOO.namespace("YAHOO.property.package");
- * </pre>
- * Either of the above would create YAHOO.property, then
- * YAHOO.property.package
- *
- * Be careful when naming packages. Reserved words may work in some browsers
- * and not others. For instance, the following will fail in Safari:
- * <pre>
- * YAHOO.namespace("really.long.nested.namespace");
- * </pre>
- * This fails because "long" is a future reserved word in ECMAScript
- *
- * For implementation code that uses YUI, do not create your components
- * in the namespaces defined by YUI (
- * <code>YAHOO.util</code>,
- * <code>YAHOO.widget</code>,
- * <code>YAHOO.lang</code>,
- * <code>YAHOO.tool</code>,
- * <code>YAHOO.example</code>,
- * <code>YAHOO.env</code>) -- create your own namespace (e.g., 'companyname').
- *
- * @method namespace
- * @static
- * @param  {String*} arguments 1-n namespaces to create
- * @return {Object}  A reference to the last namespace object created
- */
-YAHOO.namespace = function() {
-    var a=arguments, o=null, i, j, d;
-    for (i=0; i<a.length; i=i+1) {
-        d=(""+a[i]).split(".");
-        o=YAHOO;
-
-        // YAHOO is implied, so it is ignored if it is included
-        for (j=(d[0] == "YAHOO") ? 1 : 0; j<d.length; j=j+1) {
-            o[d[j]]=o[d[j]] || {};
-            o=o[d[j]];
-        }
-    }
-
-    return o;
-};
-
-/**
- * Uses YAHOO.widget.Logger to output a log message, if the widget is
- * available.
- * Note: LogReader adds the message, category, and source to the DOM as HTML.
- *
- * @method log
- * @static
- * @param  {HTML}  msg  The message to log.
- * @param  {HTML}  cat  The log category for the message.  Default
- *                        categories are "info", "warn", "error", time".
- *                        Custom categories can be used as well. (opt)
- * @param  {HTML}  src  The source of the the message (opt)
- * @return {Boolean}      True if the log operation was successful.
- */
-YAHOO.log = function(msg, cat, src) {
-    var l=YAHOO.widget.Logger;
-    if(l && l.log) {
-        return l.log(msg, cat, src);
-    } else {
-        return false;
-    }
-};
-
-/**
- * Registers a module with the YAHOO object
- * @method register
- * @static
- * @param {String}   name    the name of the module (event, slider, etc)
- * @param {Function} mainClass a reference to class in the module.  This
- *                             class will be tagged with the version info
- *                             so that it will be possible to identify the
- *                             version that is in use when multiple versions
- *                             have loaded
- * @param {Object}   data      metadata object for the module.  Currently it
- *                             is expected to contain a "version" property
- *                             and a "build" property at minimum.
- */
-YAHOO.register = function(name, mainClass, data) {
-    var mods = YAHOO.env.modules, m, v, b, ls, i;
-
-    if (!mods[name]) {
-        mods[name] = {
-            versions:[],
-            builds:[]
-        };
-    }
-
-    m  = mods[name];
-    v  = data.version;
-    b  = data.build;
-    ls = YAHOO.env.listeners;
-
-    m.name = name;
-    m.version = v;
-    m.build = b;
-    m.versions.push(v);
-    m.builds.push(b);
-    m.mainClass = mainClass;
-
-    // fire the module load listeners
-    for (i=0;i<ls.length;i=i+1) {
-        ls[i](m);
-    }
-    // label the main class
-    if (mainClass) {
-        mainClass.VERSION = v;
-        mainClass.BUILD = b;
-    } else {
-        YAHOO.log("mainClass is undefined for module " + name, "warn");
-    }
-};
-
-/**
- * YAHOO.env is used to keep track of what is known about the YUI library and
- * the browsing environment
- * @class YAHOO.env
- * @static
- */
-YAHOO.env = YAHOO.env || {
-
-    /**
-     * Keeps the version info for all YUI modules that have reported themselves
-     * @property modules
-     * @type Object[]
-     */
-    modules: [],
-
-    /**
-     * List of functions that should be executed every time a YUI module
-     * reports itself.
-     * @property listeners
-     * @type Function[]
-     */
-    listeners: []
-};
-
-/**
- * Returns the version data for the specified module:
- *      <dl>
- *      <dt>name:</dt>      <dd>The name of the module</dd>
- *      <dt>version:</dt>   <dd>The version in use</dd>
- *      <dt>build:</dt>     <dd>The build number in use</dd>
- *      <dt>versions:</dt>  <dd>All versions that were registered</dd>
- *      <dt>builds:</dt>    <dd>All builds that were registered.</dd>
- *      <dt>mainClass:</dt> <dd>An object that was was stamped with the
- *                 current version and build. If
- *                 mainClass.VERSION != version or mainClass.BUILD != build,
- *                 multiple versions of pieces of the library have been
- *                 loaded, potentially causing issues.</dd>
- *       </dl>
- *
- * @method getVersion
- * @static
- * @param {String}  name the name of the module (event, slider, etc)
- * @return {Object} The version info
- */
-YAHOO.env.getVersion = function(name) {
-    return YAHOO.env.modules[name] || null;
-};
-
-/**
- * Do not fork for a browser if it can be avoided.  Use feature detection when
- * you can.  Use the user agent as a last resort.  YAHOO.env.ua stores a version
- * number for the browser engine, 0 otherwise.  This value may or may not map
- * to the version number of the browser using the engine.  The value is
- * presented as a float so that it can easily be used for boolean evaluation
- * as well as for looking for a particular range of versions.  Because of this,
- * some of the granularity of the version info may be lost (e.g., Gecko 1.8.0.9
- * reports 1.8).
- * @class YAHOO.env.ua
- * @static
- */
-
-/**
- * parses a user agent string (or looks for one in navigator to parse if
- * not supplied).
- * @method parseUA
- * @since 2.9.0
- * @static
- */
-YAHOO.env.parseUA = function(agent) {
-
-        var numberify = function(s) {
-            var c = 0;
-            return parseFloat(s.replace(/\./g, function() {
-                return (c++ == 1) ? '' : '.';
-            }));
-        },
-
-        nav = navigator,
-
-        o = {
-
-        /**
-         * Internet Explorer version number or 0.  Example: 6
-         * @property ie
-         * @type float
-         * @static
-         */
-        ie: 0,
-
-        /**
-         * Opera version number or 0.  Example: 9.2
-         * @property opera
-         * @type float
-         * @static
-         */
-        opera: 0,
-
-        /**
-         * Gecko engine revision number.  Will evaluate to 1 if Gecko
-         * is detected but the revision could not be found. Other browsers
-         * will be 0.  Example: 1.8
-         * <pre>
-         * Firefox 1.0.0.4: 1.7.8   <-- Reports 1.7
-         * Firefox 1.5.0.9: 1.8.0.9 <-- 1.8
-         * Firefox 2.0.0.3: 1.8.1.3 <-- 1.81
-         * Firefox 3.0   <-- 1.9
-         * Firefox 3.5   <-- 1.91
-         * </pre>
-         * @property gecko
-         * @type float
-         * @static
-         */
-        gecko: 0,
-
-        /**
-         * AppleWebKit version.  KHTML browsers that are not WebKit browsers
-         * will evaluate to 1, other browsers 0.  Example: 418.9
-         * <pre>
-         * Safari 1.3.2 (312.6): 312.8.1 <-- Reports 312.8 -- currently the
-         *                                   latest available for Mac OSX 10.3.
-         * Safari 2.0.2:         416     <-- hasOwnProperty introduced
-         * Safari 2.0.4:         418     <-- preventDefault fixed
-         * Safari 2.0.4 (419.3): 418.9.1 <-- One version of Safari may run
-         *                                   different versions of webkit
-         * Safari 2.0.4 (419.3): 419     <-- Tiger installations that have been
-         *                                   updated, but not updated
-         *                                   to the latest patch.
-         * Webkit 212 nightly:   522+    <-- Safari 3.0 precursor (with native
-         * SVG and many major issues fixed).
-         * Safari 3.0.4 (523.12) 523.12  <-- First Tiger release - automatic
-         * update from 2.x via the 10.4.11 OS patch.
-         * Webkit nightly 1/2008:525+    <-- Supports DOMContentLoaded event.
-         *                                   yahoo.com user agent hack removed.
-         * </pre>
-         * http://en.wikipedia.org/wiki/Safari_version_history
-         * @property webkit
-         * @type float
-         * @static
-         */
-        webkit: 0,
-
-        /**
-         * Chrome will be detected as webkit, but this property will also
-         * be populated with the Chrome version number
-         * @property chrome
-         * @type float
-         * @static
-         */
-        chrome: 0,
-
-        /**
-         * The mobile property will be set to a string containing any relevant
-         * user agent information when a modern mobile browser is detected.
-         * Currently limited to Safari on the iPhone/iPod Touch, Nokia N-series
-         * devices with the WebKit-based browser, and Opera Mini.
-         * @property mobile
-         * @type string
-         * @static
-         */
-        mobile: null,
-
-        /**
-         * Adobe AIR version number or 0.  Only populated if webkit is detected.
-         * Example: 1.0
-         * @property air
-         * @type float
-         */
-        air: 0,
-        /**
-         * Detects Apple iPad's OS version
-         * @property ipad
-         * @type float
-         * @static
-         */
-        ipad: 0,
-        /**
-         * Detects Apple iPhone's OS version
-         * @property iphone
-         * @type float
-         * @static
-         */
-        iphone: 0,
-        /**
-         * Detects Apples iPod's OS version
-         * @property ipod
-         * @type float
-         * @static
-         */
-        ipod: 0,
-        /**
-         * General truthy check for iPad, iPhone or iPod
-         * @property ios
-         * @type float
-         * @static
-         */
-        ios: null,
-        /**
-         * Detects Googles Android OS version
-         * @property android
-         * @type float
-         * @static
-         */
-        android: 0,
-        /**
-         * Detects Palms WebOS version
-         * @property webos
-         * @type float
-         * @static
-         */
-        webos: 0,
-
-        /**
-         * Google Caja version number or 0.
-         * @property caja
-         * @type float
-         */
-        caja: nav && nav.cajaVersion,
-
-        /**
-         * Set to true if the page appears to be in SSL
-         * @property secure
-         * @type boolean
-         * @static
-         */
-        secure: false,
-
-        /**
-         * The operating system.  Currently only detecting windows or macintosh
-         * @property os
-         * @type string
-         * @static
-         */
-        os: null
-
-    },
-
-    ua = agent || (navigator && navigator.userAgent),
-
-    loc = window && window.location,
-
-    href = loc && loc.href,
-
-    m;
-
-    o.secure = href && (href.toLowerCase().indexOf("https") === 0);
-
-    if (ua) {
-
-        if ((/windows|win32/i).test(ua)) {
-            o.os = 'windows';
-        } else if ((/macintosh/i).test(ua)) {
-            o.os = 'macintosh';
-        } else if ((/rhino/i).test(ua)) {
-            o.os = 'rhino';
-        }
-
-        // Modern KHTML browsers should qualify as Safari X-Grade
-        if ((/KHTML/).test(ua)) {
-            o.webkit = 1;
-        }
-        // Modern WebKit browsers are at least X-Grade
-        m = ua.match(/AppleWebKit\/([^\s]*)/);
-        if (m && m[1]) {
-            o.webkit = numberify(m[1]);
-
-            // Mobile browser check
-            if (/ Mobile\//.test(ua)) {
-                o.mobile = 'Apple'; // iPhone or iPod Touch
-
-                m = ua.match(/OS ([^\s]*)/);
-                if (m && m[1]) {
-                    m = numberify(m[1].replace('_', '.'));
-                }
-                o.ios = m;
-                o.ipad = o.ipod = o.iphone = 0;
-
-                m = ua.match(/iPad|iPod|iPhone/);
-                if (m && m[0]) {
-                    o[m[0].toLowerCase()] = o.ios;
-                }
-            } else {
-                m = ua.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/);
-                if (m) {
-                    // Nokia N-series, Android, webOS, ex: NokiaN95
-                    o.mobile = m[0];
-                }
-                if (/webOS/.test(ua)) {
-                    o.mobile = 'WebOS';
-                    m = ua.match(/webOS\/([^\s]*);/);
-                    if (m && m[1]) {
-                        o.webos = numberify(m[1]);
-                    }
-                }
-                if (/ Android/.test(ua)) {
-                    o.mobile = 'Android';
-                    m = ua.match(/Android ([^\s]*);/);
-                    if (m && m[1]) {
-                        o.android = numberify(m[1]);
-                    }
-
-                }
-            }
-
-            m = ua.match(/Chrome\/([^\s]*)/);
-            if (m && m[1]) {
-                o.chrome = numberify(m[1]); // Chrome
-            } else {
-                m = ua.match(/AdobeAIR\/([^\s]*)/);
-                if (m) {
-                    o.air = m[0]; // Adobe AIR 1.0 or better
-                }
-            }
-        }
-
-        if (!o.webkit) { // not webkit
-// @todo check Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1316; fi; U; ssr)
-            m = ua.match(/Opera[\s\/]([^\s]*)/);
-            if (m && m[1]) {
-                o.opera = numberify(m[1]);
-                m = ua.match(/Version\/([^\s]*)/);
-                if (m && m[1]) {
-                    o.opera = numberify(m[1]); // opera 10+
-                }
-                m = ua.match(/Opera Mini[^;]*/);
-                if (m) {
-                    o.mobile = m[0]; // ex: Opera Mini/2.0.4509/1316
-                }
-            } else { // not opera or webkit
-                m = ua.match(/MSIE\s([^;]*)/);
-                if (m && m[1]) {
-                    o.ie = numberify(m[1]);
-                } else { // not opera, webkit, or ie
-                    m = ua.match(/Gecko\/([^\s]*)/);
-                    if (m) {
-                        o.gecko = 1; // Gecko detected, look for revision
-                        m = ua.match(/rv:([^\s\)]*)/);
-                        if (m && m[1]) {
-                            o.gecko = numberify(m[1]);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    return o;
-};
-
-YAHOO.env.ua = YAHOO.env.parseUA();
-
-/*
- * Initializes the global by creating the default namespaces and applying
- * any new configuration information that is detected.  This is the setup
- * for env.
- * @method init
- * @static
- * @private
- */
-(function() {
-    YAHOO.namespace("util", "widget", "example");
-    /*global YAHOO_config*/
-    if ("undefined" !== typeof YAHOO_config) {
-        var l=YAHOO_config.listener, ls=YAHOO.env.listeners,unique=true, i;
-        if (l) {
-            // if YAHOO is loaded multiple times we need to check to see if
-            // this is a new config object.  If it is, add the new component
-            // load listener to the stack
-            for (i=0; i<ls.length; i++) {
-                if (ls[i] == l) {
-                    unique = false;
-                    break;
-                }
-            }
-
-            if (unique) {
-                ls.push(l);
-            }
-        }
-    }
-})();
-/**
- * Provides the language utilites and extensions used by the library
- * @class YAHOO.lang
- */
-YAHOO.lang = YAHOO.lang || {};
-
-(function() {
-
-
-var L = YAHOO.lang,
-
-    OP = Object.prototype,
-    ARRAY_TOSTRING = '[object Array]',
-    FUNCTION_TOSTRING = '[object Function]',
-    OBJECT_TOSTRING = '[object Object]',
-    NOTHING = [],
-
-    HTML_CHARS = {
-        '&': '&amp;',
-        '<': '&lt;',
-        '>': '&gt;',
-        '"': '&quot;',
-        "'": '&#x27;',
-        '/': '&#x2F;',
-        '`': '&#x60;'
-    },
-
-    // ADD = ["toString", "valueOf", "hasOwnProperty"],
-    ADD = ["toString", "valueOf"],
-
-    OB = {
-
-    /**
-     * Determines wheather or not the provided object is an array.
-     * @method isArray
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isArray: function(o) {
-        return OP.toString.apply(o) === ARRAY_TOSTRING;
-    },
-
-    /**
-     * Determines whether or not the provided object is a boolean
-     * @method isBoolean
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isBoolean: function(o) {
-        return typeof o === 'boolean';
-    },
-
-    /**
-     * Determines whether or not the provided object is a function.
-     * Note: Internet Explorer thinks certain functions are objects:
-     *
-     * var obj = document.createElement("object");
-     * YAHOO.lang.isFunction(obj.getAttribute) // reports false in IE
-     *
-     * var input = document.createElement("input"); // append to body
-     * YAHOO.lang.isFunction(input.focus) // reports false in IE
-     *
-     * You will have to implement additional tests if these functions
-     * matter to you.
-     *
-     * @method isFunction
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isFunction: function(o) {
-        return (typeof o === 'function') || OP.toString.apply(o) === FUNCTION_TOSTRING;
-    },
-
-    /**
-     * Determines whether or not the provided object is null
-     * @method isNull
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isNull: function(o) {
-        return o === null;
-    },
-
-    /**
-     * Determines whether or not the provided object is a legal number
-     * @method isNumber
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isNumber: function(o) {
-        return typeof o === 'number' && isFinite(o);
-    },
-
-    /**
-     * Determines whether or not the provided object is of type object
-     * or function
-     * @method isObject
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isObject: function(o) {
-return (o && (typeof o === 'object' || L.isFunction(o))) || false;
-    },
-
-    /**
-     * Determines whether or not the provided object is a string
-     * @method isString
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isString: function(o) {
-        return typeof o === 'string';
-    },
-
-    /**
-     * Determines whether or not the provided object is undefined
-     * @method isUndefined
-     * @param {any} o The object being testing
-     * @return {boolean} the result
-     */
-    isUndefined: function(o) {
-        return typeof o === 'undefined';
-    },
-
-
-    /**
-     * IE will not enumerate native functions in a derived object even if the
-     * function was overridden.  This is a workaround for specific functions
-     * we care about on the Object prototype.
-     * @property _IEEnumFix
-     * @param {Function} r  the object to receive the augmentation
-     * @param {Function} s  the object that supplies the properties to augment
-     * @static
-     * @private
-     */
-    _IEEnumFix: (YAHOO.env.ua.ie) ? function(r, s) {
-            var i, fname, f;
-            for (i=0;i<ADD.length;i=i+1) {
-
-                fname = ADD[i];
-                f = s[fname];
-
-                if (L.isFunction(f) && f!=OP[fname]) {
-                    r[fname]=f;
-                }
-            }
-    } : function(){},
-
-    /**
-     * <p>
-     * Returns a copy of the specified string with special HTML characters
-     * escaped. The following characters will be converted to their
-     * corresponding character entities:
-     * <code>&amp; &lt; &gt; &quot; &#x27; &#x2F; &#x60;</code>
-     * </p>
-     *
-     * <p>
-     * This implementation is based on the
-     * <a href="http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet">OWASP
-     * HTML escaping recommendations</a>. In addition to the characters
-     * in the OWASP recommendation, we also escape the <code>&#x60;</code>
-     * character, since IE interprets it as an attribute delimiter when used in
-     * innerHTML.
-     * </p>
-     *
-     * @method escapeHTML
-     * @param {String} html String to escape.
-     * @return {String} Escaped string.
-     * @static
-     * @since 2.9.0
-     */
-    escapeHTML: function (html) {
-        return html.replace(/[&<>"'\/`]/g, function (match) {
-            return HTML_CHARS[match];
-        });
-    },
-
-    /**
-     * Utility to set up the prototype, constructor and superclass properties to
-     * support an inheritance strategy that can chain constructors and methods.
-     * Static members will not be inherited.
-     *
-     * @method extend
-     * @static
-     * @param {Function} subc   the object to modify
-     * @param {Function} superc the object to inherit
-     * @param {Object} overrides  additional properties/methods to add to the
-     *                              subclass prototype.  These will override the
-     *                              matching items obtained from the superclass
-     *                              if present.
-     */
-    extend: function(subc, superc, overrides) {
-        if (!superc||!subc) {
-            throw new Error("extend failed, please check that " +
-                            "all dependencies are included.");
-        }
-        var F = function() {}, i;
-        F.prototype=superc.prototype;
-        subc.prototype=new F();
-        subc.prototype.constructor=subc;
-        subc.superclass=superc.prototype;
-        if (superc.prototype.constructor == OP.constructor) {
-            superc.prototype.constructor=superc;
-        }
-
-        if (overrides) {
-            for (i in overrides) {
-                if (L.hasOwnProperty(overrides, i)) {
-                    subc.prototype[i]=overrides[i];
-                }
-            }
-
-            L._IEEnumFix(subc.prototype, overrides);
-        }
-    },
-
-    /**
-     * Applies all properties in the supplier to the receiver if the
-     * receiver does not have these properties yet.  Optionally, one or
-     * more methods/properties can be specified (as additional
-     * parameters).  This option will overwrite the property if receiver
-     * has it already.  If true is passed as the third parameter, all
-     * properties will be applied and _will_ overwrite properties in
-     * the receiver.
-     *
-     * @method augmentObject
-     * @static
-     * @since 2.3.0
-     * @param {Function} r  the object to receive the augmentation
-     * @param {Function} s  the object that supplies the properties to augment
-     * @param {String*|boolean}  arguments zero or more properties methods
-     *        to augment the receiver with.  If none specified, everything
-     *        in the supplier will be used unless it would
-     *        overwrite an existing property in the receiver. If true
-     *        is specified as the third parameter, all properties will
-     *        be applied and will overwrite an existing property in
-     *        the receiver
-     */
-    augmentObject: function(r, s) {
-        if (!s||!r) {
-            throw new Error("Absorb failed, verify dependencies.");
-        }
-        var a=arguments, i, p, overrideList=a[2];
-        if (overrideList && overrideList!==true) { // only absorb the specified properties
-            for (i=2; i<a.length; i=i+1) {
-                r[a[i]] = s[a[i]];
-            }
-        } else { // take everything, overwriting only if the third parameter is true
-            for (p in s) {
-                if (overrideList || !(p in r)) {
-                    r[p] = s[p];
-                }
-            }
-
-            L._IEEnumFix(r, s);
-        }
-
-        return r;
-    },
-
-    /**
-     * Same as YAHOO.lang.augmentObject, except it only applies prototype properties
-     * @see YAHOO.lang.augmentObject
-     * @method augmentProto
-     * @static
-     * @param {Function} r  the object to receive the augmentation
-     * @param {Function} s  the object that supplies the properties to augment
-     * @param {String*|boolean}  arguments zero or more properties methods
-     *        to augment the receiver with.  If none specified, everything
-     *        in the supplier will be used unless it would overwrite an existing
-     *        property in the receiver.  if true is specified as the third
-     *        parameter, all properties will be applied and will overwrite an
-     *        existing property in the receiver
-     */
-    augmentProto: function(r, s) {
-        if (!s||!r) {
-            throw new Error("Augment failed, verify dependencies.");
-        }
-        //var a=[].concat(arguments);
-        var a=[r.prototype,s.prototype], i;
-        for (i=2;i<arguments.length;i=i+1) {
-            a.push(arguments[i]);
-        }
-        L.augmentObject.apply(this, a);
-
-        return r;
-    },
-
-
-    /**
-     * Returns a simple string representation of the object or array.
-     * Other types of objects will be returned unprocessed.  Arrays
-     * are expected to be indexed.  Use object notation for
-     * associative arrays.
-     * @method dump
-     * @since 2.3.0
-     * @param o {Object} The object to dump
-     * @param d {int} How deep to recurse child objects, default 3
-     * @return {String} the dump result
-     */
-    dump: function(o, d) {
-        var i,len,s=[],OBJ="{...}",FUN="f(){...}",
-            COMMA=', ', ARROW=' => ';
-
-        // Cast non-objects to string
-        // Skip dates because the std toString is what we want
-        // Skip HTMLElement-like objects because trying to dump
-        // an element will cause an unhandled exception in FF 2.x
-        if (!L.isObject(o)) {
-            return o + "";
-        } else if (o instanceof Date || ("nodeType" in o && "tagName" in o)) {
-            return o;
-        } else if  (L.isFunction(o)) {
-            return FUN;
-        }
-
-        // dig into child objects the depth specifed. Default 3
-        d = (L.isNumber(d)) ? d : 3;
-
-        // arrays [1, 2, 3]
-        if (L.isArray(o)) {
-            s.push("[");
-            for (i=0,len=o.length;i<len;i=i+1) {
-                if (L.isObject(o[i])) {
-                    s.push((d > 0) ? L.dump(o[i], d-1) : OBJ);
-                } else {
-                    s.push(o[i]);
-                }
-                s.push(COMMA);
-            }
-            if (s.length > 1) {
-                s.pop();
-            }
-            s.push("]");
-        // objects {k1 => v1, k2 => v2}
-        } else {
-            s.push("{");
-            for (i in o) {
-                if (L.hasOwnProperty(o, i)) {
-                    s.push(i + ARROW);
-                    if (L.isObject(o[i])) {
-                        s.push((d > 0) ? L.dump(o[i], d-1) : OBJ);
-                    } else {
-                        s.push(o[i]);
-                    }
-                    s.push(COMMA);
-                }
-            }
-            if (s.length > 1) {
-                s.pop();
-            }
-            s.push("}");
-        }
-
-        return s.join("");
-    },
-
-    /**
-     * Does variable substitution on a string. It scans through the string
-     * looking for expressions enclosed in { } braces. If an expression
-     * is found, it is used a key on the object.  If there is a space in
-     * the key, the first word is used for the key and the rest is provided
-     * to an optional function to be used to programatically determine the
-     * value (the extra information might be used for this decision). If
-     * the value for the key in the object, or what is returned from the
-     * function has a string value, number value, or object value, it is
-     * substituted for the bracket expression and it repeats.  If this
-     * value is an object, it uses the Object's toString() if this has
-     * been overridden, otherwise it does a shallow dump of the key/value
-     * pairs.
-     *
-     * By specifying the recurse option, the string is rescanned after
-     * every replacement, allowing for nested template substitutions.
-     * The side effect of this option is that curly braces in the
-     * replacement content must be encoded.
-     *
-     * @method substitute
-     * @since 2.3.0
-     * @param s {String} The string that will be modified.
-     * @param o {Object} An object containing the replacement values
-     * @param f {Function} An optional function that can be used to
-     *                     process each match.  It receives the key,
-     *                     value, and any extra metadata included with
-     *                     the key inside of the braces.
-     * @param recurse {boolean} default true - if not false, the replaced
-     * string will be rescanned so that nested substitutions are possible.
-     * @return {String} the substituted string
-     */
-    substitute: function (s, o, f, recurse) {
-        var i, j, k, key, v, meta, saved=[], token, lidx=s.length,
-            DUMP='dump', SPACE=' ', LBRACE='{', RBRACE='}',
-            dump, objstr;
-
-        for (;;) {
-            i = s.lastIndexOf(LBRACE, lidx);
-            if (i < 0) {
-                break;
-            }
-            j = s.indexOf(RBRACE, i);
-            if (i + 1 > j) {
-                break;
-            }
-
-            //Extract key and meta info
-            token = s.substring(i + 1, j);
-            key = token;
-            meta = null;
-            k = key.indexOf(SPACE);
-            if (k > -1) {
-                meta = key.substring(k + 1);
-                key = key.substring(0, k);
-            }
-
-            // lookup the value
-            v = o[key];
-
-            // if a substitution function was provided, execute it
-            if (f) {
-                v = f(key, v, meta);
-            }
-
-            if (L.isObject(v)) {
-                if (L.isArray(v)) {
-                    v = L.dump(v, parseInt(meta, 10));
-                } else {
-                    meta = meta || "";
-
-                    // look for the keyword 'dump', if found force obj dump
-                    dump = meta.indexOf(DUMP);
-                    if (dump > -1) {
-                        meta = meta.substring(4);
-                    }
-
-                    objstr = v.toString();
-
-                    // use the toString if it is not the Object toString
-                    // and the 'dump' meta info was not found
-                    if (objstr === OBJECT_TOSTRING || dump > -1) {
-                        v = L.dump(v, parseInt(meta, 10));
-                    } else {
-                        v = objstr;
-                    }
-                }
-            } else if (!L.isString(v) && !L.isNumber(v)) {
-                // This {block} has no replace string. Save it for later.
-                v = "~-" + saved.length + "-~";
-                saved[saved.length] = token;
-
-                // break;
-            }
-
-            s = s.substring(0, i) + v + s.substring(j + 1);
-
-            if (recurse === false) {
-                lidx = i-1;
-            }
-
-        }
-
-        // restore saved {block}s
-        for (i=saved.length-1; i>=0; i=i-1) {
-            s = s.replace(new RegExp("~-" + i + "-~"), "{"  + saved[i] + "}", "g");
-        }
-
-        return s;
-    },
-
-
-    /**
-     * Returns a string without any leading or trailing whitespace.  If
-     * the input is not a string, the input will be returned untouched.
-     * @method trim
-     * @since 2.3.0
-     * @param s {string} the string to trim
-     * @return {string} the trimmed string
-     */
-    trim: function(s){
-        try {
-            return s.replace(/^\s+|\s+$/g, "");
-        } catch(e) {
-            return s;
-        }
-    },
-
-    /**
-     * Returns a new object containing all of the properties of
-     * all the supplied objects.  The properties from later objects
-     * will overwrite those in earlier objects.
-     * @method merge
-     * @since 2.3.0
-     * @param arguments {Object*} the objects to merge
-     * @return the new merged object
-     */
-    merge: function() {
-        var o={}, a=arguments, l=a.length, i;
-        for (i=0; i<l; i=i+1) {
-            L.augmentObject(o, a[i], true);
-        }
-        return o;
-    },
-
-    /**
-     * Executes the supplied function in the context of the supplied
-     * object 'when' milliseconds later.  Executes the function a
-     * single time unless periodic is set to true.
-     * @method later
-     * @since 2.4.0
-     * @param when {int} the number of milliseconds to wait until the fn
-     * is executed
-     * @param o the context object
-     * @param fn {Function|String} the function to execute or the name of
-     * the method in the 'o' object to execute
-     * @param data [Array] data that is provided to the function.  This accepts
-     * either a single item or an array.  If an array is provided, the
-     * function is executed with one parameter for each array item.  If
-     * you need to pass a single array parameter, it needs to be wrapped in
-     * an array [myarray]
-     * @param periodic {boolean} if true, executes continuously at supplied
-     * interval until canceled
-     * @return a timer object. Call the cancel() method on this object to
-     * stop the timer.
-     */
-    later: function(when, o, fn, data, periodic) {
-        when = when || 0;
-        o = o || {};
-        var m=fn, d=data, f, r;
-
-        if (L.isString(fn)) {
-            m = o[fn];
-        }
-
-        if (!m) {
-            throw new TypeError("method undefined");
-        }
-
-        if (!L.isUndefined(data) && !L.isArray(d)) {
-            d = [data];
-        }
-
-        f = function() {
-            m.apply(o, d || NOTHING);
-        };
-
-        r = (periodic) ? setInterval(f, when) : setTimeout(f, when);
-
-        return {
-            interval: periodic,
-            cancel: function() {
-                if (this.interval) {
-                    clearInterval(r);
-                } else {
-                    clearTimeout(r);
-                }
-            }
-        };
-    },
-
-    /**
-     * A convenience method for detecting a legitimate non-null value.
-     * Returns false for null/undefined/NaN, true for other values,
-     * including 0/false/''
-     * @method isValue
-     * @since 2.3.0
-     * @param o {any} the item to test
-     * @return {boolean} true if it is not null/undefined/NaN || false
-     */
-    isValue: function(o) {
-        // return (o || o === false || o === 0 || o === ''); // Infinity fails
-return (L.isObject(o) || L.isString(o) || L.isNumber(o) || L.isBoolean(o));
-    }
-
-};
-
-/**
- * Determines whether or not the property was added
- * to the object instance.  Returns false if the property is not present
- * in the object, or was inherited from the prototype.
- * This abstraction is provided to enable hasOwnProperty for Safari 1.3.x.
- * There is a discrepancy between YAHOO.lang.hasOwnProperty and
- * Object.prototype.hasOwnProperty when the property is a primitive added to
- * both the instance AND prototype with the same value:
- * <pre>
- * var A = function() {};
- * A.prototype.foo = 'foo';
- * var a = new A();
- * a.foo = 'foo';
- * alert(a.hasOwnProperty('foo')); // true
- * alert(YAHOO.lang.hasOwnProperty(a, 'foo')); // false when using fallback
- * </pre>
- * @method hasOwnProperty
- * @param {any} o The object being testing
- * @param prop {string} the name of the property to test
- * @return {boolean} the result
- */
-L.hasOwnProperty = (OP.hasOwnProperty) ?
-    function(o, prop) {
-        return o && o.hasOwnProperty && o.hasOwnProperty(prop);
-    } : function(o, prop) {
-        return !L.isUndefined(o[prop]) &&
-                o.constructor.prototype[prop] !== o[prop];
-    };
-
-// new lang wins
-OB.augmentObject(L, OB, true);
-
-/*
- * An alias for <a href="YAHOO.lang.html">YAHOO.lang</a>
- * @class YAHOO.util.Lang
- */
-YAHOO.util.Lang = L;
-
-/**
- * Same as YAHOO.lang.augmentObject, except it only applies prototype
- * properties.  This is an alias for augmentProto.
- * @see YAHOO.lang.augmentObject
- * @method augment
- * @static
- * @param {Function} r  the object to receive the augmentation
- * @param {Function} s  the object that supplies the properties to augment
- * @param {String*|boolean}  arguments zero or more properties methods to
- *        augment the receiver with.  If none specified, everything
- *        in the supplier will be used unless it would
- *        overwrite an existing property in the receiver.  if true
- *        is specified as the third parameter, all properties will
- *        be applied and will overwrite an existing property in
- *        the receiver
- */
-L.augment = L.augmentProto;
-
-/**
- * An alias for <a href="YAHOO.lang.html#augment">YAHOO.lang.augment</a>
- * @for YAHOO
- * @method augment
- * @static
- * @param {Function} r  the object to receive the augmentation
- * @param {Function} s  the object that supplies the properties to augment
- * @param {String*}  arguments zero or more properties methods to
- *        augment the receiver with.  If none specified, everything
- *        in the supplier will be used unless it would
- *        overwrite an existing property in the receiver
- */
-YAHOO.augment = L.augmentProto;
-
-/**
- * An alias for <a href="YAHOO.lang.html#extend">YAHOO.lang.extend</a>
- * @method extend
- * @static
- * @param {Function} subc   the object to modify
- * @param {Function} superc the object to inherit
- * @param {Object} overrides  additional properties/methods to add to the
- *        subclass prototype.  These will override the
- *        matching items obtained from the superclass if present.
- */
-YAHOO.extend = L.extend;
-
-})();
-YAHOO.register("yahoo", YAHOO, {version: "2.9.0", build: "2800"});
-/**
- * Provides a mechanism to fetch remote resources and
- * insert them into a document
- * This utility can fetch JavaScript and CSS files, inserting script
- * tags for script and link tags for CSS.  Note, this
- * is done via the normal browser mechanisms for inserting
- * these resources and making the content available to
- * code that would access it.  Be careful when retreiving
- * remote resources.  Only use this utility to fetch
- * files from sites you trust.
- *
- * @module get
- * @requires yahoo
- */
-
-/**
- * Fetches and inserts one or more script or link nodes into the document.
- * This utility can fetch JavaScript and CSS files, inserting script
- * tags for script and link tags for CSS.  Note, this
- * is done via the normal browser mechanisms for inserting
- * these resources and making the content available to
- * code that would access it.  Be careful when retreiving
- * remote resources.  Only use this utility to fetch
- * files from sites you trust.
- *
- * @namespace YAHOO.util
- * @class YAHOO.util.Get
- */
-YAHOO.util.Get = function() {
-
-    /**
-     * hash of queues to manage multiple requests
-     * @property queues
-     * @private
-     */
-    var queues={},
-
-    /**
-     * queue index used to generate transaction ids
-     * @property qidx
-     * @type int
-     * @private
-     */
-        qidx=0,
-
-    /**
-     * node index used to generate unique node ids
-     * @property nidx
-     * @type int
-     * @private
-     */
-        nidx=0,
-
-    /**
-     * interal property used to prevent multiple simultaneous purge
-     * processes
-     * @property purging
-     * @type boolean
-     * @private
-     */
-        _purging=false,
-
-        ua=YAHOO.env.ua,
-
-        lang=YAHOO.lang,
-
-    _fail,
-    _purge,
-    _track,
-
-    /**
-     * Generates an HTML element, this is not appended to a document
-     * @method _node
-     * @param type {string} the type of element
-     * @param attr {string} the attributes
-     * @param win {Window} optional window to create the element in
-     * @return {HTMLElement} the generated node
-     * @private
-     */
-    _node = function(type, attr, win) {
-        var w = win || window, d=w.document, n=d.createElement(type), i;
-
-        for (i in attr) {
-            if (attr.hasOwnProperty(i)) {
-                n.setAttribute(i, attr[i]);
-            }
-        }
-
-        return n;
-    },
-
-    /**
-     * Generates a link node
-     * @method _linkNode
-     * @param url {string} the url for the css file
-     * @param win {Window} optional window to create the node in
-     * @return {HTMLElement} the generated node
-     * @private
-     */
-    _linkNode = function(url, win, attributes) {
-
-        var o = {
-            id:   "yui__dyn_" + (nidx++),
-            type: "text/css",
-            rel:  "stylesheet",
-            href: url
-        };
-
-        if (attributes) {
-            lang.augmentObject(o, attributes);
-        }
-
-        return _node("link", o, win);
-    },
-
-    /**
-     * Generates a script node
-     * @method _scriptNode
-     * @param url {string} the url for the script file
-     * @param win {Window} optional window to create the node in
-     * @return {HTMLElement} the generated node
-     * @private
-     */
-    _scriptNode = function(url, win, attributes) {
-        var o = {
-            id:   "yui__dyn_" + (nidx++),
-            type: "text/javascript",
-            src:  url
-        };
-
-        if (attributes) {
-            lang.augmentObject(o, attributes);
-        }
-
-        return _node("script", o, win);
-    },
-
-    /**
-     * Returns the data payload for callback functions
-     * @method _returnData
-     * @private
-     */
-    _returnData = function(q, msg) {
-        return {
-                tId: q.tId,
-                win: q.win,
-                data: q.data,
-                nodes: q.nodes,
-                msg: msg,
-                purge: function() {
-                    _purge(this.tId);
-                }
-            };
-    },
-
-    _get = function(nId, tId) {
-        var q = queues[tId],
-            n = (lang.isString(nId)) ? q.win.document.getElementById(nId) : nId;
-        if (!n) {
-            _fail(tId, "target node not found: " + nId);
-        }
-
-        return n;
-    },
-
-
-    /**
-     * The request is complete, so executing the requester's callback
-     * @method _finish
-     * @param id {string} the id of the request
-     * @private
-     */
-    _finish = function(id) {
-        YAHOO.log("Finishing transaction " + id);
-        var q = queues[id], msg, context;
-        q.finished = true;
-
-        if (q.aborted) {
-            msg = "transaction " + id + " was aborted";
-            _fail(id, msg);
-            return;
-        }
-
-        // execute success callback
-        if (q.onSuccess) {
-            context = q.scope || q.win;
-            q.onSuccess.call(context, _returnData(q));
-        }
-    },
-
-    /**
-     * Timeout detected
-     * @method _timeout
-     * @param id {string} the id of the request
-     * @private
-     */
-    _timeout = function(id) {
-        YAHOO.log("Timeout " + id, "info", "get");
-        var q = queues[id], context;
-        if (q.onTimeout) {
-            context = q.scope || q;
-            q.onTimeout.call(context, _returnData(q));
-        }
-    },
-
-    /**
-     * Loads the next item for a given request
-     * @method _next
-     * @param id {string} the id of the request
-     * @param loaded {string} the url that was just loaded, if any
-     * @private
-     */
-    _next = function(id, loaded) {
-
-        YAHOO.log("_next: " + id + ", loaded: " + loaded, "info", "Get");
-
-        var q = queues[id], w=q.win, d=w.document, h=d.getElementsByTagName("head")[0],
-            n, msg, url, s, extra;
-
-        if (q.timer) {
-            // Y.log('cancel timer');
-            q.timer.cancel();
-        }
-
-        if (q.aborted) {
-            msg = "transaction " + id + " was aborted";
-            _fail(id, msg);
-            return;
-        }
-
-        if (loaded) {
-            q.url.shift();
-            if (q.varName) {
-                q.varName.shift();
-            }
-        } else {
-            // This is the first pass: make sure the url is an array
-            q.url = (lang.isString(q.url)) ? [q.url] : q.url;
-            if (q.varName) {
-                q.varName = (lang.isString(q.varName)) ? [q.varName] : q.varName;
-            }
-        }
-
-
-        if (q.url.length === 0) {
-            // Safari 2.x workaround - There is no way to know when
-            // a script is ready in versions of Safari prior to 3.x.
-            // Adding an extra node reduces the problem, but doesn't
-            // eliminate it completely because the browser executes
-            // them asynchronously.
-            if (q.type === "script" && ua.webkit && ua.webkit < 420 &&
-                    !q.finalpass && !q.varName) {
-                // Add another script node.  This does not guarantee that the
-                // scripts will execute in order, but it does appear to fix the
-                // problem on fast connections more effectively than using an
-                // arbitrary timeout.  It is possible that the browser does
-                // block subsequent script execution in this case for a limited
-                // time.
-                extra = _scriptNode(null, q.win, q.attributes);
-                extra.innerHTML='YAHOO.util.Get._finalize("' + id + '");';
-                q.nodes.push(extra); h.appendChild(extra);
-
-            } else {
-                _finish(id);
-            }
-
-            return;
-        }
-
-
-        url = q.url[0];
-
-        // if the url is undefined, this is probably a trailing comma problem in IE
-        if (!url) {
-            q.url.shift();
-            YAHOO.log('skipping empty url');
-            return _next(id);
-        }
-
-        YAHOO.log("attempting to load " + url, "info", "Get");
-
-        if (q.timeout) {
-            // Y.log('create timer');
-            q.timer = lang.later(q.timeout, q, _timeout, id);
-        }
-
-        if (q.type === "script") {
-            n = _scriptNode(url, w, q.attributes);
-        } else {
-            n = _linkNode(url, w, q.attributes);
-        }
-
-        // track this node's load progress
-        _track(q.type, n, id, url, w, q.url.length);
-
-        // add the node to the queue so we can return it to the user supplied callback
-        q.nodes.push(n);
-
-        // add it to the head or insert it before 'insertBefore'
-        if (q.insertBefore) {
-            s = _get(q.insertBefore, id);
-            if (s) {
-                s.parentNode.insertBefore(n, s);
-            }
-        } else {
-            h.appendChild(n);
-        }
-
-        YAHOO.log("Appending node: " + url, "info", "Get");
-
-        // FireFox does not support the onload event for link nodes, so there is
-        // no way to make the css requests synchronous. This means that the css
-        // rules in multiple files could be applied out of order in this browser
-        // if a later request returns before an earlier one.  Safari too.
-        if ((ua.webkit || ua.gecko) && q.type === "css") {
-            _next(id, url);
-        }
-    },
-
-    /**
-     * Removes processed queues and corresponding nodes
-     * @method _autoPurge
-     * @private
-     */
-    _autoPurge = function() {
-
-        if (_purging) {
-            return;
-        }
-
-        _purging = true;
-
-        var i, q;
-
-        for (i in queues) {
-            if (queues.hasOwnProperty(i)) {
-                q = queues[i];
-                if (q.autopurge && q.finished) {
-                    _purge(q.tId);
-                    delete queues[i];
-                }
-            }
-        }
-
-        _purging = false;
-    },
-
-    /**
-     * Saves the state for the request and begins loading
-     * the requested urls
-     * @method queue
-     * @param type {string} the type of node to insert
-     * @param url {string} the url to load
-     * @param opts the hash of options for this request
-     * @private
-     */
-    _queue = function(type, url, opts) {
-
-        var id = "q" + (qidx++), q;
-        opts = opts || {};
-
-        if (qidx % YAHOO.util.Get.PURGE_THRESH === 0) {
-            _autoPurge();
-        }
-
-        queues[id] = lang.merge(opts, {
-            tId: id,
-            type: type,
-            url: url,
-            finished: false,
-            aborted: false,
-            nodes: []
-        });
-
-        q = queues[id];
-        q.win = q.win || window;
-        q.scope = q.scope || q.win;
-        q.autopurge = ("autopurge" in q) ? q.autopurge :
-                      (type === "script") ? true : false;
-
-        q.attributes = q.attributes || {};
-        q.attributes.charset = opts.charset || q.attributes.charset || 'utf-8';
-
-        lang.later(0, q, _next, id);
-
-        return {
-            tId: id
-        };
-    };
-
-    /**
-     * Detects when a node has been loaded.  In the case of
-     * script nodes, this does not guarantee that contained
-     * script is ready to use.
-     * @method _track
-     * @param type {string} the type of node to track
-     * @param n {HTMLElement} the node to track
-     * @param id {string} the id of the request
-     * @param url {string} the url that is being loaded
-     * @param win {Window} the targeted window
-     * @param qlength the number of remaining items in the queue,
-     * including this one
-     * @param trackfn {Function} function to execute when finished
-     * the default is _next
-     * @private
-     */
-    _track = function(type, n, id, url, win, qlength, trackfn) {
-        var f = trackfn || _next, rs, q, a, freq, w, l, i, msg;
-
-        // IE supports the readystatechange event for script and css nodes
-        if (ua.ie) {
-            n.onreadystatechange = function() {
-                rs = this.readyState;
-                if ("loaded" === rs || "complete" === rs) {
-                    YAHOO.log(id + " onload " + url, "info", "Get");
-                    n.onreadystatechange = null;
-                    f(id, url);
-                }
-            };
-
-        // webkit prior to 3.x is problemmatic
-        } else if (ua.webkit) {
-
-            if (type === "script") {
-
-                // Safari 3.x supports the load event for script nodes (DOM2)
-                if (ua.webkit >= 420) {
-
-                    n.addEventListener("load", function() {
-                        YAHOO.log(id + " DOM2 onload " + url, "info", "Get");
-                        f(id, url);
-                    });
-
-                // Nothing can be done with Safari < 3.x except to pause and hope
-                // for the best, particularly after last script is inserted. The
-                // scripts will always execute in the order they arrive, not
-                // necessarily the order in which they were inserted.  To support
-                // script nodes with complete reliability in these browsers, script
-                // nodes either need to invoke a function in the window once they
-                // are loaded or the implementer needs to provide a well-known
-                // property that the utility can poll for.
-                } else {
-                    // Poll for the existence of the named variable, if it
-                    // was supplied.
-                    q = queues[id];
-                    if (q.varName) {
-                        freq = YAHOO.util.Get.POLL_FREQ;
-                        YAHOO.log("Polling for " + q.varName[0]);
-                        q.maxattempts = YAHOO.util.Get.TIMEOUT/freq;
-                        q.attempts = 0;
-                        q._cache = q.varName[0].split(".");
-                        q.timer = lang.later(freq, q, function(o) {
-                            a = this._cache;
-                            l = a.length;
-                            w = this.win;
-                            for (i=0; i<l; i=i+1) {
-                                w = w[a[i]];
-                                if (!w) {
-                                    // if we have exausted our attempts, give up
-                                    this.attempts++;
-                                    if (this.attempts++ > this.maxattempts) {
-                                        msg = "Over retry limit, giving up";
-                                        q.timer.cancel();
-                                        _fail(id, msg);
-                                    } else {
-                                        YAHOO.log(a[i] + " failed, retrying");
-                                    }
-                                    return;
-                                }
-                            }
-
-                            YAHOO.log("Safari poll complete");
-
-                            q.timer.cancel();
-                            f(id, url);
-
-                        }, null, true);
-                    } else {
-                        lang.later(YAHOO.util.Get.POLL_FREQ, null, f, [id, url]);
-                    }
-                }
-            }
-
-        // FireFox and Opera support onload (but not DOM2 in FF) handlers for
-        // script nodes.  Opera, but not FF, supports the onload event for link
-        // nodes.
-        } else {
-            n.onload = function() {
-                YAHOO.log(id + " onload " + url, "info", "Get");
-                f(id, url);
-            };
-        }
-    };
-
-    /*
-     * The request failed, execute fail handler with whatever
-     * was accomplished.  There isn't a failure case at the
-     * moment unless you count aborted transactions
-     * @method _fail
-     * @param id {string} the id of the request
-     * @private
-     */
-    _fail = function(id, msg) {
-        YAHOO.log("get failure: " + msg, "warn", "Get");
-        var q = queues[id], context;
-        // execute failure callback
-        if (q.onFailure) {
-            context = q.scope || q.win;
-            q.onFailure.call(context, _returnData(q, msg));
-        }
-    };
-
-    /**
-     * Removes the nodes for the specified queue
-     * @method _purge
-     * @private
-     */
-    _purge = function(tId) {
-        if (queues[tId]) {
-
-            var q     = queues[tId],
-                nodes = q.nodes,
-                l     = nodes.length,
-                d     = q.win.document,
-                h     = d.getElementsByTagName("head")[0],
-                sib, i, node, attr;
-
-            if (q.insertBefore) {
-                sib = _get(q.insertBefore, tId);
-                if (sib) {
-                    h = sib.parentNode;
-                }
-            }
-
-            for (i=0; i<l; i=i+1) {
-                node = nodes[i];
-                if (node.clearAttributes) {
-                    node.clearAttributes();
-                } else {
-                    for (attr in node) {
-                        if (node.hasOwnProperty(attr)) {
-                            delete node[attr];
-                        }
-                    }
-                }
-
-                h.removeChild(node);
-            }
-
-            q.nodes = [];
-        }
-    };
-
-
-    return {
-
-        /**
-         * The default poll freqency in ms, when needed
-         * @property POLL_FREQ
-         * @static
-         * @type int
-         * @default 10
-         */
-        POLL_FREQ: 10,
-
-        /**
-         * The number of request required before an automatic purge.
-         * property PURGE_THRESH
-         * @static
-         * @type int
-         * @default 20
-         */
-        PURGE_THRESH: 20,
-
-        /**
-         * The length time to poll for varName when loading a script in
-         * Safari 2.x before the transaction fails.
-         * property TIMEOUT
-         * @static
-         * @type int
-         * @default 2000
-         */
-        TIMEOUT: 2000,
-
-        /**
-         * Called by the the helper for detecting script load in Safari
-         * @method _finalize
-         * @param id {string} the transaction id
-         * @private
-         */
-        _finalize: function(id) {
-            YAHOO.log(id + " finalized ", "info", "Get");
-            lang.later(0, null, _finish, id);
-        },
-
-        /**
-         * Abort a transaction
-         * @method abort
-         * @param {string|object} either the tId or the object returned from
-         * script() or css()
-         */
-        abort: function(o) {
-            var id = (lang.isString(o)) ? o : o.tId,
-                q = queues[id];
-            if (q) {
-                YAHOO.log("Aborting " + id, "info", "Get");
-                q.aborted = true;
-            }
-        },
-
-        /**
-         * Fetches and inserts one or more script nodes into the head
-         * of the current document or the document in a specified window.
-         *
-         * @method script
-         * @static
-         * @param url {string|string[]} the url or urls to the script(s)
-         * @param opts {object} Options:
-         * <dl>
-         * <dt>onSuccess</dt>
-         * <dd>
-         * callback to execute when the script(s) are finished loading
-         * The callback receives an object back with the following
-         * data:
-         * <dl>
-         * <dt>win</dt>
-         * <dd>the window the script(s) were inserted into</dd>
-         * <dt>data</dt>
-         * <dd>the data object passed in when the request was made</dd>
-         * <dt>nodes</dt>
-         * <dd>An array containing references to the nodes that were
-         * inserted</dd>
-         * <dt>purge</dt>
-         * <dd>A function that, when executed, will remove the nodes
-         * that were inserted</dd>
-         * <dt>
-         * </dl>
-         * </dd>
-         * <dt>onFailure</dt>
-         * <dd>
-         * callback to execute when the script load operation fails
-         * The callback receives an object back with the following
-         * data:
-         * <dl>
-         * <dt>win</dt>
-         * <dd>the window the script(s) were inserted into</dd>
-         * <dt>data</dt>
-         * <dd>the data object passed in when the request was made</dd>
-         * <dt>nodes</dt>
-         * <dd>An array containing references to the nodes that were
-         * inserted successfully</dd>
-         * <dt>purge</dt>
-         * <dd>A function that, when executed, will remove any nodes
-         * that were inserted</dd>
-         * <dt>
-         * </dl>
-         * </dd>
-         * <dt>onTimeout</dt>
-         * <dd>
-         * callback to execute when a timeout occurs.
-         * The callback receives an object back with the following
-         * data:
-         * <dl>
-         * <dt>win</dt>
-         * <dd>the window the script(s) were inserted into</dd>
-         * <dt>data</dt>
-         * <dd>the data object passed in when the request was made</dd>
-         * <dt>nodes</dt>
-         * <dd>An array containing references to the nodes that were
-         * inserted</dd>
-         * <dt>purge</dt>
-         * <dd>A function that, when executed, will remove the nodes
-         * that were inserted</dd>
-         * <dt>
-         * </dl>
-         * </dd>
-         * <dt>scope</dt>
-         * <dd>the execution context for the callbacks</dd>
-         * <dt>win</dt>
-         * <dd>a window other than the one the utility occupies</dd>
-         * <dt>autopurge</dt>
-         * <dd>
-         * setting to true will let the utilities cleanup routine purge
-         * the script once loaded
-         * </dd>
-         * <dt>data</dt>
-         * <dd>
-         * data that is supplied to the callback when the script(s) are
-         * loaded.
-         * </dd>
-         * <dt>varName</dt>
-         * <dd>
-         * variable that should be available when a script is finished
-         * loading.  Used to help Safari 2.x and below with script load
-         * detection.  The type of this property should match what was
-         * passed into the url parameter: if loading a single url, a
-         * string can be supplied.  If loading multiple scripts, you
-         * must supply an array that contains the variable name for
-         * each script.
-         * </dd>
-         * <dt>insertBefore</dt>
-         * <dd>node or node id that will become the new node's nextSibling</dd>
-         * </dl>
-         * <dt>charset</dt>
-         * <dd>Node charset, deprecated, use 'attributes'</dd>
-         * <dt>attributes</dt>
-         * <dd>A hash of attributes to apply to dynamic nodes.</dd>
-         * <dt>timeout</dt>
-         * <dd>Number of milliseconds to wait before aborting and firing the timeout event</dd>
-         * <pre>
-         * // assumes yahoo, dom, and event are already on the page
-         * &nbsp;&nbsp;YAHOO.util.Get.script(
-         * &nbsp;&nbsp;["http://yui.yahooapis.com/2.7.0/build/dragdrop/dragdrop-min.js",
-         * &nbsp;&nbsp;&nbsp;"http://yui.yahooapis.com/2.7.0/build/animation/animation-min.js"], &#123;
-         * &nbsp;&nbsp;&nbsp;&nbsp;onSuccess: function(o) &#123;
-         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YAHOO.log(o.data); // foo
-         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;new YAHOO.util.DDProxy("dd1"); // also new o.reference("dd1"); would work
-         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.log("won't cause error because YAHOO is the scope");
-         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.log(o.nodes.length === 2) // true
-         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// o.purge(); // optionally remove the script nodes immediately
-         * &nbsp;&nbsp;&nbsp;&nbsp;&#125;,
-         * &nbsp;&nbsp;&nbsp;&nbsp;onFailure: function(o) &#123;
-         * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;YAHOO.log("transaction failed");
-         * &nbsp;&nbsp;&nbsp;&nbsp;&#125;,
-         * &nbsp;&nbsp;&nbsp;&nbsp;data: "foo",
-         * &nbsp;&nbsp;&nbsp;&nbsp;timeout: 10000, // 10 second timeout
-         * &nbsp;&nbsp;&nbsp;&nbsp;scope: YAHOO,
-         * &nbsp;&nbsp;&nbsp;&nbsp;// win: otherframe // target another window/frame
-         * &nbsp;&nbsp;&nbsp;&nbsp;autopurge: true // allow the utility to choose when to remove the nodes
-         * &nbsp;&nbsp;&#125;);
-         * </pre>
-         * @return {tId: string} an object containing info about the transaction
-         */
-        script: function(url, opts) { return _queue("script", url, opts); },
-
-        /**
-         * Fetches and inserts one or more css link nodes into the
-         * head of the current document or the document in a specified
-         * window.
-         * @method css
-         * @static
-         * @param url {string} the url or urls to the css file(s)
-         * @param opts Options:
-         * <dl>
-         * <dt>onSuccess</dt>
-         * <dd>
-         * callback to execute when the css file(s) are finished loading
-         * The callback receives an object back with the following
-         * data:
-         * <dl>win</dl>
-         * <dd>the window the link nodes(s) were inserted into</dd>
-         * <dt>data</dt>
-         * <dd>the data object passed in when the request was made</dd>
-         * <dt>nodes</dt>
-         * <dd>An array containing references to the nodes that were
-         * inserted</dd>
-         * <dt>purge</dt>
-         * <dd>A function that, when executed, will remove the nodes
-         * that were inserted</dd>
-         * <dt>
-         * </dl>
-         * </dd>
-         * <dt>scope</dt>
-         * <dd>the execution context for the callbacks</dd>
-         * <dt>win</dt>
-         * <dd>a window other than the one the utility occupies</dd>
-         * <dt>data</dt>
-         * <dd>
-         * data that is supplied to the callbacks when the nodes(s) are
-         * loaded.
-         * </dd>
-         * <dt>insertBefore</dt>
-         * <dd>node or node id that will become the new node's nextSibling</dd>
-         * <dt>charset</dt>
-         * <dd>Node charset, deprecated, use 'attributes'</dd>
-         * <dt>attributes</dt>
-         * <dd>A hash of attributes to apply to dynamic nodes.</dd>
-         * </dl>
-         * <pre>
-         *      YAHOO.util.Get.css("http://yui.yahooapis.com/2.7.0/build/menu/assets/skins/sam/menu.css");
-         * </pre>
-         * <pre>
-         *      YAHOO.util.Get.css(["http://yui.yahooapis.com/2.7.0/build/menu/assets/skins/sam/menu.css",
-         *                          "http://yui.yahooapis.com/2.7.0/build/logger/assets/skins/sam/logger.css"]);
-         * </pre>
-         * @return {tId: string} an object containing info about the transaction
-         */
-        css: function(url, opts) {
-            return _queue("css", url, opts);
-        }
-    };
-}();
-
-YAHOO.register("get", YAHOO.util.Get, {version: "2.9.0", build: "2800"});
-/*jslint evil: true, strict: false, regexp: false*/
-
-/**
- * Provides dynamic loading for the YUI library.  It includes the dependency
- * info for the library, and will automatically pull in dependencies for
- * the modules requested.  It supports rollup files (such as utilities.js
- * and yahoo-dom-event.js), and will automatically use these when
- * appropriate in order to minimize the number of http connections
- * required to load all of the dependencies.
- *
- * @module yuiloader
- * @namespace YAHOO.util
- */
-
-/**
- * YUILoader provides dynamic loading for YUI.
- * @class YAHOO.util.YUILoader
- * @todo
- *      version management, automatic sandboxing
- */
-(function() {
-
-    var Y = YAHOO,
-        util = Y.util,
-        lang = Y.lang,
-        env = Y.env,
-        PROV = "_provides",
-        SUPER = "_supersedes",
-        REQ = "expanded",
-        AFTER = "_after",
-        VERSION = "2.9.0";
-
-    // version hack for cdn testing
-    // if (/VERSION/.test(VERSION)) {
-        // VERSION = "2.8.2";
-    // }
-
-    var YUI = {
-
-        dupsAllowed: {'yahoo': true, 'get': true},
-
-        /*
-         * The library metadata for the current release  The is the default
-         * value for YAHOO.util.YUILoader.moduleInfo
-         * @property YUIInfo
-         * @static
-         */
-        info: {
-
-    // 'root': '2.5.2/build/',
-    // 'base': 'http://yui.yahooapis.com/2.5.2/build/',
-
-    'root': VERSION + '/build/',
-    'base': 'http://yui.yahooapis.com/' + VERSION + '/build/',
-
-    'comboBase': 'http://yui.yahooapis.com/combo?',
-
-    'skin': {
-        'defaultSkin': 'sam',
-        'base': 'assets/skins/',
-        'path': 'skin.css',
-        'after': ['reset', 'fonts', 'grids', 'base'],
-        'rollup': 3
-    },
-
-    dupsAllowed: ['yahoo', 'get'],
-
-    'moduleInfo': {
-
-        'animation': {
-            'type': 'js',
-            'path': 'animation/animation-min.js',
-            'requires': ['dom', 'event']
-        },
-
-        'autocomplete': {
-            'type': 'js',
-            'path': 'autocomplete/autocomplete-min.js',
-            'requires': ['dom', 'event', 'datasource'],
-            'optional': ['connection', 'animation'],
-            'skinnable': true
-        },
-
-        'base': {
-            'type': 'css',
-            'path': 'base/base-min.css',
-            'after': ['reset', 'fonts', 'grids']
-        },
-
-        'button': {
-            'type': 'js',
-            'path': 'button/button-min.js',
-            'requires': ['element'],
-            'optional': ['menu'],
-            'skinnable': true
-        },
-
-        'calendar': {
-            'type': 'js',
-            'path': 'calendar/calendar-min.js',
-            'requires': ['event', 'dom'],
-            supersedes: ['datemath'],
-            'skinnable': true
-        },
-
-        'carousel': {
-            'type': 'js',
-            'path': 'carousel/carousel-min.js',
-            'requires': ['element'],
-            'optional': ['animation'],
-            'skinnable': true
-        },
-
-        'charts': {
-            'type': 'js',
-            'path': 'charts/charts-min.js',
-            'requires': ['element', 'json', 'datasource', 'swf']
-        },
-
-        'colorpicker': {
-            'type': 'js',
-            'path': 'colorpicker/colorpicker-min.js',
-            'requires': ['slider', 'element'],
-            'optional': ['animation'],
-            'skinnable': true
-        },
-
-        'connection': {
-            'type': 'js',
-            'path': 'connection/connection-min.js',
-            'requires': ['event'],
-            'supersedes': ['connectioncore']
-        },
-
-        'connectioncore': {
-            'type': 'js',
-            'path': 'connection/connection_core-min.js',
-            'requires': ['event'],
-            'pkg': 'connection'
-        },
-
-        'container': {
-            'type': 'js',
-            'path': 'container/container-min.js',
-            'requires': ['dom', 'event'],
-            // button is also optional, but this creates a circular
-            // dependency when loadOptional is specified.  button
-            // optionally includes menu, menu requires container.
-            'optional': ['dragdrop', 'animation', 'connection'],
-            'supersedes': ['containercore'],
-            'skinnable': true
-        },
-
-        'containercore': {
-            'type': 'js',
-            'path': 'container/container_core-min.js',
-            'requires': ['dom', 'event'],
-            'pkg': 'container'
-        },
-
-        'cookie': {
-            'type': 'js',
-            'path': 'cookie/cookie-min.js',
-            'requires': ['yahoo']
-        },
-
-        'datasource': {
-            'type': 'js',
-            'path': 'datasource/datasource-min.js',
-            'requires': ['event'],
-            'optional': ['connection']
-        },
-
-        'datatable': {
-            'type': 'js',
-            'path': 'datatable/datatable-min.js',
-            'requires': ['element', 'datasource'],
-            'optional': ['calendar', 'dragdrop', 'paginator'],
-            'skinnable': true
-        },
-
-        datemath: {
-            'type': 'js',
-            'path': 'datemath/datemath-min.js',
-            'requires': ['yahoo']
-        },
-
-        'dom': {
-            'type': 'js',
-            'path': 'dom/dom-min.js',
-            'requires': ['yahoo']
-        },
-
-        'dragdrop': {
-            'type': 'js',
-            'path': 'dragdrop/dragdrop-min.js',
-            'requires': ['dom', 'event']
-        },
-
-        'editor': {
-            'type': 'js',
-            'path': 'editor/editor-min.js',
-            'requires': ['menu', 'element', 'button'],
-            'optional': ['animation', 'dragdrop'],
-            'supersedes': ['simpleeditor'],
-            'skinnable': true
-        },
-
-        'element': {
-            'type': 'js',
-            'path': 'element/element-min.js',
-            'requires': ['dom', 'event'],
-            'optional': ['event-mouseenter', 'event-delegate']
-        },
-
-        'element-delegate': {
-            'type': 'js',
-            'path': 'element-delegate/element-delegate-min.js',
-            'requires': ['element']
-        },
-
-        'event': {
-            'type': 'js',
-            'path': 'event/event-min.js',
-            'requires': ['yahoo']
-        },
-
-        'event-simulate': {
-            'type': 'js',
-            'path': 'event-simulate/event-simulate-min.js',
-            'requires': ['event']
-        },
-
-        'event-delegate': {
-            'type': 'js',
-            'path': 'event-delegate/event-delegate-min.js',
-            'requires': ['event'],
-            'optional': ['selector']
-        },
-
-        'event-mouseenter': {
-            'type': 'js',
-            'path': 'event-mouseenter/event-mouseenter-min.js',
-            'requires': ['dom', 'event']
-        },
-
-        'fonts': {
-            'type': 'css',
-            'path': 'fonts/fonts-min.css'
-        },
-
-        'get': {
-            'type': 'js',
-            'path': 'get/get-min.js',
-            'requires': ['yahoo']
-        },
-
-        'grids': {
-            'type': 'css',
-            'path': 'grids/grids-min.css',
-            'requires': ['fonts'],
-            'optional': ['reset']
-        },
-
-        'history': {
-            'type': 'js',
-            'path': 'history/history-min.js',
-            'requires': ['event']
-        },
-
-         'imagecropper': {
-             'type': 'js',
-             'path': 'imagecropper/imagecropper-min.js',
-             'requires': ['dragdrop', 'element', 'resize'],
-             'skinnable': true
-         },
-
-         'imageloader': {
-            'type': 'js',
-            'path': 'imageloader/imageloader-min.js',
-            'requires': ['event', 'dom']
-         },
-
-         'json': {
-            'type': 'js',
-            'path': 'json/json-min.js',
-            'requires': ['yahoo']
-         },
-
-         'layout': {
-             'type': 'js',
-             'path': 'layout/layout-min.js',
-             'requires': ['element'],
-             'optional': ['animation', 'dragdrop', 'resize', 'selector'],
-             'skinnable': true
-         },
-
-        'logger': {
-            'type': 'js',
-            'path': 'logger/logger-min.js',
-            'requires': ['event', 'dom'],
-            'optional': ['dragdrop'],
-            'skinnable': true
-        },
-
-        'menu': {
-            'type': 'js',
-            'path': 'menu/menu-min.js',
-            'requires': ['containercore'],
-            'skinnable': true
-        },
-
-        'paginator': {
-            'type': 'js',
-            'path': 'paginator/paginator-min.js',
-            'requires': ['element'],
-            'skinnable': true
-        },
-
-        'profiler': {
-            'type': 'js',
-            'path': 'profiler/profiler-min.js',
-            'requires': ['yahoo']
-        },
-
-
-        'profilerviewer': {
-            'type': 'js',
-            'path': 'profilerviewer/profilerviewer-min.js',
-            'requires': ['profiler', 'yuiloader', 'element'],
-            'skinnable': true
-        },
-
-        'progressbar': {
-            'type': 'js',
-            'path': 'progressbar/progressbar-min.js',
-            'requires': ['element'],
-            'optional': ['animation'],
-            'skinnable': true
-        },
-
-        'reset': {
-            'type': 'css',
-            'path': 'reset/reset-min.css'
-        },
-
-        'reset-fonts-grids': {
-            'type': 'css',
-            'path': 'reset-fonts-grids/reset-fonts-grids.css',
-            'supersedes': ['reset', 'fonts', 'grids', 'reset-fonts'],
-            'rollup': 4
-        },
-
-        'reset-fonts': {
-            'type': 'css',
-            'path': 'reset-fonts/reset-fonts.css',
-            'supersedes': ['reset', 'fonts'],
-            'rollup': 2
-        },
-
-         'resize': {
-             'type': 'js',
-             'path': 'resize/resize-min.js',
-             'requires': ['dragdrop', 'element'],
-             'optional': ['animation'],
-             'skinnable': true
-         },
-
-        'selector': {
-            'type': 'js',
-            'path': 'selector/selector-min.js',
-            'requires': ['yahoo', 'dom']
-        },
-
-        'simpleeditor': {
-            'type': 'js',
-            'path': 'editor/simpleeditor-min.js',
-            'requires': ['element'],
-            'optional': ['containercore', 'menu', 'button', 'animation', 'dragdrop'],
-            'skinnable': true,
-            'pkg': 'editor'
-        },
-
-        'slider': {
-            'type': 'js',
-            'path': 'slider/slider-min.js',
-            'requires': ['dragdrop'],
-            'optional': ['animation'],
-            'skinnable': true
-        },
-
-        'storage': {
-            'type': 'js',
-            'path': 'storage/storage-min.js',
-            'requires': ['yahoo', 'event', 'cookie'],
-            'optional': ['swfstore']
-        },
-
-         'stylesheet': {
-            'type': 'js',
-            'path': 'stylesheet/stylesheet-min.js',
-            'requires': ['yahoo']
-         },
-
-        'swf': {
-            'type': 'js',
-            'path': 'swf/swf-min.js',
-            'requires': ['element'],
-            'supersedes': ['swfdetect']
-        },
-
-        'swfdetect': {
-            'type': 'js',
-            'path': 'swfdetect/swfdetect-min.js',
-            'requires': ['yahoo']
-        },
-
-        'swfstore': {
-            'type': 'js',
-            'path': 'swfstore/swfstore-min.js',
-            'requires': ['element', 'cookie', 'swf']
-        },
-
-        'tabview': {
-            'type': 'js',
-            'path': 'tabview/tabview-min.js',
-            'requires': ['element'],
-            'optional': ['connection'],
-            'skinnable': true
-        },
-
-        'treeview': {
-            'type': 'js',
-            'path': 'treeview/treeview-min.js',
-            'requires': ['event', 'dom'],
-            'optional': ['json', 'animation', 'calendar'],
-            'skinnable': true
-        },
-
-        'uploader': {
-            'type': 'js',
-            'path': 'uploader/uploader-min.js',
-            'requires': ['element']
-        },
-
-        'utilities': {
-            'type': 'js',
-            'path': 'utilities/utilities.js',
-            'supersedes': ['yahoo', 'event', 'dragdrop', 'animation', 'dom', 'connection', 'element', 'yahoo-dom-event', 'get', 'yuiloader', 'yuiloader-dom-event'],
-            'rollup': 8
-        },
-
-        'yahoo': {
-            'type': 'js',
-            'path': 'yahoo/yahoo-min.js'
-        },
-
-        'yahoo-dom-event': {
-            'type': 'js',
-            'path': 'yahoodomevent/yahoo-dom-event.js',
-            'supersedes': ['yahoo', 'event', 'dom'],
-            'rollup': 3
-        },
-
-        'yuiloader': {
-            'type': 'js',
-            'path': 'yuiloader/yuiloader-min.js',
-            'supersedes': ['yahoo', 'get']
-        },
-
-        'yuiloader-dom-event': {
-            'type': 'js',
-            'path': 'yuiloader-dom-event/yuiloader-dom-event.js',
-            'supersedes': ['yahoo', 'dom', 'event', 'get', 'yuiloader', 'yahoo-dom-event'],
-            'rollup': 5
-        },
-
-        'yuitest': {
-            'type': 'js',
-            'path': 'yuitest/yuitest-min.js',
-            'requires': ['logger'],
-            'optional': ['event-simulate'],
-            'skinnable': true
-        }
-    }
-},
-        ObjectUtil: {
-            appendArray: function(o, a) {
-                if (a) {
-                    for (var i=0; i<a.length; i=i+1) {
-                        o[a[i]] = true;
-                    }
-                }
-            },
-
-            keys: function(o, ordered) {
-                var a=[], i;
-                for (i in o) {
-                    if (lang.hasOwnProperty(o, i)) {
-                        a.push(i);
-                    }
-                }
-
-                return a;
-            }
-        },
-
-        ArrayUtil: {
-
-            appendArray: function(a1, a2) {
-                Array.prototype.push.apply(a1, a2);
-                /*
-                for (var i=0; i<a2.length; i=i+1) {
-                    a1.push(a2[i]);
-                }
-                */
-            },
-
-            indexOf: function(a, val) {
-                for (var i=0; i<a.length; i=i+1) {
-                    if (a[i] === val) {
-                        return i;
-                    }
-                }
-
-                return -1;
-            },
-
-            toObject: function(a) {
-                var o = {};
-                for (var i=0; i<a.length; i=i+1) {
-                    o[a[i]] = true;
-                }
-
-                return o;
-            },
-
-            /*
-             * Returns a unique array.  Does not maintain order, which is fine
-             * for this application, and performs better than it would if it
-             * did.
-             */
-            uniq: function(a) {
-                return YUI.ObjectUtil.keys(YUI.ArrayUtil.toObject(a));
-            }
-        }
-    };
-
-    YAHOO.util.YUILoader = function(o) {
-
-        /**
-         * Internal callback to handle multiple internal insert() calls
-         * so that css is inserted prior to js
-         * @property _internalCallback
-         * @private
-         */
-        this._internalCallback = null;
-
-        /**
-         * Use the YAHOO environment listener to detect script load.  This
-         * is only switched on for Safari 2.x and below.
-         * @property _useYahooListener
-         * @private
-         */
-        this._useYahooListener = false;
-
-        /**
-         * Callback that will be executed when the loader is finished
-         * with an insert
-         * @method onSuccess
-         * @type function
-         */
-        this.onSuccess = null;
-
-        /**
-         * Callback that will be executed if there is a failure
-         * @method onFailure
-         * @type function
-         */
-        this.onFailure = Y.log;
-
-        /**
-         * Callback that will be executed each time a new module is loaded
-         * @method onProgress
-         * @type function
-         */
-        this.onProgress = null;
-
-        /**
-         * Callback that will be executed if a timeout occurs
-         * @method onTimeout
-         * @type function
-         */
-        this.onTimeout = null;
-
-        /**
-         * The execution scope for all callbacks
-         * @property scope
-         * @default this
-         */
-        this.scope = this;
-
-        /**
-         * Data that is passed to all callbacks
-         * @property data
-         */
-        this.data = null;
-
-        /**
-         * Node reference or id where new nodes should be inserted before
-         * @property insertBefore
-         * @type string|HTMLElement
-         */
-        this.insertBefore = null;
-
-        /**
-         * The charset attribute for inserted nodes
-         * @property charset
-         * @type string
-         * @default utf-8
-         */
-        this.charset = null;
-
-        /**
-         * The name of the variable in a sandbox or script node
-         * (for external script support in Safari 2.x and earlier)
-         * to reference when the load is complete.  If this variable
-         * is not available in the specified scripts, the operation will
-         * fail.
-         * @property varName
-         * @type string
-         */
-        this.varName = null;
-
-        /**
-         * The base directory.
-         * @property base
-         * @type string
-         * @default http://yui.yahooapis.com/[YUI VERSION]/build/
-         */
-        this.base = YUI.info.base;
-
-        /**
-         * Base path for the combo service
-         * @property comboBase
-         * @type string
-         * @default http://yui.yahooapis.com/combo?
-         */
-        this.comboBase = YUI.info.comboBase;
-
-        /**
-         * If configured, YUI will use the the combo handler on the
-         * Yahoo! CDN to pontentially reduce the number of http requests
-         * required.
-         * @property combine
-         * @type boolean
-         * @default false
-         */
-        // this.combine = (o && !('base' in o));
-        this.combine = false;
-
-
-        /**
-         * Root path to prepend to module path for the combo
-         * service
-         * @property root
-         * @type string
-         * @default [YUI VERSION]/build/
-         */
-        this.root = YUI.info.root;
-
-        /**
-         * Timeout value in milliseconds.  If set, this value will be used by
-         * the get utility.  the timeout event will fire if
-         * a timeout occurs.
-         * @property timeout
-         * @type int
-         */
-        this.timeout = 0;
-
-        /**
-         * A list of modules that should not be loaded, even if
-         * they turn up in the dependency tree
-         * @property ignore
-         * @type string[]
-         */
-        this.ignore = null;
-
-        /**
-         * A list of modules that should always be loaded, even
-         * if they have already been inserted into the page.
-         * @property force
-         * @type string[]
-         */
-        this.force = null;
-
-        /**
-         * Should we allow rollups
-         * @property allowRollup
-         * @type boolean
-         * @default true
-         */
-        this.allowRollup = true;
-
-        /**
-         * A filter to apply to result urls.  This filter will modify the default
-         * path for all modules.  The default path for the YUI library is the
-         * minified version of the files (e.g., event-min.js).  The filter property
-         * can be a predefined filter or a custom filter.  The valid predefined
-         * filters are:
-         * <dl>
-         *  <dt>DEBUG</dt>
-         *  <dd>Selects the debug versions of the library (e.g., event-debug.js).
-         *      This option will automatically include the logger widget</dd>
-         *  <dt>RAW</dt>
-         *  <dd>Selects the non-minified version of the library (e.g., event.js).
-         * </dl>
-         * You can also define a custom filter, which must be an object literal
-         * containing a search expression and a replace string:
-         * <pre>
-         *  myFilter: &#123;
-         *      'searchExp': "-min\\.js",
-         *      'replaceStr': "-debug.js"
-         *  &#125;
-         * </pre>
-         * @property filter
-         * @type string|{searchExp: string, replaceStr: string}
-         */
-        this.filter = null;
-
-        /**
-         * The list of requested modules
-         * @property required
-         * @type {string: boolean}
-         */
-        this.required = {};
-
-        /**
-         * The 

<TRUNCATED>

[18/20] wicket git commit: WICKET-6105 restructured, fixed javadoc

Posted by sv...@apache.org.
WICKET-6105 restructured, fixed javadoc


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/0a4b5f2e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/0a4b5f2e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/0a4b5f2e

Branch: refs/heads/master
Commit: 0a4b5f2eb0ae047c127a2d07f084d299d59eabc1
Parents: e5d21da
Author: Sven Meier <sv...@apache.org>
Authored: Fri Oct 13 14:46:22 2017 +0200
Committer: Sven Meier <sv...@apache.org>
Committed: Tue Oct 17 22:32:40 2017 +0200

----------------------------------------------------------------------
 .../org/apache/wicket/ConverterLocator.java     |   3 +
 .../ajax/builtin/modal/ModalContent1Page.java   |   4 +-
 .../ajax/builtin/modal/ModalPanel1.java         |   4 +-
 .../bean/validation/BeanValidationPage.html     |   2 +-
 .../bean/validation/BeanValidationPage.java     |  11 +-
 .../examples/datetime/DateTimeApplication.java  |  12 +-
 .../wicket/examples/datetime/DateTimePage.html  |  53 ++-
 .../wicket/examples/datetime/DateTimePage.java  | 268 +++++++++++--
 .../examples/datetime/DateTimePage.properties   |  17 +
 .../wicket/extensions/Initializer.properties    |   7 +
 .../form/datetime/AbstractDateTimeField.html    |   3 +-
 .../form/datetime/AbstractDateTimeField.java    | 194 +++++++---
 .../markup/html/form/datetime/DateField.java    | 252 -------------
 .../html/form/datetime/DateTimeField.java       | 115 ------
 .../html/form/datetime/LocalDateConverter.java  | 104 ------
 .../html/form/datetime/LocalDateTextField.java  | 163 ++++++++
 .../html/form/datetime/LocalDateTimeField.java  |  74 ++++
 .../form/datetime/LocalDateTimeTextField.java   | 163 ++++++++
 .../html/form/datetime/LocalTimeConverter.java  | 104 ------
 .../html/form/datetime/LocalTimeTextField.java  | 163 ++++++++
 .../form/datetime/PatternDateConverter.java     |  85 -----
 .../form/datetime/PatternTimeConverter.java     |  85 -----
 .../datetime/PatternZonedDateTimeConverter.java |  97 -----
 .../html/form/datetime/StyleDateConverter.java  | 118 ------
 .../html/form/datetime/StyleTimeConverter.java  | 114 ------
 .../datetime/StyleZonedDateTimeConverter.java   | 168 ---------
 .../markup/html/form/datetime/TimeField.html    |   4 +-
 .../markup/html/form/datetime/TimeField.java    | 373 ++++++-------------
 .../form/datetime/ZonedDateTimeConverter.java   | 203 ----------
 .../html/form/datetime/ZonedDateTimeField.java  |  94 +----
 .../datetime/ZonedToLocalDateTimeModel.java     | 118 ++++++
 .../html/form/datetime/DateConverterTest.java   | 109 ------
 .../html/form/datetime/DateTimeFieldTest.java   |  14 +-
 .../datetime/ZonedToLocalDateTimeModelTest.java |  65 ++++
 .../converter/ZonedDateTimeConverter.java       |   5 +-
 .../converter/ZonedDateTimeConverterTest.java   |   7 +-
 36 files changed, 1344 insertions(+), 2031 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-core/src/main/java/org/apache/wicket/ConverterLocator.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/ConverterLocator.java b/wicket-core/src/main/java/org/apache/wicket/ConverterLocator.java
index 373f3cd..dbef956 100644
--- a/wicket-core/src/main/java/org/apache/wicket/ConverterLocator.java
+++ b/wicket-core/src/main/java/org/apache/wicket/ConverterLocator.java
@@ -22,6 +22,7 @@ import java.math.BigInteger;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.time.ZonedDateTime;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
@@ -48,6 +49,7 @@ import org.apache.wicket.util.convert.converter.ShortConverter;
 import org.apache.wicket.util.convert.converter.SqlDateConverter;
 import org.apache.wicket.util.convert.converter.SqlTimeConverter;
 import org.apache.wicket.util.convert.converter.SqlTimestampConverter;
+import org.apache.wicket.util.convert.converter.ZonedDateTimeConverter;
 import org.apache.wicket.util.lang.Args;
 import org.apache.wicket.util.lang.Objects;
 
@@ -184,6 +186,7 @@ public class ConverterLocator implements IConverterLocator
 		set(LocalDate.class, new LocalDateConverter());
 		set(LocalDateTime.class, new LocalDateTimeConverter());
 		set(LocalTime.class, new LocalTimeConverter());
+		set(ZonedDateTime.class, new ZonedDateTimeConverter());
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
index 5c252e4..94ba192 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalContent1Page.java
@@ -20,7 +20,7 @@ import org.apache.wicket.PageReference;
 import org.apache.wicket.ajax.AjaxRequestTarget;
 import org.apache.wicket.ajax.markup.html.AjaxLink;
 import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;
-import org.apache.wicket.extensions.markup.html.form.datetime.DateTimeField;
+import org.apache.wicket.extensions.markup.html.form.datetime.LocalDateTimeField;
 import org.apache.wicket.markup.html.WebPage;
 
 
@@ -65,7 +65,7 @@ public class ModalContent1Page extends WebPage
 			}
 		});
 
-		add(new DateTimeField("dateTimeField"));
+		add(new LocalDateTimeField("dateTimeField"));
 
 		final ModalWindow modal;
 		add(modal = new ModalWindow("modal"));

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
index 3a9389a..884077c 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal/ModalPanel1.java
@@ -16,7 +16,7 @@
  */
 package org.apache.wicket.examples.ajax.builtin.modal;
 
-import org.apache.wicket.extensions.markup.html.form.datetime.DateTimeField;
+import org.apache.wicket.extensions.markup.html.form.datetime.LocalDateTimeField;
 import org.apache.wicket.markup.html.panel.Panel;
 
 /**
@@ -32,6 +32,6 @@ public class ModalPanel1 extends Panel
 	public ModalPanel1(String id)
 	{
 		super(id);
-		add(new DateTimeField("dateTimeField"));
+		add(new LocalDateTimeField("dateTimeField"));
 	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html
index db04a1c..7b5f6fa 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.html
@@ -34,7 +34,7 @@
 			<tr>
 				<td><label wicket:for="birthdate"><wicket:label>Birthdate</wicket:label></label></td>
 				<td><input wicket:id="birthdate" type="text" size="10"/></td>
-				<td><pre class="note">m/d/yyyy field with @Past</pre></td>
+				<td><pre class="note"><span wicket:id="pattern" /> field with @Past</pre></td>
 			</tr>
 			<tr>
 				<td><label wicket:for="password"><wicket:label>Password</wicket:label></label></td>

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java
index e1eb59d..3173867 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/bean/validation/BeanValidationPage.java
@@ -16,12 +16,14 @@
  */
 package org.apache.wicket.examples.bean.validation;
 
+import java.time.format.FormatStyle;
+
 import org.apache.wicket.bean.validation.PropertyValidator;
-import org.apache.wicket.extensions.markup.html.form.datetime.DateField;
-import org.apache.wicket.extensions.markup.html.form.datetime.StyleDateConverter;
 import org.apache.wicket.examples.WicketExamplePage;
+import org.apache.wicket.extensions.markup.html.form.datetime.LocalDateTextField;
 import org.apache.wicket.feedback.ExactLevelFeedbackMessageFilter;
 import org.apache.wicket.feedback.FeedbackMessage;
+import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.Form;
 import org.apache.wicket.markup.html.form.TextField;
 import org.apache.wicket.markup.html.panel.FeedbackPanel;
@@ -52,8 +54,9 @@ public class BeanValidationPage extends WicketExamplePage
 		form.add(new TextField<>("name", new PropertyModel<String>(this, "person.name")).add(new PropertyValidator<>()));
 		form.add(new TextField<>("phone", new PropertyModel<String>(this, "person.phone")).add(new PropertyValidator<>()));
 		form.add(new TextField<>("email", new PropertyModel<String>(this, "person.email")).add(new PropertyValidator<>()));
-		form.add(new DateField("birthdate", new PropertyModel<>(this, "person.birthdate"),
-			new StyleDateConverter("S-")).add(new PropertyValidator<>()));
+		LocalDateTextField dateField = new LocalDateTextField("birthdate", new PropertyModel<>(this, "person.birthdate"), FormatStyle.SHORT);
+		form.add(dateField.add(new PropertyValidator<>()));
+		form.add(new Label("pattern", new PropertyModel<>(dateField, "textFormat")));
 		form.add(new TextField<>("password", new PropertyModel<String>(this, "person.password")).add(new PropertyValidator<>()));
 		
 		add(new FeedbackPanel("feedbackSuccess", new ExactLevelFeedbackMessageFilter(FeedbackMessage.INFO)));

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
index 7dc4282..713f5b7 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimeApplication.java
@@ -26,8 +26,16 @@ import org.apache.wicket.examples.WicketExampleApplication;
 public class DateTimeApplication extends WicketExampleApplication
 {
 	@Override
+	protected void init()
+	{
+		super.init();
+		
+		getRequestCycleSettings().setGatherExtendedBrowserInfo(true);
+	}
+
+	@Override
 	public Class< ? extends Page> getHomePage()
 	{
 		return DateTimePage.class;
-	}
-}
+	}	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
index eed5878..2589935 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.html
@@ -9,26 +9,51 @@
 	<body>
 		<span wicket:id="mainNavigation" />
 
-		<h3>Demo for short style time</h3>
-		<span wicket:id="time1"></span><br/>
-
-		<hr/>
+		<form wicket:id="form">
+		 	 <div>
+		 	 	<wicket:message key="locale"></wicket:message>
+				<select wicket:id="localeSelect"></select>
+				<a href="#" wicket:id="defaultLocaleLink">[<wicket:message key="default" />]</a>
+     		</div>
+		
+			<hr/>
+		
+			<h3>TimeField 12-hours</h3>
+			<span wicket:id="time1"></span><br/>
+	
+			<hr/>
+	
+			<h3>TimeField 24-hours</h3>
+			<span wicket:id="time2"></span><br/>
+	
+			<hr/>
 
-		<h3>Demo for Full style time</h3>
-		<span wicket:id="time2"></span><br/>
+			<h3>LocalDateTimeField (default time 00:00)</h3>
+			<span wicket:id="datetime0"></span><br/>
 
-		<hr/>
+			<hr/>
 
-		<h3>Demo for Short style time with 24-hours</h3>
-		<span wicket:id="time3"></span><br/>
+	 	 	<wicket:message key="clientZone"></wicket:message>
+			<select wicket:id="zoneSelect"></select>
+			<br/>
+			
+			<h3>LocalDateTimeField with a ZonedDateTime (<span wicket:id="datetime1-label" />) adjusted to client's time zone</h3>
+			<span wicket:id="datetime1"></span>
+			<br/>
 
-		<hr/>
+			<h3>LocalDateTimeTextField with a ZonedDateTime (<span wicket:id="datetime2-label" />) adjusted to client's time zone</h3>
+			<input wicket:id="datetime2" type="text" />
+			<br/>
+			
+			<h3>ZonedDateTimeField</h3>
+			<span wicket:id="datetime3"></span>
+			<br/>
+			
+			<hr/>
 
-		<form wicket:id="form">
-			<h3>Demo for default Local Date Time in Form</h3>
-			<span wicket:id="datetime1"></span><br/>
-			<input wicket:id="submit" type="submit" value="Submit"/>
 			<div wicket:id="feedback"></div>
+			
+			<input wicket:id="submit" type="submit" value="Submit"/>
 		</form>
 	</body>
 </html>

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
index 6294863..b102c2e 100644
--- a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.java
@@ -18,16 +18,36 @@ package org.apache.wicket.examples.datetime;
 
 import java.time.LocalDateTime;
 import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.ZonedDateTime;
+import java.time.format.FormatStyle;
+import java.time.format.TextStyle;
+import java.util.List;
+import java.util.Locale;
+import java.util.stream.Collectors;
 
-import org.apache.wicket.ajax.AjaxRequestTarget;
-import org.apache.wicket.ajax.markup.html.form.AjaxButton;
+import org.apache.wicket.Session;
 import org.apache.wicket.examples.WicketExamplePage;
-import org.apache.wicket.extensions.markup.html.form.datetime.DateTimeField;
-import org.apache.wicket.extensions.markup.html.form.datetime.StyleTimeConverter;
+import org.apache.wicket.examples.forminput.FormInputApplication;
+import org.apache.wicket.extensions.markup.html.form.datetime.LocalDateTimeField;
+import org.apache.wicket.extensions.markup.html.form.datetime.LocalDateTimeTextField;
 import org.apache.wicket.extensions.markup.html.form.datetime.TimeField;
+import org.apache.wicket.extensions.markup.html.form.datetime.ZonedDateTimeField;
+import org.apache.wicket.extensions.markup.html.form.datetime.ZonedToLocalDateTimeModel;
+import org.apache.wicket.markup.html.basic.Label;
+import org.apache.wicket.markup.html.form.Button;
+import org.apache.wicket.markup.html.form.ChoiceRenderer;
+import org.apache.wicket.markup.html.form.DropDownChoice;
 import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.FormComponentUpdatingBehavior;
+import org.apache.wicket.markup.html.form.IChoiceRenderer;
+import org.apache.wicket.markup.html.link.Link;
 import org.apache.wicket.markup.html.panel.FeedbackPanel;
-import org.apache.wicket.model.Model;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.PropertyModel;
+import org.apache.wicket.protocol.http.request.WebClientInfo;
+import org.apache.wicket.request.http.WebRequest;
 
 /**
  * DateTime example page.
@@ -37,43 +57,231 @@ public class DateTimePage extends WicketExamplePage
 {
 	private static final long serialVersionUID = 1L;
 
+	private ZoneId clientZone;
+
+	private ZoneId targetZone = ZoneId.of("UTC+8");
+
+	@SuppressWarnings("unused")
+	private LocalTime time1 = LocalTime.of(22, 15);
+
+	@SuppressWarnings("unused")
+	private LocalTime time2 = LocalTime.of(22, 15);
+
+	@SuppressWarnings("unused")
+	private LocalDateTime dateTime0 = LocalDateTime.now();
+
+	@SuppressWarnings("unused")
+	private ZonedDateTime dateTime1 = LocalDateTime.now().atZone(targetZone);
+
+	@SuppressWarnings("unused")
+	private ZonedDateTime dateTime2 = LocalDateTime.now().atZone(targetZone);
+
+	@SuppressWarnings("unused")
+	private ZonedDateTime dateTime3 = ZonedDateTime.now();
+
 	/**
 	 * Constructor.
 	 */
 	public DateTimePage()
 	{
-		add(TimeField.forShortStyle("time1", Model.of(LocalTime.of(22, 15))));
-		add(TimeField.forTimeStyle("time2", Model.of(LocalTime.of(22, 15)), "F"));
-		add(new TimeField("time3", Model.of(LocalTime.of(22, 15)), new StyleTimeConverter("S")) {
+		Form<String> form = new Form<>("form");
+		this.add(form);
+
+		form.add(new ZoneDropDownChoice("zoneSelect"));
+
+		// Dropdown for selecting locale
+		form.add(new LocaleDropDownChoice("localeSelect"));
+
+		// Link to return to default locale
+		form.add(new Link<Void>("defaultLocaleLink")
+		{
+			public void onClick()
+			{
+				WebRequest request = (WebRequest)getRequest();
+				getSession().setLocale(request.getLocale());
+			}
+		});
+
+		form.add(new TimeField("time1", new PropertyModel<>(this, "time1"))
+		{
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected boolean use12HourFormat()
+			{
+				return true;
+			}
+		});
+
+		form.add(new TimeField("time2", new PropertyModel<>(this, "time2"))
+		{
 			private static final long serialVersionUID = 1L;
 
 			@Override
-			protected boolean use12HourFormat() {
+			protected boolean use12HourFormat()
+			{
 				return false;
 			}
 		});
-		final DateTimeField datetime1 = new DateTimeField("datetime1", Model.of(LocalDateTime.now()));
+
+		final LocalDateTimeField datetimeField0 = new LocalDateTimeField("datetime0",
+			new PropertyModel<>(this, "dateTime0"))
+		{
+			@Override
+			protected LocalTime getDefaultTime()
+			{
+				return LocalTime.of(0, 0);
+			}
+		};
+		form.add(datetimeField0);
+
+		IModel<ZonedDateTime> zonedDateTime1 = new PropertyModel<>(this, "dateTime1");
+		final LocalDateTimeField datetimeField1 = new LocalDateTimeField("datetime1",
+			new ZonedToLocalDateTimeModel(zonedDateTime1)
+			{
+				@Override
+				protected ZoneId getClientTimeZone()
+				{
+					return clientZone;
+				}
+
+				@Override
+				protected ZoneId getTargetTimeZone()
+				{
+					return targetZone;
+				}
+			});
+		form.add(datetimeField1);
+		form.add(new Label("datetime1-label", zonedDateTime1));
+
+		IModel<ZonedDateTime> zonedDateTime2 = new PropertyModel<>(this, "dateTime2");
+		LocalDateTimeTextField datetime2 = new LocalDateTimeTextField("datetime2",
+			new ZonedToLocalDateTimeModel(zonedDateTime2)
+			{
+				@Override
+				protected ZoneId getClientTimeZone()
+				{
+					return clientZone;
+				}
+
+				@Override
+				protected ZoneId getTargetTimeZone()
+				{
+					return targetZone;
+				}
+			}, FormatStyle.SHORT, FormatStyle.SHORT);
+		form.add(datetime2);
+		form.add(new Label("datetime2-label", zonedDateTime2));
+
+		final ZonedDateTimeField datetimeField3 = new ZonedDateTimeField("datetime3",
+			new PropertyModel<>(this, "dateTime3"));
+		form.add(datetimeField3);
+
 		final FeedbackPanel feedback = new FeedbackPanel("feedback");
-		Form<String> form = new Form<>("form");
-		add(form.add(datetime1)
-				.add(feedback.setOutputMarkupId(true))
-				.add(new AjaxButton("submit")
+		form.add(feedback);
+
+		form.add(new Button("submit"));
+	}
+
+	@Override
+	protected void onInitialize()
+	{
+		super.onInitialize();
+
+		clientZone = ((WebClientInfo)Session.get().getClientInfo()).getProperties().getTimeZone()
+			.toZoneId();
+	}
+
+	/**
+	 * Choice for a locale.
+	 */
+	private final class LocaleChoiceRenderer extends ChoiceRenderer<Locale>
+	{
+		@Override
+		public Object getDisplayValue(Locale locale)
+		{
+			return locale.getDisplayName(getLocale());
+		}
+	}
+
+	/**
+	 * Dropdown with Locales.
+	 */
+	private final class LocaleDropDownChoice extends DropDownChoice<Locale>
+	{
+		/**
+		 * Construct.
+		 * 
+		 * @param id
+		 *            component id
+		 */
+		public LocaleDropDownChoice(String id)
+		{
+			super(id, FormInputApplication.LOCALES, new LocaleChoiceRenderer());
+
+			setModel(new PropertyModel<>(this, "session.locale"));
+
+			add(new FormComponentUpdatingBehavior()
+			{
+				@Override
+				protected void onUpdate()
+				{
+					setResponsePage(getPage().getClass());
+				}
+			});
+		}
+	}
+
+	private class ZoneDropDownChoice extends DropDownChoice<ZoneId>
+	{
+
+		public ZoneDropDownChoice(String id)
+		{
+			super(id, new IModel<List<ZoneId>>()
+			{
+				@Override
+				public List<ZoneId> getObject()
+				{
+					return ZoneId.getAvailableZoneIds().stream().map(id -> ZoneId.of(id))
+						.collect(Collectors.toList());
+				}
+			});
+
+			setModel(new PropertyModel<ZoneId>(DateTimePage.this, "clientZone"));
+
+			setChoiceRenderer(new IChoiceRenderer<ZoneId>()
+			{
+				@Override
+				public Object getDisplayValue(ZoneId object)
+				{
+					String name = object.getDisplayName(TextStyle.FULL, getLocale());
+
+					ZoneOffset offset = LocalDateTime.now().atZone(object).getOffset();
+
+					return name + offset;
+				}
+
+				@Override
+				public String getIdValue(ZoneId object, int index)
+				{
+					return object.getId();
+				}
+
+				@Override
+				public ZoneId getObject(String id, IModel<? extends List<? extends ZoneId>> choices)
+				{
+					return ZoneId.of(id);
+				}
+			});
+
+			add(new FormComponentUpdatingBehavior()
+			{
+				protected void onUpdate()
 				{
-					private static final long serialVersionUID = 1L;
-
-					@Override
-					protected void onSubmit(AjaxRequestTarget target)
-					{
-						form.info(String.format("DateTime was just submitted: %s", datetime1.getModelObject()));
-						target.add(feedback);
-					}
-
-					@Override
-					protected void onError(AjaxRequestTarget target)
-					{
-						target.add(feedback);
-					}
-				})
-			);
+					// clear raw input of all inputs so that values are reformatted
+					getForm().clearInput();
+				};
+			});
+		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.properties
----------------------------------------------------------------------
diff --git a/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.properties b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.properties
new file mode 100644
index 0000000..6a4447b
--- /dev/null
+++ b/wicket-examples/src/main/java/org/apache/wicket/examples/datetime/DateTimePage.properties
@@ -0,0 +1,17 @@
+#  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.
+locale=Locale
+default=default
+clientZone=Client timezone

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties b/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties
index 326f2a7..b9a7819 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/Initializer.properties
@@ -38,3 +38,10 @@ Folder.CSS.other=tree-folder-other
 Folder.CSS.closed=tree-folder-closed
 Folder.CSS.open=tree-folder-open
 Folder.CSS.selected=selected
+
+AbstractDateTimeField.timeSeparator=\u00a0-\u00a0 
+AbstractDateTimeField.CSS.date=datetime-date
+AbstractDateTimeField.CSS.time=datetime-time
+TimeField.hoursSeparator=\u00a0:\u00a0
+TimeField.CSS.hours=time-hours
+TimeField.CSS.minutes=time-minutes
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.html
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.html b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.html
index d92f2ce..3230a08 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.html
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.html
@@ -16,8 +16,9 @@
    limitations under the License.
 -->
 <wicket:panel xmlns:wicket="http://wicket.apache.org">
-  <span style="white-space: nowrap;">
+  <span>
     <input type="text" wicket:id="date" size="12" />
+    <span wicket:id="timeSeparator"> - </span>
     <span wicket:id="time" />
   </span>
 </wicket:panel>

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
index 8b6f85d..2f86c19 100644
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/AbstractDateTimeField.java
@@ -18,24 +18,25 @@ package org.apache.wicket.extensions.markup.html.form.datetime;
 
 import java.time.LocalDate;
 import java.time.LocalTime;
+import java.time.format.FormatStyle;
 import java.time.temporal.Temporal;
 import java.util.Date;
-import java.util.Locale;
 
 import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.core.util.string.CssUtils;
+import org.apache.wicket.markup.ComponentTag;
+import org.apache.wicket.markup.html.basic.Label;
 import org.apache.wicket.markup.html.form.FormComponentPanel;
 import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.ResourceModel;
+import org.apache.wicket.util.convert.ConversionException;
 
 /**
- * Works on a {@link java.time.ZonedDateTime} object. Displays a date field and a DatePicker, a field
- * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field
- * depends on the time format of this {@link AbstractDateTimeField}'s {@link Locale}, as does the visibility
- * of the AM/PM field (see {@link AbstractDateTimeField#use12HourFormat}).
+ * Works on a {@link java.time.Temporal} object, aggregating a {@link LocalDateTextField} and a {@link TimeField}.
  * <p>
- * <strong>Ajaxifying the DateTimeField</strong>: If you want to update a DateTimeField with an
- * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained
- * {@link DateField} by overriding {@link #newDateTextField(String, IModel)} and calling
- * {@link #processInput()}:
+ * <strong>Ajaxifying an AbstractDateTimeField</strong>:
+ * If you want to update this component with an {@link AjaxFormComponentUpdatingBehavior}, you have to attach it
+ * to the contained components by overriding {@link #newDateTextField(String, IModel)}:
  * 
  * <pre>{@code
  *  DateTimeField dateTimeField = new DateTimeField(...) {
@@ -55,19 +56,17 @@ import org.apache.wicket.model.IModel;
  * }</pre>
  * 
  * @author eelcohillenius
- * @see DateField for a variant with just the date field and date picker
  */
 abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPanel<T>
 {
 	private static final long serialVersionUID = 1L;
 
-	// Component-IDs
-	protected static final String DATE = "date";
-	protected static final String TIME = "time";
+	public static final String DATE_CSS_CLASS_KEY = CssUtils.key(AbstractDateTimeField.class, "date");
 
-	// The date TextField and it's associated model object
-	// Note that any time information in date will be ignored
-	private DateField dateField;
+	public static final String TIME_CSS_CLASS_KEY = CssUtils.key(AbstractDateTimeField.class, "time");
+
+	private LocalDateTextField localDateField;
+	
 	private TimeField timeField;
 
 	/**
@@ -90,18 +89,38 @@ abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPa
 	{
 		super(id, model);
 
-		// Create and add the date TextField
-		add(dateField = newDateField(DATE, new DateModel()));
-		add(timeField = newTimeField(TIME, new TimeModel()));
+		add(new Label("timeSeparator", new ResourceModel("AbstractDateTimeField.timeSeparator"))
+		{
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected void onConfigure()
+			{
+				super.onConfigure();
+
+				timeField.configure();
+				
+				setVisible(timeField.isVisible());
+			}
+		});
+	}
+	
+	@Override
+	protected void onInitialize()
+	{
+		super.onInitialize();
+		
+		add(localDateField = newDateField("date", new DateModel()));
+		add(timeField = newTimeField("time", new TimeModel()));
 	}
 
 	/**
 	 * 
 	 * @return The date TextField
 	 */
-	protected final DateField getDateField()
+	protected final LocalDateTextField getDateField()
 	{
-		return dateField;
+		return localDateField;
 	}
 
 	/**
@@ -118,7 +137,7 @@ abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPa
 	{
 		// since we override convertInput, we can let this method return a value
 		// that is just suitable for error reporting
-		return String.format("%s, %s", dateField.getInput(), timeField.getInput());
+		return String.format("%s, %s", localDateField.getInput(), timeField.getInput());
 	}
 
 	/**
@@ -134,47 +153,68 @@ abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPa
 	@Override
 	public void convertInput()
 	{
-		try
-		{
-			// Get the converted input values
-			LocalDate date = dateField.getConvertedInput();
-			LocalTime time = timeField.getConvertedInput();
+		// Get the converted input values
+		LocalDate date = localDateField.getConvertedInput();
+		LocalTime time = timeField.getConvertedInput();
 
-			if (date == null || time == null)
+		T temporal;
+		if (date == null && time == null)
+		{
+			temporal = null;
+		}
+		else
+		{
+			if (date == null)
 			{
-				setConvertedInput(null);
+				error(newValidationError(new ConversionException("Cannot create temporal without date").setTargetType(getType())));
+				return;
 			}
-			else
+			if (time == null)
 			{
-				// Use the input to create proper date-time
-				setConvertedInput(performConvert(date, time));
+				time = getDefaultTime();
+				if (time == null) {
+					error(newValidationError(new ConversionException("Cannot create temporal without time").setTargetType(getType())));
+					return;
+				}
 			}
+			
+			// Use the input to create proper date-time
+			temporal = createTemporal(date, time);
 		}
-		catch (RuntimeException e)
-		{
-			AbstractDateTimeField.this.error(e.getMessage());
-			invalid();
-		}
+		
+		setConvertedInput(temporal);
 	}
 
-	abstract T performConvert(LocalDate date, LocalTime time);
-
-	void prepareObject() {
-		// no-op by default
+	/**
+	 * Get a default time if none was entered.
+	 * 
+	 * @return {@value null} by default
+	 */
+	protected LocalTime getDefaultTime()
+	{
+		return null;
 	}
 
 	/**
-	 * create a new {@link DateField} instance to be added to this panel.
+	 * create a new {@link LocalDateTextField} instance to be added to this panel.
 	 * 
 	 * @param id
 	 *            the component id
 	 * @param dateFieldModel
-	 *            model that should be used by the {@link DateField}
+	 *            model that should be used by the {@link LocalDateTextField}
 	 * @return a new date text field instance
 	 */
-	protected DateField newDateField(String id, IModel<LocalDate> dateFieldModel)
+	protected LocalDateTextField newDateField(String id, IModel<LocalDate> dateFieldModel)
 	{
-		return DateField.forShortStyle(id, dateFieldModel);
+		return new LocalDateTextField(id, dateFieldModel, FormatStyle.SHORT) {
+			@Override
+			protected void onComponentTag(ComponentTag tag)
+			{
+				super.onComponentTag(tag);
+				
+				tag.append("class", getString(DATE_CSS_CLASS_KEY), " ");
+			}
+		};
 	}
 
 	/**
@@ -188,7 +228,15 @@ abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPa
 	 */
 	protected TimeField newTimeField(String id, IModel<LocalTime> timeFieldModel)
 	{
-		return TimeField.forShortStyle(id, timeFieldModel);
+		return new TimeField(id, timeFieldModel) {
+			@Override
+			protected void onComponentTag(ComponentTag tag)
+			{
+				super.onComponentTag(tag);
+				
+				tag.append("class", getString(TIME_CSS_CLASS_KEY), " ");
+			}
+		};
 	}
 
 	/**
@@ -197,50 +245,78 @@ abstract class AbstractDateTimeField<T extends Temporal> extends FormComponentPa
 	@Override
 	protected void onBeforeRender()
 	{
-		dateField.setRequired(isRequired());
+		localDateField.setRequired(isRequired());
 		timeField.setRequired(isRequired());
 
-		prepareObject();
-
 		super.onBeforeRender();
 	}
 
-	abstract LocalDate getLocalDate();
-	abstract void setLocalDate(LocalDate date);
-	abstract LocalTime getLocalTime();
-	abstract void setLocalTime(LocalTime time);
+	/**
+	 * Get the local date from the given temporal.
+	 * 
+	 * @param temporal
+	 * @return local date
+	 */
+	protected abstract LocalDate getLocalDate(T temporal);
 
-	protected class DateModel implements IModel<LocalDate>
+	/**
+	 * Get the time from the given temporal.
+	 * 
+	 * @param temporal
+	 * @return time
+	 */
+	protected abstract LocalTime getLocalTime(T temporal);
+
+	/**
+	 * Create the temporal object from date and time. 
+	 * 
+	 * @param date
+	 * @param time
+	 * @return
+	 */
+	protected abstract T createTemporal(LocalDate date, LocalTime time);
+
+	private class DateModel implements IModel<LocalDate>
 	{
 		private static final long serialVersionUID = 1L;
 
 		@Override
 		public LocalDate getObject()
 		{
-			return getLocalDate();
+			T temporal = getModelObject();
+			if (temporal == null) {
+				return null;
+			}
+			
+			return getLocalDate(temporal);
 		}
 
 		@Override
 		public void setObject(LocalDate date)
 		{
-			setLocalDate(date);
+			// ignored
 		}
 	}
 
-	protected class TimeModel implements IModel<LocalTime>
+	private class TimeModel implements IModel<LocalTime>
 	{
 		private static final long serialVersionUID = 1L;
 
 		@Override
 		public LocalTime getObject()
 		{
-			return getLocalTime();
+			T temporal = getModelObject();
+			if (temporal == null) {
+				return null;
+			}
+			
+			return getLocalTime(temporal);
 		}
 
 		@Override
 		public void setObject(LocalTime time)
 		{
-			setLocalTime(time);
+			// ignored
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateField.java
deleted file mode 100644
index 895c0c6..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateField.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.time.format.FormatStyle;
-
-import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
-import org.apache.wicket.markup.html.form.TextField;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.lang.Args;
-
-/**
- * A TextField that is mapped to a <code>java.time.LocalDate</code> object and that uses java.time time to
- * parse and format values.
- * <p>
- * You should use on of the factory methods to construct the kind you want or use the public
- * constructor and pass in the converter to use.
- * </p>
- * <p>
- * This component tries to apply the time zone difference between the client and server. See the
- * {@link ZonedDateTimeConverter#getApplyTimeZoneDifference() date converter} of this package for more
- * information on that.
- * </p>
- * 
- * @see StyleZonedDateTimeConverter
- * @see java.time.ZonedDateTime
- * @see java.time.format.DateTimeFormatter
- * @see java.time.ZoneId
- * 
- * @author eelcohillenius
- */
-public class DateField extends TextField<LocalDate> implements ITextFormatProvider
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Creates a new DateField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param datePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @return DateField
-	 */
-	public static DateField forDatePattern(String id, IModel<LocalDate> model, String datePattern)
-	{
-		return new DateField(id, model, new PatternDateConverter(datePattern));
-	}
-
-	/**
-	 * Creates a new DateField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param datePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @return DateField
-	 */
-	public static DateField forDatePattern(String id, String datePattern)
-	{
-		return forDatePattern(id, null, datePattern);
-	}
-
-	/**
-	 * Creates a new DateField using the provided date style.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param dateStyle
-	 *            Date style to use. The first character is the date style, and the second character
-	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
-	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
-	 *            character '-'. See {@link org.joda.time.DateTimeFormat#forStyle(String)}.
-	 * @return DateField
-	 */
-	public static DateField forDateStyle(String id, IModel<LocalDate> model, String dateStyle)
-	{
-		return new DateField(id, model, new StyleDateConverter(dateStyle));
-	}
-
-	/**
-	 * Creates a new DateField using the provided date style.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param dateStyle
-	 *            Date style to use. The first character is the date style, and the second character
-	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
-	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
-	 *            character '-'. See {@link org.joda.time.DateTimeFormat#forStyle(String)}.
-	 * @return DateField
-	 */
-	public static DateField forDateStyle(String id, String dateStyle)
-	{
-		return forDateStyle(id, null, dateStyle);
-	}
-
-	/**
-	 * Creates a new DateField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @return DateField
-	 */
-	public static DateField forShortStyle(String id)
-	{
-		return forShortStyle(id, null);
-	}
-
-	/**
-	 * Creates a new DateField defaulting to using a short date pattern
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @return DateField
-	 */
-	public static DateField forShortStyle(String id, IModel<LocalDate> model)
-	{
-		return new DateField(id, model, new StyleDateConverter());
-	}
-
-	/**
-	 * Creates a new DateField using the provided converter.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param converter
-	 *            the date converter
-	 * @return DateField
-	 */
-	public static DateField withConverter(String id, LocalDateConverter converter)
-	{
-		return withConverter(id, null, converter);
-	}
-
-	/**
-	 * Creates a new DateField using the provided converter.
-	 * 
-	 * @param id
-	 *            The id of the text field
-	 * @param model
-	 *            The model
-	 * @param converter
-	 *            the date converter
-	 * @return DateField
-	 */
-	public static DateField withConverter(String id, IModel<LocalDate> model, LocalDateConverter converter)
-	{
-		return new DateField(id, model, converter);
-	}
-
-	/**
-	 * The converter for the TextField
-	 */
-	private final LocalDateConverter converter;
-
-	/**
-	 * Construct with a converter.
-	 * 
-	 * @param id
-	 *            The component id
-	 * @param model
-	 *            The model
-	 * @param converter
-	 *            The converter to use
-	 */
-	public DateField(String id, IModel<LocalDate> model, LocalDateConverter converter)
-	{
-		super(id, model, LocalDate.class);
-
-		Args.notNull(converter, "converter");
-		this.converter = converter;
-	}
-
-	/**
-	 * Construct with a converter, and a null model.
-	 * 
-	 * @param id
-	 *            The component id
-	 * @param converter
-	 *            The converter to use
-	 */
-	public DateField(String id, LocalDateConverter converter)
-	{
-		this(id, null, converter);
-	}
-
-	/**
-	 * @return The specialized converter.
-	 * @see org.apache.wicket.Component#createConverter(java.lang.Class)
-	 */
-	@Override
-	protected IConverter<?> createConverter(Class<?> clazz)
-	{
-		if (LocalDate.class.isAssignableFrom(clazz))
-		{
-			return converter;
-		}
-		return null;
-	}
-
-	/**
-	 * @see org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider#getTextFormat()
-	 */
-	@Override
-	public final String getTextFormat()
-	{
-		return converter.getPattern(getLocale());
-	}
-
-	public static FormatStyle parseFormatStyle(char style)
-	{
-		switch (style)
-		{
-			case 'S':
-				return FormatStyle.SHORT;
-			case 'M':
-				return FormatStyle.MEDIUM;
-			case 'L':
-				return FormatStyle.LONG;
-			case 'F':
-				return FormatStyle.FULL;
-			default:
-				return null;
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
deleted file mode 100644
index bc4801c..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeField.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.LocalTime;
-import java.time.temporal.ChronoField;
-import java.util.Locale;
-
-import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.model.IModel;
-
-/**
- * Works on a {@link java.time.LocalDateTimeTime} object. Displays a date field and a DatePicker, a field
- * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field
- * depends on the time format of this {@link DateTimeField}'s {@link Locale}, as does the visibility
- * of the AM/PM field (see {@link DateTimeField#use12HourFormat}).
- * <p>
- * <strong>Ajaxifying the DateTimeField</strong>: If you want to update a DateTimeField with an
- * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained
- * {@link DateField} by overriding {@link #newDateTextField(String, IModel)} and calling
- * {@link #processInput()}:
- * 
- * <pre>{@code
- *  DateTimeField dateTimeField = new DateTimeField(...) {
- *    protected DateTextField newDateTextField(String id, PropertyModel<Date> dateFieldModel)
- *    {
- *      DateTextField dateField = super.newDateTextField(id, dateFieldModel);     
- *      dateField.add(new AjaxFormComponentUpdatingBehavior("change") {
- *        protected void onUpdate(AjaxRequestTarget target) {
- *          processInput(); // let DateTimeField process input too
- *
- *          ...
- *        }
- *      });
- *      return recorder;
- *    }
- *  }
- * }</pre>
- * 
- * @author eelcohillenius
- * @see DateField for a variant with just the date field and date picker
- */
-public class DateTimeField extends AbstractDateTimeField<LocalDateTime>
-{
-	private static final long serialVersionUID = 1L;
-
-	private LocalDateTime dateTime = LocalDateTime.now();
-
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 */
-	public DateTimeField(final String id)
-	{
-		this(id, null);
-	}
-
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 * @param model
-	 */
-	public DateTimeField(final String id, final IModel<LocalDateTime> model)
-	{
-		super(id, model);
-
-		// Sets the type that will be used when updating the model for this component.
-		setType(LocalDateTime.class);
-	}
-
-	LocalDateTime performConvert(LocalDate date, LocalTime time) {
-		return LocalDateTime.of(date, time);
-	}
-
-	LocalDate getLocalDate()
-	{
-		return getModelObject() == null ? null : dateTime.toLocalDate();
-	}
-
-	void setLocalDate(LocalDate date)
-	{
-		dateTime = dateTime.with(ChronoField.YEAR, date.getYear())
-				.with(ChronoField.MONTH_OF_YEAR, date.getMonthValue())
-				.with(ChronoField.DAY_OF_YEAR, date.getDayOfMonth());
-	}
-
-	LocalTime getLocalTime()
-	{
-		return getModelObject() == null ? null : dateTime.toLocalTime();
-	}
-
-	void setLocalTime(LocalTime time)
-	{
-		dateTime = dateTime.with(ChronoField.HOUR_OF_DAY, time.getHour())
-				.with(ChronoField.MINUTE_OF_HOUR, time.getMinute());
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateConverter.java
deleted file mode 100644
index 95e1a47..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateConverter.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.time.LocalDate;
-import java.time.format.DateTimeFormatter;
-import java.util.Locale;
-
-import org.apache.wicket.util.convert.ConversionException;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.lang.Args;
-import org.apache.wicket.util.string.Strings;
-
-
-/**
- * Base class for java.time based date converters. It contains the logic to parse and format,
- * optionally taking the time zone difference between clients and the server into account.
- * <p>
- * Converters of this class are best suited for per-component use.
- * </p>
- * 
- * @author eelcohillenius
- */
-public abstract class LocalDateConverter implements IConverter<LocalDate>
-{
-	private static final long serialVersionUID = 1L;
-
-	public LocalDate convertToObject(String value, DateTimeFormatter format, Locale locale) {
-		try
-		{
-			// parse date retaining the time of the submission
-			return LocalDate.parse(value, format);
-		}
-		catch (RuntimeException e)
-		{
-			throw newConversionException(e, locale);
-		}
-	}
-
-	@Override
-	public LocalDate convertToObject(String value, Locale locale)
-	{
-		if (Strings.isEmpty(value))
-		{
-			return null;
-		}
-
-		DateTimeFormatter format = getFormat(locale);
-		Args.notNull(format, "format");
-
-		return convertToObject(value, format, locale);
-	}
-
-	/**
-	 * Creates a ConversionException and sets additional context information to it.
-	 *
-	 * @param cause
-	 *            - {@link RuntimeException} cause
-	 * @param locale
-	 *            - {@link Locale} used to set 'format' variable with localized pattern
-	 * @return {@link ConversionException}
-	 */
-	ConversionException newConversionException(RuntimeException cause, Locale locale)
-	{
-		return new ConversionException(cause)
-				.setVariable("format", getPattern(locale));
-	}
-
-	@Override
-	public String convertToString(LocalDate dateTime, Locale locale)
-	{
-		DateTimeFormatter format = getFormat(locale);
-		return format.format(dateTime);
-	}
-
-	/**
-	 * @param locale
-	 *            The locale used to convert the value
-	 * @return Gets the pattern that is used for printing and parsing
-	 */
-	public abstract String getPattern(Locale locale);
-
-	/**
-	 * @param locale
-	 *            The locale used to convert the value
-	 * 
-	 * @return formatter The formatter for the current conversion
-	 */
-	public abstract DateTimeFormatter getFormat(Locale locale);
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextField.java
new file mode 100644
index 0000000..a1d1dc0
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextField.java
@@ -0,0 +1,163 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDate;
+import java.time.chrono.IsoChronology;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.FormatStyle;
+import java.util.Locale;
+
+import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.convert.converter.LocalDateConverter;
+
+/**
+ * A TextField that is mapped to a <code>java.time.LocalDate</code> object and that uses java.time time to
+ * parse and format values.
+ * 
+ * @see java.time.format.DateTimeFormatter
+ * 
+ * @author eelcohillenius
+ */
+public class LocalDateTextField extends TextField<LocalDate> implements ITextFormatProvider
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * The converter for the TextField
+	 */
+	private final TextFormatConverter converter;
+	
+	/**
+	 * Construct with a pattern.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param model
+	 *            the model
+	 * @param pattern
+	 *            the pattern to use
+	 */
+	public LocalDateTextField(String id, IModel<LocalDate> model, String datePattern)
+	{
+		super(id, model, LocalDate.class);
+
+		this.converter = new TextFormatConverter() {
+			
+			@Override
+			public DateTimeFormatter getDateTimeFormatter(Locale locale)
+			{
+				return DateTimeFormatter.ofPattern(datePattern).withLocale(locale);
+			}
+
+			@Override
+			public String getTextFormat(Locale locale)
+			{
+				return datePattern;
+			}
+		};
+	}
+
+	/**
+	 * Construct with a pattern.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param pattern
+	 *            the pattern to use
+	 */
+	public LocalDateTextField(String id, String datePattern)
+	{
+		this(id, null, datePattern);
+	}
+
+	/**
+	 * Construct with a style.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param model
+	 *            the model
+	 * @param dateStyle
+	 *            the style to use
+	 */
+	public LocalDateTextField(String id, IModel<LocalDate> model, FormatStyle dateStyle)
+	{
+		super(id, model, LocalDate.class);
+
+		this.converter = new TextFormatConverter() {
+			
+			@Override
+			public DateTimeFormatter getDateTimeFormatter(Locale locale)
+			{
+				return DateTimeFormatter.ofLocalizedDate(dateStyle).withLocale(locale);
+			}
+
+			@Override
+			public String getTextFormat(Locale locale)
+			{
+				return DateTimeFormatterBuilder.getLocalizedDateTimePattern(dateStyle, null, IsoChronology.INSTANCE, locale);
+			}
+		};
+	}
+
+
+	/**
+	 * Construct with a style.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param dateStyle
+	 *            the style to use
+	 */
+	public LocalDateTextField(String id, FormatStyle dateStyle)
+	{
+		this(id, null, dateStyle);
+	}
+
+	/**
+	 * @return The specialized converter.
+	 * @see org.apache.wicket.Component#createConverter(java.lang.Class)
+	 */
+	@Override
+	protected IConverter<?> createConverter(Class<?> clazz)
+	{
+		if (LocalDate.class.isAssignableFrom(clazz))
+		{
+			return converter;
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider#getTextFormat()
+	 */
+	@Override
+	public final String getTextFormat()
+	{
+		return converter.getTextFormat(getLocale());
+	}
+
+	private abstract class TextFormatConverter extends LocalDateConverter {
+		
+		public abstract String getTextFormat(Locale locale);
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeField.java
new file mode 100644
index 0000000..2283904
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeField.java
@@ -0,0 +1,74 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+
+import org.apache.wicket.model.IModel;
+
+/**
+ * Works on a {@link java.time.LocalDateTime} object. See {@link AbstractDateTimeField} for
+ * further details.
+ *  
+ * @author eelcohillenius
+ */
+public class LocalDateTimeField extends AbstractDateTimeField<LocalDateTime>
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 */
+	public LocalDateTimeField(final String id)
+	{
+		this(id, null);
+	}
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 * @param model
+	 */
+	public LocalDateTimeField(final String id, final IModel<LocalDateTime> model)
+	{
+		super(id, model);
+
+		// Sets the type that will be used when updating the model for this component.
+		setType(LocalDateTime.class);
+	}
+
+	@Override
+	protected LocalDateTime createTemporal(LocalDate date, LocalTime time) {
+		return LocalDateTime.of(date, time);
+	}
+
+	@Override
+	protected LocalDate getLocalDate(LocalDateTime temporal)
+	{
+		return temporal.toLocalDate();
+	}
+
+	protected LocalTime getLocalTime(LocalDateTime temporal)
+	{
+		return temporal.toLocalTime();
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeTextField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeTextField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeTextField.java
new file mode 100644
index 0000000..772b5f3
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTimeTextField.java
@@ -0,0 +1,163 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDateTime;
+import java.time.chrono.IsoChronology;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.FormatStyle;
+import java.util.Locale;
+
+import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.convert.converter.LocalDateTimeConverter;
+
+/**
+ * A TextField that is mapped to a <code>java.time.LocalDateTime</code> object and that uses java.time time to
+ * parse and format values.
+ * 
+ * @see java.time.format.DateTimeFormatter
+ * 
+ * @author eelcohillenius
+ */
+public class LocalDateTimeTextField extends TextField<LocalDateTime> implements ITextFormatProvider
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * The converter for the TextField
+	 */
+	private final TextFormatConverter converter;
+	
+	/**
+	 * Construct with a pattern.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param model
+	 *            the model
+	 * @param pattern
+	 *            the pattern to use
+	 */
+	public LocalDateTimeTextField(String id, IModel<LocalDateTime> model, String dateTimePattern)
+	{
+		super(id, model, LocalDateTime.class);
+
+		this.converter = new TextFormatConverter() {
+			
+			@Override
+			public DateTimeFormatter getDateTimeFormatter(Locale locale)
+			{
+				return DateTimeFormatter.ofPattern(dateTimePattern).withLocale(locale);
+			}
+
+			@Override
+			public String getTextFormat(Locale locale)
+			{
+				return dateTimePattern;
+			}
+		};
+	}
+
+	/**
+	 * Construct with a pattern.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param pattern
+	 *            the pattern to use
+	 */
+	public LocalDateTimeTextField(String id, String dateTimePattern)
+	{
+		this(id, null, dateTimePattern);
+	}
+
+	/**
+	 * Construct with a style.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param model
+	 *            the model
+	 * @param timeStyle
+	 *            the style to use
+	 */
+	public LocalDateTimeTextField(String id, IModel<LocalDateTime> model, FormatStyle dateStyle, FormatStyle timeStyle)
+	{
+		super(id, model, LocalDateTime.class);
+
+		this.converter = new TextFormatConverter() {
+			
+			@Override
+			public DateTimeFormatter getDateTimeFormatter(Locale locale)
+			{
+				return DateTimeFormatter.ofLocalizedDateTime(dateStyle, timeStyle).withLocale(locale);
+			}
+
+			@Override
+			public String getTextFormat(Locale locale)
+			{
+				return DateTimeFormatterBuilder.getLocalizedDateTimePattern(dateStyle, timeStyle, IsoChronology.INSTANCE, locale);
+			}
+		};
+	}
+
+
+	/**
+	 * Construct with a style.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param timeStyle
+	 *            the style to use
+	 */
+	public LocalDateTimeTextField(String id, FormatStyle dateStyle, FormatStyle timeStyle)
+	{
+		this(id, null, dateStyle, timeStyle);
+	}
+
+	/**
+	 * @return The specialized converter.
+	 * @see org.apache.wicket.Component#createConverter(java.lang.Class)
+	 */
+	@Override
+	protected IConverter<?> createConverter(Class<?> clazz)
+	{
+		if (LocalDateTime.class.isAssignableFrom(clazz))
+		{
+			return converter;
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider#getTextFormat()
+	 */
+	@Override
+	public final String getTextFormat()
+	{
+		return converter.getTextFormat(getLocale());
+	}
+
+	private abstract class TextFormatConverter extends LocalDateTimeConverter {
+		
+		public abstract String getTextFormat(Locale locale);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeConverter.java
deleted file mode 100644
index 1597ab6..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeConverter.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.time.LocalTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Locale;
-
-import org.apache.wicket.util.convert.ConversionException;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.lang.Args;
-import org.apache.wicket.util.string.Strings;
-
-
-/**
- * Base class for java.time based date converters. It contains the logic to parse and format,
- * optionally taking the time zone difference between clients and the server into account.
- * <p>
- * Converters of this class are best suited for per-component use.
- * </p>
- * 
- * @author eelcohillenius
- */
-public abstract class LocalTimeConverter implements IConverter<LocalTime>
-{
-	private static final long serialVersionUID = 1L;
-
-	public LocalTime convertToObject(String value, DateTimeFormatter format, Locale locale) {
-		try
-		{
-			// parse date retaining the time of the submission
-			return LocalTime.parse(value, format);
-		}
-		catch (RuntimeException e)
-		{
-			throw newConversionException(e, locale);
-		}
-	}
-
-	@Override
-	public LocalTime convertToObject(String value, Locale locale)
-	{
-		if (Strings.isEmpty(value))
-		{
-			return null;
-		}
-
-		DateTimeFormatter format = getFormat(locale);
-		Args.notNull(format, "format");
-
-		return convertToObject(value, format, locale);
-	}
-
-	/**
-	 * Creates a ConversionException and sets additional context information to it.
-	 *
-	 * @param cause
-	 *            - {@link RuntimeException} cause
-	 * @param locale
-	 *            - {@link Locale} used to set 'format' variable with localized pattern
-	 * @return {@link ConversionException}
-	 */
-	ConversionException newConversionException(RuntimeException cause, Locale locale)
-	{
-		return new ConversionException(cause)
-				.setVariable("format", getPattern(locale));
-	}
-
-	@Override
-	public String convertToString(LocalTime time, Locale locale)
-	{
-		DateTimeFormatter format = getFormat(locale);
-		return format.format(time);
-	}
-
-	/**
-	 * @param locale
-	 *            The locale used to convert the value
-	 * @return Gets the pattern that is used for printing and parsing
-	 */
-	public abstract String getPattern(Locale locale);
-
-	/**
-	 * @param locale
-	 *            The locale used to convert the value
-	 * 
-	 * @return formatter The formatter for the current conversion
-	 */
-	public abstract DateTimeFormatter getFormat(Locale locale);
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeTextField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeTextField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeTextField.java
new file mode 100644
index 0000000..5ea7e3a
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalTimeTextField.java
@@ -0,0 +1,163 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalTime;
+import java.time.chrono.IsoChronology;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.FormatStyle;
+import java.util.Locale;
+
+import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.convert.converter.LocalTimeConverter;
+
+/**
+ * A TextField that is mapped to a <code>java.time.LocalTime</code> object and that uses java.time time to
+ * parse and format values.
+ * 
+ * @see java.time.format.DateTimeFormatter
+ * 
+ * @author eelcohillenius
+ */
+public class LocalTimeTextField extends TextField<LocalTime> implements ITextFormatProvider
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * The converter for the TextField
+	 */
+	private final TextFormatConverter converter;
+	
+	/**
+	 * Construct with a pattern.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param model
+	 *            the model
+	 * @param pattern
+	 *            the pattern to use
+	 */
+	public LocalTimeTextField(String id, IModel<LocalTime> model, String timePattern)
+	{
+		super(id, model, LocalTime.class);
+
+		this.converter = new TextFormatConverter() {
+			
+			@Override
+			public DateTimeFormatter getDateTimeFormatter(Locale locale)
+			{
+				return DateTimeFormatter.ofPattern(timePattern).withLocale(locale);
+			}
+
+			@Override
+			public String getTextFormat(Locale locale)
+			{
+				return timePattern;
+			}
+		};
+	}
+
+	/**
+	 * Construct with a pattern.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param pattern
+	 *            the pattern to use
+	 */
+	public LocalTimeTextField(String id, String datePattern)
+	{
+		this(id, null, datePattern);
+	}
+
+	/**
+	 * Construct with a style.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param model
+	 *            the model
+	 * @param timeStyle
+	 *            the style to use
+	 */
+	public LocalTimeTextField(String id, IModel<LocalTime> model, FormatStyle timeStyle)
+	{
+		super(id, model, LocalTime.class);
+
+		this.converter = new TextFormatConverter() {
+			
+			@Override
+			public DateTimeFormatter getDateTimeFormatter(Locale locale)
+			{
+				return DateTimeFormatter.ofLocalizedTime(timeStyle).withLocale(locale);
+			}
+
+			@Override
+			public String getTextFormat(Locale locale)
+			{
+				return DateTimeFormatterBuilder.getLocalizedDateTimePattern(null, timeStyle, IsoChronology.INSTANCE, locale);
+			}
+		};
+	}
+
+
+	/**
+	 * Construct with a style.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param timeStyle
+	 *            the style to use
+	 */
+	public LocalTimeTextField(String id, FormatStyle timeStyle)
+	{
+		this(id, null, timeStyle);
+	}
+
+	/**
+	 * @return The specialized converter.
+	 * @see org.apache.wicket.Component#createConverter(java.lang.Class)
+	 */
+	@Override
+	protected IConverter<?> createConverter(Class<?> clazz)
+	{
+		if (LocalTime.class.isAssignableFrom(clazz))
+		{
+			return converter;
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider#getTextFormat()
+	 */
+	@Override
+	public final String getTextFormat()
+	{
+		return converter.getTextFormat(getLocale());
+	}
+
+	private abstract class TextFormatConverter extends LocalTimeConverter {
+		
+		public abstract String getTextFormat(Locale locale);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternDateConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternDateConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternDateConverter.java
deleted file mode 100644
index 54ea179..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternDateConverter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.text.SimpleDateFormat;
-import java.time.format.DateTimeFormatter;
-import java.util.Locale;
-
-import org.apache.wicket.util.lang.Args;
-
-
-/**
- * Date converter that uses javax.time and can be configured to take the time zone difference between
- * clients and server into account. This converter is hard coded to use the provided custom date
- * pattern, no matter what current locale is used. See {@link SimpleDateFormat} for available
- * patterns.
- * <p>
- * This converter is especially suited on a per-component base.
- * </p>
- * 
- * @see SimpleDateFormat
- * @see StyleDateConverter
- * @see org.apache.wicket.extensions.markup.html.form.DateTextField
- * @see java.time.LocalDate
- * @see DateTimeFormatter
- * 
- * @author eelcohillenius
- */
-public class PatternDateConverter extends LocalDateConverter
-{
-
-	private static final long serialVersionUID = 1L;
-
-	/** pattern to use. */
-	private final String datePattern;
-
-	/**
-	 * Construct.
-	 * 
-	 * @param datePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @throws IllegalArgumentException
-	 *             in case the date pattern is null
-	 */
-	public PatternDateConverter(String datePattern)
-	{
-		super();
-		this.datePattern = Args.notNull(datePattern, "datePattern");
-	}
-
-	/**
-	 * Gets the optional date pattern.
-	 * 
-	 * @return datePattern
-	 */
-	@Override
-	public final String getPattern(Locale locale)
-	{
-		return datePattern;
-	}
-
-	/**
-	 * @return formatter The formatter for the current conversion
-	 */
-	@Override
-	public DateTimeFormatter getFormat(Locale locale)
-	{
-		return DateTimeFormatter.ofPattern(datePattern).withLocale(locale);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternTimeConverter.java
deleted file mode 100644
index 021f500..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternTimeConverter.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.text.SimpleDateFormat;
-import java.time.format.DateTimeFormatter;
-import java.util.Locale;
-
-import org.apache.wicket.util.lang.Args;
-
-
-/**
- * Date converter that uses javax.time and can be configured to take the time zone difference between
- * clients and server into account. This converter is hard coded to use the provided custom date
- * pattern, no matter what current locale is used. See {@link SimpleDateFormat} for available
- * patterns.
- * <p>
- * This converter is especially suited on a per-component base.
- * </p>
- * 
- * @see SimpleDateFormat
- * @see StyleDateConverter
- * @see org.apache.wicket.extensions.markup.html.form.DateTextField
- * @see java.time.LocalTime
- * @see DateTimeFormatter
- * 
- * @author eelcohillenius
- */
-public class PatternTimeConverter extends LocalTimeConverter
-{
-
-	private static final long serialVersionUID = 1L;
-
-	/** pattern to use. */
-	private final String timePattern;
-
-	/**
-	 * Construct.
-	 * 
-	 * @param timePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @throws IllegalArgumentException
-	 *             in case the date pattern is null
-	 */
-	public PatternTimeConverter(String timePattern)
-	{
-		super();
-		this.timePattern = Args.notNull(timePattern, "timePattern");
-	}
-
-	/**
-	 * Gets the optional date pattern.
-	 * 
-	 * @return datePattern
-	 */
-	@Override
-	public final String getPattern(Locale locale)
-	{
-		return timePattern;
-	}
-
-	/**
-	 * @return formatter The formatter for the current conversion
-	 */
-	@Override
-	public DateTimeFormatter getFormat(Locale locale)
-	{
-		return DateTimeFormatter.ofPattern(timePattern).withLocale(locale);
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/0a4b5f2e/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternZonedDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternZonedDateTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternZonedDateTimeConverter.java
deleted file mode 100644
index c432d90..0000000
--- a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/PatternZonedDateTimeConverter.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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.wicket.extensions.markup.html.form.datetime;
-
-import java.text.SimpleDateFormat;
-import java.time.format.DateTimeFormatter;
-import java.util.Locale;
-
-import org.apache.wicket.util.lang.Args;
-
-
-/**
- * Date converter that uses javax.time and can be configured to take the time zone difference between
- * clients and server into account. This converter is hard coded to use the provided custom date
- * pattern, no matter what current locale is used. See {@link SimpleDateFormat} for available
- * patterns.
- * <p>
- * This converter is especially suited on a per-component base.
- * </p>
- * 
- * @see SimpleDateFormat
- * @see StyleZonedDateTimeConverter
- * @see org.apache.wicket.extensions.markup.html.form.DateTextField
- * @see java.time.ZonedDateTime
- * @see DateTimeFormatter
- * @see java.time.ZoneId
- * 
- * @author eelcohillenius
- */
-public class PatternZonedDateTimeConverter extends ZonedDateTimeConverter
-{
-
-	private static final long serialVersionUID = 1L;
-
-	/** pattern to use. */
-	private final String datePattern;
-
-	/**
-	 * Construct.
-	 * </p>
-	 * When applyTimeZoneDifference is true, the current time is applied on the parsed date, and the
-	 * date will be corrected for the time zone difference between the server and the client. For
-	 * instance, if I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9
-	 * hours ahead. So, if I'm inputting say 12/24 at a couple of hours before midnight, at the
-	 * server it is already 12/25. If this boolean is true, it will be transformed to 12/25, while
-	 * the client sees 12/24.
-	 * </p>
-	 * 
-	 * @param datePattern
-	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
-	 *            patterns.
-	 * @param applyTimeZoneDifference
-	 *            whether to apply the difference in time zones between client and server
-	 * @throws IllegalArgumentException
-	 *             in case the date pattern is null
-	 */
-	public PatternZonedDateTimeConverter(String datePattern, boolean applyTimeZoneDifference)
-	{
-
-		super(applyTimeZoneDifference);
-		this.datePattern = Args.notNull(datePattern, "datePattern");
-	}
-
-	/**
-	 * Gets the optional date pattern.
-	 * 
-	 * @return datePattern
-	 */
-	@Override
-	public final String getPattern(Locale locale)
-	{
-		return datePattern;
-	}
-
-	/**
-	 * @return formatter The formatter for the current conversion
-	 */
-	@Override
-	public DateTimeFormatter getFormat(Locale locale)
-	{
-		return DateTimeFormatter.ofPattern(datePattern).withLocale(locale);
-	}
-}


[14/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
deleted file mode 100644
index 6b09e7a..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.java
+++ /dev/null
@@ -1,890 +0,0 @@
-/*
- * 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.wicket.extensions.yui.calendar;
-
-import java.text.DateFormatSymbols;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.wicket.Application;
-import org.apache.wicket.Component;
-import org.apache.wicket.WicketRuntimeException;
-import org.apache.wicket.ajax.AjaxEventBehavior;
-import org.apache.wicket.behavior.Behavior;
-import org.apache.wicket.core.request.handler.IPartialPageRequestHandler;
-import org.apache.wicket.datetime.markup.html.form.DateTextField;
-import org.apache.wicket.extensions.yui.YuiLib;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
-import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
-import org.apache.wicket.request.Response;
-import org.apache.wicket.request.cycle.RequestCycle;
-import org.apache.wicket.request.handler.resource.ResourceReferenceRequestHandler;
-import org.apache.wicket.request.resource.JavaScriptResourceReference;
-import org.apache.wicket.request.resource.PackageResourceReference;
-import org.apache.wicket.request.resource.ResourceReference;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.convert.converter.DateConverter;
-import org.apache.wicket.util.lang.Objects;
-import org.apache.wicket.util.string.Strings;
-import org.apache.wicket.util.template.PackageTextTemplate;
-import org.apache.wicket.util.template.TextTemplate;
-import org.joda.time.DateTime;
-
-/**
- * Pops up a YUI calendar component so that the user can select a date. On selection, the date is
- * set in the component it is coupled to, after which the popup is closed again. This behavior can
- * only be used with components that either implement {@link ITextFormatProvider} or that use
- * {@link DateConverter} configured with an instance of {@link SimpleDateFormat} (like Wicket's
- * default configuration has).<br/>
- * 
- * To use, simply add a new instance to your component, which would typically a TextField, like
- * {@link DateTextField}.<br/>
- * 
- * The CalendarNavigator can be configured by overriding {@link #configure(java.util.Map, org.apache.wicket.markup.head.IHeaderResponse, java.util.Map)} and setting the
- * property or by returning <code>true</code> for {@link #enableMonthYearSelection()}.
- * 
- * @see <a
- *      href="http://developer.yahoo.com/yui/calendar/">http://developer.yahoo.com/yui/calendar/</a>
- * 
- * @author eelcohillenius
- */
-public class DatePicker extends Behavior
-{
-
-	/**
-	 * Exception thrown when the bound component does not produce a format this date picker can work
-	 * with.
-	 */
-	private static final class UnableToDetermineFormatException extends WicketRuntimeException
-	{
-		private static final long serialVersionUID = 1L;
-
-		public UnableToDetermineFormatException()
-		{
-			super("This behavior can only be added to components that either implement " +
-				ITextFormatProvider.class.getName() +
-				" AND produce a non-null format, or that use" +
-				" converters that this DatePicker can use to determine" +
-				" the pattern being used. Alternatively, you can extend " +
-				" the DatePicker and override getDatePattern to provide your own.");
-		}
-	}
-
-	/**
-	 * Format to be used when configuring YUI calendar. Can be used when using the
-	 * &quot;selected&quot; property.
-	 */
-	// See wicket-1988: SimpleDateFormat is not thread safe. Do not use static final
-	// See wicket-2525: SimpleDateFormat consumes a lot of memory
-	public static String FORMAT_DATE = "MM/dd/yyyy";
-
-	/**
-	 * For specifying which page (month/year) to show in the calendar, use this format for the date.
-	 * This is to be used together with the property &quot;pagedate&quot;
-	 */
-	// See wicket-1988: SimpleDateFormat is not thread safe. Do not use static final
-	// See wicket-2525: SimpleDateFormat consumes a lot of memory
-	public static String FORMAT_PAGEDATE = "MM/yyyy";
-
-	private static final ResourceReference YUI = new JavaScriptResourceReference(YuiLib.class, "");
-
-	private static final ResourceReference WICKET_DATE = new JavaScriptResourceReference(
-		DatePicker.class, "wicket-date.js");
-
-	private static final long serialVersionUID = 1L;
-
-	/** The target component. */
-	private Component component;
-
-	private boolean showOnFieldClick = false;
-
-	/**
-	 * A setting that decides whether to close the date picker when the user clicks somewhere else
-	 * on the document.
-	 */
-	private boolean autoHide = false;
-
-	/**
-	 *  The string to use for the close button label.
-	 */
-	private String closeLabel = "";
-
-	/**
-	 * Construct.
-	 */
-	public DatePicker()
-	{
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public void bind(final Component component)
-	{
-		this.component = component;
-		checkComponentProvidesDateFormat(component);
-		component.setOutputMarkupId(true);
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public void afterRender(final Component component)
-	{
-		super.afterRender(component);
-
-		// Append the span and img icon right after the rendering of the
-		// component. Not as pretty as working with a panel etc, but works
-		// for behaviors and is more efficient
-		Response response = component.getResponse();
-		response.write("\n<span class=\"yui-skin-sam\">&nbsp;<span style=\"");
-
-		if (renderOnLoad())
-		{
-			response.write("display:block;");
-		}
-		else
-		{
-			response.write("display:none;");
-			response.write("position:absolute;");
-		}
-
-		response.write("z-index: 99999;\" id=\"");
-		response.write(getEscapedComponentMarkupId());
-		response.write("Dp\"></span><img style=\"");
-		response.write(getIconStyle());
-		response.write("\" id=\"");
-		response.write(getIconId());
-		response.write("\" src=\"");
-		CharSequence iconUrl = getIconUrl();
-		response.write(Strings.escapeMarkup(iconUrl != null ? iconUrl.toString() : ""));
-		response.write("\" alt=\"");
-		CharSequence alt = getIconAltText();
-		response.write(Strings.escapeMarkup((alt != null) ? alt.toString() : ""));
-		response.write("\" title=\"");
-		CharSequence title = getIconTitle();
-		response.write(Strings.escapeMarkup((title != null) ? title.toString() : ""));
-		response.write("\"/>");
-
-		if (renderOnLoad())
-		{
-			response.write("<br style=\"clear:left;\"/>");
-		}
-		response.write("</span>");
-	}
-
-	/**
-	 * Controls whether or not datepicker will contribute YUI libraries to the page as part of its
-	 * rendering lifecycle.
-	 * 
-	 * There may be cases when the user wants to use their own version of YUI contribution code, in
-	 * those cases this method should be overridden to return <code>false</code>.
-	 * 
-	 * @return a flag whether to contribute YUI libraries to the page. {@code true} by default.
-	 */
-	protected boolean includeYUILibraries()
-	{
-		return true;
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public void renderHead(Component component, IHeaderResponse response)
-	{
-		super.renderHead(component, response);
-
-		if (includeYUILibraries())
-		{
-			YuiLib.load(response);
-		}
-
-		renderHeadInit(response);
-
-		// variables for the initialization script
-		Map<String, Object> variables = new HashMap<>();
-		String widgetId = getEscapedComponentMarkupId();
-		variables.put("componentId", getComponentMarkupId());
-		variables.put("widgetId", widgetId);
-		variables.put("datePattern", getDatePattern());
-		variables.put("fireChangeEvent", notifyComponentOnDateSelected());
-		variables.put("alignWithIcon", alignWithIcon());
-		variables.put("hideOnSelect", hideOnSelect());
-		variables.put("showOnFieldClick", showOnFieldClick());
-		variables.put("autoHide", autoHide());
-		variables.put("closeLabel", closeLabel());
-
-		String script = getAdditionalJavaScript();
-		if (script != null)
-		{
-			variables.put("additionalJavascript",
-				Strings.replaceAll(script, "${calendar}", "YAHOO.wicket." + widgetId + "DpJs"));
-		}
-
-		// print out the initialization properties
-		Map<String, Object> p = new LinkedHashMap<>();
-		configure(p, response, variables);
-		if (!p.containsKey("navigator") && enableMonthYearSelection())
-		{
-			p.put("navigator", Boolean.TRUE);
-		}
-
-		if (enableMonthYearSelection() && p.containsKey("pages") &&
-			Objects.longValue(p.get("pages")) > 1)
-		{
-			throw new IllegalStateException(
-				"You cannot use a CalendarGroup with month/year selection!");
-		}
-
-		// ${calendarInit}
-		StringBuilder calendarInit = new StringBuilder();
-		appendMapping(p, calendarInit);
-		variables.put("calendarInit", calendarInit.toString());
-
-		// render initialization script with the variables interpolated
-		TextTemplate datePickerJs = new PackageTextTemplate(DatePicker.class, "DatePicker.js");
-		datePickerJs.interpolate(variables);
-		response.render(OnDomReadyHeaderItem.forScript(datePickerJs.asString()));
-
-		// remove previously generated markup (see onRendered) via javascript in
-		// ajax requests to not render the yui calendar multiple times
-		component.getRequestCycle().find(IPartialPageRequestHandler.class).ifPresent(target -> {
-			String escapedComponentMarkupId = getEscapedComponentMarkupId();
-			String javascript = "var e = Wicket.$('" + escapedComponentMarkupId + "Dp" +
-				"'); if (e != null && typeof(e.parentNode) != 'undefined' && " +
-				"typeof(e.parentNode.parentNode != 'undefined')) {" +
-				"e.parentNode.parentNode.removeChild(e.parentNode);" + "YAHOO.wicket." +
-				escapedComponentMarkupId + "DpJs.destroy(); delete YAHOO.wicket." +
-				escapedComponentMarkupId + "DpJs;}";
-
-			target.prependJavaScript(javascript);
-		});
-	}
-
-	/**
-	 * Renders yui & wicket calendar js module loading. It is done only once per page.
-	 * 
-	 * @param response
-	 *            header response
-	 */
-	protected void renderHeadInit(IHeaderResponse response)
-	{
-		String key = "DatePickerInit.js";
-		if (response.wasRendered(key))
-		{
-			return;
-		}
-
-		// variables for YUILoader
-		Map<String, Object> variables = new HashMap<>();
-		variables.put("basePath",
-			Strings.stripJSessionId(RequestCycle.get().urlFor(YUI, null).toString()) + "/");
-		variables.put("Wicket.DateTimeInit.DatePath", RequestCycle.get().urlFor(WICKET_DATE, null));
-
-		if (Application.get().usesDevelopmentConfig())
-		{
-			variables.put("filter", "filter: \"RAW\",");
-			variables.put("allowRollup", false);
-		}
-		else
-		{
-			variables.put("filter", "");
-			variables.put("allowRollup", true);
-		}
-
-		TextTemplate template = new PackageTextTemplate(DatePicker.class, key);
-		response.render(OnDomReadyHeaderItem.forScript(template.asString(variables)));
-
-		response.markRendered(key);
-	}
-
-	/**
-	 * Check that this behavior can get a date format out of the component it is coupled to. It
-	 * checks whether {@link #getDatePattern()} produces a non-null value. If that method returns
-	 * null, and exception will be thrown
-	 * 
-	 * @param component
-	 *            the component this behavior is being coupled to
-	 * @throws UnableToDetermineFormatException
-	 *             if this date picker is unable to determine a format.
-	 */
-	private void checkComponentProvidesDateFormat(final Component component)
-	{
-		if (getDatePattern() == null)
-		{
-			throw new UnableToDetermineFormatException();
-		}
-	}
-
-	/**
-	 * Set widget property if the array is null and has a length greater than 0.
-	 * 
-	 * @param widgetProperties
-	 * @param key
-	 * @param array
-	 */
-	private void setWidgetProperty(final Map<String, Object> widgetProperties, final String key,
-		final String[] array)
-	{
-		if (array != null && array.length > 0)
-		{
-			widgetProperties.put(key, array);
-		}
-	}
-
-	/**
-	 * Whether to position the date picker relative to the trigger icon.
-	 * 
-	 * @return If true, the date picker is aligned with the left position of the icon, and with the
-	 *         top right under. If false, the date picker will skip positioning and will let you do
-	 *         the positioning yourself. Returns true by default.
-	 */
-	protected boolean alignWithIcon()
-	{
-		return true;
-	}
-
-	/**
-	 * Gives overriding classes the option of adding (or even changing/ removing) configuration
-	 * properties for the javascript widget. See <a
-	 * href="http://developer.yahoo.com/yui/calendar/">the widget's documentation</a> for the
-	 * available options. If you want to override/ remove properties, you should call
-	 * super.configure(properties) first. If you don't call that, be aware that you will have to
-	 * call {@link #localize(java.util.Map, org.apache.wicket.markup.head.IHeaderResponse, java.util.Map)} manually if you like localized strings to be added.
-	 * 
-	 * @param widgetProperties
-	 *            the current widget properties
-	 * @param response
-	 *            the header response
-	 * @param initVariables
-	 *            variables passed to the Wicket.DateTime.init() js method
-	 */
-	protected void configure(final Map<String, Object> widgetProperties,
-		final IHeaderResponse response, final Map<String, Object> initVariables)
-	{
-		widgetProperties.put("close", true);
-
-		// localize date fields
-		localize(widgetProperties, response, initVariables);
-
-		Object modelObject = component.getDefaultModelObject();
-		// null and cast check
-		if (modelObject instanceof Date)
-		{
-			Date date = (Date)modelObject;
-			widgetProperties.put("selected", new SimpleDateFormat(FORMAT_DATE).format(date));
-			widgetProperties.put("pagedate", new SimpleDateFormat(FORMAT_PAGEDATE).format(date));
-		}
-	}
-
-	/**
-	 * Filter all empty elements (workaround for {@link DateFormatSymbols} returning arrays with
-	 * empty elements).
-	 * 
-	 * @param stringArray
-	 *            array to filter
-	 * @return filtered array (without null or empty string elements)
-	 */
-	protected final String[] filterEmpty(String[] stringArray)
-	{
-		if (stringArray == null)
-		{
-			return null;
-		}
-
-		List<String> list = new ArrayList<>(stringArray.length);
-		for (String string : stringArray)
-		{
-			if (!Strings.isEmpty(string))
-			{
-				list.add(string);
-			}
-		}
-		return list.toArray(new String[list.size()]);
-	}
-
-	/**
-	 * Gets the id of the component that the calendar widget will get attached to.
-	 * 
-	 * @return The DOM id of the component
-	 */
-	protected final String getComponentMarkupId()
-	{
-		return component.getMarkupId();
-	}
-
-	/**
-	 * Gets the date pattern to use for putting selected values in the coupled component.
-	 * 
-	 * @return The date pattern
-	 */
-	protected String getDatePattern()
-	{
-		String format = null;
-		if (component instanceof ITextFormatProvider)
-		{
-			format = ((ITextFormatProvider)component).getTextFormat();
-			// it is possible that components implement ITextFormatProvider but
-			// don't provide a format
-		}
-
-		if (format == null)
-		{
-			IConverter<?> converter = component.getConverter(DateTime.class);
-			if (!(converter instanceof DateConverter))
-			{
-				converter = component.getConverter(Date.class);
-			}
-			format = ((SimpleDateFormat)((DateConverter)converter).getDateFormat(component.getLocale())).toPattern();
-		}
-
-		return format;
-	}
-
-	/**
-	 * Gets the escaped DOM id that the calendar widget will get attached to. All non word
-	 * characters (\W) will be removed from the string.
-	 * 
-	 * @return The DOM id of the calendar widget - same as the component's markup id + 'Dp'}
-	 */
-	protected final String getEscapedComponentMarkupId()
-	{
-		return component.getMarkupId().replaceAll("\\W", "");
-	}
-
-	/**
-	 * Gets the id of the icon that triggers the popup.
-	 * 
-	 * @return The id of the icon
-	 */
-	protected final String getIconId()
-	{
-		return getEscapedComponentMarkupId() + "Icon";
-	}
-
-	/**
-	 * Gets the style of the icon that triggers the popup.
-	 * 
-	 * @return The style of the icon, e.g. 'cursor: point' etc.
-	 */
-	protected String getIconStyle()
-	{
-		return "cursor: pointer; border: none;";
-	}
-
-	/**
-	 * Gets the title attribute of the datepicker icon
-	 * 
-	 * @return text
-	 */
-	protected CharSequence getIconTitle()
-	{
-		return "";
-	}
-
-	/**
-	 * Gets the icon alt text for the datepicker icon
-	 * 
-	 * @return text
-	 */
-	protected CharSequence getIconAltText()
-	{
-		return "";
-	}
-
-	/**
-	 * Gets the url for the popup button. Users can override to provide their own icon URL.
-	 * 
-	 * @return the url to use for the popup button/ icon
-	 */
-	protected CharSequence getIconUrl()
-	{
-		return RequestCycle.get().urlFor(
-			new ResourceReferenceRequestHandler(new PackageResourceReference(DatePicker.class,
-				"icon1.gif")));
-	}
-
-	/**
-	 * Gets the locale that should be used to configure this widget.
-	 * 
-	 * @return By default the locale of the bound component.
-	 */
-	protected Locale getLocale()
-	{
-		return component.getLocale();
-	}
-
-	/**
-	 * Configure the localized strings for the datepicker widget. This implementation uses
-	 * {@link DateFormatSymbols} and some slight string manipulation to get the strings for months
-	 * and week days. Also, the first week day is set according to the {@link Locale} returned by
-	 * {@link #getLocale()}. It should work well for most locales.
-	 * <p>
-	 * This method is called from {@link #configure(java.util.Map, org.apache.wicket.markup.head.IHeaderResponse, java.util.Map)} and can be overridden if
-	 * you want to customize setting up the localized strings but are happy with the rest of
-	 * {@link #configure(java.util.Map, org.apache.wicket.markup.head.IHeaderResponse, java.util.Map)}'s behavior. Note that you can call (overridable)
-	 * method {@link #getLocale()} to get the locale that should be used for setting up the widget.
-	 * </p>
-	 * <p>
-	 * See YUI Calendar's <a href="http://developer.yahoo.com/yui/examples/calendar/germany/1.html">
-	 * German</a> and <a
-	 * href="http://developer.yahoo.com/yui/examples/calendar/japan/1.html">Japanese</a> examples
-	 * for more info.
-	 * </p>
-	 * 
-	 * @param widgetProperties
-	 *            the current widget properties
-	 * @param response
-	 *            the header response
-	 * @param initVariables
-	 *            variables passed to the Wicket.DateTime.init() js method
-	 */
-	protected void localize(Map<String, Object> widgetProperties, IHeaderResponse response,
-		Map<String, Object> initVariables)
-	{
-		Locale locale = getLocale();
-		String key = "Wicket.DateTimeInit.CalendarI18n[\"" + locale.toString() + "\"]";
-		initVariables.put("i18n", key);
-
-		if (response.wasRendered(key))
-		{
-			return;
-		}
-
-		DateFormatSymbols dfSymbols = DateFormatSymbols.getInstance(locale);
-		if (dfSymbols == null)
-		{
-			dfSymbols = new DateFormatSymbols(locale);
-		}
-
-		Map<String, Object> i18nVariables = new LinkedHashMap<>();
-		setWidgetProperty(i18nVariables, "MONTHS_SHORT", filterEmpty(dfSymbols.getShortMonths()));
-		setWidgetProperty(i18nVariables, "MONTHS_LONG", filterEmpty(dfSymbols.getMonths()));
-		setWidgetProperty(i18nVariables, "WEEKDAYS_MEDIUM",
-			filterEmpty(dfSymbols.getShortWeekdays()));
-		setWidgetProperty(i18nVariables, "WEEKDAYS_LONG", filterEmpty(dfSymbols.getWeekdays()));
-
-		i18nVariables.put("START_WEEKDAY", getFirstDayOfWeek(locale));
-
-		if (Locale.SIMPLIFIED_CHINESE.equals(locale) || Locale.TRADITIONAL_CHINESE.equals(locale))
-		{
-			setWidgetProperty(i18nVariables, "WEEKDAYS_1CHAR",
-				filterEmpty(substring(dfSymbols.getShortWeekdays(), 2, 1)));
-			i18nVariables.put("WEEKDAYS_SHORT",
-				filterEmpty(substring(dfSymbols.getShortWeekdays(), 2, 1)));
-		}
-		else
-		{
-			setWidgetProperty(i18nVariables, "WEEKDAYS_1CHAR",
-				filterEmpty(substring(dfSymbols.getShortWeekdays(), 0, 1)));
-			setWidgetProperty(i18nVariables, "WEEKDAYS_SHORT",
-				filterEmpty(substring(dfSymbols.getShortWeekdays(), 0, 2)));
-		}
-
-		StringBuilder i18n = new StringBuilder(key);
-		i18n.append('=');
-		appendMapping(i18nVariables, i18n);
-		i18n.append(';');
-
-		response.render(OnDomReadyHeaderItem.forScript(i18n.toString()));
-
-		response.wasRendered(key);
-	}
-
-	/**
-	  * Gets the first day of week of a given locale.
-	  *
-	  * @return By default the first day of week accordingly to Calendar class.
-	  */
-	protected int getFirstDayOfWeek(Locale locale)
-	{
-		return Calendar.getInstance(locale).getFirstDayOfWeek() - 1;
-	}
-
-	/**
-	 * Whether to notify the associated component when a date is selected. Notifying is done by
-	 * calling the associated component's onchange JavaScript event handler. You can for instance
-	 * attach an {@link AjaxEventBehavior} to that component to get a call back to the server. The
-	 * default is true.
-	 * 
-	 * @return if true, notifies the associated component when a date is selected
-	 */
-	protected boolean notifyComponentOnDateSelected()
-	{
-		return true;
-	}
-
-	/**
-	 * Makes a copy of the provided array and for each element copy the substring 0..len to the new
-	 * array
-	 * 
-	 * @param array
-	 *            array to copy from
-	 * @param len
-	 *            size of substring for each element to copy
-	 * @return copy of the array filled with substrings.
-	 */
-	protected final String[] substring(final String[] array, final int len)
-	{
-		return substring(array, 0, len);
-	}
-
-	/**
-	 * Makes a copy of the provided array and for each element copy the substring 0..len to the new
-	 * array
-	 * 
-	 * @param array
-	 *            array to copy from
-	 * @param start
-	 *            start position of the substring
-	 * @param len
-	 *            size of substring for each element to copy
-	 * @return copy of the array filled with substrings.
-	 */
-	protected final String[] substring(final String[] array, final int start, final int len)
-	{
-		if (array != null)
-		{
-			String[] copy = new String[array.length];
-			for (int i = 0; i < array.length; i++)
-			{
-				String el = array[i];
-				if (el != null)
-				{
-					if (el.length() > (start + len))
-					{
-						copy[i] = el.substring(start, start + len);
-					}
-					else
-					{
-						copy[i] = el;
-					}
-				}
-			}
-			return copy;
-		}
-		return null;
-	}
-
-	/**
-	 * Indicates whether plain text is rendered or two select boxes are used to allow direct
-	 * selection of month and year.
-	 * 
-	 * @return <code>true</code> if select boxes should be rendered to allow month and year
-	 *         selection.<br/>
-	 *         <code>false</code> to render just plain text.
-	 */
-	protected boolean enableMonthYearSelection()
-	{
-		return false;
-	}
-
-	/**
-	 * Indicates whether the calendar should be hidden after a date was selected.
-	 * 
-	 * @return <code>true</code> (default) if the calendar should be hidden after the date selection <br/>
-	 *         <code>false</code> if the calendar should remain visible after the date selection.
-	 */
-	protected boolean hideOnSelect()
-	{
-		return true;
-	}
-
-	/**
-	 * Indicates whether the calendar should be shown when corresponding text input is clicked.
-	 * 
-	 * @return <code>true</code> <br/>
-	 *         <code>false</code> (default)
-	 */
-	protected boolean showOnFieldClick()
-	{
-		return showOnFieldClick;
-	}
-
-	/**
-	 * @param show
-	 *            a flag indicating whether to show the picker on click event
-	 * @return {@code this} instance to be able to chain calls
-	 * @see {@link #showOnFieldClick()}
-	 */
-	public DatePicker setShowOnFieldClick(boolean show)
-	{
-		showOnFieldClick = show;
-		return this;
-	}
-
-
-	/**
-	 * Indicates whether the calendar should be hidden when the user clicks on an area of the
-	 * document outside of the dialog.
-	 * 
-	 * @return <code>true</code> <br/>
-	 *         <code>false</code> (default)
-	 */
-	protected boolean autoHide()
-	{
-		return autoHide;
-	}
-
-	/**
-	 * @param autoHide
-	 *            a flag indicating whether to hide the picker on click event
-	 * @return {@code this} instance to be able to chain calls
-	 * @see {@link #autoHide()}
-	 */
-	public DatePicker setAutoHide(boolean autoHide)
-	{
-		this.autoHide = autoHide;
-		return this;
-	}
-
-	/**
-	 * The string to use for the close button label.
-	 *
-	 * @return label
-	 */
-	protected String closeLabel()
-	{
-		return closeLabel;
-	}
-
-	/**
-	 * @param closeLabel
-	 *            The string to use for the close button label.
-	 */
-	public void setCloseLabel(String closeLabel)
-	{
-		this.closeLabel = closeLabel;
-	}
-
-	/**
-	 * Indicates whether the calendar should be rendered after it has been loaded.
-	 * 
-	 * @return <code>true</code> if the calendar should be rendered after it has been loaded.<br/>
-	 *         <code>false</code> (default) if it's initially hidden.
-	 */
-	protected boolean renderOnLoad()
-	{
-		return false;
-	}
-
-	/**
-	 * Override this method to further customize the YUI Calendar with additional JavaScript code.
-	 * The code returned by this method is executed right after the Calendar has been constructed
-	 * and initialized. To refer to the actual Calendar DOM object, use <code>${calendar}</code> in
-	 * your code.<br/>
-	 * See <a href="http://developer.yahoo.com/yui/calendar/">the widget's documentation</a> for
-	 * more information about the YUI Calendar.<br/>
-	 * Example:
-	 * 
-	 * <pre>
-	 * protected String getAdditionalJavaScript()
-	 * {
-	 * 	return &quot;${calendar}.addRenderer(\&quot;10/3\&quot;, ${calendar}.renderCellStyleHighlight1);&quot;;
-	 * }
-	 * </pre>
-	 * 
-	 * @return a String containing additional JavaScript code
-	 */
-	protected String getAdditionalJavaScript()
-	{
-		return "";
-	}
-
-	/**
-	 * {@inheritDoc}
-	 */
-	@Override
-	public boolean isEnabled(final Component component)
-	{
-		return component.isEnabledInHierarchy();
-	}
-
-	/**
-	 * 
-	 * @param map
-	 *            the key-value pairs to be serialized
-	 * @param json
-	 *            the buffer holding the constructed json
-	 */
-	private void appendMapping(final Map<String, Object> map, final StringBuilder json)
-	{
-		json.append('{');
-		for (Iterator<Entry<String, Object>> i = map.entrySet().iterator(); i.hasNext();)
-		{
-			Entry<String, Object> entry = i.next();
-			json.append(entry.getKey());
-			Object value = entry.getValue();
-			if (value instanceof CharSequence)
-			{
-				json.append(":\"");
-				json.append(Strings.toEscapedUnicode(value.toString()));
-				json.append('"');
-			}
-			else if (value instanceof CharSequence[])
-			{
-				json.append(":[");
-				CharSequence[] valueArray = (CharSequence[])value;
-				for (int j = 0; j < valueArray.length; j++)
-				{
-					CharSequence tmpValue = valueArray[j];
-					if (j > 0)
-					{
-						json.append(',');
-					}
-					if (tmpValue != null)
-					{
-						json.append('"');
-						json.append(Strings.toEscapedUnicode(tmpValue.toString()));
-						json.append('"');
-					}
-				}
-				json.append(']');
-			}
-			else if (value instanceof Map)
-			{
-				json.append(':');
-				@SuppressWarnings("unchecked")
-				Map<String, Object> nmap = (Map<String, Object>)value;
-				appendMapping(nmap, json);
-			}
-			else
-			{
-				json.append(':');
-				json.append(Strings.toEscapedUnicode(String.valueOf(value)));
-			}
-			if (i.hasNext())
-			{
-				json.append(',');
-			}
-		}
-		json.append('}');
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.js
deleted file mode 100644
index e40e0c2..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePicker.js
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * 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.
- */
-Wicket.DateTimeInit.CalendarAdd(function() {
-	Wicket.DateTime.init2("${widgetId}", "${componentId}", ${calendarInit}, "${datePattern}",
-			${alignWithIcon}, ${fireChangeEvent}, ${hideOnSelect}, ${showOnFieldClick}, ${i18n}, ${autoHide}, "${closeLabel}");
-	${additionalJavascript}
-});

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePickerInit.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePickerInit.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePickerInit.js
deleted file mode 100644
index 61b4056..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DatePickerInit.js
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * 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.
- */
-if (typeof(Wicket) === 'undefined') {
-	window.Wicket = {};
-}
-if (typeof(Wicket.DateTimeInit) === 'undefined') {
-	Wicket.DateTimeInit = {};
-}
-
-Wicket.DateTimeInit.CalendarInits = [];
-Wicket.DateTimeInit.CalendarInitFinished = false;
-Wicket.DateTimeInit.CalendarI18n = {};
-Wicket.DateTimeInit.CalendarAdd = function(initFn) {
-	if (Wicket.DateTimeInit.CalendarInitFinished) {
-		// when a DatePicker is added via ajax, the loader is already finished, so
-		// we call the init function directly.
-		initFn();
-	} else {
-		// when page is rendered, all calendar components will be initialized after
-		// the required js libraries have been loaded.
-		Wicket.DateTimeInit.CalendarInits.push(initFn);
-	}
-};
-
-Wicket.DateTimeInit.YuiLoader = new YAHOO.util.YUILoader({
-	base: "${basePath}",
-	${filter}
-	allowRollup: ${allowRollup},
-	require: ["wicket-date"],
-	onSuccess: function() {
-		Wicket.DateTimeInit.CalendarInitFinished = true;
-		while (Wicket.DateTimeInit.CalendarInits.length > 0) {
-			Wicket.DateTimeInit.CalendarInits.pop()();
-		}
-	}
-});
-Wicket.DateTimeInit.YuiLoader.addModule({
-	name: "wicket-date",
-	type: "js",
-	requires: ["calendar"],
-	fullpath: "${Wicket.DateTimeInit.DatePath}"
-});
-Wicket.DateTimeInit.YuiLoader.insert();

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.html
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.html b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.html
deleted file mode 100644
index c714db3..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-   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.
--->
-<wicket:panel xmlns:wicket="http://wicket.apache.org">
-  <span style="white-space: nowrap;">
-    <input type="text" wicket:id="date" size="12" />
-  	<input type="text" wicket:id="hours" size="2" maxlength="2" />
-   	<span wicket:id="hoursSeparator">&#160;:</span>
-    <input type="text" wicket:id="minutes" size="2" maxlength="2" />
-    <select wicket:id="amOrPmChoice"></select>
-  </span>
-</wicket:panel>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.java b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.java
deleted file mode 100644
index ecab7b6..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/DateTimeField.java
+++ /dev/null
@@ -1,616 +0,0 @@
-/*
- * 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.wicket.extensions.yui.calendar;
-
-import java.text.DecimalFormat;
-import java.text.NumberFormat;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Locale;
-import java.util.Map;
-import java.util.TimeZone;
-
-import org.apache.wicket.Session;
-import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
-import org.apache.wicket.core.request.ClientInfo;
-import org.apache.wicket.datetime.markup.html.form.DateTextField;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.html.WebMarkupContainer;
-import org.apache.wicket.markup.html.form.DropDownChoice;
-import org.apache.wicket.markup.html.form.FormComponentPanel;
-import org.apache.wicket.markup.html.form.TextField;
-import org.apache.wicket.model.IModel;
-import org.apache.wicket.model.Model;
-import org.apache.wicket.model.PropertyModel;
-import org.apache.wicket.protocol.http.request.WebClientInfo;
-import org.apache.wicket.util.convert.IConverter;
-import org.apache.wicket.util.convert.converter.IntegerConverter;
-import org.apache.wicket.validation.validator.RangeValidator;
-import org.joda.time.DateTimeFieldType;
-import org.joda.time.DateTimeZone;
-import org.joda.time.MutableDateTime;
-import org.joda.time.format.DateTimeFormat;
-
-/**
- * Works on a {@link java.util.Date} object. Displays a date field and a {@link DatePicker}, a field
- * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field
- * depends on the time format of this {@link DateTimeField}'s {@link Locale}, as does the visibility
- * of the AM/PM field (see {@link DateTimeField#use12HourFormat}).
- * <p>
- * <strong>Ajaxifying the DateTimeField</strong>: If you want to update a DateTimeField with an
- * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained
- * {@link DateTextField} by overriding {@link #newDateTextField(String, PropertyModel)} and calling
- * {@link #processInput()}:
- * 
- * <pre>{@code
- *  DateTimeField dateTimeField = new DateTimeField(...) {
- *    protected DateTextField newDateTextField(String id, PropertyModel<Date> dateFieldModel)
- *    {
- *      DateTextField dateField = super.newDateTextField(id, dateFieldModel);     
- *      dateField.add(new AjaxFormComponentUpdatingBehavior("change") {
- *        protected void onUpdate(AjaxRequestTarget target) {
- *          processInput(); // let DateTimeField process input too
- *
- *          ...
- *        }
- *      });
- *      return recorder;
- *    }
- *  }
- * }</pre>
- * 
- * @author eelcohillenius
- * @see DateField for a variant with just the date field and date picker
- */
-public class DateTimeField extends FormComponentPanel<Date>
-{
-	/**
-	 * Enumerated type for different ways of handling the render part of requests.
-	 */
-	public static enum AM_PM {
-		/** */
-		AM("AM"),
-
-		/** */
-		PM("PM");
-
-		/** */
-		private String value;
-
-		AM_PM(final String name)
-		{
-			value = name;
-		}
-
-		/**
-		 * @see java.lang.Enum#toString()
-		 */
-		@Override
-		public String toString()
-		{
-			return value;
-		}
-	}
-
-	private static final long serialVersionUID = 1L;
-
-	// Component-IDs
-	protected static final String DATE = "date";
-	protected static final String HOURS = "hours";
-	protected static final String MINUTES = "minutes";
-	protected static final String AM_OR_PM_CHOICE = "amOrPmChoice";
-
-	// PropertyModel string to access getAmOrPm
-	private static final String AM_OR_PM = "amOrPm";
-
-	private static final IConverter<Integer> MINUTES_CONVERTER = new IntegerConverter() {
-		protected NumberFormat newNumberFormat(Locale locale) {
-			return new DecimalFormat("00");
-		}
-	};
-
-	// The dropdown list for AM/PM and it's associated model object
-	private DropDownChoice<AM_PM> amOrPmChoice;
-	private AM_PM amOrPm = AM_PM.AM;
-
-	// The date TextField and it's associated model object
-	// Note that any time information in date will be ignored
-	private DateTextField dateField;
-	private Date date;
-
-	// The TextField for "hours" and it's associated model object
-	private TextField<Integer> hoursField;
-	private Integer hours;
-
-	// The TextField for "minutes" and it's associated model object
-	private TextField<Integer> minutesField;
-	private Integer minutes;
-
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 */
-	public DateTimeField(final String id)
-	{
-		this(id, null);
-	}
-
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 * @param model
-	 */
-	public DateTimeField(final String id, final IModel<Date> model)
-	{
-		super(id, model);
-
-		// Sets the type that will be used when updating the model for this component.
-		setType(Date.class);
-
-		// Create and add the date TextField
-		PropertyModel<Date> dateFieldModel = new PropertyModel<>(this, DATE);
-		add(dateField = newDateTextField(DATE, dateFieldModel));
-
-		// Add a date picker to the date TextField
-		dateField.add(newDatePicker());
-
-		// Create and add the "hours" TextField
-		add(hoursField = newHoursTextField(HOURS, new PropertyModel<Integer>(this, HOURS),
-			Integer.class));
-
-		// Create and add the "minutes" TextField
-		add(minutesField = newMinutesTextField(MINUTES, new PropertyModel<Integer>(this, MINUTES),
-			Integer.class));
-
-		// Create and add the "AM/PM" Listbox
-		add(amOrPmChoice = new DropDownChoice<AM_PM>(AM_OR_PM_CHOICE, new PropertyModel<AM_PM>(
-			this, AM_OR_PM), Arrays.asList(AM_PM.values())));
-
-		add(new WebMarkupContainer("hoursSeparator")
-		{
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			public boolean isVisible()
-			{
-				return minutesField.determineVisibility();
-			}
-		});
-	}
-
-	/**
-	 * create a new {@link TextField} instance for hours to be added to this panel.
-	 * 
-	 * @param id
-	 *            the component id
-	 * @param model
-	 *            model that should be used by the {@link TextField}
-	 * @param type
-	 *            the type of the text field
-	 * @return a new text field instance
-	 */
-	protected TextField<Integer> newHoursTextField(final String id, IModel<Integer> model, Class<Integer> type) {
-		TextField<Integer> hoursTextField = new TextField<>(id, model, type);
-		hoursTextField.add(getMaximumHours() == 24 ? RangeValidator.range(0, 23) : RangeValidator
-			.range(1, 12));
-		hoursTextField.setLabel(new Model<>(HOURS));
-		return hoursTextField;
-	}
-
-	/**
-	 * create a new {@link TextField} instance for minutes to be added to this panel.
-	 *
-	 * @param id
-	 *            the component id
-	 * @param model
-	 *            model that should be used by the {@link TextField}
-	 * @param type
-	 *            the type of the text field
-	 * @return a new text field instance
-	 */
-	protected TextField<Integer> newMinutesTextField(final String id, IModel<Integer> model,
-		Class<Integer> type)
-	{
-		TextField<Integer> minutesField = new TextField<Integer>(id, model, type)
-		{
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			protected IConverter<?> createConverter(Class<?> type)
-			{
-				if (Integer.class.isAssignableFrom(type))
-				{
-					return MINUTES_CONVERTER;
-				}
-				return null;
-			}
-		};
-		minutesField.add(new RangeValidator<>(0, 59));
-		minutesField.setLabel(new Model<>(MINUTES));
-		return minutesField;
-	}
-
-	/**
-	 * 
-	 * @return The date TextField
-	 */
-	protected final DateTextField getDateTextField()
-	{
-		return dateField;
-	}
-
-	/**
-	 * Gets the amOrPm model object of the drop down choice.
-	 * 
-	 * @return amOrPm
-	 * 
-	 * @deprecated valid during rendering only
-	 */
-	public final AM_PM getAmOrPm()
-	{
-		return amOrPm;
-	}
-
-	/**
-	 * Gets the date model object for the date TextField. Any associated time information will be
-	 * ignored.
-	 * 
-	 * @return date
-	 * 
-	 * @deprecated valid during rendering only
-	 */
-	public final Date getDate()
-	{
-		return date;
-	}
-
-	/**
-	 * Gets the hours model object for the TextField
-	 * 
-	 * @return hours
-	 * 
-	 * @deprecated valid during rendering only
-	 */
-	public final Integer getHours()
-	{
-		return hours;
-	}
-
-	/**
-	 * Gets the minutes model object for the TextField
-	 * 
-	 * @return minutes
-	 * 
-	 * @deprecated valid during rendering only
-	 */
-	public final Integer getMinutes()
-	{
-		return minutes;
-	}
-
-	/**
-	 * Gives overriding classes the option of adding (or even changing/ removing) configuration
-	 * properties for the javascript widget. See <a
-	 * href="http://developer.yahoo.com/yui/calendar/">the widget's documentation</a> for the
-	 * available options. If you want to override/ remove properties, you should call
-	 * super.configure(properties) first. If you don't call that, be aware that you will have to
-	 * call {@link #configure(java.util.Map)} manually if you like localized strings to be added.
-	 * 
-	 * @param widgetProperties
-	 *            the current widget properties
-	 */
-	protected void configure(Map<String, Object> widgetProperties)
-	{
-	}
-
-	@Override
-	public String getInput()
-	{
-		// since we override convertInput, we can let this method return a value
-		// that is just suitable for error reporting
-		return dateField.getInput() + ", " + hoursField.getInput() + ":" + minutesField.getInput();
-	}
-
-	/**
-	 * Sets the amOrPm model object associated with the drop down choice.
-	 * 
-	 * @param amOrPm
-	 *            amOrPm
-	 */
-	public final void setAmOrPm(final AM_PM amOrPm)
-	{
-		this.amOrPm = amOrPm;
-	}
-
-	/**
-	 * Sets the date model object associated with the date TextField. It does not affect hours or
-	 * minutes.
-	 * 
-	 * @param date
-	 *            date
-	 */
-	public final void setDate(final Date date)
-	{
-		this.date = date;
-	}
-
-	/**
-	 * Sets hours.
-	 * 
-	 * @param hours
-	 *            hours
-	 */
-	public final void setHours(final Integer hours)
-	{
-		this.hours = hours;
-	}
-
-	/**
-	 * Sets minutes.
-	 * 
-	 * @param minutes
-	 *            minutes
-	 */
-	public final void setMinutes(final Integer minutes)
-	{
-		this.minutes = minutes;
-	}
-
-	/**
-	 * Gets the client's time zone.
-	 * 
-	 * @return The client's time zone or null
-	 */
-	protected TimeZone getClientTimeZone()
-	{
-		ClientInfo info = Session.get().getClientInfo();
-		if (info instanceof WebClientInfo)
-		{
-			return ((WebClientInfo)info).getProperties().getTimeZone();
-		}
-		return null;
-	}
-
-	/**
-	 * Sets the converted input, which is an instance of {@link Date}, possibly null. It combines
-	 * the inputs of the nested date, hours, minutes and am/pm fields and constructs a date from it.
-	 * <p>
-	 * Note that overriding this method is a better option than overriding {@link #updateModel()}
-	 * like the first versions of this class did. The reason for that is that this method can be
-	 * used by form validators without having to depend on the actual model being updated, and this
-	 * method is called by the default implementation of {@link #updateModel()} anyway (so we don't
-	 * have to override that anymore).
-	 */
-	@Override
-	public void convertInput()
-	{
-		try
-		{
-			// Get the converted input values
-			Date dateFieldInput = dateField.getConvertedInput();
-			Integer hoursInput = hoursField.getConvertedInput();
-			Integer minutesInput = minutesField.getConvertedInput();
-			AM_PM amOrPmInput = amOrPmChoice.getConvertedInput();
-
-			if (dateFieldInput == null)
-			{
-				return;
-			}
-
-			// Get year, month and day ignoring any timezone of the Date object
-			Calendar cal = Calendar.getInstance();
-			cal.setTime(dateFieldInput);
-			int year = cal.get(Calendar.YEAR);
-			int month = cal.get(Calendar.MONTH) + 1;
-			int day = cal.get(Calendar.DAY_OF_MONTH);
-			int hours = (hoursInput == null ? 0 : hoursInput % 24);
-			int minutes = (minutesInput == null ? 0 : minutesInput);
-
-			// Use the input to create a date object with proper timezone
-			MutableDateTime date = new MutableDateTime(year, month, day, hours, minutes, 0, 0,
-				DateTimeZone.forTimeZone(getClientTimeZone()));
-
-			// Adjust for halfday if needed
-			if (use12HourFormat())
-			{
-				int halfday = (amOrPmInput == AM_PM.PM ? 1 : 0);
-				date.set(DateTimeFieldType.halfdayOfDay(), halfday);
-				date.set(DateTimeFieldType.hourOfHalfday(), hours % 12);
-			}
-
-			// The date will be in the server's timezone
-			setConvertedInput(newDateInstance(date.getMillis()));
-		}
-		catch (RuntimeException e)
-		{
-			DateTimeField.this.error(e.getMessage());
-			invalid();
-		}
-	}
-
-	/**
-	 * A factory method for the DateTextField's model object.
-	 * 
-	 * @return any specialization of java.util.Date
-	 */
-	protected Date newDateInstance()
-	{
-		return new Date();
-	}
-
-	/**
-	 * A factory method for the DateTextField's model object.
-	 * 
-	 * @param time
-	 *            the time in milliseconds
-	 * @return any specialization of java.util.Date
-	 */
-	protected Date newDateInstance(long time)
-	{
-		return new Date(time);
-	}
-
-	/**
-	 * create a new {@link DateTextField} instance to be added to this panel.
-	 * 
-	 * @param id
-	 *            the component id
-	 * @param dateFieldModel
-	 *            model that should be used by the {@link DateTextField}
-	 * @return a new date text field instance
-	 */
-	protected DateTextField newDateTextField(String id, PropertyModel<Date> dateFieldModel)
-	{
-		return DateTextField.forShortStyle(id, dateFieldModel, false);
-	}
-
-	/**
-	 * @see org.apache.wicket.Component#onBeforeRender()
-	 */
-	@Override
-	protected void onBeforeRender()
-	{
-		dateField.setRequired(isRequired());
-		hoursField.setRequired(isRequired());
-		minutesField.setRequired(isRequired());
-
-		boolean use12HourFormat = use12HourFormat();
-		amOrPmChoice.setVisible(use12HourFormat);
-
-		Date modelObject = (Date)getDefaultModelObject();
-		if (modelObject == null)
-		{
-			date = null;
-			hours = null;
-			minutes = null;
-		}
-		else
-		{
-			MutableDateTime mDate = new MutableDateTime(modelObject);
-			// convert date to the client's time zone if we have that info
-			TimeZone zone = getClientTimeZone();
-			if (zone != null)
-			{
-				mDate.setZone(DateTimeZone.forTimeZone(zone));
-			}
-
-			date = mDate.toDateTime().toLocalDate().toDate();
-
-			if (use12HourFormat)
-			{
-				int hourOfHalfDay = mDate.get(DateTimeFieldType.hourOfHalfday());
-				hours = hourOfHalfDay == 0 ? 12 : hourOfHalfDay;
-			}
-			else
-			{
-				hours = mDate.get(DateTimeFieldType.hourOfDay());
-			}
-
-			amOrPm = (mDate.get(DateTimeFieldType.halfdayOfDay()) == 0) ? AM_PM.AM : AM_PM.PM;
-			minutes = mDate.getMinuteOfHour();
-		}
-
-		super.onBeforeRender();
-	}
-
-	/**
-	 * Change a date in another timezone
-	 * 
-	 * @param date
-	 *            The input date.
-	 * @param zone
-	 *            The target timezone.
-	 * @return A new converted date.
-	 */
-	public static Date changeTimeZone(Date date, TimeZone zone)
-	{
-		Calendar first = Calendar.getInstance(zone);
-		first.setTimeInMillis(date.getTime());
-
-		Calendar output = Calendar.getInstance();
-		output.set(Calendar.YEAR, first.get(Calendar.YEAR));
-		output.set(Calendar.MONTH, first.get(Calendar.MONTH));
-		output.set(Calendar.DAY_OF_MONTH, first.get(Calendar.DAY_OF_MONTH));
-		output.set(Calendar.HOUR_OF_DAY, first.get(Calendar.HOUR_OF_DAY));
-		output.set(Calendar.MINUTE, first.get(Calendar.MINUTE));
-		output.set(Calendar.SECOND, first.get(Calendar.SECOND));
-		output.set(Calendar.MILLISECOND, first.get(Calendar.MILLISECOND));
-
-		return output.getTime();
-	}
-
-	/**
-	 * Checks whether the current {@link Locale} uses the 12h or 24h time format. This method can be
-	 * overridden to e.g. always use 24h format.
-	 * 
-	 * @return true, if the current {@link Locale} uses the 12h format.<br/>
-	 *         false, otherwise
-	 */
-	protected boolean use12HourFormat()
-	{
-		String pattern = DateTimeFormat.patternForStyle("-S", getLocale());
-		return pattern.indexOf('a') != -1 || pattern.indexOf('h') != -1
-			|| pattern.indexOf('K') != -1;
-	}
-
-	/**
-	 * @return either 12 or 24, depending on the hour format of the current {@link Locale}
-	 */
-	private int getMaximumHours()
-	{
-		return getMaximumHours(use12HourFormat());
-	}
-
-	/**
-	 * Convenience method (mainly for optimization purposes), in case {@link #use12HourFormat()} has
-	 * already been stored in a local variable and thus doesn't need to be computed again.
-	 * 
-	 * @param use12HourFormat
-	 *            the hour format to use
-	 * @return either 12 or 24, depending on the parameter <code>use12HourFormat</code>
-	 */
-	private int getMaximumHours(boolean use12HourFormat)
-	{
-		return use12HourFormat ? 12 : 24;
-	}
-
-	/**
-	 * The DatePicker that gets added to the DateTimeField component. Users may override this method
-	 * with a DatePicker of their choice.
-	 * 
-	 * @return a new {@link DatePicker} instance
-	 */
-	protected DatePicker newDatePicker()
-	{
-		return new DatePicker()
-		{
-			private static final long serialVersionUID = 1L;
-
-			@Override
-			protected void configure(final Map<String, Object> widgetProperties,
-				final IHeaderResponse response, final Map<String, Object> initVariables)
-			{
-				super.configure(widgetProperties, response, initVariables);
-
-				DateTimeField.this.configure(widgetProperties);
-			}
-		};
-	}
-}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/TimeField.java
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/TimeField.java b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/TimeField.java
deleted file mode 100644
index 3d98b31..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/TimeField.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * 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.wicket.extensions.yui.calendar;
-
-import java.util.Date;
-import java.util.Locale;
-
-import org.apache.wicket.model.IModel;
-
-/**
- * Works on a {@link java.util.Date} object. Displays a field for hours and a field for minutes, and
- * an AM/PM field. The format (12h/24h) of the hours field depends on the time format of this
- * {@link TimeField}'s {@link Locale}, as does the visibility of the AM/PM field (see
- * {@link TimeField#use12HourFormat}).
- * 
- * @author eelcohillenius
- * @see DateField for a variant with just the date field and date picker
- */
-public class TimeField extends DateTimeField
-{
-	private static final long serialVersionUID = 1L;
-
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 *      the component id
-	 */
-	public TimeField(String id)
-	{
-		this(id, null);
-	}
-
-	/**
-	 * Construct.
-	 * 
-	 * @param id
-	 *      the component id
-	 * @param model
-	 *      the component's model
-	 */
-	public TimeField(String id, IModel<Date> model)
-	{
-		super(id, model);
-
-		getDateTextField().setVisibilityAllowed(false);
-	}
-
-	@Override
-	public void convertInput()
-	{
-		Date modelObject = (Date)getDefaultModelObject();
-		getDateTextField().setConvertedInput(modelObject != null ? modelObject : newDateInstance());
-		super.convertInput();
-	}
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css
deleted file mode 100644
index 3e932f4..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/assets/skins/sam/calendar.css
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-.yui-calcontainer{position:relative;float:left;_overflow:hidden}.yui-calcontainer iframe{position:absolute;border:0;margin:0;padding:0;z-index:0;width:100%;height:100%;left:0;top:0}.yui-calcontainer iframe.fixedsize{width:50em;height:50em;top:-1px;left:-1px}.yui-calcontainer.multi .groupcal{z-index:1;float:left;position:relative}.yui-calcontainer .title{position:relative;z-index:1}.yui-calcontainer .close-icon{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar{position:relative}.yui-calendar .calnavleft{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calnavright{position:absolute;z-index:1;text-indent:-10000em;overflow:hidden}.yui-calendar .calheader{position:relative;width:100%;text-align:center}.yui-calcontainer .yui-cal-nav-mask{position:absolute;z-index:2;margin:0;padding:0;width:100%;height:100%;_width:0;_height:0;left:0;top:0;display:none}.yui-calcontainer .yui-cal-nav{position:absolute;z-index:3;top:0;display:none}.y
 ui-calcontainer .yui-cal-nav .yui-cal-nav-btn{display:-moz-inline-box;display:inline-block}.yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{display:block;*display:inline-block;*overflow:visible;border:0;background-color:transparent;cursor:pointer}.yui-calendar .calbody a:hover{background:inherit}p#clear{clear:left;padding-top:10px}.yui-skin-sam .yui-calcontainer{background-color:#f2f2f2;border:1px solid #808080;padding:10px}.yui-skin-sam .yui-calcontainer.multi{padding:0 5px 0 5px}.yui-skin-sam .yui-calcontainer.multi .groupcal{background-color:transparent;border:0;padding:10px 5px 10px 5px;margin:0}.yui-skin-sam .yui-calcontainer .title{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-bottom:1px solid #ccc;font:100% sans-serif;color:#000;font-weight:bold;height:auto;padding:.4em;margin:0 -10px 10px -10px;top:0;left:0;text-align:left}.yui-skin-sam .yui-calcontainer.multi .title{margin:0 -5px 0 -5px}.yui-skin-sam .yui-calcontainer.withtitle{padding-to
 p:0}.yui-skin-sam .yui-calcontainer .calclose{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -300px;width:25px;height:15px;top:.4em;right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar{border-spacing:0;border-collapse:collapse;font:100% sans-serif;text-align:center;margin:0}.yui-skin-sam .yui-calendar .calhead{background:transparent;border:0;vertical-align:middle;padding:0}.yui-skin-sam .yui-calendar .calheader{background:transparent;font-weight:bold;padding:0 0 .6em 0;text-align:center}.yui-skin-sam .yui-calendar .calheader img{border:0}.yui-skin-sam .yui-calendar .calnavleft{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -450px;width:25px;height:15px;top:0;bottom:0;left:-10px;margin-left:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calnavright{background:url(../../../../assets/skins/sam/sprite.png) no-repeat 0 -500px;width:25px;height:15px;top:0;bottom:0;right:-10px;margin-right:.4em;cursor:pointer}.yui-skin-sam .yui-calendar .calweek
 dayrow{height:2em}.yui-skin-sam .yui-calendar .calweekdayrow th{padding:0;border:0}.yui-skin-sam .yui-calendar .calweekdaycell{color:#000;font-weight:bold;text-align:center;width:2em}.yui-skin-sam .yui-calendar .calfoot{background-color:#f2f2f2}.yui-skin-sam .yui-calendar .calrowhead,.yui-skin-sam .yui-calendar .calrowfoot{color:#a6a6a6;font-size:85%;font-style:normal;font-weight:normal;border:0}.yui-skin-sam .yui-calendar .calrowhead{text-align:right;padding:0 2px 0 0}.yui-skin-sam .yui-calendar .calrowfoot{text-align:left;padding:0 0 0 2px}.yui-skin-sam .yui-calendar td.calcell{border:1px solid #ccc;background:#fff;padding:1px;height:1.6em;line-height:1.6em;text-align:center;white-space:nowrap}.yui-skin-sam .yui-calendar td.calcell a{color:#06c;display:block;height:100%;text-decoration:none}.yui-skin-sam .yui-calendar td.calcell.today{background-color:#000}.yui-skin-sam .yui-calendar td.calcell.today a{background-color:#fff}.yui-skin-sam .yui-calendar td.calcell.oom{background-col
 or:#ccc;color:#a6a6a6;cursor:default}.yui-skin-sam .yui-calendar td.calcell.oom a{color:#a6a6a6}.yui-skin-sam .yui-calendar td.calcell.selected{background-color:#fff;color:#000}.yui-skin-sam .yui-calendar td.calcell.selected a{background-color:#b3d4ff;color:#000}.yui-skin-sam .yui-calendar td.calcell.calcellhover{background-color:#426fd9;color:#fff;cursor:pointer}.yui-skin-sam .yui-calendar td.calcell.calcellhover a{background-color:#426fd9;color:#fff}.yui-skin-sam .yui-calendar td.calcell.previous{color:#e0e0e0}.yui-skin-sam .yui-calendar td.calcell.restricted{text-decoration:line-through}.yui-skin-sam .yui-calendar td.calcell.highlight1{background-color:#cf9}.yui-skin-sam .yui-calendar td.calcell.highlight2{background-color:#9cf}.yui-skin-sam .yui-calendar td.calcell.highlight3{background-color:#fcc}.yui-skin-sam .yui-calendar td.calcell.highlight4{background-color:#cf9}.yui-skin-sam .yui-calendar a.calnav{border:1px solid #f2f2f2;padding:0 4px;text-decoration:none;color:#000;zoom
 :1}.yui-skin-sam .yui-calendar a.calnav:hover{background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;border-color:#a0a0a0;cursor:pointer}.yui-skin-sam .yui-calcontainer .yui-cal-nav-mask{background-color:#000;opacity:.25;filter:alpha(opacity=25)}.yui-skin-sam .yui-calcontainer .yui-cal-nav{font-family:arial,helvetica,clean,sans-serif;font-size:93%;border:1px solid #808080;left:50%;margin-left:-7em;width:14em;padding:0;top:2.5em;background-color:#f2f2f2}.yui-skin-sam .yui-calcontainer.withtitle .yui-cal-nav{top:4.5em}.yui-skin-sam .yui-calcontainer.multi .yui-cal-nav{width:16em;margin-left:-8em}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y,.yui-skin-sam .yui-calcontainer .yui-cal-nav-m,.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{padding:5px 10px 5px 10px}.yui-skin-sam .yui-calcontainer .yui-cal-nav-b{text-align:center}.yui-skin-sam .yui-calcontainer .yui-cal-nav-e{margin-top:5px;padding:5px;background-color:#edf5ff;border-top:1px solid black;display:none}.yui-skin-s
 am .yui-calcontainer .yui-cal-nav label{display:block;font-weight:bold}
-.yui-skin-sam .yui-calcontainer .yui-cal-nav-mc{width:100%;_width:auto}.yui-skin-sam .yui-calcontainer .yui-cal-nav-y input.yui-invalid{background-color:#ffee69;border:1px solid #000}.yui-skin-sam .yui-calcontainer .yui-cal-nav-yc{width:4em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn{border:1px solid #808080;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 0;background-color:#ccc;margin:auto .15em}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn button{padding:0 8px;font-size:93%;line-height:2;*line-height:1.7;min-height:2em;*min-height:auto;color:#000}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default{border:1px solid #304369;background-color:#426fd9;background:url(../../../../assets/skins/sam/sprite.png) repeat-x 0 -1400px}.yui-skin-sam .yui-calcontainer .yui-cal-nav .yui-cal-nav-btn.yui-default button{color:#fff}


[03/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
new file mode 100644
index 0000000..68af251
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeField.java
@@ -0,0 +1,520 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.text.DecimalFormat;
+import java.text.NumberFormat;
+import java.text.SimpleDateFormat;
+import java.time.LocalTime;
+import java.time.chrono.IsoChronology;
+import java.time.format.DateTimeFormatterBuilder;
+import java.time.format.FormatStyle;
+import java.time.temporal.ChronoField;
+import java.util.Arrays;
+import java.util.Locale;
+
+import org.apache.wicket.AttributeModifier;
+import org.apache.wicket.markup.html.WebMarkupContainer;
+import org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider;
+import org.apache.wicket.markup.html.form.DropDownChoice;
+import org.apache.wicket.markup.html.form.FormComponentPanel;
+import org.apache.wicket.markup.html.form.TextField;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.convert.converter.IntegerConverter;
+import org.apache.wicket.util.lang.Args;
+import org.apache.wicket.validation.validator.RangeValidator;
+
+/**
+ * Works on a {@link java.util.Date} object. Displays a field for hours and a field for minutes, and
+ * an AM/PM field. The format (12h/24h) of the hours field depends on the time format of this
+ * {@link TimeField}'s {@link Locale}, as does the visibility of the AM/PM field (see
+ * {@link TimeField#use12HourFormat}).
+ * 
+ * @author eelcohillenius
+ * @see TimeField for a variant with just the date field and date picker
+ */
+public class TimeField extends FormComponentPanel<LocalTime> implements ITextFormatProvider
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Enumerated type for different ways of handling the render part of requests.
+	 */
+	public enum AM_PM {
+		/** */
+		AM("AM"),
+
+		/** */
+		PM("PM");
+
+		private  final String value;
+
+		AM_PM(final String name)
+		{
+			value = name;
+		}
+
+		@Override
+		public String toString()
+		{
+			return value;
+		}
+	}
+	protected static final String HOURS = "hours";
+	protected static final String MINUTES = "minutes";
+	protected static final String AM_OR_PM_CHOICE = "amOrPmChoice";
+
+	private static final IConverter<Integer> MINUTES_CONVERTER = new IntegerConverter() {
+		private static final long serialVersionUID = 1L;
+
+		protected NumberFormat newNumberFormat(Locale locale) {
+			return new DecimalFormat("00");
+		}
+	};
+
+	// The TextField for "hours" and it's associated model object
+	private TextField<Integer> hoursField;
+
+	// The TextField for "minutes" and it's associated model object
+	private TextField<Integer> minutesField;
+
+	// The dropdown list for AM/PM and it's associated model object
+	private DropDownChoice<AM_PM> amOrPmChoice;
+	private LocalTime time = LocalTime.now();
+
+	/**
+	 * Creates a new TimeField defaulting to using a short date pattern
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param model
+	 *            The model
+	 * @param timePattern
+	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
+	 *            patterns.
+	 * @return TimeField
+	 */
+	public static TimeField forTimePattern(String id, IModel<LocalTime> model, String timePattern)
+	{
+		return new TimeField(id, model, new PatternTimeConverter(timePattern));
+	}
+
+	/**
+	 * Creates a new TimeField defaulting to using a short date pattern
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param timePattern
+	 *            The pattern to use. Must be not null. See {@link SimpleDateFormat} for available
+	 *            patterns.
+	 * @return TimeField
+	 */
+	public static TimeField forTimePattern(String id, String timePattern)
+	{
+		return forTimePattern(id, null, timePattern);
+	}
+
+	/**
+	 * Creates a new TimeField using the provided date style.
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param model
+	 *            The model
+	 * @param timeStyle
+	 *            Date style to use. The first character is the date style, and the second character
+	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
+	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
+	 *            character '-'. See {@link org.joda.time.DateTimeFormat#forStyle(String)}.
+	 * @return TimeField
+	 */
+	public static TimeField forTimeStyle(String id, IModel<LocalTime> model, String timeStyle)
+	{
+		return new TimeField(id, model, new StyleTimeConverter(timeStyle));
+	}
+
+	/**
+	 * Creates a new TimeField using the provided date style.
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param timeStyle
+	 *            Date style to use. The first character is the date style, and the second character
+	 *            is the time style. Specify a character of 'S' for short style, 'M' for medium, 'L'
+	 *            for long, and 'F' for full. A date or time may be ommitted by specifying a style
+	 *            character '-'. See {@link org.joda.time.DateTimeFormat#forStyle(String)}.
+	 * @return TimeField
+	 */
+	public static TimeField forTimeStyle(String id, String timeStyle)
+	{
+		return forTimeStyle(id, null, timeStyle);
+	}
+
+	/**
+	 * Creates a new TimeField defaulting to using a short date pattern
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @return TimeField
+	 */
+	public static TimeField forShortStyle(String id)
+	{
+		return forShortStyle(id, null);
+	}
+
+	/**
+	 * Creates a new TimeField defaulting to using a short date pattern
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param model
+	 *            The model
+	 * @return TimeField
+	 */
+	public static TimeField forShortStyle(String id, IModel<LocalTime> model)
+	{
+		return new TimeField(id, model, new StyleTimeConverter());
+	}
+
+	/**
+	 * Creates a new TimeField using the provided converter.
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param converter
+	 *            the date converter
+	 * @return TimeField
+	 */
+	public static TimeField withConverter(String id, LocalTimeConverter converter)
+	{
+		return withConverter(id, null, converter);
+	}
+
+	/**
+	 * Creates a new TimeField using the provided converter.
+	 * 
+	 * @param id
+	 *            The id of the text field
+	 * @param model
+	 *            The model
+	 * @param converter
+	 *            the date converter
+	 * @return TimeField
+	 */
+	public static TimeField withConverter(String id, IModel<LocalTime> model, LocalTimeConverter converter)
+	{
+		return new TimeField(id, model, converter);
+	}
+
+	/**
+	 * The converter for the TextField
+	 */
+	private final LocalTimeConverter converter;
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 *      the component id
+	 */
+	public TimeField(String id, LocalTimeConverter converter)
+	{
+		this(id, null, converter);
+	}
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 *      the component id
+	 * @param model
+	 *      the component's model
+	 */
+	public TimeField(String id, IModel<LocalTime> model, LocalTimeConverter converter)
+	{
+		super(id, model);
+
+		Args.notNull(converter, "converter");
+		this.converter = converter;
+
+		// Sets the type that will be used when updating the model for this component.
+		setType(LocalTime.class);
+
+
+		// Create and add the "hours" TextField
+		add(hoursField = newHoursTextField(HOURS, new HoursModel(), Integer.class));
+
+		// Create and add the "minutes" TextField
+		add(minutesField = newMinutesTextField(MINUTES, new MinutesModel(), Integer.class));
+
+		// Create and add the "AM/PM" Listbox
+		add(amOrPmChoice = new DropDownChoice<>(AM_OR_PM_CHOICE, new AmPmModel(), Arrays.asList(AM_PM.values())));
+
+		add(new WebMarkupContainer("hoursSeparator")
+		{
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			public boolean isVisible()
+			{
+				return minutesField.determineVisibility();
+			}
+		});
+	}
+
+	/**
+	 * create a new {@link TextField} instance for hours to be added to this panel.
+	 * 
+	 * @param id
+	 *            the component id
+	 * @param model
+	 *            model that should be used by the {@link TextField}
+	 * @param type
+	 *            the type of the text field
+	 * @return a new text field instance
+	 */
+	protected TextField<Integer> newHoursTextField(final String id, IModel<Integer> model, Class<Integer> type) {
+		TextField<Integer> hoursTextField = new TextField<Integer>(id, model, type)
+		{
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected String[] getInputTypes()
+			{
+				return new String[] {"number"};
+			}
+		};
+		hoursTextField.add(AttributeModifier.append("min", getMaximumHours() == 24 ? 0 : 1));
+		hoursTextField.add(AttributeModifier.append("max", getMaximumHours() == 24 ? 23 : 12));
+		hoursTextField.add(getMaximumHours() == 24 ? RangeValidator.range(0, 23) : RangeValidator.range(1, 12));
+		hoursTextField.setLabel(new Model<>(HOURS));
+		return hoursTextField;
+	}
+
+	/**
+	 * create a new {@link TextField} instance for minutes to be added to this panel.
+	 *
+	 * @param id
+	 *            the component id
+	 * @param model
+	 *            model that should be used by the {@link TextField}
+	 * @param type
+	 *            the type of the text field
+	 * @return a new text field instance
+	 */
+	protected TextField<Integer> newMinutesTextField(final String id, IModel<Integer> model,
+		Class<Integer> type)
+	{
+		TextField<Integer> minutesField = new TextField<Integer>(id, model, type)
+		{
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			protected IConverter<?> createConverter(Class<?> type)
+			{
+				if (Integer.class.isAssignableFrom(type))
+				{
+					return MINUTES_CONVERTER;
+				}
+				return null;
+			}
+
+			@Override
+			protected String[] getInputTypes()
+			{
+				return new String[] {"number"};
+			}
+		};
+		minutesField.add(AttributeModifier.append("min", 0));
+		minutesField.add(AttributeModifier.append("max", 59));
+		minutesField.add(new RangeValidator<>(0, 59));
+		minutesField.setLabel(new Model<>(MINUTES));
+		return minutesField;
+	}
+
+	@Override
+	public String getInput()
+	{
+		// since we override convertInput, we can let this method return a value
+		// that is just suitable for error reporting
+		return String.format("%s:%s", hoursField.getInput(), minutesField.getInput());
+	}
+
+	@Override
+	public void convertInput()
+	{
+		Integer hours = hoursField.getConvertedInput();
+		Integer minutes = minutesField.getConvertedInput();
+		AM_PM amOrPmInput = amOrPmChoice.getConvertedInput();
+
+		LocalTime localTime = null;
+		if (hours != null && minutes != null)
+		{
+			// Use the input to create a LocalTime object
+			localTime = LocalTime.of(hours, minutes);
+
+			// Adjust for halfday if needed
+			if (use12HourFormat())
+			{
+				int halfday = (amOrPmInput == AM_PM.PM ? 1 : 0);
+				localTime = localTime.with(ChronoField.AMPM_OF_DAY, halfday);
+			}
+		}
+		setConvertedInput(localTime);
+	}
+
+	@Override
+	protected void onBeforeRender() {
+		hoursField.setRequired(isRequired());
+		minutesField.setRequired(isRequired());
+
+		boolean use12HourFormat = use12HourFormat();
+		amOrPmChoice.setVisible(use12HourFormat);
+		super.onBeforeRender();
+	}
+
+	/**
+	 * Checks whether the current {@link Locale} uses the 12h or 24h time format. This method can be
+	 * overridden to e.g. always use 24h format.
+	 * 
+	 * @return true, if the current {@link Locale} uses the 12h format.<br/>
+	 *         false, otherwise
+	 */
+	protected boolean use12HourFormat()
+	{
+		String pattern = DateTimeFormatterBuilder.getLocalizedDateTimePattern(null, FormatStyle.SHORT, IsoChronology.INSTANCE, getLocale());
+		return pattern.indexOf('a') != -1 || pattern.indexOf('h') != -1 || pattern.indexOf('K') != -1;
+	}
+
+	/**
+	 * @return either 12 or 24, depending on the hour format of the current {@link Locale}
+	 */
+	private int getMaximumHours()
+	{
+		return getMaximumHours(use12HourFormat());
+	}
+
+	/**
+	 * Convenience method (mainly for optimization purposes), in case {@link #use12HourFormat()} has
+	 * already been stored in a local variable and thus doesn't need to be computed again.
+	 * 
+	 * @param use12HourFormat
+	 *            the hour format to use
+	 * @return either 12 or 24, depending on the parameter <code>use12HourFormat</code>
+	 */
+	private int getMaximumHours(boolean use12HourFormat)
+	{
+		return use12HourFormat ? 12 : 24;
+	}
+
+	protected class HoursModel implements IModel<Integer>
+	{
+		private static final long serialVersionUID = 1L;
+
+		@Override
+		public Integer getObject()
+		{
+			LocalTime t = TimeField.this.getModelObject();
+			if (t == null)
+			{
+				return null;
+			}
+			return getMaximumHours() == 24 ? t.getHour() : t.get(ChronoField.CLOCK_HOUR_OF_AMPM);
+		}
+
+		@Override
+		public void setObject(Integer hour)
+		{
+			time = time.with(getMaximumHours() == 24 ? ChronoField.HOUR_OF_DAY : ChronoField.CLOCK_HOUR_OF_AMPM, hour);
+		}
+	}
+
+	protected class MinutesModel implements IModel<Integer>
+	{
+		private static final long serialVersionUID = 1L;
+
+		@Override
+		public Integer getObject()
+		{
+			LocalTime t = TimeField.this.getModelObject();
+			return t == null ? null : t.getMinute();
+		}
+
+		@Override
+		public void setObject(Integer minute)
+		{
+			time = time.with(ChronoField.MINUTE_OF_HOUR, minute);
+		}
+	}
+
+	protected class AmPmModel implements IModel<AM_PM>
+	{
+		private static final long serialVersionUID = 1L;
+
+		@Override
+		public AM_PM getObject()
+		{
+			LocalTime t = TimeField.this.getModelObject();
+			int i = t == null ? 0 : t.get(ChronoField.AMPM_OF_DAY);
+			return i == 0 ? AM_PM.AM : AM_PM.PM;
+		}
+
+		@Override
+		public void setObject(AM_PM amPm)
+		{
+			int i = AM_PM.AM == amPm ? 0 : 1;
+			time = time.with(ChronoField.AMPM_OF_DAY, i);
+		}
+	}
+
+	/**
+	 * @return The specialized converter.
+	 * @see org.apache.wicket.Component#createConverter(java.lang.Class)
+	 */
+	@Override
+	protected IConverter<?> createConverter(Class<?> clazz)
+	{
+		if (LocalTime.class.isAssignableFrom(clazz))
+		{
+			return converter;
+		}
+		return null;
+	}
+
+	/**
+	 * @see org.apache.wicket.markup.html.form.AbstractTextComponent.ITextFormatProvider#getTextFormat()
+	 */
+	@Override
+	public final String getTextFormat()
+	{
+		return converter.getPattern(getLocale());
+	}
+
+	public static FormatStyle parseFormatStyle(char style)
+	{
+		switch (style)
+		{
+			case 'M':
+				return FormatStyle.MEDIUM;
+			case 'S':
+			default:
+				return FormatStyle.SHORT;
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeConverter.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeConverter.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeConverter.java
new file mode 100644
index 0000000..9286f2e
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeConverter.java
@@ -0,0 +1,203 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import org.apache.wicket.Session;
+import org.apache.wicket.core.request.ClientInfo;
+import org.apache.wicket.protocol.http.request.WebClientInfo;
+import org.apache.wicket.util.convert.ConversionException;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.lang.Args;
+import org.apache.wicket.util.string.Strings;
+
+
+/**
+ * Base class for javax.time based date converters. It contains the logic to parse and format,
+ * optionally taking the time zone difference between clients and the server into account.
+ * <p>
+ * Converters of this class are best suited for per-component use.
+ * </p>
+ * 
+ * @author eelcohillenius
+ */
+public abstract class ZonedDateTimeConverter implements IConverter<ZonedDateTime>
+{
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Whether to apply the time zone difference when interpreting dates.
+	 */
+	private final boolean applyTimeZoneDifference;
+
+	/**
+	 * Construct. <p> When applyTimeZoneDifference is true, the current time is applied on the
+	 * parsed date, and the date will be corrected for the time zone difference between the server
+	 * and the client. For instance, if I'm in Seattle and the server I'm working on is in
+	 * Amsterdam, the server is 9 hours ahead. So, if I'm inputting say 12/24 at a couple of hours
+	 * before midnight, at the server it is already 12/25. If this boolean is true, it will be
+	 * transformed to 12/25, while the client sees 12/24. </p>
+	 * 
+	 * @param applyTimeZoneDifference
+	 *            whether to apply the difference in time zones between client and server
+	 */
+	public ZonedDateTimeConverter(boolean applyTimeZoneDifference)
+	{
+		this.applyTimeZoneDifference = applyTimeZoneDifference;
+	}
+
+	public ZonedDateTime convertToObject(String value, DateTimeFormatter format, Locale locale) {
+		try
+		{
+			// parse date retaining the time of the submission
+			return ZonedDateTime.parse(value, format);
+		}
+		catch (RuntimeException e)
+		{
+			throw newConversionException(e, locale);
+		}
+	}
+
+	@Override
+	public ZonedDateTime convertToObject(String value, Locale locale)
+	{
+		if (Strings.isEmpty(value))
+		{
+			return null;
+		}
+
+		DateTimeFormatter format = getFormat(locale);
+		Args.notNull(format, "format");
+
+		if (applyTimeZoneDifference)
+		{
+			ZoneId zoneId = getClientTimeZone();
+
+			// set time zone for client
+			format = format.withZone(getTimeZone());
+
+			ZonedDateTime dateTime = convertToObject(value, format, locale);
+			// apply the server time zone to the parsed value
+			if (zoneId != null)
+			{
+				dateTime = dateTime.withZoneSameInstant(zoneId);
+			}
+
+			return dateTime;
+		}
+		else
+		{
+			return convertToObject(value, format, locale);
+		}
+	}
+
+	/**
+	 * Creates a ConversionException and sets additional context information to it.
+	 *
+	 * @param cause
+	 *            - {@link RuntimeException} cause
+	 * @param locale
+	 *            - {@link Locale} used to set 'format' variable with localized pattern
+	 * @return {@link ConversionException}
+	 */
+	ConversionException newConversionException(RuntimeException cause, Locale locale)
+	{
+		return new ConversionException(cause)
+				.setVariable("format", getPattern(locale));
+	}
+
+	@Override
+	public String convertToString(ZonedDateTime dateTime, Locale locale)
+	{
+		DateTimeFormatter format = getFormat(locale);
+
+		if (applyTimeZoneDifference)
+		{
+			ZoneId zoneId = getClientTimeZone();
+			if (zoneId != null)
+			{
+				// apply time zone to formatter
+				format = format.withZone(zoneId);
+			}
+		}
+		return format.format(dateTime);
+	}
+
+	/**
+	 * Gets whether to apply the time zone difference when interpreting dates.
+	 * 
+	 * </p> When true, the current time is applied on the parsed date, and the date will be
+	 * corrected for the time zone difference between the server and the client. For instance, if
+	 * I'm in Seattle and the server I'm working on is in Amsterdam, the server is 9 hours ahead.
+	 * So, if I'm inputting say 12/24 at a couple of hours before midnight, at the server it is
+	 * already 12/25. If this boolean is true, it will be transformed to 12/25, while the client
+	 * sees 12/24. </p>
+	 * 
+	 * @return whether to apply the difference in time zones between client and server
+	 */
+	public final boolean getApplyTimeZoneDifference()
+	{
+		return applyTimeZoneDifference;
+	}
+
+	/**
+	 * @param locale
+	 *            The locale used to convert the value
+	 * @return Gets the pattern that is used for printing and parsing
+	 */
+	public abstract String getPattern(Locale locale);
+
+	/**
+	 * Gets the client's time zone.
+	 * 
+	 * @return The client's time zone or null
+	 */
+	protected ZoneId getClientTimeZone()
+	{
+		ClientInfo info = Session.get().getClientInfo();
+		if (info instanceof WebClientInfo)
+		{
+			TimeZone timeZone = ((WebClientInfo) info).getProperties().getTimeZone();
+			return timeZone.toZoneId();
+		}
+		return null;
+	}
+
+	/**
+	 * @param locale
+	 *            The locale used to convert the value
+	 * 
+	 * @return formatter The formatter for the current conversion
+	 */
+	public abstract DateTimeFormatter getFormat(Locale locale);
+
+	/**
+	 * Gets the server time zone. Override this method if you want to fix to a certain time zone,
+	 * regardless of what actual time zone the server is in.
+	 * 
+	 * @return The server time zone
+	 */
+	protected ZoneId getTimeZone()
+	{
+		return ZoneId.systemDefault();
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
new file mode 100644
index 0000000..a6814f8
--- /dev/null
+++ b/wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/datetime/ZonedDateTimeField.java
@@ -0,0 +1,154 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.temporal.ChronoField;
+import java.util.Locale;
+import java.util.TimeZone;
+
+import org.apache.wicket.Session;
+import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
+import org.apache.wicket.core.request.ClientInfo;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.protocol.http.request.WebClientInfo;
+
+/**
+ * Works on a {@link java.time.ZonedDateTimeTime} object. Displays a date field and a DatePicker, a field
+ * for hours and a field for minutes, and an AM/PM field. The format (12h/24h) of the hours field
+ * depends on the time format of this {@link ZonedDateTimeField}'s {@link Locale}, as does the visibility
+ * of the AM/PM field (see {@link ZonedDateTimeField#use12HourFormat}).
+ * <p>
+ * <strong>Ajaxifying the DateTimeField</strong>: If you want to update a DateTimeField with an
+ * {@link AjaxFormComponentUpdatingBehavior}, you have to attach it to the contained
+ * {@link DateField} by overriding {@link #newDateTextField(String, IModel)} and calling
+ * {@link #processInput()}:
+ * 
+ * <pre>{@code
+ *  DateTimeField dateTimeField = new DateTimeField(...) {
+ *    protected DateTextField newDateTextField(String id, PropertyModel<Date> dateFieldModel)
+ *    {
+ *      DateTextField dateField = super.newDateTextField(id, dateFieldModel);     
+ *      dateField.add(new AjaxFormComponentUpdatingBehavior("change") {
+ *        protected void onUpdate(AjaxRequestTarget target) {
+ *          processInput(); // let DateTimeField process input too
+ *
+ *          ...
+ *        }
+ *      });
+ *      return recorder;
+ *    }
+ *  }
+ * }</pre>
+ * 
+ * @author eelcohillenius
+ * @see DateField for a variant with just the date field and date picker
+ */
+public class ZonedDateTimeField extends AbstractDateTimeField<ZonedDateTime>
+{
+	private static final long serialVersionUID = 1L;
+
+	private ZonedDateTime dateTime = ZonedDateTime.now();
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 */
+	public ZonedDateTimeField(final String id)
+	{
+		this(id, null);
+	}
+
+	/**
+	 * Construct.
+	 * 
+	 * @param id
+	 * @param model
+	 */
+	public ZonedDateTimeField(final String id, final IModel<ZonedDateTime> model)
+	{
+		super(id, model);
+
+		// Sets the type that will be used when updating the model for this component.
+		setType(ZonedDateTime.class);
+	}
+
+	/**
+	 * Gets the client's time zone.
+	 * 
+	 * @return The client's time zone or null
+	 */
+	protected ZoneId getClientTimeZone()
+	{
+		ClientInfo info = Session.get().getClientInfo();
+		if (info instanceof WebClientInfo)
+		{
+			TimeZone timeZone = ((WebClientInfo) info).getProperties().getTimeZone();
+			return timeZone != null ? timeZone.toZoneId() : null;
+		}
+		return null;
+	}
+
+	ZonedDateTime performConvert(LocalDate date, LocalTime time) {
+		return ZonedDateTime.of(date, time, getClientTimeZone());
+	}
+
+	@Override
+	void prepareObject() {
+		ZonedDateTime modelObject = getModelObject();
+		if (modelObject == null)
+		{
+			dateTime = null;
+		}
+		else
+		{
+			// convert date to the client's time zone if we have that info
+			ZoneId zone = getClientTimeZone();
+			if (zone != null)
+			{
+				modelObject = modelObject.withZoneSameInstant(zone);
+			}
+		}
+	}
+
+	LocalDate getLocalDate()
+	{
+		return dateTime.toLocalDate();
+	}
+
+	void setLocalDate(LocalDate date)
+	{
+		dateTime = dateTime.with(ChronoField.YEAR, date.getYear())
+				.with(ChronoField.MONTH_OF_YEAR, date.getMonthValue())
+				.with(ChronoField.DAY_OF_YEAR, date.getDayOfMonth());
+	}
+
+	LocalTime getLocalTime()
+	{
+		return dateTime.toLocalTime();
+	}
+
+	void setLocalTime(LocalTime time)
+	{
+		dateTime = dateTime.with(ChronoField.HOUR_OF_DAY, time.getHour())
+				.with(ChronoField.MINUTE_OF_HOUR, time.getMinute());
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateConverterTest.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateConverterTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateConverterTest.java
new file mode 100644
index 0000000..d590615
--- /dev/null
+++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateConverterTest.java
@@ -0,0 +1,109 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Locale;
+
+import org.apache.wicket.extensions.markup.html.form.datetime.PatternZonedDateTimeConverter;
+import org.apache.wicket.extensions.markup.html.form.datetime.StyleZonedDateTimeConverter;
+import org.apache.wicket.util.convert.ConversionException;
+import org.apache.wicket.util.convert.IConverter;
+import org.apache.wicket.util.convert.converter.CalendarConverter;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Tests for {@link ZonedDateTimeConverter} and subclasses.
+ * 
+ * @author akiraly
+ */
+public class DateConverterTest
+{
+	/**
+	 * WICKET-3598
+	 */
+	@Test
+	public void testLocaleUsed()
+	{
+		Locale locale = Locale.GERMAN;
+
+		StyleZonedDateTimeConverter styleDateConverter = new StyleZonedDateTimeConverter("F-", false);
+		DateTimeFormatter styleFormatter = styleDateConverter.getFormat(locale);
+
+		Assert.assertEquals(locale, styleFormatter.getLocale());
+
+		PatternZonedDateTimeConverter patternDateConverter = new PatternZonedDateTimeConverter(
+			styleDateConverter.getPattern(locale), false);
+		DateTimeFormatter patternFormatter = patternDateConverter.getFormat(locale);
+
+		Assert.assertEquals(locale, patternFormatter.getLocale());
+
+		Calendar now = Calendar.getInstance();
+
+		ZonedDateTime zNow = ZonedDateTime.ofInstant(now.toInstant(), ZoneId.systemDefault());
+		String actual = styleDateConverter.convertToString(zNow, locale);
+		String expected = patternDateConverter.convertToString(zNow, locale);
+
+		Assert.assertEquals(expected, actual);
+	}
+
+	/**
+	 * WICKET-3658
+	 */
+	@Test
+	public void testCalendarConverterWithDelegate()
+	{
+		Locale locale = Locale.GERMAN;
+
+		Calendar input = Calendar.getInstance(locale);
+		input.clear();
+		input.set(2011, Calendar.MAY, 7);
+
+		final StyleZonedDateTimeConverter styleDateConverter = new StyleZonedDateTimeConverter("F-", false);
+
+		CalendarConverter calendarConverter = new CalendarConverter(new IConverter<Date>()
+		{
+			private static final long serialVersionUID = 1L;
+
+			@Override
+			public Date convertToObject(String value, Locale locale) throws ConversionException {
+				ZonedDateTime zd = styleDateConverter.convertToObject(value, locale);
+				return zd == null ? null : Date.from(zd.toInstant());
+			}
+
+			@Override
+			public String convertToString(Date value, Locale locale) {
+				return styleDateConverter.convertToString(ZonedDateTime.ofInstant(value.toInstant(), ZoneId.systemDefault()), locale);
+			}
+			
+		});
+
+		String expected = styleDateConverter.convertToString(ZonedDateTime.ofInstant(input.toInstant(), ZoneId.systemDefault()), locale);
+		String actual = calendarConverter.convertToString(input, locale);
+
+		Assert.assertEquals(expected, actual);
+
+		Calendar revert = calendarConverter.convertToObject(actual, locale);
+
+		Assert.assertEquals(input, revert);
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
new file mode 100644
index 0000000..3b167e4
--- /dev/null
+++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
@@ -0,0 +1,172 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalTime;
+import java.util.Locale;
+
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.markup.IMarkupResourceStreamProvider;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.markup.html.form.FormComponent;
+import org.apache.wicket.model.IModel;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.resource.IResourceStream;
+import org.apache.wicket.util.resource.StringResourceStream;
+import org.apache.wicket.util.tester.FormTester;
+import org.apache.wicket.util.tester.WicketTestCase;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+public class DateTimeFieldTest extends WicketTestCase {
+	@Rule
+	public ExpectedException expectedException = ExpectedException.none();
+
+	@Test
+	public void timeNullTest() {
+		TestTimePage page = new TestTimePage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.submit();
+		assertNull(page.field.getModelObject());
+	}
+
+	@Test
+	public void timeNullHoursTest() {
+		TestTimePage page = new TestTimePage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field:minutes", "8");
+		formTester.submit();
+		assertNull(page.field.getModelObject());
+	}
+
+	@Test
+	public void timeNullMinutesTest() {
+		TestTimePage page = new TestTimePage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field:hours", "8");
+		formTester.submit();
+		assertNull(page.field.getModelObject());
+	}
+
+	@Test
+	public void timeNotNullTest() {
+		TestTimePage page = new TestTimePage(LocalTime.of(6, 15));
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field:hours", "8");
+		formTester.submit();
+		LocalTime t = page.field.getModelObject();
+		assertNotNull(t);
+		assertEquals(8, t.getHour());
+		assertEquals(15, t.getMinute());
+	}
+
+	@Test
+	public void dateNullTest() {
+		TestDatePage page = new TestDatePage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.submit();
+		assertNull(page.field.getModelObject());
+	}
+
+	@Test
+	public void dateNotNullTest() {
+		LocalDate date = LocalDate.of(2017, 02, 13);
+		TestDatePage page = new TestDatePage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field", new StyleDateConverter("F").convertToString(date, Locale.forLanguageTag("en-US")));
+		formTester.submit();
+		LocalDate d = page.field.getModelObject();
+		assertNotNull(d);
+		assertEquals(date, d);
+	}
+
+	public static class TestDatePage extends TestPage<LocalDate>
+	{
+		private static final long serialVersionUID = 1L;
+
+		TestDatePage(LocalDate val)
+		{
+			super(val);
+			tag = "input type=\"text\"";
+		}
+
+		@Override
+		FormComponent<LocalDate> newComponent()
+		{
+			return DateField.forDateStyle("field", model, "F");
+		}
+	}
+
+	public static class TestTimePage extends TestPage<LocalTime>
+	{
+		private static final long serialVersionUID = 1L;
+
+		TestTimePage(LocalTime val)
+		{
+			super(val);
+		}
+
+		@Override
+		FormComponent<LocalTime> newComponent()
+		{
+			return TimeField.forTimeStyle("field", model, "F");
+		}
+	}
+
+	public abstract static class TestPage<T extends Serializable> extends WebPage implements IMarkupResourceStreamProvider
+	{
+		private static final long serialVersionUID = 1L;
+		Form<Void> form;
+		FormComponent<T> field;
+		IModel<T> model = new Model<T>();
+		String tag = "span";
+
+		/** */
+		public TestPage(T val)
+		{
+			add(form = new Form<>("form"));
+			model.setObject(val);
+			form.add(field = newComponent());
+		}
+
+		abstract FormComponent<T> newComponent();
+
+		@Override
+		public IResourceStream getMarkupResourceStream(MarkupContainer container, Class<?> containerClass)
+		{
+			return new StringResourceStream(String.format("<html><body>"
+					+ "<form wicket:id=\"form\"><%s wicket:id=\"field\"/></form></body></html>", tag));
+		}
+
+		@Override
+		protected void onDetach()
+		{
+			super.onDetach();
+			model.detach();
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_1.adoc
----------------------------------------------------------------------
diff --git a/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_1.adoc b/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_1.adoc
index c24e4dd..5dac973 100644
--- a/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_1.adoc
+++ b/wicket-user-guide/src/main/asciidoc/helloWorld/helloWorld_1.adoc
@@ -6,7 +6,6 @@ Wicket is available as a binary package on the main site  http://wicket.apache.o
 | wicket-core | Contains the main classes of the framework, like class _Component_ and _Application_. | wicket-request, wicket-util
 | wicket-request | This module contains the classes involved into web request processing. | wicket-util
 | wicket-util | Contains general-purpose utility classes for functional areas such as I/O, lang, string manipulation, security, etc... | None
-| wicket-datetime | Contains special purpose components designed to work with date and time. | wicket-core
 | wicket-bean-validation | Provides support for JSR 303 standard validation. | wicket-core
 | wicket-devutils | Contains utility classes and components to help developers with tasks such as debugging, class inspection and so on. | wicket-core, wicket-extensions
 |wicket-extensions | Contains a vast set of built-in components to build a rich UI for our web application (Ajax support is part of this module). | wicket-core


[13/20] wicket git commit: WICKET-6105 Decommission wicket-datetime

Posted by sv...@apache.org.
http://git-wip-us.apache.org/repos/asf/wicket/blob/2bb684c1/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar-min.js
----------------------------------------------------------------------
diff --git a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar-min.js b/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar-min.js
deleted file mode 100644
index 223cdcf..0000000
--- a/wicket-datetime/src/main/java/org/apache/wicket/extensions/yui/calendar/calendar-min.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-Copyright (c) 2011, Yahoo! Inc. All rights reserved.
-Code licensed under the BSD License:
-http://developer.yahoo.com/yui/license.html
-version: 2.9.0
-*/
-(function(){YAHOO.util.Config=function(d){if(d){this.init(d);}};var b=YAHOO.lang,c=YAHOO.util.CustomEvent,a=YAHOO.util.Config;a.CONFIG_CHANGED_EVENT="configChanged";a.BOOLEAN_TYPE="boolean";a.prototype={owner:null,queueInProgress:false,config:null,initialConfig:null,eventQueue:null,configChangedEvent:null,init:function(d){this.owner=d;this.configChangedEvent=this.createEvent(a.CONFIG_CHANGED_EVENT);this.configChangedEvent.signature=c.LIST;this.queueInProgress=false;this.config={};this.initialConfig={};this.eventQueue=[];},checkBoolean:function(d){return(typeof d==a.BOOLEAN_TYPE);},checkNumber:function(d){return(!isNaN(d));},fireEvent:function(d,f){var e=this.config[d];if(e&&e.event){e.event.fire(f);}},addProperty:function(e,d){e=e.toLowerCase();this.config[e]=d;d.event=this.createEvent(e,{scope:this.owner});d.event.signature=c.LIST;d.key=e;if(d.handler){d.event.subscribe(d.handler,this.owner);}this.setProperty(e,d.value,true);if(!d.suppressEvent){this.queueProperty(e,d.value);}},get
 Config:function(){var d={},f=this.config,g,e;for(g in f){if(b.hasOwnProperty(f,g)){e=f[g];if(e&&e.event){d[g]=e.value;}}}return d;},getProperty:function(d){var e=this.config[d.toLowerCase()];if(e&&e.event){return e.value;}else{return undefined;}},resetProperty:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event){if(d in this.initialConfig){this.setProperty(d,this.initialConfig[d]);return true;}}else{return false;}},setProperty:function(e,g,d){var f;e=e.toLowerCase();if(this.queueInProgress&&!d){this.queueProperty(e,g);return true;}else{f=this.config[e];if(f&&f.event){if(f.validator&&!f.validator(g)){return false;}else{f.value=g;if(!d){this.fireEvent(e,g);this.configChangedEvent.fire([e,g]);}return true;}}else{return false;}}},queueProperty:function(v,r){v=v.toLowerCase();var u=this.config[v],l=false,k,g,h,j,p,t,f,n,o,d,m,w,e;if(u&&u.event){if(!b.isUndefined(r)&&u.validator&&!u.validator(r)){return false;}else{if(!b.isUndefined(r)){u.value=r;}else{r=u.value;}l=false;k=th
 is.eventQueue.length;for(m=0;m<k;m++){g=this.eventQueue[m];if(g){h=g[0];j=g[1];if(h==v){this.eventQueue[m]=null;this.eventQueue.push([v,(!b.isUndefined(r)?r:j)]);l=true;break;}}}if(!l&&!b.isUndefined(r)){this.eventQueue.push([v,r]);}}if(u.supercedes){p=u.supercedes.length;for(w=0;w<p;w++){t=u.supercedes[w];f=this.eventQueue.length;for(e=0;e<f;e++){n=this.eventQueue[e];if(n){o=n[0];d=n[1];if(o==t.toLowerCase()){this.eventQueue.push([o,d]);this.eventQueue[e]=null;break;}}}}}return true;}else{return false;}},refireEvent:function(d){d=d.toLowerCase();var e=this.config[d];if(e&&e.event&&!b.isUndefined(e.value)){if(this.queueInProgress){this.queueProperty(d);}else{this.fireEvent(d,e.value);}}},applyConfig:function(d,g){var f,e;if(g){e={};for(f in d){if(b.hasOwnProperty(d,f)){e[f.toLowerCase()]=d[f];}}this.initialConfig=e;}for(f in d){if(b.hasOwnProperty(d,f)){this.queueProperty(f,d[f]);}}},refresh:function(){var d;for(d in this.config){if(b.hasOwnProperty(this.config,d)){this.refireEvent(
 d);}}},fireQueue:function(){var e,h,d,g,f;this.queueInProgress=true;for(e=0;e<this.eventQueue.length;e++){h=this.eventQueue[e];if(h){d=h[0];g=h[1];f=this.config[d];f.value=g;this.eventQueue[e]=null;this.fireEvent(d,g);}}this.queueInProgress=false;this.eventQueue=[];},subscribeToConfigEvent:function(d,e,g,h){var f=this.config[d.toLowerCase()];if(f&&f.event){if(!a.alreadySubscribed(f.event,e,g)){f.event.subscribe(e,g,h);}return true;}else{return false;}},unsubscribeFromConfigEvent:function(d,e,g){var f=this.config[d.toLowerCase()];if(f&&f.event){return f.event.unsubscribe(e,g);}else{return false;}},toString:function(){var d="Config";if(this.owner){d+=" ["+this.owner.toString()+"]";}return d;},outputEventQueue:function(){var d="",g,e,f=this.eventQueue.length;for(e=0;e<f;e++){g=this.eventQueue[e];if(g){d+=g[0]+"="+g[1]+", ";}}return d;},destroy:function(){var e=this.config,d,f;for(d in e){if(b.hasOwnProperty(e,d)){f=e[d];f.event.unsubscribeAll();f.event=null;}}this.configChangedEvent.un
 subscribeAll();this.configChangedEvent=null;this.owner=null;this.config=null;this.initialConfig=null;this.eventQueue=null;}};a.alreadySubscribed=function(e,h,j){var f=e.subscribers.length,d,g;if(f>0){g=f-1;do{d=e.subscribers[g];if(d&&d.obj==j&&d.fn==h){return true;}}while(g--);}return false;};YAHOO.lang.augmentProto(a,YAHOO.util.EventProvider);}());YAHOO.widget.DateMath={DAY:"D",WEEK:"W",YEAR:"Y",MONTH:"M",ONE_DAY_MS:1000*60*60*24,WEEK_ONE_JAN_DATE:1,add:function(a,e,c){var g=new Date(a.getTime());switch(e){case this.MONTH:var f=a.getMonth()+c;var b=0;if(f<0){while(f<0){f+=12;b-=1;}}else{if(f>11){while(f>11){f-=12;b+=1;}}}g.setMonth(f);g.setFullYear(a.getFullYear()+b);break;case this.DAY:this._addDays(g,c);break;case this.YEAR:g.setFullYear(a.getFullYear()+c);break;case this.WEEK:this._addDays(g,(c*7));break;}return g;},_addDays:function(e,c){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){if(c<0){for(var b=-128;c<b;c-=b){e.setDate(e.getDate()+b);}}else{for(var a=96;c>a;c-=a){e.set
 Date(e.getDate()+a);}}}e.setDate(e.getDate()+c);},subtract:function(a,c,b){return this.add(a,c,(b*-1));},before:function(c,b){var a=b.getTime();if(c.getTime()<a){return true;}else{return false;}},after:function(c,b){var a=b.getTime();if(c.getTime()>a){return true;}else{return false;}},between:function(b,a,c){if(this.after(b,a)&&this.before(b,c)){return true;}else{return false;}},getJan1:function(a){return this.getDate(a,0,1);},getDayOffset:function(b,d){var c=this.getJan1(d);var a=Math.ceil((b.getTime()-c.getTime())/this.ONE_DAY_MS);return a;},getWeekNumber:function(d,b,g){b=b||0;g=g||this.WEEK_ONE_JAN_DATE;var h=this.clearTime(d),l,m;if(h.getDay()===b){l=h;}else{l=this.getFirstDayOfWeek(h,b);}var i=l.getFullYear();m=new Date(l.getTime()+6*this.ONE_DAY_MS);var f;if(i!==m.getFullYear()&&m.getDate()>=g){f=1;}else{var e=this.clearTime(this.getDate(i,0,g)),a=this.getFirstDayOfWeek(e,b);var j=Math.round((h.getTime()-a.getTime())/this.ONE_DAY_MS);var k=j%7;var c=(j-k)/7;f=c+1;}return f;},
 getFirstDayOfWeek:function(d,a){a=a||0;
-var b=d.getDay(),c=(b-a+7)%7;return this.subtract(d,this.DAY,c);},isYearOverlapWeek:function(a){var c=false;var b=this.add(a,this.DAY,6);if(b.getFullYear()!=a.getFullYear()){c=true;}return c;},isMonthOverlapWeek:function(a){var c=false;var b=this.add(a,this.DAY,6);if(b.getMonth()!=a.getMonth()){c=true;}return c;},findMonthStart:function(a){var b=this.getDate(a.getFullYear(),a.getMonth(),1);return b;},findMonthEnd:function(b){var d=this.findMonthStart(b);var c=this.add(d,this.MONTH,1);var a=this.subtract(c,this.DAY,1);return a;},clearTime:function(a){a.setHours(12,0,0,0);return a;},getDate:function(e,a,c){var b=null;if(YAHOO.lang.isUndefined(c)){c=1;}if(e>=100){b=new Date(e,a,c);}else{b=new Date();b.setFullYear(e);b.setMonth(a);b.setDate(c);b.setHours(0,0,0,0);}return b;}};(function(){var c=YAHOO.util.Dom,a=YAHOO.util.Event,e=YAHOO.lang,d=YAHOO.widget.DateMath;function f(i,g,h){this.init.apply(this,arguments);}f.IMG_ROOT=null;f.DATE="D";f.MONTH_DAY="MD";f.WEEKDAY="WD";f.RANGE="R";f.M
 ONTH="M";f.DISPLAY_DAYS=42;f.STOP_RENDER="S";f.SHORT="short";f.LONG="long";f.MEDIUM="medium";f.ONE_CHAR="1char";f.DEFAULT_CONFIG={YEAR_OFFSET:{key:"year_offset",value:0,supercedes:["pagedate","selected","mindate","maxdate"]},TODAY:{key:"today",value:new Date(),supercedes:["pagedate"]},PAGEDATE:{key:"pagedate",value:null},SELECTED:{key:"selected",value:[]},TITLE:{key:"title",value:""},CLOSE:{key:"close",value:false},IFRAME:{key:"iframe",value:(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6)?true:false},MINDATE:{key:"mindate",value:null},MAXDATE:{key:"maxdate",value:null},MULTI_SELECT:{key:"multi_select",value:false},OOM_SELECT:{key:"oom_select",value:false},START_WEEKDAY:{key:"start_weekday",value:0},SHOW_WEEKDAYS:{key:"show_weekdays",value:true},SHOW_WEEK_HEADER:{key:"show_week_header",value:false},SHOW_WEEK_FOOTER:{key:"show_week_footer",value:false},HIDE_BLANK_WEEKS:{key:"hide_blank_weeks",value:false},NAV_ARROW_LEFT:{key:"nav_arrow_left",value:null},NAV_ARROW_RIGHT:{key:"nav_arrow_right",va
 lue:null},MONTHS_SHORT:{key:"months_short",value:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},MONTHS_LONG:{key:"months_long",value:["January","February","March","April","May","June","July","August","September","October","November","December"]},WEEKDAYS_1CHAR:{key:"weekdays_1char",value:["S","M","T","W","T","F","S"]},WEEKDAYS_SHORT:{key:"weekdays_short",value:["Su","Mo","Tu","We","Th","Fr","Sa"]},WEEKDAYS_MEDIUM:{key:"weekdays_medium",value:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},WEEKDAYS_LONG:{key:"weekdays_long",value:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},LOCALE_MONTHS:{key:"locale_months",value:"long"},LOCALE_WEEKDAYS:{key:"locale_weekdays",value:"short"},DATE_DELIMITER:{key:"date_delimiter",value:","},DATE_FIELD_DELIMITER:{key:"date_field_delimiter",value:"/"},DATE_RANGE_DELIMITER:{key:"date_range_delimiter",value:"-"},MY_MONTH_POSITION:{key:"my_month_position",value:1},MY_YEAR_POSITION:{key:"my_year_position"
 ,value:2},MD_MONTH_POSITION:{key:"md_month_position",value:1},MD_DAY_POSITION:{key:"md_day_position",value:2},MDY_MONTH_POSITION:{key:"mdy_month_position",value:1},MDY_DAY_POSITION:{key:"mdy_day_position",value:2},MDY_YEAR_POSITION:{key:"mdy_year_position",value:3},MY_LABEL_MONTH_POSITION:{key:"my_label_month_position",value:1},MY_LABEL_YEAR_POSITION:{key:"my_label_year_position",value:2},MY_LABEL_MONTH_SUFFIX:{key:"my_label_month_suffix",value:" "},MY_LABEL_YEAR_SUFFIX:{key:"my_label_year_suffix",value:""},NAV:{key:"navigator",value:null},STRINGS:{key:"strings",value:{previousMonth:"Previous Month",nextMonth:"Next Month",close:"Close"},supercedes:["close","title"]}};f._DEFAULT_CONFIG=f.DEFAULT_CONFIG;var b=f.DEFAULT_CONFIG;f._EVENT_TYPES={BEFORE_SELECT:"beforeSelect",SELECT:"select",BEFORE_DESELECT:"beforeDeselect",DESELECT:"deselect",CHANGE_PAGE:"changePage",BEFORE_RENDER:"beforeRender",RENDER:"render",BEFORE_DESTROY:"beforeDestroy",DESTROY:"destroy",RESET:"reset",CLEAR:"clear",BE
 FORE_HIDE:"beforeHide",HIDE:"hide",BEFORE_SHOW:"beforeShow",SHOW:"show",BEFORE_HIDE_NAV:"beforeHideNav",HIDE_NAV:"hideNav",BEFORE_SHOW_NAV:"beforeShowNav",SHOW_NAV:"showNav",BEFORE_RENDER_NAV:"beforeRenderNav",RENDER_NAV:"renderNav"};f.STYLES={CSS_ROW_HEADER:"calrowhead",CSS_ROW_FOOTER:"calrowfoot",CSS_CELL:"calcell",CSS_CELL_SELECTOR:"selector",CSS_CELL_SELECTED:"selected",CSS_CELL_SELECTABLE:"selectable",CSS_CELL_RESTRICTED:"restricted",CSS_CELL_TODAY:"today",CSS_CELL_OOM:"oom",CSS_CELL_OOB:"previous",CSS_HEADER:"calheader",CSS_HEADER_TEXT:"calhead",CSS_BODY:"calbody",CSS_WEEKDAY_CELL:"calweekdaycell",CSS_WEEKDAY_ROW:"calweekdayrow",CSS_FOOTER:"calfoot",CSS_CALENDAR:"yui-calendar",CSS_SINGLE:"single",CSS_CONTAINER:"yui-calcontainer",CSS_NAV_LEFT:"calnavleft",CSS_NAV_RIGHT:"calnavright",CSS_NAV:"calnav",CSS_CLOSE:"calclose",CSS_CELL_TOP:"calcelltop",CSS_CELL_LEFT:"calcellleft",CSS_CELL_RIGHT:"calcellright",CSS_CELL_BOTTOM:"calcellbottom",CSS_CELL_HOVER:"calcellhover",CSS_CELL_HIGHL
 IGHT1:"highlight1",CSS_CELL_HIGHLIGHT2:"highlight2",CSS_CELL_HIGHLIGHT3:"highlight3",CSS_CELL_HIGHLIGHT4:"highlight4",CSS_WITH_TITLE:"withtitle",CSS_FIXED_SIZE:"fixedsize",CSS_LINK_CLOSE:"link-close"};f._STYLES=f.STYLES;f.prototype={Config:null,parent:null,index:-1,cells:null,cellDates:null,id:null,containerId:null,oDomContainer:null,today:null,renderStack:null,_renderStack:null,oNavigator:null,_selectedDates:null,domEventMap:null,_parseArgs:function(h){var g={id:null,container:null,config:null};if(h&&h.length&&h.length>0){switch(h.length){case 1:g.id=null;g.container=h[0];g.config=null;break;case 2:if(e.isObject(h[1])&&!h[1].tagName&&!(h[1] instanceof String)){g.id=null;g.container=h[0];g.config=h[1];}else{g.id=h[0];g.container=h[1];g.config=null;}break;default:g.id=h[0];g.container=h[1];g.config=h[2];break;}}else{}return g;},init:function(j,h,i){var g=this._parseArgs(arguments);j=g.id;h=g.container;i=g.config;this.oDomContainer=c.get(h);this._oDoc=this.oDomContainer.ownerDocument;
 if(!this.oDomContainer.id){this.oDomContainer.id=c.generateId();
-}if(!j){j=this.oDomContainer.id+"_t";}this.id=j;this.containerId=this.oDomContainer.id;this.initEvents();this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.initStyles();c.addClass(this.oDomContainer,this.Style.CSS_CONTAINER);c.addClass(this.oDomContainer,this.Style.CSS_SINGLE);this.cellDates=[];this.cells=[];this.renderStack=[];this._renderStack=[];this.setupConfig();if(i){this.cfg.applyConfig(i,true);}this.cfg.fireQueue();this.today=this.cfg.getProperty("today");},configIframe:function(i,h,j){var g=h[0];if(!this.parent){if(c.inDocument(this.oDomContainer)){if(g){var k=c.getStyle(this.oDomContainer,"position");if(k=="absolute"||k=="relative"){if(!c.inDocument(this.iframe)){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";c.setStyle(this.iframe,"opacity","0");if(YAHOO.env.ua.ie&&YAHOO.env.ua.ie<=6){c.addClass(this.iframe,this.Style.CSS_FIXED_SIZE);}this.oDomContainer.insertBefore(this.iframe,this.oDomContainer.firstChild);}}}else{
 if(this.iframe){if(this.iframe.parentNode){this.iframe.parentNode.removeChild(this.iframe);}this.iframe=null;}}}}},configTitle:function(h,g,i){var k=g[0];if(k){this.createTitleBar(k);}else{var j=this.cfg.getProperty(b.CLOSE.key);if(!j){this.removeTitleBar();}else{this.createTitleBar("&#160;");}}},configClose:function(h,g,i){var k=g[0],j=this.cfg.getProperty(b.TITLE.key);if(k){if(!j){this.createTitleBar("&#160;");}this.createCloseButton();}else{this.removeCloseButton();if(!j){this.removeTitleBar();}}},initEvents:function(){var g=f._EVENT_TYPES,i=YAHOO.util.CustomEvent,h=this;h.beforeSelectEvent=new i(g.BEFORE_SELECT);h.selectEvent=new i(g.SELECT);h.beforeDeselectEvent=new i(g.BEFORE_DESELECT);h.deselectEvent=new i(g.DESELECT);h.changePageEvent=new i(g.CHANGE_PAGE);h.beforeRenderEvent=new i(g.BEFORE_RENDER);h.renderEvent=new i(g.RENDER);h.beforeDestroyEvent=new i(g.BEFORE_DESTROY);h.destroyEvent=new i(g.DESTROY);h.resetEvent=new i(g.RESET);h.clearEvent=new i(g.CLEAR);h.beforeShowEvent
 =new i(g.BEFORE_SHOW);h.showEvent=new i(g.SHOW);h.beforeHideEvent=new i(g.BEFORE_HIDE);h.hideEvent=new i(g.HIDE);h.beforeShowNavEvent=new i(g.BEFORE_SHOW_NAV);h.showNavEvent=new i(g.SHOW_NAV);h.beforeHideNavEvent=new i(g.BEFORE_HIDE_NAV);h.hideNavEvent=new i(g.HIDE_NAV);h.beforeRenderNavEvent=new i(g.BEFORE_RENDER_NAV);h.renderNavEvent=new i(g.RENDER_NAV);h.beforeSelectEvent.subscribe(h.onBeforeSelect,this,true);h.selectEvent.subscribe(h.onSelect,this,true);h.beforeDeselectEvent.subscribe(h.onBeforeDeselect,this,true);h.deselectEvent.subscribe(h.onDeselect,this,true);h.changePageEvent.subscribe(h.onChangePage,this,true);h.renderEvent.subscribe(h.onRender,this,true);h.resetEvent.subscribe(h.onReset,this,true);h.clearEvent.subscribe(h.onClear,this,true);},doPreviousMonthNav:function(h,g){a.preventDefault(h);setTimeout(function(){g.previousMonth();var j=c.getElementsByClassName(g.Style.CSS_NAV_LEFT,"a",g.oDomContainer);if(j&&j[0]){try{j[0].focus();}catch(i){}}},0);},doNextMonthNav:func
 tion(h,g){a.preventDefault(h);setTimeout(function(){g.nextMonth();var j=c.getElementsByClassName(g.Style.CSS_NAV_RIGHT,"a",g.oDomContainer);if(j&&j[0]){try{j[0].focus();}catch(i){}}},0);},doSelectCell:function(m,g){var r,o,i,l;var n=a.getTarget(m),h=n.tagName.toLowerCase(),k=false;while(h!="td"&&!c.hasClass(n,g.Style.CSS_CELL_SELECTABLE)){if(!k&&h=="a"&&c.hasClass(n,g.Style.CSS_CELL_SELECTOR)){k=true;}n=n.parentNode;h=n.tagName.toLowerCase();if(n==this.oDomContainer||h=="html"){return;}}if(k){a.preventDefault(m);}r=n;if(c.hasClass(r,g.Style.CSS_CELL_SELECTABLE)){l=g.getIndexFromId(r.id);if(l>-1){o=g.cellDates[l];if(o){i=d.getDate(o[0],o[1]-1,o[2]);var q;if(g.Options.MULTI_SELECT){q=r.getElementsByTagName("a")[0];if(q){q.blur();}var j=g.cellDates[l];var p=g._indexOfSelectedFieldArray(j);if(p>-1){g.deselectCell(l);}else{g.selectCell(l);}}else{q=r.getElementsByTagName("a")[0];if(q){q.blur();}g.selectCell(l);}}}}},doCellMouseOver:function(i,h){var g;if(i){g=a.getTarget(i);}else{g=this;}
 while(g.tagName&&g.tagName.toLowerCase()!="td"){g=g.parentNode;if(!g.tagName||g.tagName.toLowerCase()=="html"){return;}}if(c.hasClass(g,h.Style.CSS_CELL_SELECTABLE)){c.addClass(g,h.Style.CSS_CELL_HOVER);}},doCellMouseOut:function(i,h){var g;if(i){g=a.getTarget(i);}else{g=this;}while(g.tagName&&g.tagName.toLowerCase()!="td"){g=g.parentNode;if(!g.tagName||g.tagName.toLowerCase()=="html"){return;}}if(c.hasClass(g,h.Style.CSS_CELL_SELECTABLE)){c.removeClass(g,h.Style.CSS_CELL_HOVER);}},setupConfig:function(){var g=this.cfg;g.addProperty(b.TODAY.key,{value:new Date(b.TODAY.value.getTime()),supercedes:b.TODAY.supercedes,handler:this.configToday,suppressEvent:true});g.addProperty(b.PAGEDATE.key,{value:b.PAGEDATE.value||new Date(b.TODAY.value.getTime()),handler:this.configPageDate});g.addProperty(b.SELECTED.key,{value:b.SELECTED.value.concat(),handler:this.configSelected});g.addProperty(b.TITLE.key,{value:b.TITLE.value,handler:this.configTitle});g.addProperty(b.CLOSE.key,{value:b.CLOSE.valu
 e,handler:this.configClose});g.addProperty(b.IFRAME.key,{value:b.IFRAME.value,handler:this.configIframe,validator:g.checkBoolean});g.addProperty(b.MINDATE.key,{value:b.MINDATE.value,handler:this.configMinDate});g.addProperty(b.MAXDATE.key,{value:b.MAXDATE.value,handler:this.configMaxDate});g.addProperty(b.MULTI_SELECT.key,{value:b.MULTI_SELECT.value,handler:this.configOptions,validator:g.checkBoolean});g.addProperty(b.OOM_SELECT.key,{value:b.OOM_SELECT.value,handler:this.configOptions,validator:g.checkBoolean});g.addProperty(b.START_WEEKDAY.key,{value:b.START_WEEKDAY.value,handler:this.configOptions,validator:g.checkNumber});g.addProperty(b.SHOW_WEEKDAYS.key,{value:b.SHOW_WEEKDAYS.value,handler:this.configOptions,validator:g.checkBoolean});g.addProperty(b.SHOW_WEEK_HEADER.key,{value:b.SHOW_WEEK_HEADER.value,handler:this.configOptions,validator:g.checkBoolean});g.addProperty(b.SHOW_WEEK_FOOTER.key,{value:b.SHOW_WEEK_FOOTER.value,handler:this.configOptions,validator:g.checkBoolean});g
 .addProperty(b.HIDE_BLANK_WEEKS.key,{value:b.HIDE_BLANK_WEEKS.value,handler:this.configOptions,validator:g.checkBoolean});
-g.addProperty(b.NAV_ARROW_LEFT.key,{value:b.NAV_ARROW_LEFT.value,handler:this.configOptions});g.addProperty(b.NAV_ARROW_RIGHT.key,{value:b.NAV_ARROW_RIGHT.value,handler:this.configOptions});g.addProperty(b.MONTHS_SHORT.key,{value:b.MONTHS_SHORT.value,handler:this.configLocale});g.addProperty(b.MONTHS_LONG.key,{value:b.MONTHS_LONG.value,handler:this.configLocale});g.addProperty(b.WEEKDAYS_1CHAR.key,{value:b.WEEKDAYS_1CHAR.value,handler:this.configLocale});g.addProperty(b.WEEKDAYS_SHORT.key,{value:b.WEEKDAYS_SHORT.value,handler:this.configLocale});g.addProperty(b.WEEKDAYS_MEDIUM.key,{value:b.WEEKDAYS_MEDIUM.value,handler:this.configLocale});g.addProperty(b.WEEKDAYS_LONG.key,{value:b.WEEKDAYS_LONG.value,handler:this.configLocale});var h=function(){g.refireEvent(b.LOCALE_MONTHS.key);g.refireEvent(b.LOCALE_WEEKDAYS.key);};g.subscribeToConfigEvent(b.START_WEEKDAY.key,h,this,true);g.subscribeToConfigEvent(b.MONTHS_SHORT.key,h,this,true);g.subscribeToConfigEvent(b.MONTHS_LONG.key,h,this,tru
 e);g.subscribeToConfigEvent(b.WEEKDAYS_1CHAR.key,h,this,true);g.subscribeToConfigEvent(b.WEEKDAYS_SHORT.key,h,this,true);g.subscribeToConfigEvent(b.WEEKDAYS_MEDIUM.key,h,this,true);g.subscribeToConfigEvent(b.WEEKDAYS_LONG.key,h,this,true);g.addProperty(b.LOCALE_MONTHS.key,{value:b.LOCALE_MONTHS.value,handler:this.configLocaleValues});g.addProperty(b.LOCALE_WEEKDAYS.key,{value:b.LOCALE_WEEKDAYS.value,handler:this.configLocaleValues});g.addProperty(b.YEAR_OFFSET.key,{value:b.YEAR_OFFSET.value,supercedes:b.YEAR_OFFSET.supercedes,handler:this.configLocale});g.addProperty(b.DATE_DELIMITER.key,{value:b.DATE_DELIMITER.value,handler:this.configLocale});g.addProperty(b.DATE_FIELD_DELIMITER.key,{value:b.DATE_FIELD_DELIMITER.value,handler:this.configLocale});g.addProperty(b.DATE_RANGE_DELIMITER.key,{value:b.DATE_RANGE_DELIMITER.value,handler:this.configLocale});g.addProperty(b.MY_MONTH_POSITION.key,{value:b.MY_MONTH_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProper
 ty(b.MY_YEAR_POSITION.key,{value:b.MY_YEAR_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MD_MONTH_POSITION.key,{value:b.MD_MONTH_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MD_DAY_POSITION.key,{value:b.MD_DAY_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MDY_MONTH_POSITION.key,{value:b.MDY_MONTH_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MDY_DAY_POSITION.key,{value:b.MDY_DAY_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MDY_YEAR_POSITION.key,{value:b.MDY_YEAR_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MY_LABEL_MONTH_POSITION.key,{value:b.MY_LABEL_MONTH_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addProperty(b.MY_LABEL_YEAR_POSITION.key,{value:b.MY_LABEL_YEAR_POSITION.value,handler:this.configLocale,validator:g.checkNumber});g.addPro
 perty(b.MY_LABEL_MONTH_SUFFIX.key,{value:b.MY_LABEL_MONTH_SUFFIX.value,handler:this.configLocale});g.addProperty(b.MY_LABEL_YEAR_SUFFIX.key,{value:b.MY_LABEL_YEAR_SUFFIX.value,handler:this.configLocale});g.addProperty(b.NAV.key,{value:b.NAV.value,handler:this.configNavigator});g.addProperty(b.STRINGS.key,{value:b.STRINGS.value,handler:this.configStrings,validator:function(i){return e.isObject(i);},supercedes:b.STRINGS.supercedes});},configStrings:function(h,g,i){var j=e.merge(b.STRINGS.value,g[0]);this.cfg.setProperty(b.STRINGS.key,j,true);},configPageDate:function(h,g,i){this.cfg.setProperty(b.PAGEDATE.key,this._parsePageDate(g[0]),true);},configMinDate:function(h,g,i){var j=g[0];if(e.isString(j)){j=this._parseDate(j);this.cfg.setProperty(b.MINDATE.key,d.getDate(j[0],(j[1]-1),j[2]));}},configMaxDate:function(h,g,i){var j=g[0];if(e.isString(j)){j=this._parseDate(j);this.cfg.setProperty(b.MAXDATE.key,d.getDate(j[0],(j[1]-1),j[2]));}},configToday:function(i,h,j){var k=h[0];if(e.isStri
 ng(k)){k=this._parseDate(k);}var g=d.clearTime(k);if(!this.cfg.initialConfig[b.PAGEDATE.key]){this.cfg.setProperty(b.PAGEDATE.key,g);}this.today=g;this.cfg.setProperty(b.TODAY.key,g,true);},configSelected:function(i,g,k){var h=g[0],j=b.SELECTED.key;if(h){if(e.isString(h)){this.cfg.setProperty(j,this._parseDates(h),true);}}if(!this._selectedDates){this._selectedDates=this.cfg.getProperty(j);}},configOptions:function(h,g,i){this.Options[h.toUpperCase()]=g[0];},configLocale:function(h,g,i){this.Locale[h.toUpperCase()]=g[0];this.cfg.refireEvent(b.LOCALE_MONTHS.key);this.cfg.refireEvent(b.LOCALE_WEEKDAYS.key);},configLocaleValues:function(j,i,k){j=j.toLowerCase();var m=i[0],h=this.cfg,n=this.Locale;switch(j){case b.LOCALE_MONTHS.key:switch(m){case f.SHORT:n.LOCALE_MONTHS=h.getProperty(b.MONTHS_SHORT.key).concat();break;case f.LONG:n.LOCALE_MONTHS=h.getProperty(b.MONTHS_LONG.key).concat();break;}break;case b.LOCALE_WEEKDAYS.key:switch(m){case f.ONE_CHAR:n.LOCALE_WEEKDAYS=h.getProperty(b.W
 EEKDAYS_1CHAR.key).concat();break;case f.SHORT:n.LOCALE_WEEKDAYS=h.getProperty(b.WEEKDAYS_SHORT.key).concat();break;case f.MEDIUM:n.LOCALE_WEEKDAYS=h.getProperty(b.WEEKDAYS_MEDIUM.key).concat();break;case f.LONG:n.LOCALE_WEEKDAYS=h.getProperty(b.WEEKDAYS_LONG.key).concat();break;}var l=h.getProperty(b.START_WEEKDAY.key);if(l>0){for(var g=0;g<l;++g){n.LOCALE_WEEKDAYS.push(n.LOCALE_WEEKDAYS.shift());}}break;}},configNavigator:function(h,g,i){var j=g[0];if(YAHOO.widget.CalendarNavigator&&(j===true||e.isObject(j))){if(!this.oNavigator){this.oNavigator=new YAHOO.widget.CalendarNavigator(this);this.beforeRenderEvent.subscribe(function(){if(!this.pages){this.oNavigator.erase();}},this,true);}}else{if(this.oNavigator){this.oNavigator.destroy();this.oNavigator=null;}}},initStyles:function(){var g=f.STYLES;this.Style={CSS_ROW_HEADER:g.CSS_ROW_HEADER,CSS_ROW_FOOTER:g.CSS_ROW_FOOTER,CSS_CELL:g.CSS_CELL,CSS_CELL_SELECTOR:g.CSS_CELL_SELECTOR,CSS_CELL_SELECTED:g.CSS_CELL_SELECTED,CSS_CELL_SELECTAB
 LE:g.CSS_CELL_SELECTABLE,CSS_CELL_RESTRICTED:g.CSS_CELL_RESTRICTED,CSS_CELL_TODAY:g.CSS_CELL_TODAY,CSS_CELL_OOM:g.CSS_CELL_OOM,CSS_CELL_OOB:g.CSS_CELL_OOB,CSS_HEADER:g.CSS_HEADER,CSS_HEADER_TEXT:g.CSS_HEADER_TEXT,CSS_BODY:g.CSS_BODY,CSS_WEEKDAY_CELL:g.CSS_WEEKDAY_CELL,CSS_WEEKDAY_ROW:g.CSS_WEEKDAY_ROW,CSS_FOOTER:g.CSS_FOOTER,CSS_CALENDAR:g.CSS_CALENDAR,CSS_SINGLE:g.CSS_SINGLE,CSS_CONTAINER:g.CSS_CONTAINER,CSS_NAV_LEFT:g.CSS_NAV_LEFT,CSS_NAV_RIGHT:g.CSS_NAV_RIGHT,CSS_NAV:g.CSS_NAV,CSS_CLOSE:g.CSS_CLOSE,CSS_CELL_TOP:g.CSS_CELL_TOP,CSS_CELL_LEFT:g.CSS_CELL_LEFT,CSS_CELL_RIGHT:g.CSS_CELL_RIGHT,CSS_CELL_BOTTOM:g.CSS_CELL_BOTTOM,CSS_CELL_HOVER:g.CSS_CELL_HOVER,CSS_CELL_HIGHLIGHT1:g.CSS_CELL_HIGHLIGHT1,CSS_CELL_HIGHLIGHT2:g.CSS_CELL_HIGHLIGHT2,CSS_CELL_HIGHLIGHT3:g.CSS_CELL_HIGHLIGHT3,CSS_CELL_HIGHLIGHT4:g.CSS_CELL_HIGHLIGHT4,CSS_WITH_TITLE:g.CSS_WITH_TITLE,CSS_FIXED_SIZE:g.CSS_FIXED_SIZE,CSS_LINK_CLOSE:g.CSS_LINK_CLOSE};
-},buildMonthLabel:function(){return this._buildMonthLabel(this.cfg.getProperty(b.PAGEDATE.key));},_buildMonthLabel:function(g){var i=this.Locale.LOCALE_MONTHS[g.getMonth()]+this.Locale.MY_LABEL_MONTH_SUFFIX,h=(g.getFullYear()+this.Locale.YEAR_OFFSET)+this.Locale.MY_LABEL_YEAR_SUFFIX;if(this.Locale.MY_LABEL_MONTH_POSITION==2||this.Locale.MY_LABEL_YEAR_POSITION==1){return h+i;}else{return i+h;}},buildDayLabel:function(g){return g.getDate();},createTitleBar:function(g){var h=c.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||document.createElement("div");h.className=YAHOO.widget.CalendarGroup.CSS_2UPTITLE;h.innerHTML=g;this.oDomContainer.insertBefore(h,this.oDomContainer.firstChild);c.addClass(this.oDomContainer,this.Style.CSS_WITH_TITLE);return h;},removeTitleBar:function(){var g=c.getElementsByClassName(YAHOO.widget.CalendarGroup.CSS_2UPTITLE,"div",this.oDomContainer)[0]||null;if(g){a.purgeElement(g);this.oDomContainer.removeChild(g);}c.rem
 oveClass(this.oDomContainer,this.Style.CSS_WITH_TITLE);},createCloseButton:function(){var k=YAHOO.widget.CalendarGroup.CSS_2UPCLOSE,j=this.Style.CSS_LINK_CLOSE,m="us/my/bn/x_d.gif",l=c.getElementsByClassName(j,"a",this.oDomContainer)[0],g=this.cfg.getProperty(b.STRINGS.key),h=(g&&g.close)?g.close:"";if(!l){l=document.createElement("a");a.addListener(l,"click",function(o,n){n.hide();a.preventDefault(o);},this);}l.href="#";l.className=j;if(f.IMG_ROOT!==null){var i=c.getElementsByClassName(k,"img",l)[0]||document.createElement("img");i.src=f.IMG_ROOT+m;i.className=k;l.appendChild(i);}else{l.innerHTML='<span class="'+k+" "+this.Style.CSS_CLOSE+'">'+h+"</span>";}this.oDomContainer.appendChild(l);return l;},removeCloseButton:function(){var g=c.getElementsByClassName(this.Style.CSS_LINK_CLOSE,"a",this.oDomContainer)[0]||null;if(g){a.purgeElement(g);this.oDomContainer.removeChild(g);}},renderHeader:function(q){var p=7,o="us/tr/callt.gif",g="us/tr/calrt.gif",n=this.cfg,k=n.getProperty(b.PAGE
 DATE.key),l=n.getProperty(b.STRINGS.key),v=(l&&l.previousMonth)?l.previousMonth:"",h=(l&&l.nextMonth)?l.nextMonth:"",m;if(n.getProperty(b.SHOW_WEEK_HEADER.key)){p+=1;}if(n.getProperty(b.SHOW_WEEK_FOOTER.key)){p+=1;}q[q.length]="<thead>";q[q.length]="<tr>";q[q.length]='<th colspan="'+p+'" class="'+this.Style.CSS_HEADER_TEXT+'">';q[q.length]='<div class="'+this.Style.CSS_HEADER+'">';var x,u=false;if(this.parent){if(this.index===0){x=true;}if(this.index==(this.parent.cfg.getProperty("pages")-1)){u=true;}}else{x=true;u=true;}if(x){m=this._buildMonthLabel(d.subtract(k,d.MONTH,1));var r=n.getProperty(b.NAV_ARROW_LEFT.key);if(r===null&&f.IMG_ROOT!==null){r=f.IMG_ROOT+o;}var i=(r===null)?"":' style="background-image:url('+r+')"';q[q.length]='<a class="'+this.Style.CSS_NAV_LEFT+'"'+i+' href="#">'+v+" ("+m+")"+"</a>";}var w=this.buildMonthLabel();var s=this.parent||this;if(s.cfg.getProperty("navigator")){w='<a class="'+this.Style.CSS_NAV+'" href="#">'+w+"</a>";}q[q.length]=w;if(u){m=this._bui
 ldMonthLabel(d.add(k,d.MONTH,1));var t=n.getProperty(b.NAV_ARROW_RIGHT.key);if(t===null&&f.IMG_ROOT!==null){t=f.IMG_ROOT+g;}var j=(t===null)?"":' style="background-image:url('+t+')"';q[q.length]='<a class="'+this.Style.CSS_NAV_RIGHT+'"'+j+' href="#">'+h+" ("+m+")"+"</a>";}q[q.length]="</div>\n</th>\n</tr>";if(n.getProperty(b.SHOW_WEEKDAYS.key)){q=this.buildWeekdays(q);}q[q.length]="</thead>";return q;},buildWeekdays:function(h){h[h.length]='<tr class="'+this.Style.CSS_WEEKDAY_ROW+'">';if(this.cfg.getProperty(b.SHOW_WEEK_HEADER.key)){h[h.length]="<th>&#160;</th>";}for(var g=0;g<this.Locale.LOCALE_WEEKDAYS.length;++g){h[h.length]='<th class="'+this.Style.CSS_WEEKDAY_CELL+'">'+this.Locale.LOCALE_WEEKDAYS[g]+"</th>";}if(this.cfg.getProperty(b.SHOW_WEEK_FOOTER.key)){h[h.length]="<th>&#160;</th>";}h[h.length]="</tr>";return h;},renderBody:function(T,Q){var ao=this.cfg.getProperty(b.START_WEEKDAY.key);this.preMonthDays=T.getDay();if(ao>0){this.preMonthDays-=ao;}if(this.preMonthDays<0){this
 .preMonthDays+=7;}this.monthDays=d.findMonthEnd(T).getDate();this.postMonthDays=f.DISPLAY_DAYS-this.preMonthDays-this.monthDays;T=d.subtract(T,d.DAY,this.preMonthDays);var F,q,o="w",L="_cell",J="wd",Z="d",v,X,af=this.today,u=this.cfg,ae,D=af.getFullYear(),Y=af.getMonth(),k=af.getDate(),ad=u.getProperty(b.PAGEDATE.key),j=u.getProperty(b.HIDE_BLANK_WEEKS.key),P=u.getProperty(b.SHOW_WEEK_FOOTER.key),I=u.getProperty(b.SHOW_WEEK_HEADER.key),O=u.getProperty(b.OOM_SELECT.key),B=u.getProperty(b.MINDATE.key),H=u.getProperty(b.MAXDATE.key),A=this.Locale.YEAR_OFFSET;if(B){B=d.clearTime(B);}if(H){H=d.clearTime(H);}Q[Q.length]='<tbody class="m'+(ad.getMonth()+1)+" "+this.Style.CSS_BODY+'">';var am=0,w=document.createElement("div"),R=document.createElement("td");w.appendChild(R);var ac=this.parent||this;for(var ah=0;ah<6;ah++){F=d.getWeekNumber(T,ao);q=o+F;if(ah!==0&&j===true&&T.getMonth()!=ad.getMonth()){break;}else{Q[Q.length]='<tr class="'+q+'">';if(I){Q=this.renderRowHeader(F,Q);}for(var an=0
 ;an<7;an++){v=[];this.clearElement(R);R.className=this.Style.CSS_CELL;R.id=this.id+L+am;if(T.getDate()==k&&T.getMonth()==Y&&T.getFullYear()==D){v[v.length]=ac.renderCellStyleToday;}var G=[T.getFullYear(),T.getMonth()+1,T.getDate()];this.cellDates[this.cellDates.length]=G;ae=T.getMonth()!=ad.getMonth();if(ae&&!O){v[v.length]=ac.renderCellNotThisMonth;}else{c.addClass(R,J+T.getDay());c.addClass(R,Z+T.getDate());var S=this.renderStack.concat();for(var ag=0,al=S.length;ag<al;++ag){X=null;var aa=S[ag],ap=aa[0],h,K,n;switch(ap){case f.DATE:h=aa[1][1];K=aa[1][2];n=aa[1][0];if(T.getMonth()+1==h&&T.getDate()==K&&T.getFullYear()==n){X=aa[2];this.renderStack.splice(ag,1);}break;case f.MONTH_DAY:h=aa[1][0];K=aa[1][1];if(T.getMonth()+1==h&&T.getDate()==K){X=aa[2];this.renderStack.splice(ag,1);}break;case f.RANGE:var N=aa[1][0],M=aa[1][1],U=N[1],z=N[2],E=N[0],ak=d.getDate(E,U-1,z),m=M[1],W=M[2],g=M[0],aj=d.getDate(g,m-1,W);if(T.getTime()>=ak.getTime()&&T.getTime()<=aj.getTime()){X=aa[2];if(T.getT
 ime()==aj.getTime()){this.renderStack.splice(ag,1);
-}}break;case f.WEEKDAY:var y=aa[1][0];if(T.getDay()+1==y){X=aa[2];}break;case f.MONTH:h=aa[1][0];if(T.getMonth()+1==h){X=aa[2];}break;}if(X){v[v.length]=X;}}}if(this._indexOfSelectedFieldArray(G)>-1){v[v.length]=ac.renderCellStyleSelected;}if(ae){v[v.length]=ac.styleCellNotThisMonth;}if((B&&(T.getTime()<B.getTime()))||(H&&(T.getTime()>H.getTime()))){v[v.length]=ac.renderOutOfBoundsDate;}else{v[v.length]=ac.styleCellDefault;v[v.length]=ac.renderCellDefault;}for(var ab=0;ab<v.length;++ab){if(v[ab].call(ac,T,R)==f.STOP_RENDER){break;}}T.setTime(T.getTime()+d.ONE_DAY_MS);T=d.clearTime(T);if(am>=0&&am<=6){c.addClass(R,this.Style.CSS_CELL_TOP);}if((am%7)===0){c.addClass(R,this.Style.CSS_CELL_LEFT);}if(((am+1)%7)===0){c.addClass(R,this.Style.CSS_CELL_RIGHT);}var V=this.postMonthDays;if(j&&V>=7){var C=Math.floor(V/7);for(var ai=0;ai<C;++ai){V-=7;}}if(am>=((this.preMonthDays+V+this.monthDays)-7)){c.addClass(R,this.Style.CSS_CELL_BOTTOM);}Q[Q.length]=w.innerHTML;am++;}if(P){Q=this.renderRowFo
 oter(F,Q);}Q[Q.length]="</tr>";}}Q[Q.length]="</tbody>";return Q;},renderFooter:function(g){return g;},render:function(){this.beforeRenderEvent.fire();var i=d.findMonthStart(this.cfg.getProperty(b.PAGEDATE.key));this.resetRenderers();this.cellDates.length=0;a.purgeElement(this.oDomContainer,true);var g=[],h;g[g.length]='<table cellSpacing="0" class="'+this.Style.CSS_CALENDAR+" y"+(i.getFullYear()+this.Locale.YEAR_OFFSET)+'" id="'+this.id+'">';g=this.renderHeader(g);g=this.renderBody(i,g);g=this.renderFooter(g);g[g.length]="</table>";this.oDomContainer.innerHTML=g.join("\n");this.applyListeners();h=((this._oDoc)&&this._oDoc.getElementById(this.id))||(this.id);this.cells=c.getElementsByClassName(this.Style.CSS_CELL,"td",h);this.cfg.refireEvent(b.TITLE.key);this.cfg.refireEvent(b.CLOSE.key);this.cfg.refireEvent(b.IFRAME.key);this.renderEvent.fire();},applyListeners:function(){var q=this.oDomContainer,h=this.parent||this,m="a",t="click";var n=c.getElementsByClassName(this.Style.CSS_NAV_
 LEFT,m,q),j=c.getElementsByClassName(this.Style.CSS_NAV_RIGHT,m,q);if(n&&n.length>0){this.linkLeft=n[0];a.addListener(this.linkLeft,t,this.doPreviousMonthNav,h,true);}if(j&&j.length>0){this.linkRight=j[0];a.addListener(this.linkRight,t,this.doNextMonthNav,h,true);}if(h.cfg.getProperty("navigator")!==null){this.applyNavListeners();}if(this.domEventMap){var k,g;for(var s in this.domEventMap){if(e.hasOwnProperty(this.domEventMap,s)){var o=this.domEventMap[s];if(!(o instanceof Array)){o=[o];}for(var l=0;l<o.length;l++){var r=o[l];g=c.getElementsByClassName(s,r.tag,this.oDomContainer);for(var p=0;p<g.length;p++){k=g[p];a.addListener(k,r.event,r.handler,r.scope,r.correct);}}}}}a.addListener(this.oDomContainer,"click",this.doSelectCell,this);a.addListener(this.oDomContainer,"mouseover",this.doCellMouseOver,this);a.addListener(this.oDomContainer,"mouseout",this.doCellMouseOut,this);},applyNavListeners:function(){var h=this.parent||this,i=this,g=c.getElementsByClassName(this.Style.CSS_NAV,"a
 ",this.oDomContainer);if(g.length>0){a.addListener(g,"click",function(n,m){var l=a.getTarget(n);if(this===l||c.isAncestor(this,l)){a.preventDefault(n);}var j=h.oNavigator;if(j){var k=i.cfg.getProperty("pagedate");j.setYear(k.getFullYear()+i.Locale.YEAR_OFFSET);j.setMonth(k.getMonth());j.show();}});}},getDateByCellId:function(h){var g=this.getDateFieldsByCellId(h);return(g)?d.getDate(g[0],g[1]-1,g[2]):null;},getDateFieldsByCellId:function(g){g=this.getIndexFromId(g);return(g>-1)?this.cellDates[g]:null;},getCellIndex:function(j){var h=-1;if(j){var g=j.getMonth(),p=j.getFullYear(),o=j.getDate(),l=this.cellDates;for(var k=0;k<l.length;++k){var n=l[k];if(n[0]===p&&n[1]===g+1&&n[2]===o){h=k;break;}}}return h;},getIndexFromId:function(i){var h=-1,g=i.lastIndexOf("_cell");if(g>-1){h=parseInt(i.substring(g+5),10);}return h;},renderOutOfBoundsDate:function(h,g){c.addClass(g,this.Style.CSS_CELL_OOB);g.innerHTML=h.getDate();return f.STOP_RENDER;},renderRowHeader:function(h,g){g[g.length]='<th c
 lass="'+this.Style.CSS_ROW_HEADER+'">'+h+"</th>";return g;},renderRowFooter:function(h,g){g[g.length]='<th class="'+this.Style.CSS_ROW_FOOTER+'">'+h+"</th>";return g;},renderCellDefault:function(h,g){g.innerHTML='<a href="#" class="'+this.Style.CSS_CELL_SELECTOR+'">'+this.buildDayLabel(h)+"</a>";},styleCellDefault:function(h,g){c.addClass(g,this.Style.CSS_CELL_SELECTABLE);},renderCellStyleHighlight1:function(h,g){c.addClass(g,this.Style.CSS_CELL_HIGHLIGHT1);},renderCellStyleHighlight2:function(h,g){c.addClass(g,this.Style.CSS_CELL_HIGHLIGHT2);},renderCellStyleHighlight3:function(h,g){c.addClass(g,this.Style.CSS_CELL_HIGHLIGHT3);},renderCellStyleHighlight4:function(h,g){c.addClass(g,this.Style.CSS_CELL_HIGHLIGHT4);},renderCellStyleToday:function(h,g){c.addClass(g,this.Style.CSS_CELL_TODAY);},renderCellStyleSelected:function(h,g){c.addClass(g,this.Style.CSS_CELL_SELECTED);},renderCellNotThisMonth:function(h,g){this.styleCellNotThisMonth(h,g);g.innerHTML=h.getDate();return f.STOP_RENDE
 R;},styleCellNotThisMonth:function(h,g){YAHOO.util.Dom.addClass(g,this.Style.CSS_CELL_OOM);},renderBodyCellRestricted:function(h,g){c.addClass(g,this.Style.CSS_CELL);c.addClass(g,this.Style.CSS_CELL_RESTRICTED);g.innerHTML=h.getDate();return f.STOP_RENDER;},addMonths:function(i){var h=b.PAGEDATE.key,j=this.cfg.getProperty(h),g=d.add(j,d.MONTH,i);this.cfg.setProperty(h,g);this.resetRenderers();this.changePageEvent.fire(j,g);},subtractMonths:function(g){this.addMonths(-1*g);},addYears:function(i){var h=b.PAGEDATE.key,j=this.cfg.getProperty(h),g=d.add(j,d.YEAR,i);this.cfg.setProperty(h,g);this.resetRenderers();this.changePageEvent.fire(j,g);},subtractYears:function(g){this.addYears(-1*g);},nextMonth:function(){this.addMonths(1);},previousMonth:function(){this.addMonths(-1);},nextYear:function(){this.addYears(1);},previousYear:function(){this.addYears(-1);},reset:function(){this.cfg.resetProperty(b.SELECTED.key);this.cfg.resetProperty(b.PAGEDATE.key);this.resetEvent.fire();},clear:funct
 ion(){this.cfg.setProperty(b.SELECTED.key,[]);
-this.cfg.setProperty(b.PAGEDATE.key,new Date(this.today.getTime()));this.clearEvent.fire();},select:function(i){var l=this._toFieldArray(i),h=[],k=[],m=b.SELECTED.key;for(var g=0;g<l.length;++g){var j=l[g];if(!this.isDateOOB(this._toDate(j))){if(h.length===0){this.beforeSelectEvent.fire();k=this.cfg.getProperty(m);}h.push(j);if(this._indexOfSelectedFieldArray(j)==-1){k[k.length]=j;}}}if(h.length>0){if(this.parent){this.parent.cfg.setProperty(m,k);}else{this.cfg.setProperty(m,k);}this.selectEvent.fire(h);}return this.getSelectedDates();},selectCell:function(j){var h=this.cells[j],n=this.cellDates[j],m=this._toDate(n),i=c.hasClass(h,this.Style.CSS_CELL_SELECTABLE);if(i){this.beforeSelectEvent.fire();var l=b.SELECTED.key;var k=this.cfg.getProperty(l);var g=n.concat();if(this._indexOfSelectedFieldArray(g)==-1){k[k.length]=g;}if(this.parent){this.parent.cfg.setProperty(l,k);}else{this.cfg.setProperty(l,k);}this.renderCellStyleSelected(m,h);this.selectEvent.fire([g]);this.doCellMouseOut.c
 all(h,null,this);}return this.getSelectedDates();},deselect:function(k){var g=this._toFieldArray(k),j=[],m=[],n=b.SELECTED.key;for(var h=0;h<g.length;++h){var l=g[h];if(!this.isDateOOB(this._toDate(l))){if(j.length===0){this.beforeDeselectEvent.fire();m=this.cfg.getProperty(n);}j.push(l);var i=this._indexOfSelectedFieldArray(l);if(i!=-1){m.splice(i,1);}}}if(j.length>0){if(this.parent){this.parent.cfg.setProperty(n,m);}else{this.cfg.setProperty(n,m);}this.deselectEvent.fire(j);}return this.getSelectedDates();},deselectCell:function(k){var h=this.cells[k],n=this.cellDates[k],i=this._indexOfSelectedFieldArray(n);var j=c.hasClass(h,this.Style.CSS_CELL_SELECTABLE);if(j){this.beforeDeselectEvent.fire();var l=this.cfg.getProperty(b.SELECTED.key),m=this._toDate(n),g=n.concat();if(i>-1){if((this.cfg.getProperty(b.PAGEDATE.key).getMonth()==m.getMonth()&&this.cfg.getProperty(b.PAGEDATE.key).getFullYear()==m.getFullYear())||this.cfg.getProperty(b.OOM_SELECT.key)){c.removeClass(h,this.Style.CSS_
 CELL_SELECTED);}l.splice(i,1);}if(this.parent){this.parent.cfg.setProperty(b.SELECTED.key,l);}else{this.cfg.setProperty(b.SELECTED.key,l);}this.deselectEvent.fire([g]);}return this.getSelectedDates();},deselectAll:function(){this.beforeDeselectEvent.fire();var j=b.SELECTED.key,g=this.cfg.getProperty(j),h=g.length,i=g.concat();if(this.parent){this.parent.cfg.setProperty(j,[]);}else{this.cfg.setProperty(j,[]);}if(h>0){this.deselectEvent.fire(i);}return this.getSelectedDates();},_toFieldArray:function(h){var g=[];if(h instanceof Date){g=[[h.getFullYear(),h.getMonth()+1,h.getDate()]];}else{if(e.isString(h)){g=this._parseDates(h);}else{if(e.isArray(h)){for(var j=0;j<h.length;++j){var k=h[j];g[g.length]=[k.getFullYear(),k.getMonth()+1,k.getDate()];}}}}return g;},toDate:function(g){return this._toDate(g);},_toDate:function(g){if(g instanceof Date){return g;}else{return d.getDate(g[0],g[1]-1,g[2]);}},_fieldArraysAreEqual:function(i,h){var g=false;if(i[0]==h[0]&&i[1]==h[1]&&i[2]==h[2]){g=tru
 e;}return g;},_indexOfSelectedFieldArray:function(k){var j=-1,g=this.cfg.getProperty(b.SELECTED.key);for(var i=0;i<g.length;++i){var h=g[i];if(k[0]==h[0]&&k[1]==h[1]&&k[2]==h[2]){j=i;break;}}return j;},isDateOOM:function(g){return(g.getMonth()!=this.cfg.getProperty(b.PAGEDATE.key).getMonth());},isDateOOB:function(i){var j=this.cfg.getProperty(b.MINDATE.key),k=this.cfg.getProperty(b.MAXDATE.key),h=d;if(j){j=h.clearTime(j);}if(k){k=h.clearTime(k);}var g=new Date(i.getTime());g=h.clearTime(g);return((j&&g.getTime()<j.getTime())||(k&&g.getTime()>k.getTime()));},_parsePageDate:function(g){var j;if(g){if(g instanceof Date){j=d.findMonthStart(g);}else{var k,i,h;h=g.split(this.cfg.getProperty(b.DATE_FIELD_DELIMITER.key));k=parseInt(h[this.cfg.getProperty(b.MY_MONTH_POSITION.key)-1],10)-1;i=parseInt(h[this.cfg.getProperty(b.MY_YEAR_POSITION.key)-1],10)-this.Locale.YEAR_OFFSET;j=d.getDate(i,k,1);}}else{j=d.getDate(this.today.getFullYear(),this.today.getMonth(),1);}return j;},onBeforeSelect:fu
 nction(){if(this.cfg.getProperty(b.MULTI_SELECT.key)===false){if(this.parent){this.parent.callChildFunction("clearAllBodyCellStyles",this.Style.CSS_CELL_SELECTED);this.parent.deselectAll();}else{this.clearAllBodyCellStyles(this.Style.CSS_CELL_SELECTED);this.deselectAll();}}},onSelect:function(g){},onBeforeDeselect:function(){},onDeselect:function(g){},onChangePage:function(){this.render();},onRender:function(){},onReset:function(){this.render();},onClear:function(){this.render();},validate:function(){return true;},_parseDate:function(j){var k=j.split(this.Locale.DATE_FIELD_DELIMITER),g;if(k.length==2){g=[k[this.Locale.MD_MONTH_POSITION-1],k[this.Locale.MD_DAY_POSITION-1]];g.type=f.MONTH_DAY;}else{g=[k[this.Locale.MDY_YEAR_POSITION-1]-this.Locale.YEAR_OFFSET,k[this.Locale.MDY_MONTH_POSITION-1],k[this.Locale.MDY_DAY_POSITION-1]];g.type=f.DATE;}for(var h=0;h<g.length;h++){g[h]=parseInt(g[h],10);}return g;},_parseDates:function(h){var o=[],n=h.split(this.Locale.DATE_DELIMITER);for(var m
 =0;m<n.length;++m){var l=n[m];if(l.indexOf(this.Locale.DATE_RANGE_DELIMITER)!=-1){var g=l.split(this.Locale.DATE_RANGE_DELIMITER),k=this._parseDate(g[0]),p=this._parseDate(g[1]),j=this._parseRange(k,p);o=o.concat(j);}else{var i=this._parseDate(l);o.push(i);}}return o;},_parseRange:function(g,k){var h=d.add(d.getDate(g[0],g[1]-1,g[2]),d.DAY,1),j=d.getDate(k[0],k[1]-1,k[2]),i=[];i.push(g);while(h.getTime()<=j.getTime()){i.push([h.getFullYear(),h.getMonth()+1,h.getDate()]);h=d.add(h,d.DAY,1);}return i;},resetRenderers:function(){this.renderStack=this._renderStack.concat();},removeRenderers:function(){this._renderStack=[];this.renderStack=[];},clearElement:function(g){g.innerHTML="&#160;";g.className="";},addRenderer:function(g,h){var k=this._parseDates(g);for(var j=0;j<k.length;++j){var l=k[j];if(l.length==2){if(l[0] instanceof Array){this._addRenderer(f.RANGE,l,h);}else{this._addRenderer(f.MONTH_DAY,l,h);}}else{if(l.length==3){this._addRenderer(f.DATE,l,h);}}}},_addRenderer:function(h
 ,i,g){var j=[h,i,g];
-this.renderStack.unshift(j);this._renderStack=this.renderStack.concat();},addMonthRenderer:function(h,g){this._addRenderer(f.MONTH,[h],g);},addWeekdayRenderer:function(h,g){this._addRenderer(f.WEEKDAY,[h],g);},clearAllBodyCellStyles:function(g){for(var h=0;h<this.cells.length;++h){c.removeClass(this.cells[h],g);}},setMonth:function(i){var g=b.PAGEDATE.key,h=this.cfg.getProperty(g);h.setMonth(parseInt(i,10));this.cfg.setProperty(g,h);},setYear:function(h){var g=b.PAGEDATE.key,i=this.cfg.getProperty(g);i.setFullYear(parseInt(h,10)-this.Locale.YEAR_OFFSET);this.cfg.setProperty(g,i);},getSelectedDates:function(){var i=[],h=this.cfg.getProperty(b.SELECTED.key);for(var k=0;k<h.length;++k){var j=h[k];var g=d.getDate(j[0],j[1]-1,j[2]);i.push(g);}i.sort(function(m,l){return m-l;});return i;},hide:function(){if(this.beforeHideEvent.fire()){this.oDomContainer.style.display="none";this.hideEvent.fire();}},show:function(){if(this.beforeShowEvent.fire()){this.oDomContainer.style.display="block";t
 his.showEvent.fire();}},browser:(function(){var g=navigator.userAgent.toLowerCase();if(g.indexOf("opera")!=-1){return"opera";}else{if(g.indexOf("msie 7")!=-1){return"ie7";}else{if(g.indexOf("msie")!=-1){return"ie";}else{if(g.indexOf("safari")!=-1){return"safari";}else{if(g.indexOf("gecko")!=-1){return"gecko";}else{return false;}}}}}})(),toString:function(){return"Calendar "+this.id;},destroy:function(){if(this.beforeDestroyEvent.fire()){var g=this;if(g.navigator){g.navigator.destroy();}if(g.cfg){g.cfg.destroy();}a.purgeElement(g.oDomContainer,true);c.removeClass(g.oDomContainer,g.Style.CSS_WITH_TITLE);c.removeClass(g.oDomContainer,g.Style.CSS_CONTAINER);c.removeClass(g.oDomContainer,g.Style.CSS_SINGLE);g.oDomContainer.innerHTML="";g.oDomContainer=null;g.cells=null;this.destroyEvent.fire();}}};YAHOO.widget.Calendar=f;YAHOO.widget.Calendar_Core=YAHOO.widget.Calendar;YAHOO.widget.Cal_Core=YAHOO.widget.Calendar;})();(function(){var d=YAHOO.util.Dom,f=YAHOO.widget.DateMath,a=YAHOO.util.E
 vent,e=YAHOO.lang,g=YAHOO.widget.Calendar;function b(j,h,i){if(arguments.length>0){this.init.apply(this,arguments);}}b.DEFAULT_CONFIG=b._DEFAULT_CONFIG=g.DEFAULT_CONFIG;b.DEFAULT_CONFIG.PAGES={key:"pages",value:2};var c=b.DEFAULT_CONFIG;b.prototype={init:function(k,i,j){var h=this._parseArgs(arguments);k=h.id;i=h.container;j=h.config;this.oDomContainer=d.get(i);if(!this.oDomContainer.id){this.oDomContainer.id=d.generateId();}if(!k){k=this.oDomContainer.id+"_t";}this.id=k;this.containerId=this.oDomContainer.id;this.initEvents();this.initStyles();this.pages=[];d.addClass(this.oDomContainer,b.CSS_CONTAINER);d.addClass(this.oDomContainer,b.CSS_MULTI_UP);this.cfg=new YAHOO.util.Config(this);this.Options={};this.Locale={};this.setupConfig();if(j){this.cfg.applyConfig(j,true);}this.cfg.fireQueue();},setupConfig:function(){var h=this.cfg;h.addProperty(c.PAGES.key,{value:c.PAGES.value,validator:h.checkNumber,handler:this.configPages});h.addProperty(c.YEAR_OFFSET.key,{value:c.YEAR_OFFSET.valu
 e,handler:this.delegateConfig,supercedes:c.YEAR_OFFSET.supercedes,suppressEvent:true});h.addProperty(c.TODAY.key,{value:new Date(c.TODAY.value.getTime()),supercedes:c.TODAY.supercedes,handler:this.configToday,suppressEvent:false});h.addProperty(c.PAGEDATE.key,{value:c.PAGEDATE.value||new Date(c.TODAY.value.getTime()),handler:this.configPageDate});h.addProperty(c.SELECTED.key,{value:[],handler:this.configSelected});h.addProperty(c.TITLE.key,{value:c.TITLE.value,handler:this.configTitle});h.addProperty(c.CLOSE.key,{value:c.CLOSE.value,handler:this.configClose});h.addProperty(c.IFRAME.key,{value:c.IFRAME.value,handler:this.configIframe,validator:h.checkBoolean});h.addProperty(c.MINDATE.key,{value:c.MINDATE.value,handler:this.delegateConfig});h.addProperty(c.MAXDATE.key,{value:c.MAXDATE.value,handler:this.delegateConfig});h.addProperty(c.MULTI_SELECT.key,{value:c.MULTI_SELECT.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.OOM_SELECT.key,{value:c.OOM_SELECT.
 value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.START_WEEKDAY.key,{value:c.START_WEEKDAY.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.SHOW_WEEKDAYS.key,{value:c.SHOW_WEEKDAYS.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.SHOW_WEEK_HEADER.key,{value:c.SHOW_WEEK_HEADER.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.SHOW_WEEK_FOOTER.key,{value:c.SHOW_WEEK_FOOTER.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.HIDE_BLANK_WEEKS.key,{value:c.HIDE_BLANK_WEEKS.value,handler:this.delegateConfig,validator:h.checkBoolean});h.addProperty(c.NAV_ARROW_LEFT.key,{value:c.NAV_ARROW_LEFT.value,handler:this.delegateConfig});h.addProperty(c.NAV_ARROW_RIGHT.key,{value:c.NAV_ARROW_RIGHT.value,handler:this.delegateConfig});h.addProperty(c.MONTHS_SHORT.key,{value:c.MONTHS_SHORT.value,handler:this.delegateConfig});h.addProperty(c.MONTHS_LONG.key,{value:c.MONTH
 S_LONG.value,handler:this.delegateConfig});h.addProperty(c.WEEKDAYS_1CHAR.key,{value:c.WEEKDAYS_1CHAR.value,handler:this.delegateConfig});h.addProperty(c.WEEKDAYS_SHORT.key,{value:c.WEEKDAYS_SHORT.value,handler:this.delegateConfig});h.addProperty(c.WEEKDAYS_MEDIUM.key,{value:c.WEEKDAYS_MEDIUM.value,handler:this.delegateConfig});h.addProperty(c.WEEKDAYS_LONG.key,{value:c.WEEKDAYS_LONG.value,handler:this.delegateConfig});h.addProperty(c.LOCALE_MONTHS.key,{value:c.LOCALE_MONTHS.value,handler:this.delegateConfig});h.addProperty(c.LOCALE_WEEKDAYS.key,{value:c.LOCALE_WEEKDAYS.value,handler:this.delegateConfig});h.addProperty(c.DATE_DELIMITER.key,{value:c.DATE_DELIMITER.value,handler:this.delegateConfig});h.addProperty(c.DATE_FIELD_DELIMITER.key,{value:c.DATE_FIELD_DELIMITER.value,handler:this.delegateConfig});h.addProperty(c.DATE_RANGE_DELIMITER.key,{value:c.DATE_RANGE_DELIMITER.value,handler:this.delegateConfig});h.addProperty(c.MY_MONTH_POSITION.key,{value:c.MY_MONTH_POSITION.value,hand
 ler:this.delegateConfig,validator:h.checkNumber});
-h.addProperty(c.MY_YEAR_POSITION.key,{value:c.MY_YEAR_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MD_MONTH_POSITION.key,{value:c.MD_MONTH_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MD_DAY_POSITION.key,{value:c.MD_DAY_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MDY_MONTH_POSITION.key,{value:c.MDY_MONTH_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MDY_DAY_POSITION.key,{value:c.MDY_DAY_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MDY_YEAR_POSITION.key,{value:c.MDY_YEAR_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MY_LABEL_MONTH_POSITION.key,{value:c.MY_LABEL_MONTH_POSITION.value,handler:this.delegateConfig,validator:h.checkNumber});h.addProperty(c.MY_LABEL_YEAR_POSITION.key,{value:c.MY_LABEL_YEAR_POSITION.value,handler:this.delegateConfig,validat
 or:h.checkNumber});h.addProperty(c.MY_LABEL_MONTH_SUFFIX.key,{value:c.MY_LABEL_MONTH_SUFFIX.value,handler:this.delegateConfig});h.addProperty(c.MY_LABEL_YEAR_SUFFIX.key,{value:c.MY_LABEL_YEAR_SUFFIX.value,handler:this.delegateConfig});h.addProperty(c.NAV.key,{value:c.NAV.value,handler:this.configNavigator});h.addProperty(c.STRINGS.key,{value:c.STRINGS.value,handler:this.configStrings,validator:function(i){return e.isObject(i);},supercedes:c.STRINGS.supercedes});},initEvents:function(){var j=this,l="Event",m=YAHOO.util.CustomEvent;var i=function(o,s,n){for(var r=0;r<j.pages.length;++r){var q=j.pages[r];q[this.type+l].subscribe(o,s,n);}};var h=function(n,r){for(var q=0;q<j.pages.length;++q){var o=j.pages[q];o[this.type+l].unsubscribe(n,r);}};var k=g._EVENT_TYPES;j.beforeSelectEvent=new m(k.BEFORE_SELECT);j.beforeSelectEvent.subscribe=i;j.beforeSelectEvent.unsubscribe=h;j.selectEvent=new m(k.SELECT);j.selectEvent.subscribe=i;j.selectEvent.unsubscribe=h;j.beforeDeselectEvent=new m(k.BEF
 ORE_DESELECT);j.beforeDeselectEvent.subscribe=i;j.beforeDeselectEvent.unsubscribe=h;j.deselectEvent=new m(k.DESELECT);j.deselectEvent.subscribe=i;j.deselectEvent.unsubscribe=h;j.changePageEvent=new m(k.CHANGE_PAGE);j.changePageEvent.subscribe=i;j.changePageEvent.unsubscribe=h;j.beforeRenderEvent=new m(k.BEFORE_RENDER);j.beforeRenderEvent.subscribe=i;j.beforeRenderEvent.unsubscribe=h;j.renderEvent=new m(k.RENDER);j.renderEvent.subscribe=i;j.renderEvent.unsubscribe=h;j.resetEvent=new m(k.RESET);j.resetEvent.subscribe=i;j.resetEvent.unsubscribe=h;j.clearEvent=new m(k.CLEAR);j.clearEvent.subscribe=i;j.clearEvent.unsubscribe=h;j.beforeShowEvent=new m(k.BEFORE_SHOW);j.showEvent=new m(k.SHOW);j.beforeHideEvent=new m(k.BEFORE_HIDE);j.hideEvent=new m(k.HIDE);j.beforeShowNavEvent=new m(k.BEFORE_SHOW_NAV);j.showNavEvent=new m(k.SHOW_NAV);j.beforeHideNavEvent=new m(k.BEFORE_HIDE_NAV);j.hideNavEvent=new m(k.HIDE_NAV);j.beforeRenderNavEvent=new m(k.BEFORE_RENDER_NAV);j.renderNavEvent=new m(k.REND
 ER_NAV);j.beforeDestroyEvent=new m(k.BEFORE_DESTROY);j.destroyEvent=new m(k.DESTROY);},configPages:function(u,s,n){var l=s[0],j=c.PAGEDATE.key,x="_",m,o=null,t="groupcal",w="first-of-type",k="last-of-type";for(var i=0;i<l;++i){var v=this.id+x+i,r=this.containerId+x+i,q=this.cfg.getConfig();q.close=false;q.title=false;q.navigator=null;if(i>0){m=new Date(o);this._setMonthOnDate(m,m.getMonth()+i);q.pageDate=m;}var h=this.constructChild(v,r,q);d.removeClass(h.oDomContainer,this.Style.CSS_SINGLE);d.addClass(h.oDomContainer,t);if(i===0){o=h.cfg.getProperty(j);d.addClass(h.oDomContainer,w);}if(i==(l-1)){d.addClass(h.oDomContainer,k);}h.parent=this;h.index=i;this.pages[this.pages.length]=h;}},configPageDate:function(o,n,l){var j=n[0],m;var k=c.PAGEDATE.key;for(var i=0;i<this.pages.length;++i){var h=this.pages[i];if(i===0){m=h._parsePageDate(j);h.cfg.setProperty(k,m);}else{var q=new Date(m);this._setMonthOnDate(q,q.getMonth()+i);h.cfg.setProperty(k,q);}}},configSelected:function(j,h,l){var k
 =c.SELECTED.key;this.delegateConfig(j,h,l);var i=(this.pages.length>0)?this.pages[0].cfg.getProperty(k):[];this.cfg.setProperty(k,i,true);},delegateConfig:function(i,h,l){var m=h[0];var k;for(var j=0;j<this.pages.length;j++){k=this.pages[j];k.cfg.setProperty(i,m);}},setChildFunction:function(k,i){var h=this.cfg.getProperty(c.PAGES.key);for(var j=0;j<h;++j){this.pages[j][k]=i;}},callChildFunction:function(m,i){var h=this.cfg.getProperty(c.PAGES.key);for(var l=0;l<h;++l){var k=this.pages[l];if(k[m]){var j=k[m];j.call(k,i);}}},constructChild:function(k,i,j){var h=document.getElementById(i);if(!h){h=document.createElement("div");h.id=i;this.oDomContainer.appendChild(h);}return new g(k,i,j);},setMonth:function(l){l=parseInt(l,10);var m;var i=c.PAGEDATE.key;for(var k=0;k<this.pages.length;++k){var j=this.pages[k];var h=j.cfg.getProperty(i);if(k===0){m=h.getFullYear();}else{h.setFullYear(m);}this._setMonthOnDate(h,l+k);j.cfg.setProperty(i,h);}},setYear:function(j){var i=c.PAGEDATE.key;j=pa
 rseInt(j,10);for(var l=0;l<this.pages.length;++l){var k=this.pages[l];var h=k.cfg.getProperty(i);if((h.getMonth()+1)==1&&l>0){j+=1;}k.setYear(j);}},render:function(){this.renderHeader();for(var i=0;i<this.pages.length;++i){var h=this.pages[i];h.render();}this.renderFooter();},select:function(h){for(var j=0;j<this.pages.length;++j){var i=this.pages[j];i.select(h);}return this.getSelectedDates();},selectCell:function(h){for(var j=0;j<this.pages.length;++j){var i=this.pages[j];i.selectCell(h);}return this.getSelectedDates();},deselect:function(h){for(var j=0;j<this.pages.length;++j){var i=this.pages[j];i.deselect(h);}return this.getSelectedDates();},deselectAll:function(){for(var i=0;i<this.pages.length;++i){var h=this.pages[i];h.deselectAll();}return this.getSelectedDates();},deselectCell:function(h){for(var j=0;j<this.pages.length;++j){var i=this.pages[j];i.deselectCell(h);}return this.getSelectedDates();},reset:function(){for(var i=0;i<this.pages.length;++i){var h=this.pages[i];h.re
 set();}},clear:function(){for(var i=0;
-i<this.pages.length;++i){var h=this.pages[i];h.clear();}this.cfg.setProperty(c.SELECTED.key,[]);this.cfg.setProperty(c.PAGEDATE.key,new Date(this.pages[0].today.getTime()));this.render();},nextMonth:function(){for(var i=0;i<this.pages.length;++i){var h=this.pages[i];h.nextMonth();}},previousMonth:function(){for(var i=this.pages.length-1;i>=0;--i){var h=this.pages[i];h.previousMonth();}},nextYear:function(){for(var i=0;i<this.pages.length;++i){var h=this.pages[i];h.nextYear();}},previousYear:function(){for(var i=0;i<this.pages.length;++i){var h=this.pages[i];h.previousYear();}},getSelectedDates:function(){var j=[];var i=this.cfg.getProperty(c.SELECTED.key);for(var l=0;l<i.length;++l){var k=i[l];var h=f.getDate(k[0],k[1]-1,k[2]);j.push(h);}j.sort(function(n,m){return n-m;});return j;},addRenderer:function(h,i){for(var k=0;k<this.pages.length;++k){var j=this.pages[k];j.addRenderer(h,i);}},addMonthRenderer:function(k,h){for(var j=0;j<this.pages.length;++j){var i=this.pages[j];i.addMonth
 Renderer(k,h);}},addWeekdayRenderer:function(i,h){for(var k=0;k<this.pages.length;++k){var j=this.pages[k];j.addWeekdayRenderer(i,h);}},removeRenderers:function(){this.callChildFunction("removeRenderers");},renderHeader:function(){},renderFooter:function(){},addMonths:function(h){this.callChildFunction("addMonths",h);},subtractMonths:function(h){this.callChildFunction("subtractMonths",h);},addYears:function(h){this.callChildFunction("addYears",h);},subtractYears:function(h){this.callChildFunction("subtractYears",h);},getCalendarPage:function(l){var o=null;if(l){var p=l.getFullYear(),k=l.getMonth();var j=this.pages;for(var n=0;n<j.length;++n){var h=j[n].cfg.getProperty("pagedate");if(h.getFullYear()===p&&h.getMonth()===k){o=j[n];break;}}}return o;},_setMonthOnDate:function(i,j){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420&&(j<0||j>11)){var h=f.add(i,f.MONTH,j-i.getMonth());i.setTime(h.getTime());}else{i.setMonth(j);}},_fixWidth:function(){var h=0;for(var j=0;j<this.pages.length;++
 j){var i=this.pages[j];h+=i.oDomContainer.offsetWidth;}if(h>0){this.oDomContainer.style.width=h+"px";}},toString:function(){return"CalendarGroup "+this.id;},destroy:function(){if(this.beforeDestroyEvent.fire()){var k=this;if(k.navigator){k.navigator.destroy();}if(k.cfg){k.cfg.destroy();}a.purgeElement(k.oDomContainer,true);d.removeClass(k.oDomContainer,b.CSS_CONTAINER);d.removeClass(k.oDomContainer,b.CSS_MULTI_UP);for(var j=0,h=k.pages.length;j<h;j++){k.pages[j].destroy();k.pages[j]=null;}k.oDomContainer.innerHTML="";k.oDomContainer=null;this.destroyEvent.fire();}}};b.CSS_CONTAINER="yui-calcontainer";b.CSS_MULTI_UP="multi";b.CSS_2UPTITLE="title";b.CSS_2UPCLOSE="close-icon";YAHOO.lang.augmentProto(b,g,"buildDayLabel","buildMonthLabel","renderOutOfBoundsDate","renderRowHeader","renderRowFooter","renderCellDefault","styleCellDefault","renderCellStyleHighlight1","renderCellStyleHighlight2","renderCellStyleHighlight3","renderCellStyleHighlight4","renderCellStyleToday","renderCellStyleSel
 ected","renderCellNotThisMonth","styleCellNotThisMonth","renderBodyCellRestricted","initStyles","configTitle","configClose","configIframe","configStrings","configToday","configNavigator","createTitleBar","createCloseButton","removeTitleBar","removeCloseButton","hide","show","toDate","_toDate","_parseArgs","browser");YAHOO.widget.CalGrp=b;YAHOO.widget.CalendarGroup=b;YAHOO.widget.Calendar2up=function(j,h,i){this.init(j,h,i);};YAHOO.extend(YAHOO.widget.Calendar2up,b);YAHOO.widget.Cal2up=YAHOO.widget.Calendar2up;})();YAHOO.widget.CalendarNavigator=function(a){this.init(a);};(function(){var a=YAHOO.widget.CalendarNavigator;a.CLASSES={NAV:"yui-cal-nav",NAV_VISIBLE:"yui-cal-nav-visible",MASK:"yui-cal-nav-mask",YEAR:"yui-cal-nav-y",MONTH:"yui-cal-nav-m",BUTTONS:"yui-cal-nav-b",BUTTON:"yui-cal-nav-btn",ERROR:"yui-cal-nav-e",YEAR_CTRL:"yui-cal-nav-yc",MONTH_CTRL:"yui-cal-nav-mc",INVALID:"yui-invalid",DEFAULT:"yui-default"};a.DEFAULT_CONFIG={strings:{month:"Month",year:"Year",submit:"Okay",ca
 ncel:"Cancel",invalidYear:"Year needs to be a number"},monthFormat:YAHOO.widget.Calendar.LONG,initialFocus:"year"};a._DEFAULT_CFG=a.DEFAULT_CONFIG;a.ID_SUFFIX="_nav";a.MONTH_SUFFIX="_month";a.YEAR_SUFFIX="_year";a.ERROR_SUFFIX="_error";a.CANCEL_SUFFIX="_cancel";a.SUBMIT_SUFFIX="_submit";a.YR_MAX_DIGITS=4;a.YR_MINOR_INC=1;a.YR_MAJOR_INC=10;a.UPDATE_DELAY=50;a.YR_PATTERN=/^\d+$/;a.TRIM=/^\s*(.*?)\s*$/;})();YAHOO.widget.CalendarNavigator.prototype={id:null,cal:null,navEl:null,maskEl:null,yearEl:null,monthEl:null,errorEl:null,submitEl:null,cancelEl:null,firstCtrl:null,lastCtrl:null,_doc:null,_year:null,_month:0,__rendered:false,init:function(a){var c=a.oDomContainer;this.cal=a;this.id=c.id+YAHOO.widget.CalendarNavigator.ID_SUFFIX;this._doc=c.ownerDocument;var b=YAHOO.env.ua.ie;this.__isIEQuirks=(b&&((b<=6)||(this._doc.compatMode=="BackCompat")));},show:function(){var a=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeShowNavEvent.fire()){if(!this.__rendered){this.render();}this.
 clearErrors();this._updateMonthUI();this._updateYearUI();this._show(this.navEl,true);this.setInitialFocus();this.showMask();YAHOO.util.Dom.addClass(this.cal.oDomContainer,a.NAV_VISIBLE);this.cal.showNavEvent.fire();}},hide:function(){var a=YAHOO.widget.CalendarNavigator.CLASSES;if(this.cal.beforeHideNavEvent.fire()){this._show(this.navEl,false);this.hideMask();YAHOO.util.Dom.removeClass(this.cal.oDomContainer,a.NAV_VISIBLE);this.cal.hideNavEvent.fire();}},showMask:function(){this._show(this.maskEl,true);if(this.__isIEQuirks){this._syncMask();}},hideMask:function(){this._show(this.maskEl,false);},getMonth:function(){return this._month;},getYear:function(){return this._year;},setMonth:function(a){if(a>=0&&a<12){this._month=a;}this._updateMonthUI();},setYear:function(b){var a=YAHOO.widget.CalendarNavigator.YR_PATTERN;if(YAHOO.lang.isNumber(b)&&a.test(b+"")){this._year=b;}this._updateYearUI();},render:function(){this.cal.beforeRenderNavEvent.fire();if(!this.__rendered){this.createNav();
 this.createMask();this.applyListeners();
-this.__rendered=true;}this.cal.renderNavEvent.fire();},createNav:function(){var b=YAHOO.widget.CalendarNavigator;var c=this._doc;var e=c.createElement("div");e.className=b.CLASSES.NAV;var a=this.renderNavContents([]);e.innerHTML=a.join("");this.cal.oDomContainer.appendChild(e);this.navEl=e;this.yearEl=c.getElementById(this.id+b.YEAR_SUFFIX);this.monthEl=c.getElementById(this.id+b.MONTH_SUFFIX);this.errorEl=c.getElementById(this.id+b.ERROR_SUFFIX);this.submitEl=c.getElementById(this.id+b.SUBMIT_SUFFIX);this.cancelEl=c.getElementById(this.id+b.CANCEL_SUFFIX);if(YAHOO.env.ua.gecko&&this.yearEl&&this.yearEl.type=="text"){this.yearEl.setAttribute("autocomplete","off");}this._setFirstLastElements();},createMask:function(){var b=YAHOO.widget.CalendarNavigator.CLASSES;var a=this._doc.createElement("div");a.className=b.MASK;this.cal.oDomContainer.appendChild(a);this.maskEl=a;},_syncMask:function(){var b=this.cal.oDomContainer;if(b&&this.maskEl){var a=YAHOO.util.Dom.getRegion(b);YAHOO.util.Do
 m.setStyle(this.maskEl,"width",a.right-a.left+"px");YAHOO.util.Dom.setStyle(this.maskEl,"height",a.bottom-a.top+"px");}},renderNavContents:function(a){var c=YAHOO.widget.CalendarNavigator,d=c.CLASSES,b=a;b[b.length]='<div class="'+d.MONTH+'">';this.renderMonth(b);b[b.length]="</div>";b[b.length]='<div class="'+d.YEAR+'">';this.renderYear(b);b[b.length]="</div>";b[b.length]='<div class="'+d.BUTTONS+'">';this.renderButtons(b);b[b.length]="</div>";b[b.length]='<div class="'+d.ERROR+'" id="'+this.id+c.ERROR_SUFFIX+'"></div>';return b;},renderMonth:function(c){var f=YAHOO.widget.CalendarNavigator,g=f.CLASSES;var j=this.id+f.MONTH_SUFFIX,e=this.__getCfg("monthFormat"),a=this.cal.cfg.getProperty((e==YAHOO.widget.Calendar.SHORT)?"MONTHS_SHORT":"MONTHS_LONG"),d=c;if(a&&a.length>0){d[d.length]='<label for="'+j+'">';d[d.length]=this.__getCfg("month",true);d[d.length]="</label>";d[d.length]='<select name="'+j+'" id="'+j+'" class="'+g.MONTH_CTRL+'">';for(var b=0;b<a.length;b++){d[d.length]='<opt
 ion value="'+b+'">';d[d.length]=a[b];d[d.length]="</option>";}d[d.length]="</select>";}return d;},renderYear:function(b){var d=YAHOO.widget.CalendarNavigator,e=d.CLASSES;var f=this.id+d.YEAR_SUFFIX,a=d.YR_MAX_DIGITS,c=b;c[c.length]='<label for="'+f+'">';c[c.length]=this.__getCfg("year",true);c[c.length]="</label>";c[c.length]='<input type="text" name="'+f+'" id="'+f+'" class="'+e.YEAR_CTRL+'" maxlength="'+a+'"/>';return c;},renderButtons:function(a){var c=YAHOO.widget.CalendarNavigator.CLASSES;var b=a;b[b.length]='<span class="'+c.BUTTON+" "+c.DEFAULT+'">';b[b.length]='<button type="button" id="'+this.id+"_submit"+'">';b[b.length]=this.__getCfg("submit",true);b[b.length]="</button>";b[b.length]="</span>";b[b.length]='<span class="'+c.BUTTON+'">';b[b.length]='<button type="button" id="'+this.id+"_cancel"+'">';b[b.length]=this.__getCfg("cancel",true);b[b.length]="</button>";b[b.length]="</span>";return b;},applyListeners:function(){var b=YAHOO.util.Event;function a(){if(this.validate(
 )){this.setYear(this._getYearFromUI());}}function c(){this.setMonth(this._getMonthFromUI());}b.on(this.submitEl,"click",this.submit,this,true);b.on(this.cancelEl,"click",this.cancel,this,true);b.on(this.yearEl,"blur",a,this,true);b.on(this.monthEl,"change",c,this,true);if(this.__isIEQuirks){YAHOO.util.Event.on(this.cal.oDomContainer,"resize",this._syncMask,this,true);}this.applyKeyListeners();},purgeListeners:function(){var a=YAHOO.util.Event;a.removeListener(this.submitEl,"click",this.submit);a.removeListener(this.cancelEl,"click",this.cancel);a.removeListener(this.yearEl,"blur");a.removeListener(this.monthEl,"change");if(this.__isIEQuirks){a.removeListener(this.cal.oDomContainer,"resize",this._syncMask);}this.purgeKeyListeners();},applyKeyListeners:function(){var d=YAHOO.util.Event,a=YAHOO.env.ua;var c=(a.ie||a.webkit)?"keydown":"keypress";var b=(a.ie||a.opera||a.webkit)?"keydown":"keypress";d.on(this.yearEl,"keypress",this._handleEnterKey,this,true);d.on(this.yearEl,c,this._handl
 eDirectionKeys,this,true);d.on(this.lastCtrl,b,this._handleTabKey,this,true);d.on(this.firstCtrl,b,this._handleShiftTabKey,this,true);},purgeKeyListeners:function(){var d=YAHOO.util.Event,a=YAHOO.env.ua;var c=(a.ie||a.webkit)?"keydown":"keypress";var b=(a.ie||a.opera||a.webkit)?"keydown":"keypress";d.removeListener(this.yearEl,"keypress",this._handleEnterKey);d.removeListener(this.yearEl,c,this._handleDirectionKeys);d.removeListener(this.lastCtrl,b,this._handleTabKey);d.removeListener(this.firstCtrl,b,this._handleShiftTabKey);},submit:function(){if(this.validate()){this.hide();this.setMonth(this._getMonthFromUI());this.setYear(this._getYearFromUI());var b=this.cal;var a=YAHOO.widget.CalendarNavigator.UPDATE_DELAY;if(a>0){var c=this;window.setTimeout(function(){c._update(b);},a);}else{this._update(b);}}},_update:function(b){var a=YAHOO.widget.DateMath.getDate(this.getYear()-b.cfg.getProperty("YEAR_OFFSET"),this.getMonth(),1);b.cfg.setProperty("pagedate",a);b.render();},cancel:functio
 n(){this.hide();},validate:function(){if(this._getYearFromUI()!==null){this.clearErrors();return true;}else{this.setYearError();this.setError(this.__getCfg("invalidYear",true));return false;}},setError:function(a){if(this.errorEl){this.errorEl.innerHTML=a;this._show(this.errorEl,true);}},clearError:function(){if(this.errorEl){this.errorEl.innerHTML="";this._show(this.errorEl,false);}},setYearError:function(){YAHOO.util.Dom.addClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearYearError:function(){YAHOO.util.Dom.removeClass(this.yearEl,YAHOO.widget.CalendarNavigator.CLASSES.INVALID);},clearErrors:function(){this.clearError();this.clearYearError();},setInitialFocus:function(){var a=this.submitEl,c=this.__getCfg("initialFocus");if(c&&c.toLowerCase){c=c.toLowerCase();if(c=="year"){a=this.yearEl;try{this.yearEl.select();}catch(b){}}else{if(c=="month"){a=this.monthEl;}}}if(a&&YAHOO.lang.isFunction(a.focus)){try{a.focus();}catch(d){}}},erase:function(){if(this.__rende
 red){this.purgeListeners();
-this.yearEl=null;this.monthEl=null;this.errorEl=null;this.submitEl=null;this.cancelEl=null;this.firstCtrl=null;this.lastCtrl=null;if(this.navEl){this.navEl.innerHTML="";}var b=this.navEl.parentNode;if(b){b.removeChild(this.navEl);}this.navEl=null;var a=this.maskEl.parentNode;if(a){a.removeChild(this.maskEl);}this.maskEl=null;this.__rendered=false;}},destroy:function(){this.erase();this._doc=null;this.cal=null;this.id=null;},_show:function(b,a){if(b){YAHOO.util.Dom.setStyle(b,"display",(a)?"block":"none");}},_getMonthFromUI:function(){if(this.monthEl){return this.monthEl.selectedIndex;}else{return 0;}},_getYearFromUI:function(){var b=YAHOO.widget.CalendarNavigator;var a=null;if(this.yearEl){var c=this.yearEl.value;c=c.replace(b.TRIM,"$1");if(b.YR_PATTERN.test(c)){a=parseInt(c,10);}}return a;},_updateYearUI:function(){if(this.yearEl&&this._year!==null){this.yearEl.value=this._year;}},_updateMonthUI:function(){if(this.monthEl){this.monthEl.selectedIndex=this._month;}},_setFirstLastElem
 ents:function(){this.firstCtrl=this.monthEl;this.lastCtrl=this.cancelEl;if(this.__isMac){if(YAHOO.env.ua.webkit&&YAHOO.env.ua.webkit<420){this.firstCtrl=this.monthEl;this.lastCtrl=this.yearEl;}if(YAHOO.env.ua.gecko){this.firstCtrl=this.yearEl;this.lastCtrl=this.yearEl;}}},_handleEnterKey:function(b){var a=YAHOO.util.KeyListener.KEY;if(YAHOO.util.Event.getCharCode(b)==a.ENTER){YAHOO.util.Event.preventDefault(b);this.submit();}},_handleDirectionKeys:function(h){var g=YAHOO.util.Event,a=YAHOO.util.KeyListener.KEY,d=YAHOO.widget.CalendarNavigator;var f=(this.yearEl.value)?parseInt(this.yearEl.value,10):null;if(isFinite(f)){var b=false;switch(g.getCharCode(h)){case a.UP:this.yearEl.value=f+d.YR_MINOR_INC;b=true;break;case a.DOWN:this.yearEl.value=Math.max(f-d.YR_MINOR_INC,0);b=true;break;case a.PAGE_UP:this.yearEl.value=f+d.YR_MAJOR_INC;b=true;break;case a.PAGE_DOWN:this.yearEl.value=Math.max(f-d.YR_MAJOR_INC,0);b=true;break;default:break;}if(b){g.preventDefault(h);try{this.yearEl.select
 ();}catch(c){}}}},_handleTabKey:function(d){var c=YAHOO.util.Event,a=YAHOO.util.KeyListener.KEY;if(c.getCharCode(d)==a.TAB&&!d.shiftKey){try{c.preventDefault(d);this.firstCtrl.focus();}catch(b){}}},_handleShiftTabKey:function(d){var c=YAHOO.util.Event,a=YAHOO.util.KeyListener.KEY;if(d.shiftKey&&c.getCharCode(d)==a.TAB){try{c.preventDefault(d);this.lastCtrl.focus();}catch(b){}}},__getCfg:function(d,b){var c=YAHOO.widget.CalendarNavigator.DEFAULT_CONFIG;var a=this.cal.cfg.getProperty("navigator");if(b){return(a!==true&&a.strings&&a.strings[d])?a.strings[d]:c.strings[d];}else{return(a!==true&&a[d])?a[d]:c[d];}},__isMac:(navigator.userAgent.toLowerCase().indexOf("macintosh")!=-1)};YAHOO.register("calendar",YAHOO.widget.Calendar,{version:"2.9.0",build:"2800"});
\ No newline at end of file


[16/20] wicket git commit: WICKET-6105 split tests

Posted by sv...@apache.org.
WICKET-6105 split tests


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/a4aed9e3
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/a4aed9e3
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/a4aed9e3

Branch: refs/heads/master
Commit: a4aed9e35a6055d627960a58eee40e29d84c461d
Parents: 0a4b5f2
Author: Sven Meier <sv...@apache.org>
Authored: Mon Oct 16 08:57:43 2017 +0200
Committer: Sven Meier <sv...@apache.org>
Committed: Tue Oct 17 22:32:40 2017 +0200

----------------------------------------------------------------------
 .../html/form/datetime/DateTimeFieldTest.java   | 200 +++++--------------
 .../form/datetime/LocalDateTextFieldTest.java   |  89 +++++++++
 .../html/form/datetime/TimeFieldTest.java       | 107 ++++++++++
 3 files changed, 242 insertions(+), 154 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/a4aed9e3/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
index 64efda6..8296ad6 100644
--- a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
+++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/DateTimeFieldTest.java
@@ -16,19 +16,15 @@
  */
 package org.apache.wicket.extensions.markup.html.form.datetime;
 
-import java.io.Serializable;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.LocalTime;
-import java.time.format.FormatStyle;
 import java.util.Locale;
 
 import org.apache.wicket.MarkupContainer;
 import org.apache.wicket.markup.IMarkupResourceStreamProvider;
 import org.apache.wicket.markup.html.WebPage;
 import org.apache.wicket.markup.html.form.Form;
-import org.apache.wicket.markup.html.form.FormComponent;
-import org.apache.wicket.model.IModel;
 import org.apache.wicket.model.Model;
 import org.apache.wicket.util.convert.converter.LocalDateConverter;
 import org.apache.wicket.util.resource.IResourceStream;
@@ -39,200 +35,96 @@ import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
-public class DateTimeFieldTest extends WicketTestCase {
+/**
+ * Test for {@link LocalDateTimeField}.
+ */
+public class DateTimeFieldTest extends WicketTestCase
+{
 	@Rule
 	public ExpectedException expectedException = ExpectedException.none();
 
 	@Test
-	public void timeNullTest() {
-		TestTimePage page = new TestTimePage(null);
-		tester.startPage(page);
-		FormTester formTester = tester.newFormTester("form", false);
-		formTester.submit();
-		assertNull(page.field.getModelObject());
-	}
-
-	@Test
-	public void timeNullHoursTest() {
-		TestTimePage page = new TestTimePage(null);
-		tester.startPage(page);
-		FormTester formTester = tester.newFormTester("form", false);
-		formTester.setValue("field:minutes", "8");
-		formTester.submit();
-		assertNull(page.field.getModelObject());
-	}
-
-	@Test
-	public void timeNullMinutesTest() {
-		TestTimePage page = new TestTimePage(null);
-		tester.startPage(page);
-		FormTester formTester = tester.newFormTester("form", false);
-		formTester.setValue("field:hours", "8");
-		formTester.submit();
-		assertNull(page.field.getModelObject());
-	}
-
-	@Test
-	public void timeNotNullTest() {
-		TestTimePage page = new TestTimePage(LocalTime.of(6, 15));
-		tester.startPage(page);
-		FormTester formTester = tester.newFormTester("form", false);
-		formTester.setValue("field:hours", "8");
-		formTester.submit();
-		LocalTime t = page.field.getModelObject();
-		assertNotNull(t);
-		assertEquals(8, t.getHour());
-		assertEquals(15, t.getMinute());
-	}
-
-	@Test
-	public void dateNullTest() {
-		TestDatePage page = new TestDatePage(null);
-		tester.startPage(page);
-		FormTester formTester = tester.newFormTester("form", false);
-		formTester.submit();
-		assertNull(page.field.getModelObject());
-	}
-
-	@Test
-	public void dateNotNullTest() {
-		LocalDate date = LocalDate.of(2017, 02, 13);
-		TestDatePage page = new TestDatePage(null);
-		tester.startPage(page);
-		FormTester formTester = tester.newFormTester("form", false);
-		formTester.setValue("field", new LocalDateConverter().convertToString(date, Locale.forLanguageTag("en-US")));
-		formTester.submit();
-		LocalDate d = page.field.getModelObject();
-		assertNotNull(d);
-		assertEquals(date, d);
-	}
-
-	@Test
-	public void dateTimeNullTest() {
-		TestDateTimePage page = new TestDateTimePage(null);
+	public void dateTimeNull()
+	{
+		TestPage page = new TestPage(null);
 		tester.startPage(page);
 		FormTester formTester = tester.newFormTester("form", false);
 		formTester.submit();
+		tester.assertNoErrorMessage();
 		assertNull(page.field.getModelObject());
 	}
 
 	@Test
-	public void dateTimeNullTest1() {
+	public void timeEmpty()
+	{
 		LocalDate date = LocalDate.of(2017, 02, 13);
-		TestDateTimePage page = new TestDateTimePage(null);
+		TestPage page = new TestPage(null);
 		tester.startPage(page);
 		FormTester formTester = tester.newFormTester("form", false);
-		formTester.setValue("field:date", new LocalDateConverter().convertToString(date, Locale.forLanguageTag("en-US")));
+		formTester.setValue("field:date",
+			new LocalDateConverter().convertToString(date, Locale.forLanguageTag("en-US")));
 		formTester.submit();
-		assertNull(page.field.getModelObject());
+		tester.assertNoErrorMessage();
+		assertEquals(LocalDateTime.of(date, LocalTime.of(12, 0)), page.field.getModelObject());
 	}
 
 	@Test
-	public void dateTimeNullTest2() {
-		TestDateTimePage page = new TestDateTimePage(null);
+	public void dateEmpty()
+	{
+		TestPage page = new TestPage(null);
 		tester.startPage(page);
 		FormTester formTester = tester.newFormTester("form", false);
 		formTester.setValue("field:time:hours", "6");
 		formTester.setValue("field:time:minutes", "15");
 		formTester.select("field:time:amOrPmChoice", 0);
 		formTester.submit();
-		assertNull(page.field.getModelObject());
+		tester.assertErrorMessages("The value of 'field' is not a valid LocalDateTime.");
 	}
 
 	@Test
-	public void dateTimeNotNullTest() {
+	public void dateTimeNotEmpty()
+	{
 		LocalDate date = LocalDate.of(2017, 02, 13);
-		TestDateTimePage page = new TestDateTimePage(null);
+		TestPage page = new TestPage(null);
 		tester.startPage(page);
 		FormTester formTester = tester.newFormTester("form", false);
-		formTester.setValue("field:date", new LocalDateConverter().convertToString(date, Locale.forLanguageTag("en-US")));
+		formTester.setValue("field:date",
+			new LocalDateConverter().convertToString(date, Locale.forLanguageTag("en-US")));
 		formTester.setValue("field:time:hours", "6");
 		formTester.setValue("field:time:minutes", "15");
 		formTester.select("field:time:amOrPmChoice", 0);
 		formTester.submit();
-		assertNotNull(page.field.getModelObject());
-		assertEquals(LocalDateTime.of(date, LocalTime.of(6,  15)), page.field.getModelObject());
-	}
-
-	public static class TestDateTimePage extends TestPage<LocalDateTime>
-	{
-		private static final long serialVersionUID = 1L;
-
-		TestDateTimePage(LocalDateTime val)
-		{
-			super(val);
-		}
-
-		@Override
-		FormComponent<LocalDateTime> newComponent()
-		{
-			return new LocalDateTimeField("field", model);
-		}
-	}
-
-	public static class TestDatePage extends TestPage<LocalDate>
-	{
-		private static final long serialVersionUID = 1L;
-
-		TestDatePage(LocalDate val)
-		{
-			super(val);
-			tag = "input type=\"text\"";
-		}
-
-		@Override
-		FormComponent<LocalDate> newComponent()
-		{
-			return new LocalDateTextField("field", model, FormatStyle.SHORT);
-		}
+		tester.assertNoErrorMessage();
+		assertEquals(LocalDateTime.of(date, LocalTime.of(6, 15)), page.field.getModelObject());
 	}
 
-	public static class TestTimePage extends TestPage<LocalTime>
+	public static class TestPage extends WebPage implements IMarkupResourceStreamProvider
 	{
 		private static final long serialVersionUID = 1L;
 
-		TestTimePage(LocalTime val)
-		{
-			super(val);
-		}
+		public LocalDateTimeField field;
 
-		@Override
-		FormComponent<LocalTime> newComponent()
-		{
-			return new TimeField("field", model);
-		}
-	}
-
-	public abstract static class TestPage<T extends Serializable> extends WebPage implements IMarkupResourceStreamProvider
-	{
-		private static final long serialVersionUID = 1L;
-		Form<Void> form;
-		FormComponent<T> field;
-		IModel<T> model = new Model<T>();
-		String tag = "span";
-
-		/** */
-		public TestPage(T val)
-		{
-			add(form = new Form<>("form"));
-			model.setObject(val);
-			form.add(field = newComponent());
-		}
-
-		abstract FormComponent<T> newComponent();
-
-		@Override
-		public IResourceStream getMarkupResourceStream(MarkupContainer container, Class<?> containerClass)
+		TestPage(LocalDateTime val)
 		{
-			return new StringResourceStream(String.format("<html><body>"
-					+ "<form wicket:id=\"form\"><%s wicket:id=\"field\"/></form></body></html>", tag));
+			Form<Void> form = new Form<>("form");
+			add(form);
+
+			form.add(field = new LocalDateTimeField("field", Model.of(val))
+			{
+				@Override
+				protected LocalTime getDefaultTime()
+				{
+					return LocalTime.NOON;
+				}
+			});
 		}
 
 		@Override
-		protected void onDetach()
+		public IResourceStream getMarkupResourceStream(MarkupContainer container,
+			Class<?> containerClass)
 		{
-			super.onDetach();
-			model.detach();
+			return new StringResourceStream("<html><body>"
+				+ "<form wicket:id=\"form\"><span wicket:id=\"field\"/></form></body></html>");
 		}
 	}
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/a4aed9e3/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextFieldTest.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextFieldTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextFieldTest.java
new file mode 100644
index 0000000..1d50158
--- /dev/null
+++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/LocalDateTextFieldTest.java
@@ -0,0 +1,89 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalDate;
+import java.time.format.FormatStyle;
+import java.util.Locale;
+
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.markup.IMarkupResourceStreamProvider;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.convert.converter.LocalDateConverter;
+import org.apache.wicket.util.resource.IResourceStream;
+import org.apache.wicket.util.resource.StringResourceStream;
+import org.apache.wicket.util.tester.FormTester;
+import org.apache.wicket.util.tester.WicketTestCase;
+import org.junit.Test;
+
+/**
+ * Test for {@link LocalDateTextField}.
+ */
+public class LocalDateTextFieldTest extends WicketTestCase
+{
+
+	@Test
+	public void dateNullTest()
+	{
+		TestPage page = new TestPage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.submit();
+		tester.assertNoErrorMessage();
+		assertNull(page.field.getModelObject());
+	}
+
+	@Test
+	public void dateNotNullTest()
+	{
+		LocalDate date = LocalDate.of(2017, 02, 13);
+		TestPage page = new TestPage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field",
+			new LocalDateConverter().convertToString(date, Locale.forLanguageTag("en-US")));
+		formTester.submit();
+		tester.assertNoErrorMessage();
+		LocalDate d = page.field.getModelObject();
+		assertEquals(date, d);
+	}
+
+	public static class TestPage extends WebPage implements IMarkupResourceStreamProvider
+	{
+		private static final long serialVersionUID = 1L;
+
+		public LocalDateTextField field;
+
+		TestPage(LocalDate val)
+		{
+			Form<Void> form = new Form<>("form");
+			add(form);
+
+			form.add(field = new LocalDateTextField("field", Model.of(val), FormatStyle.SHORT));
+		}
+
+		@Override
+		public IResourceStream getMarkupResourceStream(MarkupContainer container,
+			Class<?> containerClass)
+		{
+			return new StringResourceStream("<html><body>"
+				+ "<form wicket:id=\"form\"><input wicket:id=\"field\"/></form></body></html>");
+		}
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/wicket/blob/a4aed9e3/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeFieldTest.java
----------------------------------------------------------------------
diff --git a/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeFieldTest.java b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeFieldTest.java
new file mode 100644
index 0000000..1d698b0
--- /dev/null
+++ b/wicket-extensions/src/test/java/org/apache/wicket/extensions/markup/html/form/datetime/TimeFieldTest.java
@@ -0,0 +1,107 @@
+/*
+ * 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.wicket.extensions.markup.html.form.datetime;
+
+import java.time.LocalTime;
+
+import org.apache.wicket.MarkupContainer;
+import org.apache.wicket.markup.IMarkupResourceStreamProvider;
+import org.apache.wicket.markup.html.WebPage;
+import org.apache.wicket.markup.html.form.Form;
+import org.apache.wicket.model.Model;
+import org.apache.wicket.util.resource.IResourceStream;
+import org.apache.wicket.util.resource.StringResourceStream;
+import org.apache.wicket.util.tester.FormTester;
+import org.apache.wicket.util.tester.WicketTestCase;
+import org.junit.Test;
+
+/**
+ * Test for {@link TimeField}.
+ */
+public class TimeFieldTest extends WicketTestCase
+{
+
+	@Test
+	public void timeNull()
+	{
+		TestPage page = new TestPage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.submit();
+		tester.assertNoErrorMessage();
+		assertNull(page.field.getModelObject());
+	}
+
+	@Test
+	public void timeEmptyHours()
+	{
+		TestPage page = new TestPage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field:minutes", "8");
+		formTester.submit();
+		tester.assertErrorMessages("The value of 'field' is not a valid LocalTime.");
+	}
+
+	@Test
+	public void timeEmptyMinutes()
+	{
+		TestPage page = new TestPage(null);
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field:hours", "8");
+		formTester.submit();
+		tester.assertErrorMessages("The value of 'field' is not a valid LocalTime.");
+	}
+
+	@Test
+	public void timeNotNull()
+	{
+		TestPage page = new TestPage(LocalTime.of(6, 15));
+		tester.startPage(page);
+		FormTester formTester = tester.newFormTester("form", false);
+		formTester.setValue("field:hours", "8");
+		formTester.submit();
+		LocalTime t = page.field.getModelObject();
+		assertNotNull(t);
+		assertEquals(8, t.getHour());
+		assertEquals(15, t.getMinute());
+	}
+
+	public static class TestPage extends WebPage implements IMarkupResourceStreamProvider
+	{
+		private static final long serialVersionUID = 1L;
+
+		public TimeField field;
+
+		TestPage(LocalTime val)
+		{
+			Form<Void> form = new Form<>("form");
+			add(form);
+
+			form.add(field = new TimeField("field", Model.of(val)));
+		}
+
+		@Override
+		public IResourceStream getMarkupResourceStream(MarkupContainer container,
+			Class<?> containerClass)
+		{
+			return new StringResourceStream("<html><body>"
+				+ "<form wicket:id=\"form\"><span wicket:id=\"field\"/></form></body></html>");
+		}
+	}
+}