Examples of InputSecret


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

            throw new NullPointerException();
        }
       
        if (!component.isRendered()) return;
       
        InputSecret comp = (InputSecret)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);
        RendererUtils.writeAttribute(Attributes.TYPE, "password", writer);
       
        writer.endElement(Attributes.INPUT);
    }
View Full Code Here

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

        log.debug("decode(" + component.getId() + ")");
        if (component == null || context == null) throw new NullPointerException();
        if (!(component instanceof InputSecret))
            log.error("Component " + component.getClass().getName() + " is no InputSecret, cannot be converted!");
       
        InputSecret comp = (InputSecret)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: " + map.get(comp.getName()));
            comp.setSubmittedValue(map.get(comp.getName()));
            //comp.setValue(map.get(comp.getName()));
        }
    }
View Full Code Here

Examples of org.openfaces.component.input.InputSecret

        encodeInitScript(facesContext, inputText);
    }

    protected void writeCustomAttributes(FacesContext context, OUIInputText input) throws IOException {
        ResponseWriter writer = context.getResponseWriter();
        InputSecret inputSecret = (InputSecret) input;
        writeAttribute(writer, "type", "text");
        Rendering.writeAttributes(writer, inputSecret);
        writeAttribute(writer, "maxlength", inputSecret.getMaxlength(), Integer.MIN_VALUE);
        writeAttribute(writer, "size", inputSecret.getSize(), Integer.MIN_VALUE);
    }
View Full Code Here

Examples of org.openfaces.component.input.InputSecret

    }

    @Override
    protected void encodeInitScript(FacesContext context, OUIInputText input) throws IOException {

        InputSecret inputSecret = (InputSecret) input;

        String promptText = inputSecret.getPromptText();
        String promptTextClass = Styles.getCSSClass(context, inputSecret, inputSecret.getPromptTextStyle(), StyleGroup.regularStyleGroup(1), inputSecret.getPromptTextClass(), DEFAULT_PROMPT_CLASS);
        String rolloverClass = Styles.getCSSClass(context, inputSecret, inputSecret.getRolloverStyle(), StyleGroup.regularStyleGroup(2), inputSecret.getRolloverClass(), null);
        String focusedClass = Styles.getCSSClass(context, inputSecret, inputSecret.getFocusedStyle(), StyleGroup.regularStyleGroup(3), inputSecret.getFocusedClass(), null);

        String value = Rendering.convertToString(context, inputSecret, inputSecret.getValue());
        boolean promptVisible = value == null || value.length() == 0;

        ScriptBuilder scriptBuilder = new ScriptBuilder();
        scriptBuilder.initScript(context, inputSecret, "O$.InputSecret._init",
                inputSecret.getInterval(),
                inputSecret.getDuration(),
                inputSecret.getReplacement(),
                promptVisible,
                promptText,
                promptTextClass,
                rolloverClass,
                focusedClass);
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.