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 228064 - Editor needs to support new EE 7 namespaces
Summary: Editor needs to support new EE 7 namespaces
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF Editor (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-28 20:43 UTC by chaase3
Modified: 2014-01-27 06:01 UTC (History)
2 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 chaase3 2013-03-28 20:43:21 UTC
As of Java EE 7 the old java.sun.com namespaces for Facelets pages have changed to xmlns.jcp.org, as described in http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html.

As of this week's Dev builds (3/27, for example), NetBeans does not yet recognize these namespaces. It is happy with the following:

<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html">

However, it marks the following as erroneous:

<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://xmlns.jcp.org/jsf/html">

The error is "No library found for namespace http://xmlns.jcp.org/jsf/html", and it also says, "Content is being hidden from the validator based on namespace filtering". 

If I use the new namespaces in a JSF application, the application deploys and runs just fine on a current GlassFish 4 build. It's just that NetBeans doesn't know about them yet.

Perhaps you have just not gotten to this yet, since the new namespaces have been valid for only a few weeks. I just wanted to make sure this is on your radar. Thanks.

Product Version: NetBeans IDE Dev (Build 201303272300)
Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Martin Fousek 2013-03-29 05:31:30 UTC
Thanks chasse3 for the issue. As you mentioned the NS change happen later so it was not caught by wave of implementing JSF editor updates for JSF2.2. According to the specification both namespaces are allowed now although the JCP's ones are the recommended.

Definitely has to be fixed into the 7.3.1 - not just the editor hint but also the completion for the namespaces and hints for adding missing facelet taglibrary.
Comment 2 Martin Fousek 2013-04-04 20:47:59 UTC
This was fixed by more changesets which resolved new namespaces and also compatibility with the old ones:
web-main #2bfe51ed7f8e
web-main #9bed749bdbb4
web-main #c6c6f2b1d0f6
web-main #2ca22c2ccf46

It should fix also hints issue you were facing, add entries into NS completion etc. I suppose that it could be available in tomorrow's Dev build so feel free to give it another try there and report any issue you would be still facing. Thanks a lot...
Comment 3 Vladimir Riha 2013-04-05 12:17:41 UTC
It seems fine to me, new namespaces are being added using hints/"autocompletion on tag usage" if JSF 2.2 is used. If JSF 2.1, then old namespaces are used instead. Code completion also works.

One small observation. Should the new JSF XHTML page template still contain  the old namespace? The point is if user with JSF 2.2 let IDE to autocomplete missing namespaces, he ends up with kind of mixed of old/new ones which might feel a bit odd. 


Product Version: NetBeans IDE Dev (Build web-main-javaee7-207-on-20130405)
Comment 4 Martin Fousek 2013-04-05 12:29:36 UTC
(In reply to comment #3)
> It seems fine to me, new namespaces are being added using hints/"autocompletion
> on tag usage" if JSF 2.2 is used. If JSF 2.1, then old namespaces are used
> instead. Code completion also works.

Thanks for verification.

> One small observation. Should the new JSF XHTML page template still contain 
> the old namespace? The point is if user with JSF 2.2 let IDE to autocomplete
> missing namespaces, he ends up with kind of mixed of old/new ones which might
> feel a bit odd. 

You are definitely right, please report it as a new issue. Thanks!
Comment 5 Vladimir Riha 2013-04-05 13:36:39 UTC
You're welcome :)

Issue reported as #228281.

v.

Product Version: NetBeans IDE Dev (Build web-main-javaee7-207-on-20130405)
Java: 1.7.0_17; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b32
System: Linux version 3.2.0-39-generic-pae running on i386; UTF-8; en_US (nb)
Comment 6 Marian Mirilovic 2013-05-03 09:17:25 UTC
So, where exactly is this issue fixed ? Is it already in release73 repository ? If so, please change SW to '73patch2-fixed', thanks in advance.
Comment 7 Vladimir Riha 2013-05-09 14:49:04 UTC
patch2 verified

Product Version: NetBeans IDE 7.3.1 (Build 201302132200)
Java: 1.7.0_21; Java HotSpot(TM) Client VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
System: Linux version 3.2.0-41-generic-pae running on i386; UTF-8; en_US (nb)
Comment 8 haroon_foad 2014-01-26 09:22:46 UTC
I have the same problem with Netbeans 7.4
Comment 9 Martin Fousek 2014-01-27 06:01:57 UTC
(In reply to haroon_foad from comment #8)
> I have the same problem with Netbeans 7.4

Haroon_foad this issue was about support of new namespaces of the JSF 2.2 which was fixed into NetBeans 7.3.1. If you are facing issues around the new/old namespaces please create new issue for that and attach steps or better description what troubles are you facing. Thanks a lot!