Examples of addDefaultToEmpty()


Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

    public void generate() throws IOException {
        Map<String, Object> params = context.getParameters();
        Attributes a = new Attributes();

        a.addDefaultToEmpty("name", params.get("name"))
                .addIfExists("for", params.get("for"))
                .addIfExists("id", params.get("id"))
                .addIfExists("class", params.get("cssClass"))
                .addIfExists("style", params.get("cssStyle"))
                .addIfExists("title", params.get("title"));
View Full Code Here

Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

        Boolean showPassword = (Boolean) params.get("showPassword");
        if (showPassword != null && showPassword)
           attrs.addIfExists("value",  params.get("nameValue"));

        attrs.addDefaultToEmpty("name", params.get("name"))
                .add("type", "password")
                .addIfExists("size", params.get("size"))
                .addIfExists("maxlength", params.get("maxlength"))
                .addIfTrue("disabled", params.get("disabled"))
                .addIfTrue("readonly", params.get("readonly"))
View Full Code Here

Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

        Map<String, Object> params = context.getParameters();
        Attributes attrs = new Attributes();

        boolean isButton = "button".equals(params.get("type"));

        attrs.addDefaultToEmpty("name", params.get("name"))
                .add("type", "reset")
                .addIfExists("value", params.get("nameValue"))
                .addIfExists("tabindex", params.get("tabindex"))
                .addIfExists("id", params.get("id"))
                .addIfExists("class", params.get("cssClass"))
View Full Code Here

Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

    public void generate() throws IOException {
        Map<String, Object> params = context.getParameters();
        Attributes a = new Attributes();

        a.addDefaultToEmpty("name", params.get("name"))
                .add("type", "file")
                .addIfExists("size", params.get("size"))
                .addIfExists("value", params.get("nameValue"))
                .addIfTrue("disabled", params.get("disabled"))
                .addIfExists("accept", params.get("accept"))
View Full Code Here

Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

    public void generate() throws IOException {
        Map<String, Object> params = context.getParameters();
        Attributes a = new Attributes();

        a.addDefaultToEmpty("name", params.get("name"))
                .add("type", "hidden")
                .addIfExists("value", params.get("nameValue"))
                .addIfTrue("disabled", params.get("disabled"))
                .addIfExists("id", params.get("id"))
                .addIfExists("class", params.get("cssClass"))
View Full Code Here

Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

    public void generate() throws IOException {
        Map<String, Object> params = context.getParameters();
        Attributes attrs = new Attributes();

        attrs.addDefaultToEmpty("name", params.get("name"))
                .addDefaultToEmpty("cols", params.get("cols"))
                .addDefaultToEmpty("rows", params.get("rows"))
                .addIfExists("wrap", params.get("wrap"))
                .addIfTrue("disabled", params.get("disabled"))
                .addIfTrue("readonly", params.get("readonly"))
View Full Code Here

Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

        Map<String, Object> params = context.getParameters();
        Attributes a = new Attributes();

        Object value = params.get("nameValue");

        a.addDefaultToEmpty("name", params.get("name"))
                .addIfExists("size", params.get("size"))
                .addIfExists("value", value)
                .addIfTrue("disabled", params.get("disabled"))
                .addIfTrue("readonly", params.get("readonly"))
                .addIfTrue("multiple", params.get("multiple"))
View Full Code Here

Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

    public void generate() throws IOException {
        Map<String, Object> params = context.getParameters();
        Attributes a = new Attributes();

        a.addDefaultToEmpty("name", params.get("name"))
                .addIfExists("for", params.get("for"))
                .addIfExists("id", params.get("id"))
                .addIfExists("class", params.get("cssClass"))
                .addIfExists("style", params.get("cssStyle"))
                .addIfExists("title", params.get("title"));
View Full Code Here

Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

        Map<String, Object> params = context.getParameters();
        Attributes attrs = new Attributes();

        boolean isButton = "button".equals(params.get("type"));

        attrs.addDefaultToEmpty("name", params.get("name"))
                .add("type", "reset")
                .addIfExists("value", params.get("nameValue"), false)
                .addIfExists("tabindex", params.get("tabindex"))
                .addIfExists("id", params.get("id"))
                .addIfExists("class", params.get("cssClass"))
View Full Code Here

Examples of org.apache.struts2.views.java.Attributes.addDefaultToEmpty()

        Map<String, Object> params = context.getParameters();
        Attributes a = new Attributes();

        Object value = params.get("nameValue");

        a.addDefaultToEmpty("name", params.get("name"))
                .addIfExists("size", params.get("size"))
                .addIfExists("value", value, false)
                .addIfTrue("disabled", params.get("disabled"))
                .addIfTrue("readonly", params.get("readonly"))
                .addIfTrue("multiple", params.get("multiple"))
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.