Registers a variable in the EL context. The variable is associated with the result of evaluating the given expression. Passing a null expression removes the variable from the context. @param variable the variable name @param expression the EL expression to associate with the variable, or
(String variable, String expression)
| 125 | * @throws ELException if the expression cannot be evaluated |
| 126 | */ |
| 127 | public void setVariable(String variable, String expression) { |
| 128 | if (expression == null) { |
| 129 | manager.setVariable(variable, null); |
| 130 | } else { |
| 131 | ValueExpression ve = factory.createValueExpression(context, bracket(expression), Object.class); |
| 132 | manager.setVariable(variable, ve); |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | /** |
| 137 | * Registers a function in the EL context by looking up the static method in the given class. |