Login  Register

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

Posted by Grégoire Neuville on Oct 06, 2011; 8:57am
URL: https://discuss.orbeon.com/fr-date-component-Exception-in-client-side-code-tp3871584p3877476.html

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