[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);
Niciun comentariu :
Trimiteți un comentariu