Package javax.faces.el

Examples of javax.faces.el.PropertyResolver


        if (names.size() < 2) {
            return base.getClass();
        }

        // Resolve the property names
        PropertyResolver pr = application().getPropertyResolver();
        for (int i = 1; i < names.size() - 1; i++) {
            base = pr.getValue(base, (String) names.get(i));
        }

        // Return the type of the final property
        return pr.getType(base, (String) names.get(names.size() - 1));

    }
View Full Code Here


        }

        context.setPropertyResolved(true);
        FacesContext fcontext = (FacesContext) context.getContext(FacesContext.class);
        ELContext elContext = fcontext.getELContext();
        PropertyResolver pr = fcontext.getApplication().getPropertyResolver();

        if ((base instanceof List) || base.getClass().isArray()) {
            Integer index = (Integer) fcontext.getApplication().getExpressionFactory().
                    coerceToType(property, Integer.class);
            try {
                return pr.getType(base, index.intValue());
            } catch (EvaluationException e) {
                context.setPropertyResolved(false);
                throw new ELException(e);
            }
        } else {
            try {
                return pr.getType(base, property);
            } catch (EvaluationException e) {
                context.setPropertyResolved(false);
                throw new ELException(e);
            }
        }
View Full Code Here

        }

        context.setPropertyResolved(true);
        FacesContext fcontext = (FacesContext) context.getContext(FacesContext.class);
        ELContext elContext = fcontext.getELContext();
        PropertyResolver pr = fcontext.getApplication().getPropertyResolver();

        if ((base instanceof List) || base.getClass().isArray()) {
            Integer index = (Integer) fcontext.getApplication().getExpressionFactory().
                    coerceToType(property, Integer.class);
            try {
                return pr.getValue(base, index.intValue());
            } catch (EvaluationException e) {
                context.setPropertyResolved(false);
                throw new ELException(e);
            }
        } else {
            try {
                return pr.getValue(base, property);
            } catch (EvaluationException e) {
                context.setPropertyResolved(false);
                throw new ELException(e);
            }
        }
View Full Code Here

        }

        context.setPropertyResolved(true);
        FacesContext fcontext = (FacesContext) context.getContext(FacesContext.class);
        ELContext elContext = fcontext.getELContext();
        PropertyResolver pr = fcontext.getApplication().getPropertyResolver();

        if ((base instanceof List) || base.getClass().isArray()) {
            Integer index = (Integer) fcontext.getApplication().getExpressionFactory().
                    coerceToType(property, Integer.class);
            try {
                return pr.isReadOnly(base, index.intValue());
            } catch (EvaluationException e) {
                context.setPropertyResolved(false);
                throw new ELException(e);
            }
        } else {
            try {
                return pr.isReadOnly(base, property);
            } catch (EvaluationException e) {
                context.setPropertyResolved(false);
                throw new ELException(e);
            }
        }
View Full Code Here

        }

        context.setPropertyResolved(true);
        FacesContext fcontext = (FacesContext) context.getContext(FacesContext.class);
        ELContext elContext = fcontext.getELContext();
        PropertyResolver pr = fcontext.getApplication().getPropertyResolver();

        if ((base instanceof List) || base.getClass().isArray()) {
            Integer index = (Integer) fcontext.getApplication().getExpressionFactory().
                    coerceToType(property, Integer.class);
            try {
                pr.setValue(base, index.intValue(), value);
            } catch (EvaluationException e) {
                context.setPropertyResolved(false);
                throw new ELException(e);
            }
        } else {
            try {
                pr.setValue(base, property, value);
            } catch (EvaluationException e) {
                context.setPropertyResolved(false);
                throw new ELException(e);
            }
        }
View Full Code Here

     */
    @SuppressWarnings("deprecation")
    public static PropertyResolver getDelegatePR(ApplicationAssociate associate,
                                                 boolean provideDefault)  {

        PropertyResolver pr = associate.getLegacyPropertyResolver();
        if (pr == null) {
            pr = associate.getLegacyPRChainHead();
            if (pr == null && provideDefault) {
                pr = new DummyPropertyResolverImpl();
            }
View Full Code Here

     */
    @SuppressWarnings("deprecation")
    private static void addPropertyResolvers(CompositeELResolver target,
                                             ApplicationAssociate associate) {

        PropertyResolver pr = getDelegatePR(associate, false);
        if (pr != null) {
            target.add(new PropertyResolverChainWrapper(pr));
        }

    }
View Full Code Here

  public ObjectWrapperFactory(FacesContext context, final String var, SortOrder sortOrder) {
   
    this.context = context;
   
    Application application = context.getApplication();
    PropertyResolver resolver = application.getPropertyResolver();

    this.var = var;
   
    SortField[] sortFields = sortOrder.getFields();
   
View Full Code Here

     */
    @SuppressWarnings("deprecation")
    public static PropertyResolver getDelegatePR(ApplicationAssociate associate,
                                                 boolean provideDefault)  {

        PropertyResolver pr = associate.getLegacyPropertyResolver();
        if (pr == null) {
            pr = associate.getLegacyPRChainHead();
            if (pr == null && provideDefault) {
                pr = new DummyPropertyResolverImpl();
            }
View Full Code Here

     */
    @SuppressWarnings("deprecation")
    private static void addPropertyResolvers(FacesCompositeELResolver target,
                                             ApplicationAssociate associate) {

        PropertyResolver pr = getDelegatePR(associate, false);
        if (pr != null) {
            target.addPropertyELResolver(new PropertyResolverChainWrapper(pr));
            }
        }
View Full Code Here

TOP

Related Classes of javax.faces.el.PropertyResolver

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.