Package com.sun.faces.mgbean

Examples of com.sun.faces.mgbean.BeanBuilder$Expression


            ApplicationAssociate associate = ApplicationAssociate.getInstance(sc);
            if (associate != null) {
                BeanManager manager = associate.getBeanManager();
                for (Map.Entry<String,BeanBuilder> entry : manager.getRegisteredBeans().entrySet()) {
                    String name = entry.getKey();
                    BeanBuilder bean = entry.getValue();
                    if (bean.getScope() == ELUtils.Scope.APPLICATION) {
                        if (LOGGER.isLoggable(Level.INFO)) {
                            LOGGER.log(Level.INFO,
                                       "Removing application scoped managed bean: {0}",
                                       name);
                        }
View Full Code Here


        List<FeatureDescriptor> list =
             new ArrayList<FeatureDescriptor>(beans.size());
        // iterate over the list of managed beans
        for (Map.Entry<String,BeanBuilder> bean : beans.entrySet()) {
            String beanName = bean.getKey();
            BeanBuilder builder = bean.getValue();
            String loc = Util.getLocaleFromContextOrSystem(facesContext).toString();
            Map<String,String> descriptions = builder.getDescriptions();

            String description = null;
            if (descriptions != null) {
                description = descriptions.get(loc);
                if (description == null) {
                    description = descriptions.get("DEFAULT");
                }
            }
            list.add(Util.getFeatureDescriptor(beanName,
                                               beanName,
                                               (description == null) ? "" : description,
                                               false,
                                               false,
                                               true,
                                               builder.getBeanClass(),
                                               Boolean.TRUE));
        }

        return list.iterator();
    }
View Full Code Here

    private Object resolveBean(ELContext context, Object property, boolean markAsResolvedIfCreated) {
        Object result = null;
        BeanManager manager = getBeanManager();
        if (manager != null) {
            String beanName = property.toString();
            BeanBuilder builder = manager.getBuilder(beanName);
            if (builder != null) {
                FacesContext facesContext = (FacesContext)
                    context.getContext(FacesContext.class);
                result = manager.getBeanFromScope(beanName, builder, facesContext);
                if (result == null) {
View Full Code Here

            ApplicationAssociate associate = ApplicationAssociate.getInstance(sc);
            if (associate != null) {
                BeanManager manager = associate.getBeanManager();
                for (Map.Entry<String, BeanBuilder> entry : manager.getRegisteredBeans().entrySet()) {
                    String name = entry.getKey();
                    BeanBuilder bean = entry.getValue();
                    if (ELUtils.Scope.APPLICATION.toString().equals(bean.getScope())) {
                        if (LOGGER.isLoggable(Level.INFO)) {
                            LOGGER.log(Level.INFO,
                                    "Removing application scoped managed bean: {0}",
                                    name);
                        }
View Full Code Here

            ApplicationAssociate associate = ApplicationAssociate.getInstance(sc);
            if (associate != null) {
                BeanManager manager = associate.getBeanManager();
                for (Map.Entry<String,BeanBuilder> entry : manager.getRegisteredBeans().entrySet()) {
                    String name = entry.getKey();
                    BeanBuilder bean = entry.getValue();
                    if (bean.getScope() == ELUtils.Scope.APPLICATION) {
                        if (LOGGER.isLoggable(Level.INFO)) {
                            LOGGER.log(Level.INFO,
                                       "Removing application scoped managed bean: {0}",
                                       name);
                        }
View Full Code Here

                                                   null);
        BeanManager beanManager =
             ApplicationAssociate.getCurrentInstance().getBeanManager();
        beanManager.register(bean);
        assertNotNull(beanManager.create(beanName, getFacesContext()));
        BeanBuilder builder = beanManager.getBuilder(beanName);
        assertTrue(builder.getScope() == ELUtils.Scope.SESSION);
    }
View Full Code Here

        //make sure bean instantiated properly. Get property back from bean.
        assertTrue(testBean.getOne().equals("one"));

        //make sure scope is stored properly
        BeanBuilder builder = beanManager.getBuilder(beanName);
        assertTrue(builder.getScope() == ELUtils.Scope.SESSION);
    }
View Full Code Here

        assertTrue(testBean.getIntProp() == testInt);
        assertTrue(testBean.getLongProp() == testLong);
        assertTrue(testBean.getShortProp() == testShort);

        //make sure scope is stored properly
        BeanBuilder builder = beanManager.getBuilder(beanName);
        assertTrue(builder.getScope() == ELUtils.Scope.SESSION);
    }
View Full Code Here

        // setter should be called if bean getter returned null
        assertTrue(testBean.getListNullSetterCalled());

        //make sure scope is stored properly
        BeanBuilder builder = beanManager.getBuilder(beanName);
        assertTrue(builder.getScope() == ELUtils.Scope.REQUEST);
    }
View Full Code Here

        // setter should be called if bean getter returned null
        assertTrue(testBean.getMapPropertyNullSetterCalled());

        //make sure scope is stored properly
        BeanBuilder builder = beanManager.getBuilder(beanName);
        assertTrue(builder.getScope() == ELUtils.Scope.REQUEST);
    }
View Full Code Here

TOP

Related Classes of com.sun.faces.mgbean.BeanBuilder$Expression

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.