struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlenart <...@git.apache.org>
Subject [GitHub] struts pull request: Allow html5 attributes
Date Wed, 10 Feb 2016 12:33:09 GMT
Github user lukaszlenart commented on a diff in the pull request:

    https://github.com/apache/struts/pull/86#discussion_r52450951
  
    --- Diff: plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/TextFieldHandler.java
---
    @@ -31,8 +31,8 @@
         public void generate() throws IOException {
             Map<String, Object> params = context.getParameters();
             Attributes attr = new Attributes();
    -
    -        attr.add("type", "text")
    +        Object type = params.get("type");
    +        attr.add("type", type == null ? "text" : (String) type)
    --- End diff --
    
    You must check for `null` because `String.valueOf(null)` will return a String "null" :\
I think the current solution is ok :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message