[OmniFaces utilities] The
getRichFacesPartialViewContext()
method returns the RichFaces PartialViewContext
implementation. RichFaces 4.0-4.3 ExtendedPartialViewContextImpl
does not extend from PartialViewContextWrapper
. So a hack wherin the exact fully qualified class name needs to be known has to be used to properly extract it from the FacesContext#getPartialViewContext()
.Method:
See also: Ajax#getContext()
Usage:import org.omnifaces.util.Hacks;
import javax.faces.context.PartialViewContext;
...
PartialViewContext pvContext = Hacks.getRichFacesPartialViewContext();
if(pvContext != null){
// do something
} else {
// do something else
}
Niciun comentariu :
Trimiteți un comentariu