/** * This method uses a FacesContext to find the current person who is logged in. It then loads the * current login object from the EJB */ public void loadLogin() { FacesContext context = FacesContext.getCurrentInstance(); String username = context.getExternalContext().getUserPrincipal().getName(); currentLogin = detentionTrackerBean.getLogin(username); }