Examples of ELContext


Examples of javax.el.ELContext

  Class<?> initRegexpClass(ArrayList<String> vars)
  {
    HashMap<String,Object> map = new HashMap<String,Object>();
    map.put("regexp", vars);

    ELContext mapEnv = new ConfigELContext(new MapVariableResolver(map));

    String rawName = getServletName();
    String rawClassName = getServletClassName();

    if (rawName == null)
View Full Code Here

Examples of javax.el.ELContext

      return null;
   
    HashMap<String,Object> map = new HashMap<String,Object>();
    map.put("regexp", vars);

    ELContext mapEnv = new ConfigELContext(new MapVariableResolver(map));

    String rawName = getServletName();
    String rawClassName = getServletClassName();

    if (rawName == null)
View Full Code Here

Examples of javax.el.ELContext

{
  private Expr _expr;

  public ExprCondition(String expr)
  {
    ELContext elContext = new RewriteELContext();
   
    _expr = new ELParser(elContext, expr).parse();
  }
View Full Code Here

Examples of javax.el.ELContext

      HashMap<String,Object> varMap = new HashMap<String,Object>();
      varMap.put("host", new HostRegexpVar(key));
     
      ELResolver resolver = new MapVariableResolver(varMap);

      ELContext env = new ConfigELContext(resolver);

      hostName = EL.evalString(hostNamePattern, env);
    }

    HostController controller
View Full Code Here

Examples of javax.el.ELContext

    }

    public void testSetValue()
    {
        // set value of #{foo} to BAR via ValueExpression
        ELContext elContext = facesContext.getELContext();
        ValueExpression ve = application.getExpressionFactory()
                .createValueExpression(elContext, "#{foo}", String.class);
        ve.setValue(elContext, "BAR");
        assertEquals("BAR", externalContext.getRequestMap().get("foo"));
    }
View Full Code Here

Examples of javax.el.ELContext

    public void testGetValue()
    {
        // set value of #{foo} to BAR in request scope
        externalContext.getRequestMap().put("foo", "BAR");
        // resolve value of #{foo} via ValueExpression
        ELContext elContext = facesContext.getELContext();
        ValueExpression ve = application.getExpressionFactory()
                .createValueExpression(elContext, "#{foo}", String.class);
        Object value = ve.getValue(elContext);
        assertEquals("BAR", value);
    }
View Full Code Here

Examples of javax.el.ELContext

    public void testGetCompositeValue()
    {
        // set value of #{foo} to BAR in request scope
        externalContext.getRequestMap().put("foo", "BAR");
        // resolve value of #{foo} via ValueExpression
        ELContext elContext = facesContext.getELContext();
        ValueExpression ve = application.getExpressionFactory()
                .createValueExpression(elContext, "test #{foo}", String.class);
        Object value = ve.getValue(elContext);
        assertEquals("test BAR", value);
    }
View Full Code Here

Examples of javax.el.ELContext

        }
        // RF-1073
        try {
            ValueExpression ve = getValueExpression("currentDate");
            if (ve != null) {
                ELContext elContext = facesContext.getELContext();
                if (ve.getType(elContext).equals(String.class)) {
                    DateTimeConverter convert = new DateTimeConverter();
                    convert.setLocale(CalendarHelper.getAsLocale(facesContext, this, getLocale()));
                    convert.setPattern(CalendarHelper.getDatePatternOrDefault(this));
                    ve.setValue(facesContext.getELContext(), convert.getAsString(facesContext, this, currentDate));
View Full Code Here

Examples of javax.el.ELContext

    public void when_attribute_value_expression_evaluates_to_null_then_evaluateAttribute_should_return_attribute_value() {
        // given
        Map<String, Object> attributes = Maps.newTreeMap();
        Object value = new Object();
        attributes.put("value", value);
        ELContext elContext = facesEnvironment.getElContext();

        ValueExpression valueExpression = facesEnvironment.createMock(ValueExpression.class);


        UIComponent component = createMockComponent();
View Full Code Here

Examples of javax.el.ELContext

        // given
        Map<String, Object> attributes = Maps.newTreeMap();
        Object attributeValue = new Object();
        Object valueExpressionValue = new Object();
        attributes.put("value", attributeValue);
        ELContext elContext = facesEnvironment.getElContext();

        ValueExpression valueExpression = facesEnvironment.createMock(ValueExpression.class);

        UIComponent component = createMockComponent();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.