cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudius Spellmann <claudius.spellm...@juwimm.com>
Subject Deleting multiple repeater rows
Date Mon, 10 Jan 2005 17:10:24 GMT
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


Mime
View raw message