/*
 * 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 managedbeans;

import entities.Customer;
import java.io.Serializable;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import session.CustomerManager;

/**
 *
 * @author Hoss
 */
@ManagedBean
@ViewScoped
public class CustomerMBean implements Serializable {
    @EJB
    private CustomerManager customerManager;
    private List<Customer> customerList;
    /**
     * Creates a new instance of CustomerMBean
     */
    public CustomerMBean() {
    }
    public List<Customer> getCustomers() {
         return customerManager.getAllCustomers();
    }
    public String showDetails(int customerId) {
     return "CustomerDetails?idCustomer=" + customerId; 
    }
}
