Package javax.faces.component

Examples of javax.faces.component.UISelectItem


    @Override
    protected UIComponent createComponentToTest()
    {
        UIComponent component = new HtmlSelectOneRadio();
        UISelectItem item = new UISelectItem();
        item.setItemValue("value1");
        component.getChildren().add(item);
        return component;
    }
View Full Code Here


    @Override
    protected UIComponent createComponentToTest()
    {
        UIComponent component = new HtmlSelectManyMenu();
        UISelectItem item = new UISelectItem();
        item.setItemValue("value1");
        component.getChildren().add(item);
        return component;
    }
View Full Code Here

    @Override
    protected UIComponent createComponentToTest()
    {
        UIComponent component = new HtmlSelectOneListbox();
        UISelectItem item = new UISelectItem();
        item.setItemValue("value1");
        component.getChildren().add(item);
        return component;
    }
View Full Code Here

    @Override
    protected UIComponent createComponentToTest()
    {
        UIComponent component = new HtmlSelectManyListbox();
        UISelectItem item = new UISelectItem();
        item.setItemValue("value1");
        component.getChildren().add(item);
        return component;
    }
View Full Code Here

    @Override
    protected UIComponent createComponentToTest()
    {
        UIComponent component = new HtmlSelectManyCheckbox();
        UISelectItem item = new UISelectItem();
        item.setItemValue("value1");
        component.getChildren().add(item);
        return component;
    }
View Full Code Here

    @Override
    protected UIComponent createComponentToTest()
    {
        UIComponent component = new HtmlSelectOneMenu();
        UISelectItem item = new UISelectItem();
        item.setItemValue("value1");
        component.getChildren().add(item);
        return component;
    }
View Full Code Here

    @Override
    public void renderView() {
        HtmlSelectOneMenu select = new HtmlSelectOneMenu();
        String[] valueArray = properties.getValues().split(";");
        for (int i = 0; i < valueArray.length; ++i) {
            UISelectItem item = new UISelectItem();
            item.setItemValue(valueArray[i]);
            item.setItemLabel(valueArray[i]);
            select.getChildren().add(item);
        }
        if (isDisabled()) {
            select.setDisabled(true);
        }
View Full Code Here

                    UIComponentBase comp = null;
                    if (item.getValueTranslations().containsKey(property)) {
                        comp = new HtmlSelectOneMenu();
                        for (Object value : item.getValueTranslations().get(property).keySet()) {
                            String translation = (String) item.getValueTranslations().get(property).get(value);
                            UISelectItem selectItem = new UISelectItem();
                            selectItem.setItemLabel(translation);
                            selectItem.setItemValue(value);
                            comp.getChildren().add(selectItem);
                        }
                        ((HtmlSelectOneMenu) comp).setValue(val);
                    } else {
                        if (!item.getSpecialProperties().containsKey(property)) {
                            if (pd.getReadMethod().getReturnType() == String.class
                                    || pd.getReadMethod().getReturnType() == Integer.class) {
                                comp = new HtmlInputText();
                                ((HtmlInputText) comp).setValue(val);
                            } else if(pd.getReadMethod().getReturnType() == Boolean.class) {
                                comp = new HtmlSelectBooleanCheckbox();
                                UISelectItem box = new UISelectItem();
                                if((Boolean)val) {
                                    ((HtmlSelectBooleanCheckbox)comp).setSelected(Boolean.TRUE);
                                } else {
                                    ((HtmlSelectBooleanCheckbox)comp).setSelected(Boolean.FALSE);
                                }
View Full Code Here

        HtmlSelectOneRadio select = new HtmlSelectOneRadio();
        select.setLayout(properties.getLayout());

        String[] valueArray = properties.getValues().split(";");
        for (int i = 0; i < valueArray.length; ++i) {
            UISelectItem item = new UISelectItem();
            item.setItemValue(valueArray[i]);
            item.setItemLabel(valueArray[i]);
            select.getChildren().add(item);
        }
        if (isDisabled()) {
            select.setDisabled(true);
        }
View Full Code Here

    public void renderView() {
        HtmlSelectManyCheckbox select = new HtmlSelectManyCheckbox();
        select.setLayout(properties.getLayout());
        String[] valueArray = properties.getValues().split(";");
        for (int i = 0; i < valueArray.length; ++i) {
            UISelectItem item = new UISelectItem();
            item.setItemValue(valueArray[i]);
            item.setItemLabel(valueArray[i]);
            select.getChildren().add(item);
        }

        if (isDisabled()) {
            select.setDisabled(true);
View Full Code Here

TOP

Related Classes of javax.faces.component.UISelectItem

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.