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

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

@Named(value="shopping")
@SessionScoped
public class ShoppingBean
extends java.lang.Object
implements java.io.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()
           
 java.util.Collection<ShoppingItem> getCartItems()
           
 ProductBean getProduct()
           
 java.util.Collection<ProductBean> getProducts()
           
 float getShippingCost()
           
 java.lang.String getShippingCostString()
           
 float getTotalCost()
           
 java.lang.String getTotalCostString()
           
 java.lang.String performAddToCart()
           
 java.lang.String performCart()
           
 java.lang.String performProductDetail()
           
 java.lang.String performRecalculate()
           
 java.lang.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 java.lang.String performAddToCart()

performCart

public java.lang.String performCart()

performProductDetail

public java.lang.String performProductDetail()

performRecalculate

public java.lang.String performRecalculate()

performShopping

public java.lang.String performShopping()

getCartItems

public java.util.Collection<ShoppingItem> getCartItems()

getProduct

public ProductBean getProduct()

getProducts

public java.util.Collection<ProductBean> getProducts()

getShippingCostString

public java.lang.String getShippingCostString()

getShippingCost

public float getShippingCost()
Returns:
the shippingCost

setShippingCost

public void setShippingCost(float shippingCost)

getTotalCost

public float getTotalCost()

getTotalCostString

public java.lang.String getTotalCostString()

getCart

public ShoppingCartBean getCart()


Copyright © 2012. All Rights Reserved.