[OmniFaces utilities] The
getRichFacesWrappedPartialViewContext()
method returns the wrapped PartialViewContext
from the RichFaces PartialViewContext
implementation. RichFaces PartialViewContext
implementation does not have any getWrapped()
method to return the wrapped PartialViewContext
. So a reflection hack is necessary to return it from the private field.Method:
See also: Hacks#getRichFacesPartialViewContext()
Usage:
import org.omnifaces.util.Hacks;
import org.omnifaces.util.Hacks;
import
javax.faces.context.PartialViewContext;
...
PartialViewContext
pvContext = Hacks.getRichFacesWrappedPartialViewContext();
if(pvContext
!= null){
// do
something
} else {
// do
something else
}
Niciun comentariu :
Trimiteți un comentariu