Author: jkuhnert
Date: Sat May 12 17:22:52 2007
New Revision: 537534

URL: http://svn.apache.org/viewvc?view=rev&rev=537534
Log:
Fixes TAPESTRY-1454. Had some additional client side wiget parameters that the 
component didn't have support for yet.

Added:
    
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/form/ShowError.html
   (with props)
Removed:
    
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/form/ShowError.properties
Modified:
    
tapestry/tapestry4/trunk/src/site/xdoc/components/dojo/dropdowndatepicker.xml
    tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html
    
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.java
    
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.jwc
    
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/LinkSubmit.script
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/datetime.js
    
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js
    
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/AlertDialog.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/Widget.js

Modified: 
tapestry/tapestry4/trunk/src/site/xdoc/components/dojo/dropdowndatepicker.xml
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/dojo/dropdowndatepicker.xml?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/src/site/xdoc/components/dojo/dropdowndatepicker.xml 
(original)
+++ 
tapestry/tapestry4/trunk/src/site/xdoc/components/dojo/dropdowndatepicker.xml 
Sat May 12 17:22:52 2007
@@ -54,11 +54,11 @@
                     </tr>
                     <tr>
                         <td>value</td>
-                        <td>java.util.Date</td>
+                        <td>Object</td>
                         <td>yes</td>
                         <td></td>
                         <td>
-                            The data value. Take care to ensure date time 
values are 'normalized'
+                            The date value. Take care to ensure date time 
values are 'normalized'
                             before performing any millisec based comparison or 
equality operations.
                         </td>
                     </tr>
@@ -123,6 +123,60 @@
                         <td>literal:Select a Date</td>
                         <td>
                            The textual name given to the date picking icon 
before the image is loaded.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>displayWeeks</td>
+                        <td>int</td>
+                        <td>no</td>
+                        <td>6</td>
+                        <td>
+                            Number of weeks to display, default is 6.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>adjustWeeks</td>
+                        <td>boolean</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>
+                            If true, weekly size of calendar changes to 
accomodate the month. If false (the default), 42 day format is used.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>startDate</td>
+                        <td>Object</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            First available date in the calendar set. If 
specified then no date earlier than startDate will be selectable.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>endDate</td>
+                        <td>Object</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            Last available date in the calendar set. If 
specified then no date later than endDate will be selectable.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>weekStartsOn</td>
+                        <td>int</td>
+                        <td>no</td>
+                        <td>0</td>
+                        <td>
+                            Adjusts the first day of the week 
0==Sunday..6==Saturday.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>staticDisplay</td>
+                        <td>boolean</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>
+                            Disables all incremental controls, must pick a 
date in the current display. Default is false.
                         </td>
                     </tr>
                 </table>

Modified: 
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html 
(original)
+++ 
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/Fields.html 
Sat May 12 17:22:52 2007
@@ -82,7 +82,7 @@
        <td></td>
                <td>
        Or, use a LinkSubmit component:   
-       <a jwcid="[EMAIL PROTECTED]" listener="listener:doByLink" 
async="true">Continue</a>
+       <a jwcid="[EMAIL PROTECTED]" listener="listener:doByLink">Continue</a>
         </td>
   </tr>
   

Added: 
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/form/ShowError.html
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/form/ShowError.html?view=auto&rev=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/form/ShowError.html
 (added)
+++ 
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/form/ShowError.html
 Sat May 12 17:22:52 2007
@@ -0,0 +1,8 @@
+<table class="inputerror">
+    <tr valign="top">
+        <td><img src="images/Warning.gif" alt="Warning" width="42" height="42" 
/></td>
+        <td class="message">
+            <span jwcid="@RenderBody" />
+        </td>
+    </tr>
+</table>

Propchange: 
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/form/ShowError.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/form/ShowError.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: 
tapestry/tapestry4/trunk/tapestry-examples/Workbench/src/context/WEB-INF/form/ShowError.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Modified: 
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.java?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.java
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.java
 Sat May 12 17:22:52 2007
@@ -46,6 +46,18 @@
     
     /** Alt html text for the date icon, what is displayed when mouse hovers 
over icon. */
     public abstract String getIconAlt();
+
+    public abstract int getDisplayWeeks();
+
+    public abstract boolean isAdjustWeeks();
+
+    public abstract Object getStartDate();
+
+    public abstract Object getEndDate();
+
+    public abstract int getWeekStartsOn();
+
+    public abstract boolean isStaticDisplay();
     
     /**
      * [EMAIL PROTECTED]
@@ -87,7 +99,19 @@
         }
         
         json.put("disabled", isDisabled());
-        
+        if (getDisplayWeeks() > 0)
+            json.put("displayWeeks", getDisplayWeeks());
+        if (isAdjustWeeks())
+            json.put("adjustWeeks", isAdjustWeeks());
+        if (getStartDate() != null)
+            json.put("startDate", translator.formatRfc3339(getStartDate()));
+        if (getEndDate() != null)
+            json.put("endDate", translator.formatRfc3339(getEndDate()));
+        if (getWeekStartsOn() > -1)
+            json.put("weekStartsOn", getWeekStartsOn());
+        if (isStaticDisplay())
+            json.put("staticDisplay", isStaticDisplay());
+
         Map parms = new HashMap();
         parms.put("clientId", getClientId());
         parms.put("props", json.toString());

Modified: 
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.jwc
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.jwc?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.jwc
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/dojo/form/DropdownDatePicker.jwc
 Sat May 12 17:22:52 2007
@@ -15,23 +15,53 @@
    limitations under the License.
 -->
 
-<!DOCTYPE component-specification PUBLIC 
-  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
-  "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd";>
+<!DOCTYPE component-specification PUBLIC
+        "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
+        "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd";>
 
 <component-specification 
class="org.apache.tapestry.dojo.form.DropdownDatePicker" allow-body="no">
-  
-  <parameter name="value" required="yes"/>
-  <parameter name="disabled"/>
-  <parameter name="iconAlt" default-value="literal:Select a Date" />
-  
-  <parameter name="displayName"/>
-  <parameter name="translator" default-value="translator:date,pattern=dd MMM 
yyyy"/>
-  <parameter name="validators"/>
-  <parameter name="id" property="idParameter" default-value="id"/>
-  
-  <inject property="script" type="script" object="DropdownDatePicker.script"/>
-  <inject property="translatedFieldSupport" 
object="service:tapestry.form.TranslatedFieldSupport"/>
-  <inject property="validatableFieldSupport" 
object="service:tapestry.form.ValidatableFieldSupport"/>
-    
+
+    <parameter name="value" required="yes"/>
+    <parameter name="disabled"/>
+    <parameter name="iconAlt" default-value="literal:Select a Date" />
+    <parameter name="displayWeeks" >
+        <description>
+            Number of weeks to display, default is 6.
+        </description>
+    </parameter>
+    <parameter name="adjustWeeks" >
+        <description>
+            If true, weekly size of calendar changes to accomodate the month. 
If false (the default), 42 day format is used.
+        </description>
+    </parameter>
+    <parameter name="startDate" >
+        <description>
+            First available date in the calendar set. If specified then no 
date earlier than startDate will be selectable.
+        </description>
+    </parameter>
+    <parameter name="endDate" >
+        <description>
+            Last available date in the calendar set. If specified then no date 
later than endDate will be selectable.
+        </description>
+    </parameter>
+    <parameter name="weekStartsOn">
+        <description>
+            Adjusts the first day of the week 0==Sunday..6==Saturday.
+        </description>
+    </parameter>
+    <parameter name="staticDisplay">
+        <description>
+            Disables all incremental controls, must pick a date in the current 
display. Default is false.
+        </description>
+    </parameter>
+
+    <parameter name="displayName"/>
+    <parameter name="translator" default-value="translator:date,pattern=dd MMM 
yyyy"/>
+    <parameter name="validators"/>
+    <parameter name="id" property="idParameter" default-value="id"/>
+
+    <inject property="script" type="script" 
object="DropdownDatePicker.script"/>
+    <inject property="translatedFieldSupport" 
object="service:tapestry.form.TranslatedFieldSupport"/>
+    <inject property="validatableFieldSupport" 
object="service:tapestry.form.ValidatableFieldSupport"/>
+
 </component-specification>

Modified: 
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/LinkSubmit.script
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/LinkSubmit.script?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/LinkSubmit.script
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/form/LinkSubmit.script
 Sat May 12 17:22:52 2007
@@ -1,30 +1,30 @@
-<?xml version="1.0"?>
-<!-- 
-   Copyright 2005 The Apache Software Foundation
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
--->
-
-<!DOCTYPE script PUBLIC
-       "-//Apache Software Foundation//Tapestry Script Specification 3.0//EN"
-       "http://tapestry.apache.org/dtd/Script_3_0.dtd";>
+<?xml version="1.0"?>
+<!-- 
+   Copyright 2005 The Apache Software Foundation
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<!DOCTYPE script PUBLIC
+       "-//Apache Software Foundation//Tapestry Script Specification 3.0//EN"
+       "http://tapestry.apache.org/dtd/Script_3_0.dtd";>
 <script>
-
-<input-symbol key="name" required="yes" />
+
+<input-symbol key="name" required="yes" />
 <input-symbol key="form" required="yes" />
 
 <let key="href">
-javascript:tapestry.form.submit("${form.clientId}","${name}");
+javascript:tapestry.form.submit('${form.clientId}','${name}');
 </let>
-
+
 </script>

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js 
(original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js Sat May 
12 17:22:52 2007
@@ -1,9 +1,7 @@
 dojo.provide("tapestry.form");
-
 dojo.require("dojo.event.browser");
 dojo.require("dojo.dom");
 dojo.require("dojo.html.selection");
-
 dojo.require("tapestry.core");
 
 /**
@@ -296,8 +294,8 @@
                        tapestry.form.submitAsync(form);
                        return;
                }
-               
-               form.submit();
+        
+        form.submit();
        },
        
        /**

Modified: 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/datetime.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/datetime.js?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/datetime.js 
(original)
+++ 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/datetime.js 
Sat May 12 17:22:52 2007
@@ -2,7 +2,6 @@
 
 dojo.require("dojo.date.format");
 dojo.require("dojo.validate.datetime");
-dojo.require("dojo.logging.Logger");
 
 tapestry.form.datetime={
        

Modified: 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js 
(original)
+++ 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form/validation.js 
Sat May 12 17:22:52 2007
@@ -1,5 +1,4 @@
 dojo.provide("tapestry.form.validation");
-
 dojo.require("dojo.validate.check");
 dojo.require("dojo.html.style");
 dojo.require("dojo.widget.*");

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js Sat May 
12 17:22:52 2007
@@ -1,6 +1,4 @@
 dojo.provide("tapestry.fx");
-
-dojo.require("dojo.logging.Logger");
 dojo.require("tapestry.core");
 
 /**

Modified: 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/AlertDialog.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/AlertDialog.js?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/AlertDialog.js
 (original)
+++ 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/AlertDialog.js
 Sat May 12 17:22:52 2007
@@ -2,7 +2,6 @@
 
 dojo.require("dojo.widget.*");
 dojo.require("dojo.widget.Dialog");
-dojo.require("dojo.widget.Button");
 dojo.require("dojo.event.common");
 dojo.require("dojo.html.common");
 

Modified: 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/Widget.js
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/Widget.js?view=diff&rev=537534&r1=537533&r2=537534
==============================================================================
--- 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/Widget.js 
(original)
+++ 
tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/widget/Widget.js 
Sat May 12 17:22:52 2007
@@ -13,7 +13,6 @@
 // limitations under the License.
 dojo.provide("tapestry.widget");
 dojo.provide("tapestry.widget.Widget");
-
 dojo.require("dojo.widget.*");
 
 // Define core widget management methods


Reply via email to