1 14 15 package com.sun.facelets.el; 16 17 import java.util.HashMap ; 18 import java.util.Map ; 19 20 import javax.el.ValueExpression; 21 import javax.el.VariableMapper; 22 23 33 public final class DefaultVariableMapper extends VariableMapper { 34 35 private Map vars; 36 37 public DefaultVariableMapper() { 38 super(); 39 } 40 41 44 public ValueExpression resolveVariable(String name) { 45 if (this.vars != null) { 46 return (ValueExpression) this.vars.get(name); 47 } 48 return null; 49 } 50 51 54 public ValueExpression setVariable(String name, ValueExpression expression) { 55 if (this.vars == null) { 56 this.vars = new HashMap (); 57 } 58 return (ValueExpression) this.vars.put(name, expression); 59 } 60 61 } 62 | Popular Tags |