HTML5 introduced data attributes that are often used by javascript library.
I need to add one of those data attribute to a button generated with jsf. For example, this jsf :
<h:commandButton value = "Click Me!" />
will generate the following html :
<input type="submit" value="Click Me!" />
How can I modify the jsf to have the following result :
<input type="submit" value="Click Me!" data-foo="bar" />
I tried by adding <f:attribute name="data-foo" value="bar" />
but the html doesn't have it.
How can i add a custom HTML attribute to a jsf generated HTML component ?