[OmniFaces utilities] The
getContext() |
getExternalContext() | getELContext() | getFaceletContext()
methods returns the FacesContext | ExternalContext | ELContext | FaceletContext
value.Methods:
Usage:
import
org.omnifaces.util.Faces;
import
javax.el.ELContext;
import
javax.faces.context.FacesContext;
import javax.faces.context.ExternalContext;
import javax.faces.context.ExternalContext;
import javax.faces.view.facelets.FaceletContext;
...
// shortcut
for FacesContext
FacesContext
fc = Faces.getContext();
// shortcut for ExternalContext
ExternalContext ec = Faces.getExternalContext();
// shortcut
for ELContext
ELContext el
= Faces.getELContext();
// shortcut
for FacesContext (pass ELContext)
FacesContext
fc = Faces.getContext(el);
// shortcut
for FaceletContext
FaceletContext
flc = Faces.getFaceletContext();
Niciun comentariu :
Trimiteți un comentariu