Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package beans;
- import FP.TableRow;
- import java.util.ArrayList;
- import javax.annotation.ManagedBean;
- import javax.ejb.Stateless;
- /**
- *
- * @author aaron
- */
- @ManagedBean
- public class ShoppingCart {
- public ShoppingCart(){
- }
- public int sizeOf(){
- int count = cartItems.size();
- return count;
- }
- private ArrayList<FP.TableRow> cartItems = new ArrayList();
- /**
- * @return the cartItems
- */
- public ArrayList<FP.TableRow> getCartItems() {
- return cartItems;
- }
- /**
- * @param newItem
- */
- public void setCartItems(FP.TableRow newItem) {
- try {
- cartItems.add(newItem);
- } catch (Exception e) {
- System.out.println("Error in setCartItems" + e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement