You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Claudius Spellmann <cl...@juwimm.com> on 2005/01/10 18:10:24 UTC
Deleting multiple repeater rows
Hi,
I've got a problem when deleting multiple repeater rows. Cocoon only
seems to be deleting one row at the time.
When I delete a couple of rows it first seems that cocoon is deleting
the repeater rows correctly but when reloading the form only one item
was deleted.
My binding file looks like this:
<fb:repeater id="xxx" parent-path="." row-path="xxxx">
<fb:identity>
<fb:value id="study_id" path="@studyId"/>
</fb:identity>
<fb:on-bind>
<fb:value id="xxxxx" path="xxxxx"/>
<fb:value id="xxxx" path="xxx"/>
<fb:value id="xxxxxr" path="xxx"/>
</fb:on-bind>
<fb:on-delete-row>
<fb:delete-node/>
</fb:on-delete-row>
<fb:on-insert-row>
<fb:insert-bean
classname="myPackage"
addmethod="myAddMethod"/>
</fb:on-insert-row>
</fb:repeater>
And my template like this:
<fd:repeater-action id="remove_xxx" action-command="delete-rows"
repeater="xxx" select="xxxx">
<fd:label>remove selected items</fd:label>
<!-- <fd:on-action>
<javascript>
<![CDATA[
var widget =
cocoon.session.getAttribute("admin_form_widget");
var trials = widget.trials;
for (var i = 0; i < trials.length; i++) {
if(trials[i].select == true) {
trials[i].id = null ; // The application
will only delete items with null id's
}
}
]]>
</javascript>
</fd:on-action> -->
</fd:repeater-action>
I've already tried to use the on-action event but nothing will happen then
Any Ideas ????
Thanks in advance
Claudius
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Deleting multiple repeater rows
Posted by beatejung <be...@online.de>.
Am Montag, 10. Januar 2005 18:10 schrieb Claudius Spellmann:
hi,
> I've got a problem when deleting multiple repeater rows. Cocoon only
> seems to be deleting one row at the time.
> When I delete a couple of rows it first seems that cocoon is deleting
> the repeater rows correctly but when reloading the form only one item
> was deleted.
> And my template like this:
>
> <fd:repeater-action id="remove_xxx" action-command="delete-rows"
> repeater="xxx" select="xxxx">
> <fd:label>remove selected items</fd:label>
you should try <fd:on-activate> instead i think ;-)
> <!-- <fd:on-action>
> <javascript>
> <![CDATA[
>
> var widget =
> cocoon.session.getAttribute("admin_form_widget");
> var trials = widget.trials;
>
> for (var i = 0; i < trials.length; i++) {
> if(trials[i].select == true) {
> trials[i].id = null ; // The application
> will only delete items with null id's
> }
> }
> ]]>
> </javascript>
> </fd:on-action> -->
> </fd:repeater-action>
>
> I've already tried to use the on-action event but nothing will happen then
>
> Any Ideas ????
>
> Thanks in advance
> Claudius
--
����
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org