cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Salvetti <salvetti.m...@gmail.com>
Subject Re: execute js after row-delete ?
Date Sun, 20 Nov 2005 02:54:58 GMT
Thanks a lot !
It works perfectly :)

Marc

2005/11/17, Robin Wyles <rob@robinwyles.com>:
>
> Marc,
>
> Instead of using a fd:row-action why not use a fd:action such as:
>
> <fd:action id="delete_item" command="delete_item">
> <fd:on-action>
> <fd:javascript>
> var widget = event.source;
> var row = widget.parent;
> var repeater = row.parent;
> repeater.removeRow(repeater.indexOf(row));
> // Your extra code here...
> </fd:javascript>
> </fd:on-action>
> </fd:action>
>
> Hope this helps...
>
> Robin
>
>
> On 16 Nov 2005, at 11:01, Marc Salvetti wrote:
>
> > Hello,
> >
> > I have a cart displaying an invoice on top of the page and a cforms
> > with a repeater displaying the products at the bottom of the page.
> > I need to update the invoice when a row is deleted in the repeater
> > The calculation of the invoice is done on the server and need to read
> > from the dom binded to the form
> > So i need to do a form.save(doc) to update the dom tree, then pass
> > this dom tree to the invoicing fonction.
> >
> > Now my problem is that for the row-delete action, the on-action
> > handler is triggered *before* the row is removed, so calling
> > form.save() in this handler is useless for me.
> >
> > Does someone now how to execute some code after the row is deleted ?
> >
> > Thanks,
> >
> > Marc
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Mime
View raw message