Package org.apache.myfaces.wap.component

Examples of org.apache.myfaces.wap.component.InputText


            throw new NullPointerException();
        }
       
        if (!component.isRendered()) return;
       
        InputText comp = (InputText)component;
       
        ResponseWriter writer = context.getResponseWriter();
        writer.startElement(Attributes.INPUT, component);
       
        RendererUtils.writeAttribute(Attributes.ID, comp.getClientId(context), writer);
        RendererUtils.writeAttribute(Attributes.STYLE_CLASS, comp.getStyleClass(), writer);
        RendererUtils.writeAttribute(Attributes.XML_LANG, comp.getXmllang(), writer);
       
        /* attribute name is not required. If is not set, name value equals component id */
        if (comp.getName() == null) {
            log.debug("getName is null");
            comp.setName(comp.getClientId(context));
        }
        RendererUtils.writeAttribute(Attributes.NAME, comp.getName(), writer);
       
        /* default value is false, write only if value of attribute emptyok is true */
        if (comp.isEmptyok()) RendererUtils.writeAttribute(Attributes.EMPTY_OK, "true", writer);
       
        RendererUtils.writeAttribute(Attributes.FORMAT, comp.getFormat(), writer);
        RendererUtils.writeAttribute(Attributes.MAX_LENGTH, comp.getMaxlength(), writer);
        RendererUtils.writeAttribute(Attributes.SIZE, comp.getSize(), writer);
        RendererUtils.writeAttribute(Attributes.TABINDEX, comp.getTabindex(), writer);
        RendererUtils.writeAttribute(Attributes.TITLE, comp.getTitle(), writer);
        RendererUtils.writeAttribute(Attributes.VALUE, comp.getValue(), writer);
       
        // value "text" is default, don't must be written
        //RenderUtils.writeAttribute(Attributes.TYPE, "text", writer);
       
        writer.endElement(Attributes.INPUT);
View Full Code Here


        log.debug("decode(" + component.getId() + ")");
        if (component == null || context == null) throw new NullPointerException();
        if (!(component instanceof InputText))
            log.error("Component " + component.getClass().getName() + " is no InputText, cannot be converted!");
       
        InputText comp = (InputText)component;
       
        Map map = context.getExternalContext().getRequestParameterMap();
       
        // Set the submitted value of this UIInput component
        if (map.containsKey(comp.getName())){
            log.debug("Parameter:" + comp.getName() + " was found in the request. Value: " + (String)map.get(comp.getName()));
            comp.setSubmittedValue(map.get(comp.getName()));
            //comp.setValue(map.get(comp.getName()));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.wap.component.InputText

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.