Package javax.el

Examples of javax.el.ELContext


    }

    public Object evaluate(Exchange exchange) {
        // TODO we could use caching here but then we'd have possible concurrency issues
        // so lets assume that the provider caches
        ELContext context = populateContext(createContext(), exchange);
        ValueExpression valueExpression = getExpressionFactory().createValueExpression(context, expression, type);
        return valueExpression.getValue(context);
    }
View Full Code Here


    if (name == null)
      throw new NullPointerException();

    if ((expression != null) && expression.isLiteralText())
    {
      ELContext context =
          FacesContext.getCurrentInstance().getELContext();
      getAttributes().put(name, expression.getValue(context));
    }
    else
    {
View Full Code Here

        public void processAction(ActionEvent evt) throws AbortProcessingException
        {
            FacesContext facesContext = FacesContext.getCurrentInstance();
           
            ELContext elContext = facesContext.getELContext();
           
            // Spec f:setPropertyActionListener:
           
            // Call getValue() on the "value" ValueExpression.
            Object value = _value.getValue(elContext);
View Full Code Here

                    else
                    {
                        //EL expression found. Evaluate it and pushback
                        //the result into the stream
                        FacesContext context = FacesContext.getCurrentInstance();
                        ELContext elContext = context.getELContext();
                        try
                        {
                            ValueExpression ve = context.getApplication().
                                getExpressionFactory().createValueExpression(
                                        elContext,
View Full Code Here

        // That means somewhere we need to create a custom BeanInfo object for composite components
        // that will be filled somewhere (theorically in ViewDeclarationLanguage.getComponentMetadata())

        PropertyDescriptor[] propertyDescriptors = compositeComponentMetadata.getPropertyDescriptors();

        ELContext elContext = (ELContext) context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);

        for (PropertyDescriptor propertyDescriptor : propertyDescriptors)
        {
            if (propertyDescriptor.getValue("type") != null)
            {
View Full Code Here

        {
            BeanInfo compositeComponentMetadata = (BeanInfo) component.getAttributes().get(UIComponent.BEANINFO_KEY);

            PropertyDescriptor[] propertyDescriptors = compositeComponentMetadata.getPropertyDescriptors();

            ELContext elContext = (ELContext) context.getAttributes().get(FaceletContext.FACELET_CONTEXT_KEY);

            for (PropertyDescriptor propertyDescriptor : propertyDescriptors)
            {
                if (propertyDescriptor.getValue("type") != null)
                {
View Full Code Here

     * @return A ValueReferenceWrapper with the necessary information about the ValueReference.
     */
    private _ValueReferenceWrapper getValueReference(
            final ValueExpression valueExpression, final FacesContext context)
    {
        ELContext elCtx = context.getELContext();
        if (_ExternalSpecifications.isUnifiedELAvailable())
        {
            // unified el 2.2 is available --> we can use ValueExpression.getValueReference()
            // we can't access ValueExpression.getValueReference() directly here, because
            // Class loading would fail in applications with el-api versions prior to 2.2
View Full Code Here

     * @return The ValueReferenceWrapper.
     */
    public static _ValueReferenceWrapper resolve(ValueExpression valueExpression, final ELContext elCtx)
    {
        _ValueReferenceResolver resolver = new _ValueReferenceResolver(elCtx.getELResolver());
        ELContext elCtxDecorator = new _ELContextDecorator(elCtx, resolver);
       
        valueExpression.getValue(elCtxDecorator);
       
        while (resolver.lastObject.getBase() instanceof CompositeComponentExpressionHolder)
        {
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

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.