Funny thing, I never wanted to touch JavaScript, but here we are... On Oct 22, 2011, at 6:58 AM, Steve Eynon wrote:
> Blimey, > > It looks like you worked hard to find that one! > > Well done! > > Steve. > > > > > On 22 October 2011 17:30, Lenny Primak <lpri...@hope.nyc.ny.us> wrote: >> I found the bug in underscore.js, and it's a serious one. >> https://issues.apache.org/jira/browse/TAP5-1716 >> >> I also submitted a bug for underscore.js itself. >> >> On Oct 22, 2011, at 3:56 AM, Lenny Primak wrote: >> >>> Never mind, the 'old' contains() works correctly. >>> This actually seems to be what's wrong with the new code, >>> the scripts that should not be reloaded (datepicker.js) are reloaded when >>> zone is refreshed. >>> >>> >>> On Oct 22, 2011, at 3:53 AM, Lenny Primak wrote: >>> >>>> Digging there even further, >>>> it seems that the old addScripts() had a bug that >>>> Tapestry.ScriptManager.contains(document.scripts, "src", ...) >>>> would silently throw the exception every time, and the scripts would never >>>> get reloaded, which masked the problem. >>>> >>>> With this code reworked, scripts actually get reloaded and that seems to >>>> be causing a problem with datepicker 'losing' its prototype. >>>> >>>> >>>> On Oct 22, 2011, at 12:53 AM, Lenny Primak wrote: >>>> >>>>> Digging further into this, the problem is actually triggered by the GWT >>>>> JavaScript that's on the same page. >>>>> I can't reproduce this unless I have a GWT component on that page, any >>>>> GWT component. >>>>> >>>>> I believe something was broken with >>>>> http://svn.apache.org/viewvc?view=revision&revision=1186564 >>>>> It seems to load and call scripts in the wrong order now. >>>>> Seems like Tapestry.DateField.prototype is undefined after then AJAX call >>>>> to render the zone. >>>>> >>>>> >>>>> On Oct 21, 2011, at 3:05 PM, Lenny Primak wrote: >>>>> >>>>>> Just upgraded to beta-26, and started getting JavaScript errors when >>>>>> submitting an AJAX form. >>>>>> >>>>>> <t:zone t:id="searchZone"> >>>>>> <div t:type="button" cut="left"> >>>>>> <t:beaneditform t:id="searchForm" object="search" >>>>>> zone="searchZone"> >>>>>> </t:beaneditform> >>>>>> </div> >>>>>> </t:zone> >>>>>> >>>>>> search object has a Date (hence the DateField bean) >>>>>> >>>>>> I get the following errors starting sometime after beta-21 (it worked >>>>>> perfectly in beta-21) >>>>>> >>>>>> Exception invoking function Tapestry.Initializer.evalScript with >>>>>> parameters ["Tapestry.DateField.initLocalization({\n \"firstDay\" : >>>>>> 6,\n \"months\" : [\n \"January\",\n \"February\",\n >>>>>> \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n >>>>>> \"August\",\n \"September\",\n \"October\",\n >>>>>> \"November\",\n \"December\",\n \"\"\n ],\n \"days\" : >>>>>> \"mtwtfss\"\n});"]: TypeError: 'undefined' is not an object (evaluating >>>>>> 'Tapestry.DateField.prototype.firstDay = localization.firstDay') >>>>>> t5-console.js:61Exception invoking function >>>>>> Tapestry.Initializer.dateField with parameters >>>>>> [{"field":"dateFrom_13327d9e159","formatURL":"/test/test/tappage.datefield:format?t:cp=core/propertyeditblocks","parseURL":"/test/test/tappage.datefield:parse?t:cp=core/propertyeditblocks"}]: >>>>>> TypeError: '[Class ID:undefined]' is not a constructor (evaluating 'new >>>>>> Tapestry.DateField(spec)') >>>>>> t5-console.js:61Exception invoking function >>>>>> Tapestry.Initializer.dateField with parameters >>>>>> [{"field":"dateTo_13327d9e159","formatURL":"/test/test/tappage.datefield:format?t:cp=core/propertyeditblocks","parseURL":"/test/test/tappage.datefield:parse?t:cp=core/propertyeditblocks"}]: >>>>>> TypeError: '[Class ID:undefined]' is not a constructor (evaluating 'new >>>>>> Tapestry.DateField(spec)') >>>>> >>>> >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org