Java Reference
In-Depth Information
Creating the beans
Once your project is properly configured, we can start modeling our beans. The first bean
we will upgrade is TheatreBooker , which will drive the user session, accessing the
ticket list from our TheatreBox bean:
package com.packtpub.wflydevelopment.chapter4.controller;
import org.jboss.logging.Logger;
import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;
import javax.inject.Inject;
import javax.inject.Named;
@Named [1]
@SessionScoped [2]
public class TheatreBooker implements Serializable {
private Logger logger; [3]
private TheatreBox theatreBox; [4]
private FacesContext facesContext; [5]
private int money;
public void createCustomer() { = 100;
Search WWH ::

Custom Search