Example #1
0
 public Object call(PageContext pc, Collection.Key key, Object[] arguments) throws PageException {
   Member m = component.getMember(access, key, false, false);
   if (m != null) {
     if (m instanceof UDF) return ((UDF) m).call(pc, arguments, false);
     throw ComponentUtil.notFunction(component, key, m.getValue(), access);
   }
   throw ComponentUtil.notFunction(component, key, null, access);
 }
Example #2
0
 public Object callWithNamedValues(PageContext pc, Key key, Struct args) throws PageException {
   Member m = component.getMember(access, key, false, false);
   if (m != null) {
     if (m instanceof UDF) return ((UDF) m).callWithNamedValues(pc, args, false);
     throw ComponentUtil.notFunction(component, key, m.getValue(), access);
   }
   throw ComponentUtil.notFunction(component, key, null, access);
 }
Example #3
0
 private static Object get(ComponentAccess app, Key name, String defaultValue) {
   Member mem = app.getMember(Component.ACCESS_PRIVATE, name, true, false);
   if (mem == null) return defaultValue;
   return mem.getValue();
 }