Hi,

I'm having trouble using a multivalue field within a union - at least with mozilla based browsers and AJAX enabled I'm getting JavaScript errors and the multivalue field stops working.

Attached is a very simple example that reproduces the problem. The tar is intended to be extracted into a default cocoon installation in the folder where the main cocoon sitemap resides and is then accessible via http://localhost:xxxx/..../uniontest/uniontest. I'm using Cocoon 2.1.8.

The attached example lets you swich cases via a drop down box - very similar to Datasource chooser sample in cocoon. Case 1 has a multivalue field in it, case 2 has a simple field. Upon first loading, the default case (the multivalue field) is displayed. Everything's fine so far. You can now swich to case 2, so the simple field gets displayed. However, from now on it is not possible to swich back to the multivalue field - at least not with Mozilla or Firefox, IE works fine...

In the Javascript console I can see the following error when trying to switch back:

Error: this.entry has no properties
Source File: http://localhost:8080/cocoon2.1.8/policyeditnew/resources/forms/js/forms-lib.js
Line: 234

This is located in the FormsMultiValueEditor JavaScript class that gets instanciated as part of the multivalue field on the bowser side. Also this is perfectly working upon first loading the page, it seems that the partial AJAX updates that Mozilla / Firefox retrieves are not immediatelly accessible via getElementById. Thus, the first lookup in FormsMultiValueEditor() fails and causes Mozilla / Firefox cancelling the new FormsMultiValueEditor() call together with the complete div replacement and things stop working.

(By the way: The same behaviour occurs when using a multivalue field within a repeater that has move actions associated with the repeater rows. As soon as a move has been triggered, the multivalue field stops working.)

Is this a known problem or is it possible to work around this? I've dived into this somewhat, but my knowledge of JavaScript is still very limited. Any help is greatly appreciated.

Thanks!

Ralph

Attachment: uniontest.tar
Description: Unix tar archive

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to