
import java.io.Serializable;

import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

@Named
@Sessionscoped
public class Basket extends Page implements Serializable{

    static List<Product> products = new ArrayList<Product>();

    /**
     *
     * @return List<Products>
     */
    public List<Products> getBasket(){
        return products;
    }

    /**
     *
     ** @param  Product updated
     */

    public void edit(Product old, Product updated){
        int place = products.indexOf(old);
        //products.addAt(place, updated);
        products.remove(place);
        product.add(updated);
    }

    /**
     * @param selected
     *
     */

    public void remove(Product selected){
        int place = products.indexOf(old);
        products.remove(place);
    }

    /**
     *
     * @param Product item
     */

    public void add(Product item){
        product.add(item);
    }
}
@@ -1,20 +1,35 @@
+package pages;%0A
 %0Aimport java.io.Seri
@@ -1016,8 +1016,9 @@
 %0A    %7D%0A%7D
+%0A

Update Basket.java