syidah140484
Programmer
hi all.. i need ur help to check what's wrong with my codes..
e.g.
item 1 Remove btn
item 2 Remove btn
item 3 Remove btn
when i click on the Remove btn of item 2 in shopping cart page.. it removes the item 1.. y???
below are the codes:
public void removeItem(String id){
Enumeration productEnum = getProducts();
while(productEnum.hasMoreElements()){
Product product = (Product)productEnum.nextElement();
products.removeElement(product);
break;
}
}
pls i desperately need someone.. to help me .. :<
e.g.
item 1 Remove btn
item 2 Remove btn
item 3 Remove btn
when i click on the Remove btn of item 2 in shopping cart page.. it removes the item 1.. y???
below are the codes:
public void removeItem(String id){
Enumeration productEnum = getProducts();
while(productEnum.hasMoreElements()){
Product product = (Product)productEnum.nextElement();
products.removeElement(product);
break;
}
}
pls i desperately need someone.. to help me .. :<