Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Closed Closed
Resolution: Works as designed
Priority: Minor Minor
Assignee: Manfred Riem
Reporter: kithouna
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

HTML input elements without type attribute should be recognized as text inputs

Created: 31/Oct/13 12:56 PM   Updated: 08/Jan/14 10:19 PM   Resolved: 31/Oct/13 02:55 PM
Component/s: None
Affects Version/s: 2.2.4
Fix Version/s: 2.2.5

Time Tracking:
Not Specified


GlassFish 4.0

Tags: html input type attribute form
Participants: kithouna and Manfred Riem

 Description  « Hide

Consider the following form:

<form jsf:id="form">
  <label jsf:for="input">Foo</label>
  <input type="text" jsf:value="#{}" jsf:id="input"/>
  <h:message for="input"/>
  <input type="submit" jsf:action="#{}" value="Save"/>

When the type attribute is removed from the input element, the input element is not recognized anymore. The foo property of testBean is not set and the log shows 2 warnings because the label and h:message do not find the component with the ID "input".

I'm not sure if this requires a JSF spec change. IIRC the JSF spec says input elements with any type value (other than those with other meanings like button, submit etc.) should be rendered like h:inputText. One could argue the type attribute does not have any value when it's not specified, but the HTML 4.01 specification clearly states The default value for this attribute is "text" and it's very common in HTML to omit this attribute.

Manfred Riem added a comment - 31/Oct/13 02:55 PM

You are indeed pointing out something that would nice to have unfortunately we have to implement what is specified at

Please feel free to file this as a spec issue at the spec issue tracker at


kithouna added a comment - 31/Oct/13 05:22 PM