JSF, Facelets and HTML 5 mix support on IDEA 10
Hi.
I'm developing a Java EE 6 web app using JSF 2 with facelets templating. During development I needed to use custom attributes so I went with the HTML 5 standard:
<div data-nota="#{nota}" data-alteracion="0">#{nota}</div>
But data-nota and data-alteración show red on my file. This page has no explicit doctype as it is part of templating. The initial page has XHTML on it but when I've tried to change to this
<!DOCTYPE html>
Then everything goes red. The file extension is .xhtml and I've found that if I use a .html extension seems to work quite right.
In the past I had the option (intention?) to just add those attributes to a custom list.
Any idea what I can do?
Thanks.
Please sign in to leave a comment.
Try to change default HTML language level to HTML5 at Project Settings ->
Resources.
Thanks!
Works quite well. The pages without DOCTYP> work perfect and seems to be recognised as HTML 5 (the data-* is accepted).
Strangely enough the main page (template) which has the DOCTYPE gives some problems. If I keep it as XHTML then no html5 is accepted (ex: data-* attributes or canvas tag). But if I put it as the html5 doctype (<DOCTYPE html>) then all the tags are not accepted. Weird because that's exactle the html5 doctype explicitly given.
Anyway, works enough for me for the moment.
Thanks!
I cannot reproduce this. Could you attach an example page?
I think the problem is the .xhtml extension. If I switch it to .html seems to work.
Anyway I've created a small project to illustrate it. Just a minor glitch.
Attachment(s):
test-html5.zip
Thanks for your input. This looks like a bug. Could you please submit a
request to YouTrack?
Done!
http://youtrack.jetbrains.net/issue/IDEA-63054