Greg Huber created WW-5592:
------------------------------

             Summary: Textfield tag not allowing white space
                 Key: WW-5592
                 URL: https://issues.apache.org/jira/browse/WW-5592
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Java Templates
    Affects Versions: 7.1.1
            Reporter: Greg Huber


The Textfield tag in the java templates plugin does not allow white space.

To make it match the standard, the .isNotBlank(..) should be .isNotEmpty(..) in 
the org.apache.struts2.views.java.Attributes class.
{code:java}
public Attributes addIfExists(String attrName, Object paramValue, boolean 
encode) {
        if (paramValue != null) {
            String val = paramValue.toString();
            if (StringUtils.isNotBlank(val))
                put(attrName, (encode ? 
StringUtils.defaultString(StringEscapeUtils.escapeHtml4(val)) : val));
        }
        return this;
    }
{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to