Package org.openfaces.component.input

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


    }

    @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

Related Classes of org.openfaces.component.input.InputSecret

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.