cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew <andrewm...@gmail.com>
Subject Re: checkbox widget with datatype vector
Date Sun, 23 Jul 2006 08:37:04 GMT
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
>

Mime
View raw message