cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek Hohls" <dho...@csir.co.za>
Subject Re: execute js after row-delete ?
Date Sun, 20 Nov 2005 14:40:06 GMT
Perhaps, while we are on the subject - is it possible to
have a similar type of code that, when a row is inserted,
also inserts additional rows... ideally the number of rows 
inserted could be controlled by the value of another widget?

>>> salvetti.marc@gmail.com 2005/11/20 04:54:58 AM >>>

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






-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
HelpDesk@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


Mime
View raw message