cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Johnston" ...@lojjic.net>
Subject Re: onChange event handler not working in cocoon-2.1.7
Date Thu, 29 Sep 2005 20:01:15 GMT
>
> Hi,
>
> We are using cocoon-2.1.7
>
> I'm setting widget onChange event handler programmatically in the
> flowscript, it's not working as intended
> Same code working fine with cocoon-2.1.5.1
>
> I have attached my code below.
>
> cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/v2/Form.
> js");
> function test() {
>   var form = new Form("forms/test-def.xml");
>   var wid = frm.getWidget();
>
>   wid.number1.value = 1;
>
>   wid.number1.onChange = function(oldValue, newValue) {
>     print("number1 changed from " + oldValue + " to " + newValue);
>
>   }
>   form.showForm("forms/test.html");
> }
>
>
> We are using following resource in cocoon-2.1.5.1 ...
> cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/v3/Form.
> js");
>

Why did you switch flow APIs from v3 to v2?  The APIs have many
differences, so it's not surprising they're behaving differently.  I'm not
familiar with anything but v1, but a cursory glance at the javadocs tells
me v2 doesn't support the .onChange shortcut.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message