[OmniFaces utilities] The
startsWithOneOf() method returns true if the given string starts with one of the given prefixes.Method:
Usage:
import org.omnifaces.util.Utils;
...
String[] listenersPrefixNames = {"Action", "AjaxBehavior",
"Behavior", "ComponentSystemEvent", "ViewMap",
"SystemEvent", "ValueChange"};
// returns true
boolean startsWithOneOf = Utils.startsWithOneOf("ComponentSystemEvent",
listenersPrefixNames);
// returns false
boolean startsWithOneOf = Utils.startsWithOneOf("Phase",
listenersPrefixNames);







JSF 2 Tutorials at www.mkyong.com
JavaServer Faces (JSF) Tutorial 

















Niciun comentariu :
Trimiteți un comentariu