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/[EMAIL PROTECTED]
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 <[EMAIL PROTECTED]
> wrote:
Any ideas with this one guys?
regards
AndrewOn 22/07/06, Andrew < [EMAIL PROTECTED]> 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
