This should work:

button.onClick = function() {
 var row = button.getParent();
 var repeater = row.getParent();
 repeater.removeRow(parseInt(row.getId()))
}

But I think it would be a good idea to add a getRowIndex() to the JS RepeaterRow object. Maybe a remove() operation should be added to JS RepeaterRow as well.

Chris

Mark Lundquist wrote:

I'm using Cocoon 2.1.5_dev w/ the v2 forms+flow API...

I've got an <fd:action> as a child of a repeater. This is supposed to be a "Delete" button that calls removeRow() on the repeater for its row, but I can't figure out how to know, within the fd:action's onClick handler, the index of the row whose delete button submitted the form.

Is there a nice way to do this?

Thanks a lot,
Mark


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




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



Reply via email to