Hi,
The fr:date xbl component is bugged. Try the supplied date-unittest.xhtml in the xforms-sandbox : once loaded, change the date in one of the firsts "min" or "max fields. You'll get an "Exception in client-side code. Message: Cannot read property 'id' of null". I looked into the code (date.xbl) and found something odd indeed : the xxforms:script responsible for the calling of the associated js functions is only included in the final xforms if appearance "fr:inline" is set. But those functions ('init' especially) are nevertheless called with the default appearance (how ?) and quite logically fail because of the absence of some needed xhtml elements. I'll try to submit a patch but make no promise of success, so feel free to fix it on your side. Thanks, -- Grégoire Neuville -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Hi Grégoire,
2011/10/4 Grégoire Neuville <[hidden email]>: > The fr:date xbl component is bugged. Try the supplied > date-unittest.xhtml in the xforms-sandbox : once loaded, change the > date in one of the firsts "min" or "max fields. You'll get an > "Exception in client-side code. Message: Cannot read property 'id' of > null". BTW, you can try that example by going to the following URL (no need to copy it in the XForms sandbox directory or to upload it through the sandbox). http://localhost:8080/orbeon/xforms-sandbox/sample/xbl/orbeon/date/date-unittest > I looked into the code (date.xbl) and found something odd indeed : the > xxforms:script responsible for the calling of the associated js > functions is only included in the final xforms if appearance > "fr:inline" is set. > But those functions ('init' especially) are nevertheless called with > the default appearance (how ?) and quite logically fail because of the > absence of some needed xhtml elements. I notice is that when you change the min/max, the min/max are not updated in the inline fr:date (they are in the non-inline fr:date). This was due to a bug introduced in March doing some refactoring, and another long-standing bug. Here are the bugs and commits for reference. Those changes will be in the next nightly build. You'll let us know if this works for you. https://github.com/orbeon/orbeon-forms/commit/7f6dc78c91b4e7125e198147be1852efb38571a6 https://github.com/orbeon/orbeon-forms/commit/3e9b9e7c6637469260b6e030e7065c033d76d50a http://forge.ow2.org/tracker/index.php?func=detail&aid=316208&group_id=168&atid=350207 http://forge.ow2.org/tracker/index.php?func=detail&aid=316209&group_id=168&atid=350207 Alex -- Orbeon Forms - Web forms, open-source, for the Enterprise - http://www.orbeon.com/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by Grégoire Neuville
Hi,
Attached is a patch to date.js that does it for me but about which I can't tell for sure that it is side effect free. Thanks, Grégoire Neuville. 2011/10/4 Grégoire Neuville <[hidden email]>: > Hi, > > The fr:date xbl component is bugged. Try the supplied > date-unittest.xhtml in the xforms-sandbox : once loaded, change the > date in one of the firsts "min" or "max fields. You'll get an > "Exception in client-side code. Message: Cannot read property 'id' of > null". > > I looked into the code (date.xbl) and found something odd indeed : the > xxforms:script responsible for the calling of the associated js > functions is only included in the final xforms if appearance > "fr:inline" is set. > But those functions ('init' especially) are nevertheless called with > the default appearance (how ?) and quite logically fail because of the > absence of some needed xhtml elements. > I'll try to submit a patch but make no promise of success, so feel > free to fix it on your side. > > Thanks, > > -- > Grégoire Neuville > -- Grégoire Neuville -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws date.js.patch (1K) Download Attachment |
In reply to this post by Alessandro Vernet
Hi Alex,
On 5 October 2011 20:35, Alessandro Vernet <[hidden email]> wrote: > Hi Grégoire, > > 2011/10/4 Grégoire Neuville <[hidden email]>: >> The fr:date xbl component is bugged. Try the supplied >> date-unittest.xhtml in the xforms-sandbox : once loaded, change the >> date in one of the firsts "min" or "max fields. You'll get an >> "Exception in client-side code. Message: Cannot read property 'id' of >> null". > > BTW, you can try that example by going to the following URL (no need > to copy it in the XForms sandbox directory or to upload it through the > sandbox). > > http://localhost:8080/orbeon/xforms-sandbox/sample/xbl/orbeon/date/date-unittest > >> I looked into the code (date.xbl) and found something odd indeed : the >> xxforms:script responsible for the calling of the associated js >> functions is only included in the final xforms if appearance >> "fr:inline" is set. >> But those functions ('init' especially) are nevertheless called with >> the default appearance (how ?) and quite logically fail because of the >> absence of some needed xhtml elements. > > I notice is that when you change the min/max, the min/max are not > updated in the inline fr:date (they are in the non-inline fr:date). > This was due to a bug introduced in March doing some refactoring, and > another long-standing bug. Here are the bugs and commits for > reference. Those changes will be in the next nightly build. You'll let > us know if this works for you. > > https://github.com/orbeon/orbeon-forms/commit/7f6dc78c91b4e7125e198147be1852efb38571a6 > https://github.com/orbeon/orbeon-forms/commit/3e9b9e7c6637469260b6e030e7065c033d76d50a > http://forge.ow2.org/tracker/index.php?func=detail&aid=316208&group_id=168&atid=350207 > http://forge.ow2.org/tracker/index.php?func=detail&aid=316209&group_id=168&atid=350207 Note that I created a branch on my local orbeon git repository. I thus merged your changes on it. But they should probably also be merged back on 3.9-ce-stable branch (for wich the last commit is still 3be01f0bcad1ed8f19fa254746bf506841612baa), shouldn't they ? Grégoire. > > Alex > -- > Orbeon Forms - Web forms, open-source, for the Enterprise - > http://www.orbeon.com/ > My Twitter: http://twitter.com/avernet > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- Grégoire Neuville -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |