vineri, 13 martie 2015

[OmniFaces utilities(2.0)] Get the ID of the current view root


[OmniFaces utilities] The getViewId() method returns the ID of the current view root, or null if there is no view.

Method:
Usage:

import org.omnifaces.util.Faces;
...
String viewid = Faces.getViewId(); //e.g. /index.xhtml

or,

import static org.omnifaces.util.Faces.getViewId;
...
String viewid = getViewId(); //e.g. /index.xhtml

Niciun comentariu:

Trimiteți un comentariu