com.ibm.websphere.samples.pbw.war
Class ShoppingBean

java.lang.Object
  extended by com.ibm.websphere.samples.pbw.war.ShoppingBean
All Implemented Interfaces:
Serializable

@Named(value="shopping")
@SessionScoped
public class ShoppingBean
extends Object
implements Serializable

A combination JSF action bean and backing bean for the shopping web page.

See Also:
Serialized Form

Constructor Summary
ShoppingBean()
           
 
Method Summary
 ShoppingCartBean getCart()
           
 Collection<ShoppingItem> getCartItems()
           
 ProductBean getProduct()
           
 Collection<ProductBean> getProducts()
           
 float getShippingCost()
           
 String getShippingCostString()
           
 float getTotalCost()
           
 String getTotalCostString()
           
 String performAddToCart()
           
 String performCart()
           
 String performProductDetail()
           
 String performRecalculate()
           
 String performShopping()
           
 void setShippingCost(float shippingCost)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShoppingBean

public ShoppingBean()
Method Detail

performAddToCart

public String performAddToCart()

performCart

public String performCart()

performProductDetail

public String performProductDetail()

performRecalculate

public String performRecalculate()

performShopping

public String performShopping()

getCartItems

public Collection<ShoppingItem> getCartItems()

getProduct

public ProductBean getProduct()

getProducts

public Collection<ProductBean> getProducts()

getShippingCostString

public String getShippingCostString()

getShippingCost

public float getShippingCost()
Returns:
the shippingCost

setShippingCost

public void setShippingCost(float shippingCost)

getTotalCost

public float getTotalCost()

getTotalCostString

public String getTotalCostString()

getCart

public ShoppingCartBean getCart()


Copyright © 2011. All Rights Reserved.