Examples of coerceToType()


Examples of javax.el.ExpressionFactory.coerceToType()

    {
        if (value == null)
            return null;

        ExpressionFactory expFactory = facesContext.getApplication().getExpressionFactory();
        return expFactory.coerceToType(value, desiredClass);
    }   

    /**
     * Gets the ClassLoader associated with the current thread. Returns the class loader associated with the specified
     * default object if no context loader is associated with the current thread.
View Full Code Here

Examples of javax.el.ExpressionFactory.coerceToType()

        }

        try
        {
            ExpressionFactory expFactory = FacesContext.getCurrentInstance().getApplication().getExpressionFactory();
            return expFactory.coerceToType(value, desiredClass);
        }
        catch (Exception e)
        {
            String message = "Cannot coerce " + value.getClass().getName()
                             + " to " + desiredClass.getName();
View Full Code Here

Examples of javax.el.ExpressionFactory.coerceToType()

        try
        {
            ExpressionFactory expFactory = facesContext.getApplication().getExpressionFactory();
            // Use coersion implemented by JSP EL for consistency with EL
            // expressions. Additionally, it caches some of the coersions.
            return (T)expFactory.coerceToType(value, desiredClass);
        }
        catch (ELException e)
        {
            String message = "Cannot coerce " + value.getClass().getName()
                    + " to " + desiredClass.getName();
View Full Code Here

Examples of javax.el.ExpressionFactory.coerceToType()

        }

        try
        {
            ExpressionFactory expFactory = FacesContext.getCurrentInstance().getApplication().getExpressionFactory();
            return expFactory.coerceToType(value, desiredClass);
        }
        catch (Exception e)
        {
            String message = "Cannot coerce " + value.getClass().getName() + " to " + desiredClass.getName();
            log.log(Level.SEVERE, message, e);
View Full Code Here

Examples of javax.el.ExpressionFactory.coerceToType()

        {
            return null;
        }

        ExpressionFactory expFactory = facesContext.getApplication().getExpressionFactory();
        return expFactory.coerceToType(value, desiredClass);
    }   

    /**
     * Gets the ClassLoader associated with the current thread. Returns the class loader associated with the specified
     * default object if no context loader is associated with the current thread.
View Full Code Here

Examples of javax.el.ExpressionFactory.coerceToType()

        }

        try
        {
            ExpressionFactory expFactory = FacesContext.getCurrentInstance().getApplication().getExpressionFactory();
            return expFactory.coerceToType(value, desiredClass);
        }
        catch (Exception e)
        {
            String message = "Cannot coerce " + value.getClass().getName()
                             + " to " + desiredClass.getName();
View Full Code Here

Examples of javax.el.ExpressionFactory.coerceToType()

        try
        {
            ExpressionFactory expFactory = facesContext.getApplication().getExpressionFactory();
            // Use coersion implemented by JSP EL for consistency with EL
            // expressions. Additionally, it caches some of the coersions.
            return (T)expFactory.coerceToType(value, desiredClass);
        }
        catch (ELException e)
        {
            String message = "Cannot coerce " + value.getClass().getName()
                    + " to " + desiredClass.getName();
View Full Code Here

Examples of javax.el.ExpressionFactory.coerceToType()

        JspFactory jspFactory = JspFactory.getDefaultFactory();
        JspApplicationContext jspAppContext =
            jspFactory.getJspApplicationContext(pageContext.getServletContext());
        ExpressionFactory exprFactory = jspAppContext.getExpressionFactory();
        return exprFactory.coerceToType(value, expectedType);
    }

    //*********************************************************************
    // Accessor methods

View Full Code Here

Examples of javax.el.ExpressionFactory.coerceToType()

                                            Class toType) {

        Object newValue;
        try {
            ExpressionFactory ef = ctx.getApplication().getExpressionFactory();
            newValue = ef.coerceToType(value, toType);
        } catch (ELException ele) {
            newValue = value;
        } catch (IllegalArgumentException iae) {
            // If coerceToType fails, per the docs it should throw
            // an ELException, however, GF 9.0 and 9.0u1 will throw
View Full Code Here

Examples of javax.el.ExpressionFactory.coerceToType()

        }

        try
        {
            ExpressionFactory expFactory = FacesContext.getCurrentInstance().getApplication().getExpressionFactory();
            return expFactory.coerceToType(value, desiredClass);
        }
        catch (Exception e)
        {
            String message = "Cannot coerce " + value.getClass().getName()
                             + " to " + desiredClass.getName();
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.