Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 60182 invoked from network); 23 Jul 2006 12:02:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Jul 2006 12:02:53 -0000 Received: (qmail 93682 invoked by uid 500); 23 Jul 2006 12:02:45 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 93629 invoked by uid 500); 23 Jul 2006 12:02:45 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 93618 invoked by uid 99); 23 Jul 2006 12:02:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jul 2006 05:02:45 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of andrewmadu@gmail.com designates 64.233.182.191 as permitted sender) Received: from [64.233.182.191] (HELO nf-out-0910.google.com) (64.233.182.191) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Jul 2006 05:02:44 -0700 Received: by nf-out-0910.google.com with SMTP id c31so1244315nfb for ; Sun, 23 Jul 2006 05:02:23 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=EVO85sXz3NhcWRGV5QfR5wlj4ZnxtZZUzCJk61D2ABN0GGvJ8pGVCRkqi9aAJ8jiDYy+8yyglaws1+SFg6a+gb8H6uaIN9I9IdEqXr1nEU0hweWQW72rV/7bec2SmjUDQYHdFX2waxiCF36O8CxN+HGOAao1QcIFzZcnKLSsA6E= Received: by 10.78.167.12 with SMTP id p12mr1088718hue; Sun, 23 Jul 2006 05:02:23 -0700 (PDT) Received: by 10.78.151.7 with HTTP; Sun, 23 Jul 2006 05:02:23 -0700 (PDT) Message-ID: Date: Sun, 23 Jul 2006 13:02:23 +0100 From: Andrew To: users@cocoon.apache.org Subject: Re: checkbox widget with datatype vector In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_158700_10386458.1153656143169" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_158700_10386458.1153656143169 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I have managed to track down the email I first posted to the group concerning this issue in 2004!: http://mail-archives.apache.org/mod_mbox/cocoon-users/200411.mbox/%3Cs18f3876.079@cs-emo.csir.co.za%3E The only thing I have changed, like I said earlier, is that I have now implemented a widget system with required fields and I suspect that it is the datatype declaration I have assigned to the widget that is causing the problem here. Any pointer will be most welcome. regards Andrew On 23/07/06, Andrew wrote: > > Any ideas with this one guys? > > regards > > Andrew > > > On 22/07/06, Andrew wrote: > > > > Hi, > > I have a shopping cart system which enables a user to select a number of > > items from their cart and delete them at the same time. This was working > > perfectly before I chnaged everything to widgets because I need to use ajax. > > What is happening now is that no matter how many items you select to delete, > > only one item is ever deleted at a time. Now I suspect that the problem lays > > with the datatype being used in fd: > > > > > > // I tried boolean and nothing was > > being deleted > > > > > > widget definition is: > > > > > > > > > > > > flow: > > > > delItems = bizData.delItem ; > > var items = new java.util.Vector(); > > > > if (parseInt(bizData.quantity) || delItems != null) { > > try { > > > > if (delItems != null) { > > > > if (delItems.iterator) { // A list of delItems have > > been selected to be deleted. > > items.addAll(delItems); > > deleteOrderItem2(items); > > } else { //A single delItem has been selected to be > > deleted. > > items.add(delItems); > > deleteOrderItem2(items); > > } > > } > > > > Any ideas what I am missing here? > > > > regards > > > > Andrew > > > > ------=_Part_158700_10386458.1153656143169 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi,
I have managed to track down the email I first posted to the group concerning this issue in 2004!:

http://mail-archives.apache.org/mod_mbox/cocoon-users/200411.mbox/%3Cs18f3876.079@cs-emo.csir.co.za%3E

The only thing I have changed, like I said earlier, is that I have now implemented a widget system with required fields and I suspect that it is the datatype declaration I have assigned to the widget that is causing the problem here.

Any pointer will be most welcome.

regards

Andrew

On 23/07/06, Andrew <andrewmadu@gmail.com > wrote:
Any ideas with this one guys?

regards

Andrew


On 22/07/06, Andrew < andrewmadu@gmail.com> wrote:
Hi,
I have a shopping cart system which enables a user to select a number of items from their cart and delete them at the same time. This was working perfectly before I chnaged everything to widgets because I need to use ajax. What is happening now is that no matter how many items you select to delete, only one item is ever deleted at a time. Now I suspect that the problem lays with the datatype being used in fd:

    <fd:field id="delItem" required="true|false">
      <fd:datatype base="string"/> // I tried boolean and nothing was being deleted
    </fd:field>

widget definition is:

     <ft:widget id= "delItem">
        <fi:styling value="${orderitem.getID()}" type="checkbox"/>
     </ft:widget>

flow:

        delItems = bizData.delItem ;
        var items = new java.util.Vector();
       
        if (parseInt(bizData.quantity) || delItems != null) {
            try {
             
                if (delItems != null) {
               
                   if (delItems.iterator) { // A list of delItems have been selected to be deleted.
                      items.addAll(delItems);
                      deleteOrderItem2(items);
                   } else { //A single delItem has been selected to be deleted.
                      items.add(delItems);
                      deleteOrderItem2(items);
                   }
                }

Any ideas what I am missing here?

regards

Andrew


------=_Part_158700_10386458.1153656143169--