Github user gregh3269 commented on a diff in the pull request:
https://github.com/apache/struts/pull/86#discussion_r52433247
--- 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 --
I did use originally .valueOf and then checking the other handlers they all
used the cast, so matched what they use, for code style.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]