Re: fr:date component : Exception in client-side code

Posted by Alessandro Vernet on
URL: https://discuss.orbeon.com/fr-date-component-Exception-in-client-side-code-tp3871584p3877679.html

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