Package org.apache.myfaces.shared.util

Examples of org.apache.myfaces.shared.util.SelectItemsIterator


    public static List<SelectItemInfo> getSelectItemInfoList(UISelectMany uiSelectMany,
            FacesContext facesContext)
    {
        List<SelectItemInfo> list = new ArrayList<SelectItemInfo>();

        for (SelectItemsIterator iter = new SelectItemsIterator(uiSelectMany, facesContext); iter
                .hasNext();)
        {
            list.add(new SelectItemInfo(iter.next(), iter.getCurrentComponent(), iter.getCurrentValue()));
        }
        return list;
    }
View Full Code Here


    public static List<SelectItemInfo> getSelectItemInfoList(UISelectOne uiSelectOne,
            FacesContext facesContext)
    {
        List<SelectItemInfo> list = new ArrayList<SelectItemInfo>();
        for (SelectItemsIterator iter = new SelectItemsIterator(uiSelectOne, facesContext); iter
                .hasNext();)
        {
            list.add(new SelectItemInfo(iter.next(), iter.getCurrentComponent(), iter.getCurrentValue()));
        }
        return list;
    }
View Full Code Here

        if (Collection.class.isAssignableFrom(valueType)
                || Object.class.equals(valueType))
        {
            // try to get the by-type-converter from the type of the SelectItems
            return _SharedRendererUtils.getSelectItemsValueConverter(
                    new SelectItemsIterator(component, facesContext),
                    facesContext);
        }

        if (!valueType.isArray())
        {
            throw new IllegalArgumentException(
                    "ValueExpression for UISelectMany : "
                            + getPathToComponent(component)
                            + " must be of type Collection or Array");
        }

        Class<?> arrayComponentType = valueType.getComponentType();
        if (String.class.equals(arrayComponentType))
        {
            return null; //No converter needed for String type
        }

        if (Object.class.equals(arrayComponentType))
        {
            // There is no converter for Object class
            // try to get the by-type-converter from the type of the SelectItems
            return _SharedRendererUtils.getSelectItemsValueConverter(
                    new SelectItemsIterator(component, facesContext),
                    facesContext);
        }

        try
        {
View Full Code Here

        }
         */

        List list = new ArrayList();

        for (Iterator iter = new SelectItemsIterator(uiComponent, facesContext); iter
                .hasNext();)
        {
            list.add(iter.next());
        }
        return list;
    }
View Full Code Here

            else if (Collection.class.isAssignableFrom(modelType) || Object.class.equals(modelType))
            {
                if (converter == null)
                {
                    // try to get the by-type-converter from the type of the SelectItems
                    SelectItemsIterator iterator = new SelectItemsIterator(component, facesContext);
                    converter = getSelectItemsValueConverter(iterator, facesContext);
                }

                Object collectionTypeAttr = component.getAttributes().get(
                        COLLECTION_TYPE_KEY);
View Full Code Here

        if (Collection.class.isAssignableFrom(valueType)
                || Object.class.equals(valueType))
        {
            // try to get the by-type-converter from the type of the SelectItems
            return _SharedRendererUtils.getSelectItemsValueConverter(
                    new SelectItemsIterator(component, facesContext),
                    facesContext);
        }

        if (!valueType.isArray())
        {
            throw new IllegalArgumentException(
                    "ValueExpression for UISelectMany : "
                            + getPathToComponent(component)
                            + " must be of type Collection or Array");
        }

        Class<?> arrayComponentType = valueType.getComponentType();
        if (String.class.equals(arrayComponentType))
        {
            return null; //No converter needed for String type
        }

        if (Object.class.equals(arrayComponentType))
        {
            // There is no converter for Object class
            // try to get the by-type-converter from the type of the SelectItems
            return _SharedRendererUtils.getSelectItemsValueConverter(
                    new SelectItemsIterator(component, facesContext),
                    facesContext);
        }

        try
        {
View Full Code Here

        }
         */

        List list = new ArrayList();

        for (Iterator iter = new SelectItemsIterator(uiComponent, facesContext); iter
                .hasNext();)
        {
            list.add(iter.next());
        }
        return list;
    }
View Full Code Here

    public static List<SelectItemInfo> getSelectItemInfoList(UISelectMany uiSelectMany,
            FacesContext facesContext)
    {
        List<SelectItemInfo> list = new ArrayList<SelectItemInfo>();

        for (SelectItemsIterator iter = new SelectItemsIterator(uiSelectMany, facesContext); iter
                .hasNext();)
        {
            list.add(new SelectItemInfo(iter.next(), iter.getCurrentComponent()));
        }
        return list;
    }
View Full Code Here

    public static List<SelectItemInfo> getSelectItemInfoList(UISelectOne uiSelectOne,
            FacesContext facesContext)
    {
        List<SelectItemInfo> list = new ArrayList<SelectItemInfo>();
        for (SelectItemsIterator iter = new SelectItemsIterator(uiSelectOne, facesContext); iter
                .hasNext();)
        {
            list.add(new SelectItemInfo(iter.next(), iter.getCurrentComponent()));
        }
        return list;
    }
View Full Code Here

        if (Collection.class.isAssignableFrom(valueType)
                || Object.class.equals(valueType))
        {
            // try to get the by-type-converter from the type of the SelectItems
            return _SharedRendererUtils.getSelectItemsValueConverter(
                    new SelectItemsIterator(component, facesContext),
                    facesContext);
        }

        if (!valueType.isArray())
        {
            throw new IllegalArgumentException(
                    "ValueExpression for UISelectMany : "
                            + getPathToComponent(component)
                            + " must be of type Collection or Array");
        }

        Class<?> arrayComponentType = valueType.getComponentType();
        if (String.class.equals(arrayComponentType))
        {
            return null; //No converter needed for String type
        }

        if (Object.class.equals(arrayComponentType))
        {
            // There is no converter for Object class
            // try to get the by-type-converter from the type of the SelectItems
            return _SharedRendererUtils.getSelectItemsValueConverter(
                    new SelectItemsIterator(component, facesContext),
                    facesContext);
        }

        try
        {
View Full Code Here

TOP

Related Classes of org.apache.myfaces.shared.util.SelectItemsIterator

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.