1 18 package org.apache.beehive.netui.script.el; 19 20 import javax.servlet.jsp.el.VariableResolver ; 21 22 import org.apache.beehive.netui.script.IllegalExpressionException; 23 import org.apache.beehive.netui.util.logging.Logger; 24 25 28 public class NetUIReadVariableResolver 29 extends NetUIVariableResolver { 30 31 private static final Logger LOGGER = Logger.getInstance(NetUIReadVariableResolver.class); 32 33 private VariableResolver _vr = null; 34 35 public NetUIReadVariableResolver(VariableResolver vr) { 36 assert vr != null; 37 _vr = vr; 38 } 39 40 public Object resolveVariable(String name) { 41 42 try { 43 return _vr.resolveVariable(name); 44 } catch(javax.servlet.jsp.el.ELException ele) { 45 RuntimeException re = new RuntimeException ("Could not resolve variable named \"" + name + "\"", new IllegalExpressionException()); 46 47 if(LOGGER.isErrorEnabled()) 48 LOGGER.error("", re); 49 50 throw re; 51 } 52 } 53 54 public String [] getAvailableVariables() { 55 return new String []{"actionForm", "pageFlow", "globalApp", "request", "session", "application", "pageContext", "bundle", "container", "url", "pageInput"}; 56 } 57 } 58 | Popular Tags |