Package com.sun.faces.config.beans

Examples of com.sun.faces.config.beans.ManagedBeanBean


                                       digester.getMatch() +
                                       "} Push " + CLASS_NAME);
        }
        Class clazz =
            digester.getClassLoader().loadClass(CLASS_NAME);
        ManagedBeanBean mbb = (ManagedBeanBean) clazz.newInstance();
        digester.push(mbb);

    }


     * @exception IllegalStateException if the popped object is not
     *  of the correct type
     */
    public void end(String namespace, String name) throws Exception {

        ManagedBeanBean top;
        try {
            top = (ManagedBeanBean) digester.pop();
        } catch (Exception e) {
            throw new IllegalStateException("Popped object is not a " +
                                            CLASS_NAME + " instance");
        }

        validate(top);

        FacesConfigBean fcb = (FacesConfigBean) digester.peek();
        ManagedBeanBean old = fcb.getManagedBean(top.getManagedBeanName());
        if (old == null) {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[ManagedBeanRule]{" +
                                           digester.getMatch() +
                                           "} New(" +

            top = (ManagedPropertyBean) digester.pop();
        } catch (Exception e) {
            throw new IllegalStateException("Popped object is not a " +
                                            CLASS_NAME + " instance");
        }
        ManagedBeanBean mbb = (ManagedBeanBean) digester.peek();

        validate(mbb.getManagedBeanName(), top);

        ManagedPropertyBean old =
            mbb.getManagedProperty(top.getPropertyName());
        if (old == null) {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[ManagedPropertyRule]{" +
                                           digester.getMatch() +
                                           "} New(" +
                                           top.getPropertyName() +
                                           ")");
            }
            mbb.addManagedProperty(top);
        } else {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[ManagedPropertyRule]{" +
                                          digester.getMatch() +
                                          "} Merge(" +

        for (Iterator i = mbMap.entrySet().iterator(); i.hasNext(); ) {
            Map.Entry entry = (Map.Entry) i.next();
            String managedBeanName = (String) entry.getKey();
            ManagedBeanFactoryImpl managedBeanFactory = (ManagedBeanFactoryImpl)
                entry.getValue();
            ManagedBeanBean managedBean = managedBeanFactory.getManagedBeanBean();

            if ( managedBean != null) {
                Locale curLocale = Util.getLocaleFromContextOrSystem(facesContext);
                String locale = curLocale.toString();
                DescriptionBean descBean = managedBean.getDescription(locale);
                String desc = "";
                descBean = (null != descBean) ? descBean :
                           managedBean.getDescription("");
                if (null != descBean) {
                    // handle the case where the lang or xml:lang attributes
                    // are not specified on the description
                    desc = descBean.getDescription();
                }

            top = (ManagedPropertyBean) digester.pop();
        } catch (Exception e) {
            throw new IllegalStateException("Popped object is not a " +
                                            CLASS_NAME + " instance");
        }
        ManagedBeanBean mbb = (ManagedBeanBean) digester.peek();

        validate(mbb.getManagedBeanName(), top);

        ManagedPropertyBean old =
            mbb.getManagedProperty(top.getPropertyName());
        if (old == null) {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[ManagedPropertyRule]{" +
                                           digester.getMatch() +
                                           "} New(" +
                                           top.getPropertyName() +
                                           ")");
            }
            mbb.addManagedProperty(top);
        } else {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[ManagedPropertyRule]{" +
                                          digester.getMatch() +
                                          "} Merge(" +

                                       digester.getMatch() +
                                       "} Push " + CLASS_NAME);
        }
        Class clazz =
            digester.getClassLoader().loadClass(CLASS_NAME);
        ManagedBeanBean mbb = (ManagedBeanBean) clazz.newInstance();
        digester.push(mbb);

    }

     * @exception IllegalStateException if the popped object is not
     *  of the correct type
     */
    public void end(String namespace, String name) throws Exception {

        ManagedBeanBean top;
        try {
            top = (ManagedBeanBean) digester.pop();
        } catch (Exception e) {
            throw new IllegalStateException("Popped object is not a " +
                                            CLASS_NAME + " instance");
        }

        validate(top);

        FacesConfigBean fcb = (FacesConfigBean) digester.peek();
        ManagedBeanBean old = fcb.getManagedBean(top.getManagedBeanName());
        if (old == null) {
            if (digester.getLogger().isDebugEnabled()) {
                digester.getLogger().debug("[ManagedBeanRule]{" +
                                           digester.getMatch() +
                                           "} New(" +

TOP

Related Classes of com.sun.faces.config.beans.ManagedBeanBean

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.