Package javax.faces.model

Examples of javax.faces.model.SelectItemGroup


        while (selectItemsIter.hasNext())
        {
            SelectItem item = selectItemsIter.next();
            if (item instanceof SelectItemGroup)
            {
                SelectItemGroup itemgroup = (SelectItemGroup) item;
                SelectItem[] selectItems = itemgroup.getSelectItems();
                if (selectItems != null
                        && selectItems.length > 0
                        && isNoSelectionOption(context, uiComponent, value,
                                Arrays.asList(selectItems).iterator(),
                                converter))
View Full Code Here


            if(!pageDirectionLayout)
            {
                writer.startElement(HTML.TR_ELEM, selectOne);
            }

            SelectItemGroup group = (SelectItemGroup) selectItem;
            SelectItem[] selectItems = group.getSelectItems();

            for (SelectItem groupSelectItem : selectItems)
            {
                itemNum = renderGroupOrItemRadio(facesContext, selectOne, groupSelectItem, currentValue,
                                                 converter, pageDirectionLayout, itemNum);
View Full Code Here

            if(!pageDirectionLayout)
            {
                writer.startElement(HTML.TR_ELEM, selectMany);
            }

            SelectItemGroup group = (SelectItemGroup) selectItem;
            SelectItem[] selectItems = group.getSelectItems();
           
            for (SelectItem groupSelectItem : selectItems)
            {
                itemNum = renderGroupOrItemCheckbox(facesContext, selectMany, groupSelectItem, useSubmittedValues,
                                                    lookupSet, converter, pageDirectionLayout, itemNum);
View Full Code Here

    }


    // Create an options list with nested groups
    protected List setupOptions() {
        SelectItemGroup group, subgroup;
        subgroup = new SelectItemGroup("Group C");
        subgroup.setSelectItems(new SelectItem[]
            { new SelectItem("C1"),
              new SelectItem("C2"),
              new SelectItem("C3") });
        List options = new ArrayList();
        options.add(new SelectItem("A1"));
        group = new SelectItemGroup("Group B");
        group.setSelectItems(new SelectItem[]
            { new SelectItem("B1"),
              subgroup,
              new SelectItem("B2"),
              new SelectItem("B3") });
       
View Full Code Here

        return (options);
    }

    // Create an options list with nested groups
    protected Set setupOptionsSet() {
        SelectItemGroup group, subgroup;
        subgroup = new SelectItemGroup("Group C");
        subgroup.setSelectItems(new SelectItem[]
            { new SelectItem("C1"),
              new SelectItem("C2"),
              new SelectItem("C3") });
        Set<SelectItem> options = new HashSet<SelectItem>();
        options.add(new SelectItem("A1"));
        group = new SelectItemGroup("Group B");
        group.setSelectItems(new SelectItem[]
            { new SelectItem("B1"),
              subgroup,
              new SelectItem("B2"),
              new SelectItem("B3") });
        options.add(group);
View Full Code Here

    }


    // Create an options list with nested groups
    protected List setupOptions() {
        SelectItemGroup group, subgroup;
        subgroup = new SelectItemGroup("Group C");
        subgroup.setSelectItems(new SelectItem[]
            { new SelectItem("C1"),
              new SelectItem("C2"),
              new SelectItem("C3") });
        List options = new ArrayList();
        options.add(new SelectItem("A1"));
        group = new SelectItemGroup("Group B");
        group.setSelectItems(new SelectItem[]
            { new SelectItem("B1"),
              subgroup,
              new SelectItem("B2"),
              new SelectItem("B3") });
        options.add(group);
View Full Code Here

        while (selectItemsIter.hasNext())
        {
            SelectItem item = selectItemsIter.next();
            if (item instanceof SelectItemGroup)
            {
                SelectItemGroup itemgroup = (SelectItemGroup) item;
                SelectItem[] selectItems = itemgroup.getSelectItems();
                if (selectItems != null
                                && selectItems.length > 0
                                && matchValue(context, value, Arrays.asList(
                                                selectItems).iterator(), converter))
                {
View Full Code Here

            writer.startElement(HTML.TD_ELEM, selectMany);

            writer.startElement(HTML.TABLE_ELEM, selectMany);
            writer.writeAttribute(HTML.BORDER_ATTR, "0", null);

            SelectItemGroup group = (SelectItemGroup) selectItem;
            SelectItem[] selectItems = group.getSelectItems();

            for (int i = 0; i < selectItems.length; i++)
            {
                renderGroupOrItemCheckbox(facesContext, selectMany, selectItems[i], useSubmittedValues, lookupSet, converter, pageDirectionLayout, new Integer(i));
            }
View Full Code Here

        SelectItem item3 = new SelectItem("Three", "Three", null);

        SelectItem item4 = new SelectItem("Four", "Four", null);
        SelectItem item5 = new SelectItem("Five", "Five", null);
        SelectItem[] itemsArray = {item4, item5};
        SelectItemGroup itemGroup = new SelectItemGroup("group", null, true,
                                                        itemsArray);
        SelectItem[] items = {item1, item2, item3, itemGroup};
        uiSelectItems.setValue(items);
        uiSelectItems.setId("items");
        uiSelectOne.getChildren().add(uiSelectItems);
View Full Code Here

        SelectItem item2 = new SelectItem("Blue", "Blue", null);
       
        SelectItem item3 = new SelectItem("Green", "Green", null);
        SelectItem item4 = new SelectItem("Yellow", "Yellow", null);
        SelectItem[] itemsArray = {item3, item4};
        SelectItemGroup itemGroup = new SelectItemGroup("group", null, true,
                itemsArray);
        SelectItem[] selectItems = {item1, item2, itemGroup};
        Object selectedValues[] = null;
        uiSelectItems.setValue(selectItems);
        uiSelectItems.setId("manyListitems");
View Full Code Here

TOP

Related Classes of javax.faces.model.SelectItemGroup

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.