protected override void setValueBody(OgnlContext context, object target, object value) // throws OgnlException { object expr = children[0].getValue(context, target), previousRoot = context.getRoot(); Node node; target = children[1].getValue(context, target); node = (expr is Node) ? (Node)expr : (Node)Ognl.parseExpression(expr.ToString()); try { context.setRoot(target); node.setValue(context, target, value); } finally { context.setRoot(previousRoot); } }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { object result, expr = children[0].getValue(context, source), previousRoot = context.getRoot(); Node node; source = children[1].getValue(context, source); node = (expr is Node) ? (Node)expr : (Node)Ognl.parseExpression(expr.ToString()); try { context.setRoot(source); result = node.getValue(context, source); } finally { context.setRoot(previousRoot); } return(result); }
protected override void setValueBody(OgnlContext context, object target, object value) // throws OgnlException { context.setRoot(value); }