Hi all,
  I'm trying to build a page which has a few basic components, and a few
EventListeners that update 'select' components etc etc. Recently, I've been
trying to add a @DatePicker, but I get horrible errors. Stack trace is
attached:

ERROR: 11:51:47 PM: Error evaluating script: //<![CDATA[
calendar_warrantyStartDate = new Calendar();
calendar_warrantyStartDate.initialize(["January", "February", "March",
"April", "May", "June", "July", "August", "September", "October",
"November", "December"], ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
"Aug", "Sep", "Oct", "Nov", "Dec"], ["Sunday", "Monday", "Tuesday",
"Wednesday", "Thursday", "Friday", "Saturday"], ["Sun", "Mon", "Tue", "Wed",
"Thu", "Fri", "Sat"], "dd MMM yyyy", 0, false, 1,
"Clear");calendar_warrantyStartDate.onchange = function() { var field =
dojo.byId("form").warrantyStartDate; var value =
calendar_warrantyStartDate.formatDate(); if (field.value != value) {
field.value = value; if (field.onchange) field.onchange(); }} dojo.require("
tapestry.form");tapestry.form.focusField('productType');
tapestry.cleanConnect(dojo.byId("productType"), "onchange",
"formEvent153267511"); tapestry.formEvent153267511=function(e){ var
content={beventname:"onchange"}; tapestry.event.buildEventProperties(e,
content); if (!content["beventtarget.id"]){
content["beventtarget.id"]="productType";
} var validateState=tapestry.form.forms["form"].validateForm; var
validateForm=false; tapestry.form.setFormValidating("form", validateForm);
tapestry.form.submitAsync("form", content);
tapestry.form.setFormValidating("form",
validateState); }; dojo.event.connect(dojo.byId("productType"), "onchange",
tapestry, "formEvent153267511"); tapestry.cleanConnect(dojo.byId("policyType"),
"onchange", "formEvent1649734528"); tapestry.formEvent1649734528=function(e){
var content={beventname:"onchange"}; tapestry.event.buildEventProperties(e,
content); if (!content["beventtarget.id"]){
content["beventtarget.id"]="policyType";
} var validateState=tapestry.form.forms["form"].validateForm; var
validateForm=false; tapestry.form.setFormValidating("form", validateForm);
tapestry.form.submitAsync("form", content);
tapestry.form.setFormValidating("form",
validateState); }; dojo.event.connect(dojo.byId("policyType"), "onchange",
tapestry, "formEvent1649734528"); //]]> TypeError : 'Calendar' is undefined



The Code I'm using is

                   <div class="fieldItem">
                       <span jwcid="@FieldLabel"
                           class="fieldLabels formFieldLabels"
                           displayName="Start Date"
                           field="component:warrantyStartDate"
                       />
                       <span jwcid="[EMAIL PROTECTED]"
value="ognl:policy.warrantyStartDate" class="field medField"/><br/>

Could the error I'm having stem from the fact that this calendar is inside
an 'IF' block, that is rendered based on a particular EventListener event?

Any help would be great, or I'll just have to revert to plain text fields

Cheers

Reply via email to