org.apache.cocoon.faces.samples.carstore
Class CarStore
java.lang.Object
org.apache.cocoon.faces.samples.carstore.CarStore
public class CarStore
- extends Object
This is the main bean for the application. It maintains a
Map
of CarBean
instances, keyed by model name,
and a Map
of CarCustomizer
instances, keyed by
package name. The CarBean
instances in the model
Map
are accessed from several pages, as described
below.
Several pages in the application use this bean as the target of
method reference and value reference expressions.
The "chooseLocale" page uses actionListener
attributes to point to the chooseLocaleFromMap(javax.faces.event.ActionEvent)
and chooseLocaleFromLink(javax.faces.event.ActionEvent)
methods.
The "storeFront" page uses value binding expressions to pull
information about four of the known car models in the store.
The "carDetail" page uses value binding expressions to pull
information about the currently chosen model. It also uses the
action
attribute to convey the user's package
choices.
The "confirmChoices" page uses value binding expressions to
pull the user's choices from the currently chosen model.
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
CarStore
public CarStore()
chooseLocaleFromMap
public void chooseLocaleFromMap(javax.faces.event.ActionEvent actionEvent)
chooseLocaleFromLink
public void chooseLocaleFromLink(javax.faces.event.ActionEvent event)
choosePackage
public void choosePackage(javax.faces.event.ActionEvent event)
choosePackage
public void choosePackage(String packageName)
storeFrontJalopyPressed
public String storeFrontJalopyPressed()
storeFrontRoadsterPressed
public String storeFrontRoadsterPressed()
storeFrontLuxuryPressed
public String storeFrontLuxuryPressed()
storeFrontSUVPressed
public String storeFrontSUVPressed()
buyCurrentCar
public String buyCurrentCar()
getCurrentModel
public CarBean getCurrentModel()
getModels
public Map getModels()
getCustomizers
public Map getCustomizers()
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.