Package org.openfaces.component.select

Examples of org.openfaces.component.select.SelectOneMenu


        return "o_dropdown o_selectonemenu";
    }

    @Override
    protected int getItemPresentationColumn(DropDownComponent dropDown) {
        SelectOneMenu fieldComponent = (SelectOneMenu) dropDown;
        return fieldComponent.getItemPresentationColumn();
    }
View Full Code Here


                ? "[" + currentValueConverted + "]"
                : "";
    }

    protected void encodeField(FacesContext context, UIComponent component) throws IOException {
        SelectOneMenu fieldComponent = (SelectOneMenu) component;
        ResponseWriter writer = context.getResponseWriter();

        String fieldId = getFieldClientId(context, fieldComponent);
        String itemPresentationId = getItemPresentationId(context, fieldComponent);
        writer.writeAttribute("style", "width: 100%; height: 100%", null);

        // Item presentation
        writer.startElement("div", fieldComponent);
        writer.writeAttribute("class", PRESENTATION_CONTENT_CLASS, null);
        writer.writeAttribute("id", itemPresentationId + CONTAINER_SUFFIX, null);
        writer.startElement("table", fieldComponent);
        writer.writeAttribute("cellspacing", "0", null);
        writer.writeAttribute("cellpadding", "0", null);
        // 98% - for compatibility with IE quirk mode
        writer.writeAttribute("style", "width: 98%;height: 98%;", null);
        writer.startElement("colgroup", fieldComponent);
        writer.endElement("colgroup");
        writer.startElement("tbody", fieldComponent);
        writer.startElement("tr", fieldComponent);
        writer.writeAttribute("id", itemPresentationId, null);
        writer.startElement("td", fieldComponent);
        Rendering.writeNonBreakableSpace(writer);
        writer.endElement("td");
        writer.endElement("tr");
        writer.endElement("tbody");
        writer.endElement("table");
        writer.endElement("div");

        // Filter field
        writer.startElement("div", fieldComponent);
        writer.writeAttribute("id", fieldId + CONTAINER_SUFFIX, null);
        writer.writeAttribute("class", FIELD_CONTAINER_OUTER_CLASS, null);
        writer.startElement("div", fieldComponent);
        writer.writeAttribute("class", FIELD_CONTAINER_MIDDLE_CLASS, null);
        writer.startElement("div", fieldComponent);
        writer.writeAttribute("class", FIELD_CONTAINER_INNER_CLASS, null);
        writer.startElement("input", fieldComponent);
        writer.writeAttribute("id", fieldId, null);
        writer.writeAttribute("type", "text", null);
        writer.writeAttribute("style", "height: 100%;", null);
        if (fieldComponent.isDisabled())
            writer.writeAttribute("disabled", "disabled", null);
        if (fieldComponent.isReadonly())
            writer.writeAttribute("readonly", "readonly", null);
        writer.writeAttribute("name", fieldId, null);
        writeFieldAttributes(writer, fieldComponent);
        writer.endElement("input");
        writer.endElement("div");
View Full Code Here

TOP

Related Classes of org.openfaces.component.select.SelectOneMenu

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.