Examples of SelectManyCheckbox


Examples of org.openfaces.component.select.SelectManyCheckbox

                                 ResponseWriter writer,
                                 SelectManyCheckbox selectManyInputBase,
                                 List<SelectItem> selectItems,
                                 boolean isLineLayout,
                                 boolean isCheckboxWithImages) throws IOException {
        SelectManyCheckbox selectManyCheckbox = (SelectManyCheckbox) selectManyInputBase;
        String clientId = selectManyCheckbox.getClientId(facesContext);

        List<List<SelectItem>> itemsDistribution =
                calculateItemsDistribution(selectItems, isLineLayout, selectManyCheckbox);

        int itemsNumber = 0;
View Full Code Here

Examples of org.openfaces.component.select.SelectManyCheckbox

        return table;
    }

    @Override
    public void decode(FacesContext context, UIComponent component) {
        SelectManyCheckbox selectManyCheckbox = (SelectManyCheckbox) component;

        Map<String, String[]> requestMap = context.getExternalContext().getRequestParameterValuesMap();

        String clientId = selectManyCheckbox.getClientId(context);

        if (requestMap.containsKey(clientId)) {
            String[] requestValues = requestMap.get(clientId);
            selectManyCheckbox.setSubmittedValue(requestValues);
        } else {
            selectManyCheckbox.setSubmittedValue(new String[0]);
        }
    }
View Full Code Here

Examples of org.openfaces.component.select.SelectManyCheckbox

        }
    }

    @Override
    public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue) throws ConverterException {
        SelectManyCheckbox selectManyCheckbox = (SelectManyCheckbox) component;
        return Rendering.getConvertedUISelectManyValue(context, selectManyCheckbox, submittedValue);
    }
View Full Code Here

Examples of org.openfaces.component.select.SelectManyCheckbox

    protected void renderInitScript(FacesContext facesContext, OUISelectManyInputBase selectManyInputBase,
                                    JSONObject imagesObj, JSONObject stylesObj,
                                    int selectItemCount, AnonymousFunction onchangeFunction)
            throws IOException {
        SelectManyCheckbox selectManyCheckbox = (SelectManyCheckbox) selectManyInputBase;
        Script initScript = new ScriptBuilder().initScript(facesContext, selectManyCheckbox, "O$.ManyCheckbox._init",
                imagesObj,
                stylesObj,
                selectItemCount,
                selectManyCheckbox.isDisabled(),
                selectManyCheckbox.isReadonly(),
                onchangeFunction
        );

        Rendering.renderInitScript(facesContext, initScript,
                Resources.utilJsURL(facesContext),
View Full Code Here

Examples of org.primefaces.component.selectmanycheckbox.SelectManyCheckbox

    }
   
    @Override
    protected void encodeOption(FacesContext context, UIInput component, Object values, Object submittedValues, Converter converter, SelectItem option, int idx) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        SelectManyCheckbox checkbox = (SelectManyCheckbox) component;
        String itemValueAsString = getOptionAsString(context, component, converter, option.getValue());
        String name = checkbox.getClientId(context);
        String id = name + UINamingContainer.getSeparatorChar(context) + idx;
        boolean disabled = option.isDisabled() || checkbox.isDisabled();

        Object valuesArray;
        Object itemValue;
        if(submittedValues != null) {
            valuesArray = submittedValues;
            itemValue = itemValueAsString;
        } else {
            valuesArray = values;
            itemValue = option.getValue();
        }
       
        boolean selected = isSelected(context, component, itemValue, valuesArray, converter);
        if(option.isNoSelectionOption() && values != null && !selected) {
            return;
        }
       
        writer.startElement("input", null);
        writer.writeAttribute("id", id, null);
        writer.writeAttribute("name", name, null);
        writer.writeAttribute("type", "checkbox", null);
        writer.writeAttribute("value", itemValueAsString, null);

        renderOnchange(context, checkbox);
        renderDynamicPassThruAttributes(context, checkbox);
       
        if (checkbox.getTabindex() != null) writer.writeAttribute("tabindex", checkbox.getTabindex(), null);
        if (selected) writer.writeAttribute("checked", "checked", null);
        if (disabled) writer.writeAttribute("disabled", "disabled", null);
       
        writer.endElement("input");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.