public Object get(String name) { Object obj = context.getConst(name, true); if (obj == null) { // check if it is a util function reference obj = getUtilFunctions(name, context); if (obj != null) { context.getRootContext().addConst(name, null, obj, true); } } return obj; }
public Object get(String name) { Object obj = context.getConst(name, true); if (obj == null) { // check if it is a util function reference obj = getUtilFunctions(name, context); if (obj != null) { context.getRootContext().addConst(name, null, obj, true); } } return obj; }
/** * Set a const in context. * * @param id * the const id * @param value * the const * @param top * true to set on root context, false to set on its own context * @return the existing const if any. */ public static Object setConst(String id, Object value, boolean top) { Context context = Context.getCurrentContext(); context = top ? context.getRootContext() : context.getCurrentEntityContext(); return context.setConst(id, value == null ? null : value.getClass().getName(), value, true); }
/** * Set a const in context. * * @param id * the const id * @param value * the const * @param top * true to set on root context, false to set on its own context * @return the existing const if any. */ public static Object setConst(String id, Object value, boolean top) { Context context = Context.getCurrentContext(); context = top ? context.getRootContext() : context.getCurrentEntityContext(); return context.setConst(id, value == null ? null : value.getClass().getName(), value, true); }
targetContext = context.getRootContext(); } else {
targetContext = context.getRootContext(); } else {
ObjectTree nameGlobal = getRootContext().getNameMap(false, true); ObjectTree nameLocal = getNameMap(true, false);
ObjectTree nameGlobal = getRootContext().getNameMap(false, true); ObjectTree nameLocal = getNameMap(true, false);