You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by tm...@apache.org on 2006/04/15 15:02:48 UTC
svn commit: r394284 - in /incubator/webwork2/action/src:
main/resources/template/simple/
test/java/org/apache/struts/action2/views/jsp/ui/
test/resources/org/apache/struts/action2/views/jsp/ui/
Author: tmjee
Date: Sat Apr 15 06:02:46 2006
New Revision: 394284
URL: http://svn.apache.org/viewcvs?rev=394284&view=rev
Log:
- fix test case failing
- commented out test case testing feature no longer exists in dojo
DatePicker
- corrected some error in datepicker.ftl parameter.dateFormat should
actually be parameter.format
Modified:
incubator/webwork2/action/src/main/resources/template/simple/datepicker.ftl
incubator/webwork2/action/src/test/java/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest.java
incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-1.txt
incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-2.txt
Modified: incubator/webwork2/action/src/main/resources/template/simple/datepicker.ftl
URL: http://svn.apache.org/viewcvs/incubator/webwork2/action/src/main/resources/template/simple/datepicker.ftl?rev=394284&r1=394283&r2=394284&view=diff
==============================================================================
--- incubator/webwork2/action/src/main/resources/template/simple/datepicker.ftl (original)
+++ incubator/webwork2/action/src/main/resources/template/simple/datepicker.ftl Sat Apr 15 06:02:46 2006
@@ -8,8 +8,8 @@
<#else>
<div dojoType="dropdowncontainer"
dateIconPath="<@saf.url includeParams='none' value='/struts/dojo/struts/widgets/dateIcon.gif' encode='false'/>"
- <#if parameters.dateFormat?exists>
- dateFormat="${parameters.dateFormat}"
+ <#if parameters.format?exists>
+ dateFormat="${parameters.format}"
</#if>
<#if parameters.dateIconPath?exists>
dateIconPath="${parameters.dateIconPath}"
@@ -22,9 +22,6 @@
</#if>
<#if parameters.templateCssPath?exists>
templateCssPath="${parameters.templateCssPath}"
- </#if>
- <#if parameters.dateFormat?exists>
- dateFormat="${parameters.dateFormat}"
</#if>
<#if parameters.get("size")?exists>
inputWidth="${parameters.get("size")?html}"
Modified: incubator/webwork2/action/src/test/java/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest.java
URL: http://svn.apache.org/viewcvs/incubator/webwork2/action/src/test/java/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest.java?rev=394284&r1=394283&r2=394284&view=diff
==============================================================================
--- incubator/webwork2/action/src/test/java/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest.java (original)
+++ incubator/webwork2/action/src/test/java/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest.java Sat Apr 15 06:02:46 2006
@@ -26,6 +26,7 @@
* Unit test for {@link DatePickerTag}.
*
* @author Claus Ibsen
+ * @author tm_jee
*/
public class DatePickerTagTest extends AbstractUITagTest {
@@ -49,35 +50,42 @@
}
public void testFormat() throws Exception {
- tag.setFormat("yyyy/MM/dd hh:mm:ss");
+ tag.setFormat("#yyyy/#MM/#dd #hh:#mm:#ss");
tag.doStartTag();
tag.doEndTag();
- assertTrue("Should contain format", writer.toString().indexOf("yyyy/MM/dd hh:mm:ss") > -1);
+ assertTrue("Should contain format", writer.toString().indexOf("#yyyy/#MM/#dd #hh:#mm:#ss") > -1);
}
- public void testLanguage() throws Exception {
+ // NOTE: Switching to Dojo's DatePicker, i18n is not supported,
+ // Commenting out this test case
+ /*public void testLanguage() throws Exception {
tag.setLanguage("da");
tag.doStartTag();
tag.doEndTag();
assertTrue("Should contain danish language", writer.toString().indexOf("/struts/jscalendar/lang/calendar-da.js") > -1);
- }
+ }*/
- public void testShowstime() throws Exception {
+
+ // NOTE: Switching to Dojo's DatePicker, showing time is not supported.
+ // Commenting this test case
+ /*public void testShowstime() throws Exception {
tag.setShowstime("24");
tag.doStartTag();
tag.doEndTag();
assertTrue("Should contain showsTime 24", writer.toString().indexOf("showsTime : \"24\"") > -1);
- }
+ }*/
- public void testSingleclick() throws Exception {
+ // NOTE: Switching to Dojo's DatePickuer, single / double click to popup
+ // is not supported. Commenting out this test case.
+ /*public void testSingleclick() throws Exception {
tag.setSingleclick("true");
tag.doStartTag();
tag.doEndTag();
- }
+ }*/
protected void setUp() throws Exception {
super.setUp();
Modified: incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-1.txt
URL: http://svn.apache.org/viewcvs/incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-1.txt?rev=394284&r1=394283&r2=394284&view=diff
==============================================================================
--- incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-1.txt (original)
+++ incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-1.txt Sat Apr 15 06:02:46 2006
@@ -1,19 +1,15 @@
<tr>
<td class="tdLabel"></td>
<td>
-<script type="text/javascript" src="/struts/jscalendar/calendar.js"></script>
-<script type="text/javascript" src="/struts/jscalendar/lang/calendar-en.js"></script>
-<script type="text/javascript" src="/struts/jscalendar/calendar-setup.js"></script>
-<input type="text" name="" id=""/>
-<a href="#" id="_button"><img src="/struts/jscalendar/img.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
<script type="text/javascript">
- Calendar.setup({
- inputField : "",
- button : "_button",
- step : 1
- });
+ dojo.require("dojo.widget.html.DatePicker");
+ dojo.require("struts.widgets.*");
</script>
+
+ <div dojoType="dropdowncontainer"
+ dateIconPath="/struts/dojo/struts/widgets/dateIcon.gif"
+ >
+<input type="text" name="" id=""/>
+ </div>
</td>
</tr>
-
-
Modified: incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-2.txt
URL: http://svn.apache.org/viewcvs/incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-2.txt?rev=394284&r1=394283&r2=394284&view=diff
==============================================================================
--- incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-2.txt (original)
+++ incubator/webwork2/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/DatePickerTagTest-2.txt Sat Apr 15 06:02:46 2006
@@ -1,18 +1,16 @@
<tr>
<td class="tdLabel"></td>
<td>
-<script type="text/javascript" src="/struts/jscalendar/calendar.js"></script>
-<script type="text/javascript" src="/struts/jscalendar/lang/calendar-fr.js"></script>
-<script type="text/javascript" src="/struts/jscalendar/calendar-setup.js"></script>
-<input type="text" name="" id=""/>
-<a href="#" id="_button"><img src="/struts/jscalendar/img.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
<script type="text/javascript">
- Calendar.setup({
- inputField : "",
- button : "_button",
- step : 1
- });
+ dojo.require("dojo.widget.html.DatePicker");
+ dojo.require("struts.widgets.*");
</script>
+
+ <div dojoType="dropdowncontainer"
+ dateIconPath="/struts/dojo/struts/widgets/dateIcon.gif"
+ >
+<input type="text" name="" id=""/>
+ </div>
</td>
</tr>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org