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

Posted by Grégoire Neuville on
URL: https://discuss.orbeon.com/fr-date-component-Exception-in-client-side-code-tp3871584p3882126.html

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
>
Thanks for the tip.

>> 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
All is working fine now, thank you very much.

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