/** Sets the method binding for this UICommand to perform no action but to * return the supplied value, should the cycle complete without errors. * This will overwrite any existing method binding for the component. * @param returnvalue The required return value from the action cycle. * @return this component. */ public UICommand setReturn(String returnvalue) { methodbinding = new ELReference(PathUtil.composePath("constantReturn", returnvalue)); return this; }
public boolean remove(String beanname) { if (sebl.removeEL == null) { throw new UnsupportedOperationException("Cannot implement removal from EntityBeanLocator without removeEL being set"); } // TODO: support the case where the fetch method signature accepts an object // rather than its ID Object togo = sebl.bma.invokeBeanMethod(PathUtil.composePath(sebl.removeEL, '\'' + beanname + '\''), beanlocator); delivered.remove(beanname); if (togo == null) return false; if (togo instanceof Boolean) { return ((Boolean)togo).booleanValue(); } return true; }
public Object locateBean(String name) { Object togo = delivered.get(name); if (togo == null) { if (name.startsWith(NEW_PREFIX)) { if (sebl.newEL != null) { togo = sebl.bma.invokeBeanMethod(sebl.newEL, beanlocator); } else { togo = sebl.reflectivecache.construct(sebl.entityClazz); } } else { togo = sebl.bma.invokeBeanMethod(PathUtil.composePath(sebl.fetchEL, '\'' + name + '\''), beanlocator); } delivered.put(name, togo); } return togo; }
public static String matchPath(String spec, String path) { String togo = ""; while (true) { if (spec == null || spec.equals("")) break; if (path == null || path.equals("")) return null; String spechead = PathUtil.getHeadPath(spec); String pathhead = PathUtil.getHeadPath(path); // if we fail to match on a specific component, fail. if (!(spechead.equals("*") || spechead.equals(pathhead))) return null; togo = PathUtil.composePath(togo, pathhead); spec = PathUtil.getFromHeadPath(spec); path = PathUtil.getFromHeadPath(path); } return togo; }
String guardproperty = guarddef.getGuardProperty(); if (guardEL != null && guardmethod != null) { guardmethod = PathUtil.composePath(guardEL, guardmethod);