2

Seems that there is an bug using some HTML 5 attributes using the passthrough namespace, i.e:

<h:inputText id="text1" p:autofocus p:placeholder="this is a placeholder text"></h:inputText> 

When I try to run the page in Glassfish I get this error:

Error Parsing /index.xhtml: Error Traced[line: 19] Attribute name "p:autofocus" associated with an element type "h:inputText" must be followed by the ' = ' character.

Notice the placeholder attribute works fine, just the ones that doesn't need to specify a value (=""), for example autofocus are failing.

Is this a known bug?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
CIOC
  • 1,385
  • 3
  • 19
  • 48

1 Answers1

6

No, this is caused by the XHTML standard:

XML does not support attribute minimization. Attribute-value pairs must be written in full. Attribute names such as compact and checked cannot occur in elements without their value being specified.

From http://www.w3schools.com/tags/att_input_autofocus.asp

Differences Between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the autofocus attribute must be defined as <input autofocus="autofocus" />.

unwichtich
  • 13,712
  • 4
  • 53
  • 66