示例#1
0
 static HandlerRef referenceFor(String value) {
   for (HandlerRef ref : HandlerRef.values()) {
     if (ref.getRef().equals(value)) {
       return ref;
     }
   }
   return null;
 }
示例#2
0
 public Action(
     final String handler, final String title, final String scope, final String nameResolver) {
   this.handler = Handlebars.stripHandlebar(handler);
   this.handlerRef = HandlerRef.referenceFor(handler);
   this.title =
       Handlebars.templateSafeValue(title); // title can be a simple value or an expression
   this.scope = scope != null ? Button.Scope.valueOf(scope.toUpperCase()) : null;
   this.nameResolver =
       Handlebars.stripHandlebar(nameResolver); // name resolver has to be an expression
   this.attributes = new ArrayList<>();
 }