cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Cocoon Forms v3 onClick
Date Fri, 14 May 2004 18:48:34 GMT
On Fri, 2004-05-14 at 18:36, Markx.Johnson@rrd.com wrote:
> Hi all,
> 
> I have a FlowScript that uses Cocoon Forms.  I sets the onClick
> function of an Action widget like so:
> 
>   var wid = form.getWidget();
>   wid.submit.onClick = function() {
>     form.save(occ);
>     occ.store(occ.getMetaData());
>   }
> 
> I recently switched from Cocoon Forms v2 to v3 to take advantage of
> the multiple bindings feature.  Suddenly the FlowScript fails on the
> line wid.submit.onClick = function().
> 
> Anybody know what is going on?
> Does  form.getWidget() return something different in v3?

yes, the forms v3 API isn't compatible with v2.

in v3, getWidget() returns the java widget. The javascript form model is
accessible via the property form.model, thus where you previously used
form.getWidget(), now use form.model

Furthermore, onClick has been renamed to onActivate (and may be renamed
to onAction in the future, which would fit better).

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


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


Mime
View raw message