Passing objects between managed beans&controllers

Posted by

in the source controller add your object into faces session map interface and identify it with a name

FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("category", category);

then in the target controller to acquire the object do the following

Category category = (Category) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("category");

Leave a Reply

Your email address will not be published. Required fields are marked *