Package javax.el

Examples of javax.el.ELContext


        UIViewRoot root = new UIViewRoot();
        MockFacesContext12 facesContext = new MockFacesContext12();
        IMocksControl mocksControl = EasyMock.createControl();
        Application application = mocksControl.createMock(Application.class);
        ViewHandler viewHandler = mocksControl.createMock(ViewHandler.class);
        ELContext elContext = mocksControl.createMock(ELContext.class);
        ExpressionFactory expressionFactory = mocksControl.createMock(ExpressionFactory.class);
        ValueExpression valueExpression = mocksControl.createMock(ValueExpression.class);
        facesContext.setApplication(application);
        facesContext.setViewRoot(root);
        facesContext.setELContext(elContext);
View Full Code Here


        checkNull(componentExpression, "componentExpression");
        checkNull(facesContext, "facesContext");
        checkNull(componentType, "componentType");

        ELContext elContext = facesContext.getELContext();

        try
        {
            Object retVal = componentExpression.getValue(elContext);
View Full Code Here

    @SuppressWarnings("unchecked")
    @Override
    public final <T> T evaluateExpressionGet(final FacesContext context, final String expression,
                                             final Class<? extends T> expectedType) throws ELException
    {
        ELContext elContext = context.getELContext();

        ExpressionFactory factory = getExpressionFactory();

        return (T) factory.createValueExpression(elContext, expression, expectedType).getValue(elContext);
    }
View Full Code Here

        long elapsed = -System.currentTimeMillis();
        for (int i = 0; i < iterations; i++) {
            final Map<String, ValueExpression> localContext = ProctorUtils.convertToValueExpressionMap(expressionFactory, values);
            final VariableMapper variableMapper = new MulticontextReadOnlyVariableMapper(localContext);

            final ELContext elContext = new ELContext() {
                @Override
                public ELResolver getELResolver() {
                    return elResolver;
                }
View Full Code Here

   
    this.context = context;
   
    Application application = context.getApplication();
    ELResolver resolver = application.getELResolver();
    ELContext elContext = context.getELContext();
    this.var = var;
   
    SortField[] sortFields = sortOrder.getFields();
   
    expressions = new Expression[sortFields.length];
View Full Code Here

   
    this.context = context;
   
    Application application = context.getApplication();
    ELResolver resolver = application.getELResolver();
    ELContext elContext = context.getELContext();
    this.var = var;
   
    expressions = new Expression[sortOrder.size()];
   
    int i = 0;
View Full Code Here

      return skin;
    }
  }

  private void processProperties(FacesContext context, Map<Object, Object> properties) {
      ELContext elContext = context.getELContext();
      // replace all EL-expressions by prepared ValueBinding ?
      ApplicationFactory factory = (ApplicationFactory) FactoryFinder
      .getFactory(FactoryFinder.APPLICATION_FACTORY);
      Application app = factory.getApplication();
     
View Full Code Here

   
    return genericPropertyClass;
  }
 
  public static Class<?> getContainerClass(FacesContext facesContext, ValueExpression expression) {
    ELContext initialELContext = facesContext.getELContext();

    CapturingELResolver capturingELResolver = new CapturingELResolver(initialELContext.getELResolver());
    Class<?> type = expression.getType(new ELContextWrapper(initialELContext, capturingELResolver));

    Class<?> containerType = type.getComponentType();
    if (containerType == null && type != null) {
      if (Collection.class.isAssignableFrom(type)) {
View Full Code Here

    // If you change something here please do the same in the other class!

    if (submittedValue == null)
      throw new NullPointerException("submittedValue");
   
    ELContext elContext = facesContext.getELContext();
    ValueExpression vb = component.getValueExpression("value");
    Class<?> valueType = null;
    Class<?> arrayComponentType = null;
    if (vb != null) {
      valueType = vb.getType(elContext);
View Full Code Here

  public void send(ResourceContext context) throws IOException {
    UriData data = (UriData) restoreData(context);
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (null != data && null != facesContext ) {
      // Send headers
      ELContext elContext = facesContext.getELContext();
//      if(data.expires != null){
//        ValueExpression binding = (ValueExpression) UIComponentBase.restoreAttachedState(facesContext,data.expires);
//        Date expires = (Date) binding.getValue(elContext);
//        context.setDateHeader("Expires",expires.getTime());
//      }
View Full Code Here

TOP

Related Classes of javax.el.ELContext

Copyright © 2018 www.massapicom. 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.