Examples of createValueExpression()


Examples of javax.el.ExpressionFactory.createValueExpression()

            super(propertyDescriptor, dependency);
        }

        private Object getExpressionValue(FacesContext context, String expressionString, Class<?> expectedType) {
            ExpressionFactory expressionFactory = context.getApplication().getExpressionFactory();
            ValueExpression expression = expressionFactory.createValueExpression(context.getELContext(), expressionString,
                expectedType);
            return expression.getValue(context.getELContext());
        }

        protected Object evaluateProperty(FacesContext context, Class<?> propertyType) {
View Full Code Here

Examples of javax.el.ExpressionFactory.createValueExpression()

                new FilterField(null, new Filter<User>() {
                    public boolean accept(User t) {
                        return t.getFname().indexOf('a') == -1;
                    }
                }, null),
                new FilterField(expressionFactory.createValueExpression(elContext, "#{var.lname != filterVar}", Object.class),
                    null, "b") };
        SortField[] sortFields = {
                new SortField(expressionFactory.createValueExpression(elContext, "#{var.fname}", Object.class), null,
                    SortOrder.ascending), new SortField(null, new Comparator<User>() {
                    public int compare(User o1, User o2) {
View Full Code Here

Examples of javax.el.ExpressionFactory.createValueExpression()

                    }
                }, null),
                new FilterField(expressionFactory.createValueExpression(elContext, "#{var.lname != filterVar}", Object.class),
                    null, "b") };
        SortField[] sortFields = {
                new SortField(expressionFactory.createValueExpression(elContext, "#{var.fname}", Object.class), null,
                    SortOrder.ascending), new SortField(null, new Comparator<User>() {
                    public int compare(User o1, User o2) {
                        return o1.getLname().compareTo(o2.getLname());
                    }
                }, SortOrder.descending) };
View Full Code Here

Examples of javax.el.ExpressionFactory.createValueExpression()

   public static final Pattern elPattern = Pattern.compile(EL_REGEX);

   public Object coerceToType(final FacesContext context, final String expression, final Object value) throws ELException
   {
      ExpressionFactory ef = context.getApplication().getExpressionFactory();
      ValueExpression ve = ef.createValueExpression(context.getELContext(), expression, Object.class);
      return ef.coerceToType(value, ve.getType(context.getELContext()));
   }

   public Class<?> getExpectedType(final FacesContext context, final String expression) throws ELException
   {
View Full Code Here

Examples of javax.el.ExpressionFactory.createValueExpression()

   }

   public Class<?> getExpectedType(final FacesContext context, final String expression) throws ELException
   {
      ExpressionFactory ef = context.getApplication().getExpressionFactory();
      ValueExpression ve = ef.createValueExpression(context.getELContext(), expression, Object.class);
      return ve.getType(context.getELContext());
   }

   public Object getValue(final FacesContext context, final String expression) throws ELException
   {
View Full Code Here

Examples of javax.el.ExpressionFactory.createValueExpression()

   }

   public Object getValue(final FacesContext context, final String expression) throws ELException
   {
      ExpressionFactory ef = context.getApplication().getExpressionFactory();
      ValueExpression ve = ef.createValueExpression(context.getELContext(), expression, Object.class);
      return ve.getValue(context.getELContext());
   }

   public Object invokeMethod(final FacesContext context, final String expression) throws ELException
   {
View Full Code Here

Examples of javax.el.ExpressionFactory.createValueExpression()

   }

   public void setValue(final FacesContext context, final String expression, final Object value) throws ELException
   {
      ExpressionFactory ef = context.getApplication().getExpressionFactory();
      ValueExpression ve = ef.createValueExpression(context.getELContext(), expression, Object.class);
      ve.setValue(context.getELContext(), ef.coerceToType(value, ve.getType(context.getELContext())));
   }

   public ValueExpression createValueExpression(final FacesContext context, final String expression) throws ELException
   {
View Full Code Here

Examples of javax.el.ExpressionFactory.createValueExpression()

   }

   public ValueExpression createValueExpression(final FacesContext context, final String expression) throws ELException
   {
      ExpressionFactory ef = context.getApplication().getExpressionFactory();
      ValueExpression ve = ef.createValueExpression(context.getELContext(), expression, Object.class);
      return ve;
   }
}
View Full Code Here

Examples of javax.el.ExpressionFactory.createValueExpression()

    */
   private ValueExpression getValueExpression(FacesContext facesContext, String expression)
   {
      String el = toELExpression(expression);
      ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
      return expressionFactory.createValueExpression(facesContext.getELContext(), el, Object.class);
   }

   /**
    * Obtains the {@link FacesContext} using {@link FacesContext#getCurrentInstance()}. This method will throw an
    * {@link IllegalArgumentException} if the {@link FacesContext} is not available.
View Full Code Here

Examples of javax.el.ExpressionFactory.createValueExpression()

         {
            FacesContext context = FacesContext.getCurrentInstance();
            Application app = context.getApplication();

            ExpressionFactory expressionFactory = app.getExpressionFactory();
            ValueExpression ve = expressionFactory.createValueExpression(attribute, Object.class);
            component.setValueExpression(attributeName, ve);
         }
         else
         {
            component.getAttributes().put(attributeName, attribute);
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.