This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 192486 - Common JSF elements such as h:head and h:body elements are marked as errors
Summary: Common JSF elements such as h:head and h:body elements are marked as errors
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 7.0
Hardware: Macintosh Mac OS X
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 191266 191562 192551 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-11-25 17:24 UTC by alanobject
Modified: 2010-12-10 06:17 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alanobject 2010-11-25 17:24:14 UTC
To re-create this problem:

1. Start IDE -- version and environment is as follows:

Product Version: NetBeans IDE 7.0 Beta (Build 201011152355)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307
System: Mac OS X version 10.6.5 running on x86_64; MacRoman; en_US (nb)

2. Menu File->New Project

3. In dialog box choose Maven->WebApplication

4. Set some sensible project name and select Java EE 6 in EE Version.  

5. Select File->New FIle

6. Select JavaServer Faces->JSF Page

7. make some new file in the location "Web Page" and select "Facelets" radio button.  You will create file as below, and the "h:head" and "h:body" elements will be marked as errors.  


<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
      Hello from Facelets
    </h:body>
</html>
Comment 1 Marek Fukala 2010-11-25 21:35:39 UTC
reproducible, these errors comes from the html validator
Comment 2 Marek Fukala 2010-12-07 09:13:55 UTC
*** Bug 191266 has been marked as a duplicate of this bug. ***
Comment 3 Marek Fukala 2010-12-07 09:14:17 UTC
*** Bug 192551 has been marked as a duplicate of this bug. ***
Comment 4 Marek Fukala 2010-12-09 14:27:09 UTC
fixed in web-main#a2738b3c51bf

Once a facelets library is declared in an xhtml file the file's mimetype changes to text/facelets+xhtml mimetype from the error provider's view (not the actual fileobject's mimetype changes).

So it is possible to use the "disable/enable error checking for this mimetype" hintfix to modify the behavior. 

By default the checking for facelets is disabled as for other files possibly embedding html code (php, jsp...)
Comment 5 Marek Fukala 2010-12-09 14:30:05 UTC
*** Bug 191562 has been marked as a duplicate of this bug. ***
Comment 6 Quality Engineering 2010-12-10 06:17:20 UTC
Integrated into 'main-golden', will be available in build *201012100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a2738b3c51bf
User: Marek Fukala <mfukala@netbeans.org>
Log: #192486 - Common JSF elements such as h:head and h:body elements are marked as errors