Package javax.el

Examples of javax.el.ELContext


      }
     
      if (valueExpression!=null)
      {
         //TODO: note that this code is duplicated from ModelValidator!!
         ELContext elContext = facesContext.getELContext();
         InvalidValue[] invalidValues;
         try
         {
            invalidValues = Validators.instance().validate( valueExpression.toUnifiedValueExpression(), elContext, value );
         }
View Full Code Here


        return FacesContext.getCurrentInstance();
    }

    public void setLiteralValue(String name, ValueExpression expression) {
        assert (expression.isLiteralText());
        ELContext context = getFacesContext().getELContext();

        try {
            setLiteralAttribute(name, expression.getValue(context));
        } catch (ELException elem) {
            throw new FacesException(elem);
View Full Code Here

        return converter;
    }

    public void processAction(ActionEvent actionEvent) throws AbortProcessingException {
        FacesContext context = getFacesContext();
        ELContext elContext = context.getELContext();
        ValueExpression updateBinding = getAssignToExpression();

        if (updateBinding != null && (!updateBinding.isReadOnly(elContext))) {
            String requestValue = context.getExternalContext().getRequestParameterMap().get(getName());
View Full Code Here

     */
    private static final String[] SKINS_PATHS = { DEFAULT_SKIN_PATH, USER_SKIN_PATH };
    private ConcurrentMap<String, FutureTask<Skin>> skins = new ConcurrentHashMap<String, FutureTask<Skin>>();

    protected void processProperties(FacesContext context, Map<Object, Object> properties) {
        ELContext elContext = context.getELContext();

        // replace all EL-expressions by prepared ValueBinding ?
        Application app = context.getApplication();

        for (Entry<Object, Object> entry : properties.entrySet()) {
View Full Code Here

    }

    private String evaluateExpression(String expression) {
        if (isExpression(expression)) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            ELContext elContext = facesContext.getELContext();
            Object evaluated = ELUtils.evaluateValueExpression(ELUtils.createValueExpression(expression), elContext);
            if (evaluated == null) {
                throw new NullPointerException("expression '" + expression + "' was evaluated to null");
            }
            return evaluated.toString();
View Full Code Here

    public FacesContextImpl() {
        setCurrentInstance(this);
    }

    private ELContext createELContext() {
        ELContext result = new ELContextImpl();
        result.putContext(FacesContext.class, this);
        return result;
    }
View Full Code Here

        super.setUp();
        setupFacesRequest();
        extendedDataModel = new SequenceDataModel<User>(new ArrayDataModel<User>(users));
        arrangeableModel = new ArrangeableModel(extendedDataModel, "var", "filterVar");
        ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
        ELContext elContext = facesContext.getELContext();
        FilterField[] filterFields = {
                new FilterField(null, new Filter<User>() {
                    public boolean accept(User t) {
                        return t.getFname().indexOf('a') == -1;
                    }
View Full Code Here

    protected MethodExpressionEventListener(MethodExpression methodExpressionOneArg) {

        super();
        this.methodExpressionOneArg = methodExpressionOneArg;
        FacesContext context = FacesContext.getCurrentInstance();
        ELContext elContext = context.getELContext();
        this.methodExpressionZeroArg = context
            .getApplication()
            .getExpressionFactory()
            .createMethodExpression(elContext, methodExpressionOneArg.getExpressionString(), Void.class,
                EVENT_LISTENER_ZERO_ARG_SIG);
View Full Code Here

        if (event == null) {
            throw new NullPointerException();
        }
        FacesContext context = FacesContext.getCurrentInstance();
        ELContext elContext = context.getELContext();
        // PENDING: The corresponding code in MethodExpressionActionListener
        // has an elaborate message capture, logging, and rethrowing block.
        // Why not here?
        try {
            methodExpressionOneArg.invoke(elContext, new Object[] { event });
View Full Code Here

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

        final ELContext elContext = facesContext.getELContext();

        try
        {
            final Object retVal = componentExpression.getValue(elContext);
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.