public String getValue() { return _expr != null ? (String)_expr.evaluate(_xelc): _val; } }
void interpret(InterpretContext ic) throws IOException { try { final String result = (String) _expr.evaluate(ic.xelc); if (result != null) ic.dc.getOut().write(result); } catch (XelException ex) { log.error("", ex); //Web server might 'eat' throw ex; } }
public Object evaluate(Component comp, Expression expression) throws XelException { return expression.evaluate(newXelContext(comp)); }
public Object evaluate(Page page, Expression expression) throws XelException { return expression.evaluate(newXelContext(page)); }
/** Applies this attribute to the specified action. */ private void apply(InterpretContext ic, Action action) throws DspException { final Object[] args = new Object[1]; try { if (_value instanceof Expression) { args[0] = ((Expression) _value).evaluate(ic.xelc); //if (log.finerable()) log.finer("attr "+_method.getName()+"="+_value+" to "+args[0]); } else { args[0] = _value; } _method.invoke(action, args); } catch (Exception ex) { log.error("", ex); //Web server might 'eat' throw DspException.Aide.wrap(ex, "Failed to invoke " + _method + " with " + args[0] + (args[0] != null ? " @" + args[0].getClass().getName() : "")); } } }