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 226528

Summary: Facelet-Taglib without namespace not recognized by editor
Product: javaee Reporter: roben
Component: JSF EditorAssignee: Martin Fousek <marfous>
Status: REOPENED ---    
Severity: normal CC: asbachb, roben
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Netbeans not recognizing valid library

Description roben 2013-02-22 12:15:38 UTC
I am using a custom taglib referencing a library class which defines the EL functions to be provided by the taglib:

<facelet-taglib version="2.0"
                xmlns="http://java.sun.com/xml/ns/javaee"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                xsi:schemaLocation="http://java.sun.com/xml/ns/javaee    web-facelettaglibrary_2_0.xsd">
    <library-class>eu.rbecker.el.function.FnLibrary</library-class>
</facelet-taglib

(further information: http://seamframework.org/Documentation/CreatingCustomELFunctions)

In this case Netbeans does not recognize the library (its namespace) at all because it is definied solely in the FnLibrary class constructor (super(NAMESPACE)). The library works fine in the application itself.

Adding a <namespace> tag conflicts with the xsd which leads to the same problem and also breaks the taglib. Further removing the <library-class> tag fixes the xsd and lets the editor behave fine but, of course, the library's functionality is broken.

I understand the problem, that Netbeans is not able to determine the namespace from the java class, so my best guess is to provide an editor hint within a comment of the taglib containing the namespace.

In my case i am not able to define the functions directly in the taglib since one of them uses a varargs signature which is not supported by the xml definition.

Any guesses for a workaround would also be appreciated until (if at all) this problem can be fixed.
Comment 1 Martin Fousek 2013-02-25 11:09:54 UTC
Sorry, right now I don't have idea, how to workaround it. I'm marking this as an enhancement of the JSF editor. I'll try to take a look into the next version.
Comment 2 Martin Balin 2016-07-07 08:53:47 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 3 roben 2016-07-11 12:05:10 UTC
Created attachment 160347 [details]
Netbeans not recognizing valid library
Comment 4 roben 2016-07-11 12:06:14 UTC
Sadly the issue still remains (see screenshot). Perhaps taglibs containing library-class tags can simply be wildcarded so that the library itself is recognized and no semantic check is applied for the namespace?