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.
I have a few custom taglibs designed for (and that work with) Facelets 1.1.14 included as a jar into webapps. I have the foo.taglib.xml files in the META-INF folder of the included library and each XML file starts with something similar to: <?xml version="1.0" encoding="UTF-8"?> <facelet-taglib version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" id="th"> <namespace>/tags/core</namespace> In the Facelets pages, not only does autocomplete not recognize the functions or tags, the namespace declarations have an error: "No library found for this namespace". According to the JSF 2 spec section 10.3.2, this is a standard feature.
Sure, this is supposed to work and it works for me. Can you please attach a simple project showing the issue? I am also not sure if the pre 2.0 faceles configs cannot be the problem...
Our project also has the same problem. we placed q2i.taglib.xml in our WEB-INF/taglib folder and declared the namespace like this : <?xml version="1.0"?> <!DOCTYPE facelet-taglib PUBLIC "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN" "http://java.sun.com/dtd/facelet-taglib_1_0.dtd"> <facelet-taglib> <namespace>http://www.bipt.com/jsf</namespace> Then in our web.xml we have <context-param> <param-name>facelets.LIBRARIES</param-name> <param-value> /WEB-INF/taglib/q2i.taglib.xml </param-value> </context-param> Netbeans 6.8 does not find the the taglib file and complains that No library found for this namespace See attached screenshot.
Created attachment 89997 [details] custom tablib not found by netbeans
Created attachment 90051 [details] Test Web Project
Unzip and give that project a try. It works fine for me with v3, but neither the tags nor the library is recognized in build 200910170201.
Why is this marked resolved? I just downloaded 6.8 RC 2, and I'm still getting this error. The "No library found for this namespace" is still displayed, and all tags that use this namespace are underlined in red. In some cases more than half of my facelet files are underlined in red. This makes it difficult to spot an actual "real" error when editing the files. Given that this syntax was supported in Netbeans 6.7, and is valid for Java EE 5 / facelets projects, can the old taglib mechanism not be supported in Netbeans 6.8? (I'm re-opening this issue, but I'm not sure if that is something I'm supposed to do, please advise. I apologize in advance) Thanks, Brian Leathem
Anyone know if this is forecast to resolve this bug? I'm having the same problem here! This is a know old problem. Thank's Celestrini
(In reply to comment #7) > Anyone know if this is forecast to resolve this bug? > > I'm having the same problem here! > > This is a know old problem. > > Thank's > > Celestrini Please attach here a reporducible usecase, eg. a project which with all necessary files where the editing support fails + describe the steps to reproduce. As for the project attached by jpleed3 on 2009-10-24 19:11:05 - the index.xhtml file contains some references to tag files which are not part of the project. How can I use it to reproduce?
> As for the project attached by jpleed3 on 2009-10-24 19:11:05 - the > index.xhtml file contains some references to tag files which are not part of > the project. How can I use it to reproduce? Where are the references to a tag file that isn't in the project? There are two custom tags listed in META-INF/test.taglib.xml. One is a xhtml component in the test/taglib/test1.xhtml file; the other is a custom handler in test.taglib.Test2Handler.java. Like I said, the project runs fine but the editor doesn't pick up the tags. Would you prefer a Maven project instead?
Ohh, I'm sorry, I was tired out in the evening. The resources are in source packages, not in the web root, I see.
fixed in web-main#6b2adfc1ecd9
Yeah, I made that project before I went to Maven. The taglibs in my real code are in the resources folder now. :)
Integrated into 'main-golden', will be available in build *201002110200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6b2adfc1ecd9 User: Marek Fukala <mfukala@netbeans.org> Log: #172520 - [68cat] Custom Facelets taglibs not found
Created attachment 94075 [details] Project changed - tags attributes auto-complete not working Hey guys... It's working now! But I'm having some problems yet! Despite Netbeans recognize the Namespace of library and the components, I'm not able to auto-complete the tags attributes. I'm using the project attached by jpleed3 and I put in test.taglib.xml: <tag> <tag-name>test2</tag-name> <handler-class>test.taglib.Test2Handler</handler-class> <attribute> <name>rendered</name> <required>true</required> </attribute> </tag> But Netbeans not recognize the atributes. Another problem: when I have components with source, like: <tag> <tag-name>test1</tag-name> <source>resources/test/test1.xhtml</source> </tag> I expect that Netbeans read the content of file and get the tag attributes from: <cc:attribute name="teste" /> But It's not happening. I have to create a .tld? It would be much simpler if Netbeans could reader the taglib or the source and get the attributes. I'm attaching the project... changed. Thnk's and I'm sorry about my English.. hehe! Ahhh... I really need to restart my IDE to Netbeans recovery changes in taglib.xml????
All the problems described by jordanorc are reproducible. I'll fix it ASAP.
changeset: 159688:0caaf6c6a1b1 date: Fri Feb 12 11:26:58 2010 +0100 summary: #172520 - A) Composite component libraries are recognized when put into the project's source folder underneath META-INF.*/resources; B) Tags declared in facelets descriptors (*.taglib.xml) residing in project's sources META-INF.* folder are recognized There are still two remaining problems (I'm still working on them): 1) The metadata from ${project's sources folder}/META-INF/*.taglib.xml are not fully taken into account - the attributes description is ommited (this is because I just use the Mojarra's parser to get the metadata from it and the parser does't care about them) 2) The tags declared in following way: <tag> <tag-name>test1</tag-name> <source>resources/test/test1.xhtml</source> </tag> are not recognized (but only if the refered source is not in META-INF*/resources/alibfolder/ folder - then it is recognized as a composite component library member and is accessible using the default cc namespace + the lib name.
Hey man! Good job! When you finish, please, send-me message with the build with changes and I will test it again! Thank's, Congratulations Netbeans Team! Very good work!
Integrated into 'main-golden', will be available in build *201002130200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/0caaf6c6a1b1 User: Marek Fukala <mfukala@netbeans.org> Log: #172520 - A) Composite component libraries are recognized when put into the project's source folder underneath META-INF.*/resources; B) Tags declared in facelets descriptors (*.taglib.xml) residing in project's sources META-INF.* folder are recognized
changeset: 160198:36dd6ae68dc2 date: Mon Feb 15 15:10:31 2010 +0100 summary: #172520 - metadata from tag library descriptors residing in project's sources are taken into account; Unified and fixed tags' completion help item #1 from comment #16 fixed I also realized that the item #2 from the same comment is quite misleading. The library descriptor is already parsed and the declared tag is visible in the code completion together with its description (if available in the taglib descriptor file). If the refered file is a composite component, then all the features works fine. If not - what would the completion offer? I'd say nothing ... so I consider this usecase as functional. So it looks like the last complain is: >Ahhh... I really need to restart my IDE to Netbeans recovery changes in >taglib.xml????
changeset: 160210:fd805c6f020c tag: tip user: Marek Fukala <mfukala@netbeans.org> date: Mon Feb 15 17:20:31 2010 +0100 summary: #172520 - facelet library is refreshed upon its file change Please test the changes and reopen or preferably create new issue if you find the fix is not correct or introduces some regressions. The last change is kind quite hacky since all facelets libraries are invalidated after you modify any of its descriptors. I've filed a separate issue for this problem ( Bug 180739 - All facelets libraries are invalidated upon modification of any of its descriptors ) I'm looking forward for your feedback (and bugs :-) ).
Integrated into 'main-golden', will be available in build *201002170200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/36dd6ae68dc2 User: Marek Fukala <mfukala@netbeans.org> Log: #172520 - metadata from tag library descriptors residing in project's sources are taken into account; Unified and fixed tags' completion help
And here we are again. :) 6.9 is detecting my Richfaces libraries now, which is a big help. However, the custom taglibs are still not recognized. Also, in the taglib test I attached, on lines 11 and 13 of index.xhtml, the rendered attribute is flagged as an error, saying "The attribute rendered is not defined in the component's interface" The component doesn't have an interface since one can't exactly be defined for it. In that case, I don't think it should be shown as an error. If anything is shown, it should be a warning at most.
Hi, I'm using 6.9 RC and I see this problem has not been solved yet. I'm currently lobbying for the acceptance of NB in my company, but it is an useless effort so far because a lot of projects we have are based on custom JSF facelets. Also the same problem with seam specific tags, like <s:defaultAction/>, <s:validate/>, <s:span/>. They are not recognized and auto completion still doesn't work. Please tell me, do I need to file this complaint somewhere else, maybe to open a new bug report, or does this suffice?
Forgot to say, thanks a lot for the great effort, NB looks promising. Sorry if I seem blunt, I'm not, just try to give as accurate as possible feedback.
Razvan, the best is if the issue has increased priority. If this is a blocker for anyone it needs to be fixed in preference to other issues. I made the issue a P2 and will look at it asap. I may possibly need some input from you later. Thanks for the feedback.
(In reply to comment #25) > Razvan, the best is if the issue has increased priority. If this is a blocker > for anyone it needs to be fixed in preference to other issues. > > I made the issue a P2 and will look at it asap. I may possibly need some input > from you later. > > Thanks for the feedback. No problem, please contact me if you need additional feedback.
> Also, in the taglib test I attached, on lines 11 and 13 of index.xhtml, the > rendered attribute is flagged as an error, saying "The attribute rendered is > not defined in the component's interface" > > The component doesn't have an interface since one can't exactly be defined for > it. In that case, I don't think it should be shown as an error. If anything is > shown, it should be a warning at most. That is the only remaining problem I found in going through this long issue and I'll try to fix it. Razvan, as for the seam's taglibs, I cannot reproduce the issue. If I add all the seam's 2.2.0GA jars to the project classpath the JSF support works fine and I can see the <s:defaultAction/> and the others in the completion together with their attributes. Would it be a big problem for you to create a sample project which I could use to reproduce the bugs you are facing? Or at least try to exactly describe what doesn't work in what environment.
Hi Marek, I will try to assemble a 'dummy' project to reproduce the environment asap and I will attach it here. Forgot to mention, I'm also facing problems with jstl tags like <c:if>. And, it will be a Maven project, I also forgot to mention that. Regards.
Created attachment 99710 [details] project demonstrating problems with custom facelets, seam libraries and jstl tags.
Hi Marek, I attached a project, hope it's going to be of help. It's part of a larger maven project, just point netbeans to open pom.xml and should open it...don't know about the dependencies though. Please let me know if I can provide additional help. Some files where to look for problems: propertyType.xhtml entityList.xhtml (this is a custom facelet, the taglib is located inside the WEB-INF/facelets/tags/up.taglib.xml) Problems with:: -seam tags -custom facelets -jstl tags Thanks a lot again, Razvan.
Thanks, I can reproduce the problem with tags from up.taglib.xml not being recognized. Its caused by the fact that the deployment descriptor (web.xml) is not found and thus the refererence to the library is not taken into account. I'll look at this if I can somehow resolve it. As for the richfaces and jstl tags I cannot reproduce since the project's pom.xml refers to some parent pom which likely declares these libraries.
All right, seems we're getting there...:) Thanks for feedback. As about the other problems, if necessary I'll try to send the project with the parent pom too, in order to be able to replicate. What do you think? Razvan.
Razvan, would it be possible to create a valid netbeans project with the reproducible case? If I open the one sent by you the project is marked as invalid and I suspect that the fact that the web.xml is not found is caused by that. Or sent me the project this one depends on (the link to the parent pom).
Hi Marek, I'll try to send you what you requested tonight, unfortunately I cannot do it right now.
OK. Thanks. I do not think this is a showstopper (P1 issue) so it won't be likely added to the 6.9FCS, but I would like to see the fix in 6.9.1 which should follow very soon.
Perfect, it's no rush I guess, since you guys already have a lot of stuff to fix, preparing for the great 6.9 release! We would like to see it fixed though, so I'm gonna try to prepare a good project to reproduce the problem. Thanks again, Razvan.
Created attachment 99936 [details] Project demonstrating problems with custom facelets, seam libraries and jstl tags Hi Marek, Sorry for being late with this. Fortunately I found a much simpler solution, namely a seam demo project, with some files that already contain seam tags. I just added some jstl tags, custom tags and our up.taglib.xml, and problems should be reproducible. To sum up:: =========================================================================== Environment:: NetBeans 6.9 RC2 =========================================================================== Problems:: * NetBeans reports "No library found for this namespace" when encountering the namespaces associated with jstl and seam libraries, and a custom namespace. * the tags themselves are underlined with red. =========================================================================== Note that you have to add the JEE 6 and JSTL library dependencies(I did not bundle them to keep the size of the archive low). The seam jar is already bundled. Thanks, Razvan.
Razvan, thanks for the sample project. As for the issues here are my comments: 1) the custom facelets library declared in up.taglib.xml was not found since the links are relative to the parent folder of the web-inf folder, not the web module root. I've changed the code so both roots are used when trying to resolve the link, web-inf's parent first. (web-main#804893b9db9c) 2) as for the default jstl tags, I believe the JSF2.0 namespace for them is http://java.sun.com/jsp/jstl/core not http://java.sun.com/jstl/core, if you change the references it works fine 3) as for the seam tags, you need jboss-seam-ui.jar which contains the facelets library descriptor on the project's classpath otherwise netbeans cannot find the library description. I'm looking forward on your opinions on my issue resolution. I assume it being reopened at once ;-). Thank you for the feedback.
Integrated into 'main-golden', will be available in build *201006110001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/804893b9db9c User: Marek Fukala <mfukala@netbeans.org> Log: #172520 - [68cat] Custom Facelets taglibs not found
Created attachment 100011 [details] screenshot proving problems still exist Hi Marek again, And thank you for the feedback too. As for my comments, here they are:: 1. The fix with regards to the custom facelets library has no effect. If you look at the attached picture, you see that the up:secureForm tag is still underlined. As you see, I tried using the 201006110001 nightly build. 2. Please have a look here: http://wiki.java.net/bin/view/Projects/FaceletsFAQ#What_s_the_difference_between_c The answer to the last question clearly states that "Facelets expects the namespace of its subset of JSTL to be http://java.sun.com/jstl/core and NOT http://java.sun.com/jsp/jstl/core as defined by JSTL 1.1.", exactly the opposite of what you mentioned. So is has to work using that namespace. 3. Please read further. Anyway, getting back to the basics, we have a maven project, so the differences may lie there, definitely I'll have to find a way to thoroughly reproduce our environment. I'll work on this and when it's ready I'll attach the project. So what do you say, is it reopened?
Created attachment 100227 [details] No library found with this namespace, but the page works.
Created attachment 100228 [details] Project Maven with custom component JSF 2.0 and a Web project that use it. Hi, I have the same problem (or I think that) in Netbeans 6.9 (build 201006130001). I use custom JSF components, Maven and Netbeans. I make a litle Maven project with the problem. The page index.jsf work with my simple custom jsf component, but Netbeans's editor don't find the xmlns (see screenshot that I sent before please). I think that netbeans will need to looking for files.taglib.xml to resolve this kind of problem, but I didn't know how. I hope that the test project help Best regards
Hello I can reproduce the bug, but only in one certain configuration. Namely if you have a jsf maven project and import it into Netbeans then I am getting this error. In a Netbeans generated project this functionality works out of the box. I assume there is one check too much there, especially since Facelets now is bundled within the JSF impl. It does not matter which JSF implementation you have in maven either myfaces or mojarra, in both cases the error is issued instead of the template being generated. Reproducable in 6.9 and 6.9.1.
there's some progress on this problem resolution, but not done completely yet. web-main#1b49a881c8fe
fixed in web-main#f6b333570807
Integrated into 'main-golden', will be available in build *201012290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/1b49a881c8fe User: Marek Fukala <mfukala@netbeans.org> Log: some progress at issue #177540 - JSF support doesn't index project dependencies properly, #172520 - [68cat] Custom Facelets taglibs not found. Also added unit tests for JSF libraries, indexing. Also fixed bugs with default library prefixes, improved performance by using more index data instead of another files scanning.
I reopened it because I'm still having the issue pointed out by jpleed3 on comment #22: "Also, in the taglib test I attached, on lines 11 and 13 of index.xhtml, the rendered attribute is flagged as an error, saying "The attribute rendered is not defined in the component's interface" The component doesn't have an interface since one can't exactly be defined for it. In that case, I don't think it should be shown as an error. If anything is shown, it should be a warning at most." Marek Fukala replied in post #27: "That is the only remaining problem I found in going through this long issue and I'll try to fix it." I'm using versions 6.9.1 and 7.0.beta2 and the problem is still there. The only attribute NetBeans identifies is "id" when you use ctrl-space (code assistant) in the custom tag. Despite of being flagged as error by NetBeans, the value of the attribute is passed to the component at runtime and it works fine, but the error flagging in this case can confuse the user. I'm not sure if I should reopen this entry or file another one.
If you wouldn't mind I'd prefer a new issue with clear steps to reproduce and possibly a sample project. This issue is a bit hard to orient in. Thanks for understanding and your time.
Hi there, I ran into a similar issue. I'm creating a JSF 2.2 custom componentes to be used among different projects. My issue was the wrongly defined namespace and replaced by <facelet-taglib version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd"> </facelet-taglib> Source: https://jsflive.wordpress.com/2013/05/16/jsf22-namespaces/