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.
This issue is for Netbeans 7.0 beta2. The code completion for expression language is not working for classes anotated with @Named. For example, suppose the class @Named class Messages { public String getMessage() { return "Hello"; } } and the XHTML file containing the following code: <h:outputText value="#{messages.message}" /> The code completion does not show the message property above.
Works fine for me, I've tried the described scenario in a web project. Does it work in a new web project? Or is it a project specific? If so, can you attach the project here? Thanks.
Sorry, I forgot to mention that it's a Maven based WEB project. Please, recheck it.
*** Bug 196064 has been marked as a duplicate of this bug. ***
I've checked it in a maven web project and it does work well either. Does it work for you if you do following: 1) create new maven web project 2) in the project properties add jsf framework 3) create a java class MyBean 4) add @Named ann to the bean and add a getX() method 5) open the index.xhtml 6) type #{ and invoke the completion 7) complete MyBean 8) type . and invoke cc again => x property is offered Do you have all the dependencies of the maven project resolved? If it doesn't work for you only in a specific project, can you attach it here packed? Or send it to me by email if confidential. Then please also reopen the bug again. Thanks for understanding.
reverting accidental priority change
I have the same issue. Using 7.0 rc1. I did those instructions but didn't worked for me. Operating System windows 7 64bit Also some settings in windows "region and language" Format = English Display Language = English Turkish Q keyboard Language for non-unicode programs = English (US) thanks (In reply to comment #4) > I've checked it in a maven web project and it does work well either. Does it > work for you if you do following: > > 1) create new maven web project > 2) in the project properties add jsf framework > 3) create a java class MyBean > 4) add @Named ann to the bean and add a getX() method > 5) open the index.xhtml > 6) type #{ and invoke the completion > 7) complete MyBean > 8) type . and invoke cc again > => x property is offered > > Do you have all the dependencies of the maven project resolved? > > If it doesn't work for you only in a specific project, can you attach it here > packed? Or send it to me by email if confidential. Then please also reopen the > bug again. Thanks for understanding.
Created attachment 107409 [details] Comment #6 test case Test case for comment 6
Thanks for information. Yes, it's working. In order to make it work, we must add a JSF framework in project properties. Netbeans 6.9.1 does not require you to do that. After that, I believe that it's not a bug. (In reply to comment #6) > I have the same issue. Using 7.0 rc1. > I did those instructions but didn't worked for me. > > Operating System windows 7 64bit > Also some settings in windows "region and language" > Format = English > Display Language = English > Turkish Q keyboard > Language for non-unicode programs = English (US) > > thanks > > > (In reply to comment #4) > > I've checked it in a maven web project and it does work well either. Does it > > work for you if you do following: > > > > 1) create new maven web project > > 2) in the project properties add jsf framework > > 3) create a java class MyBean > > 4) add @Named ann to the bean and add a getX() method > > 5) open the index.xhtml > > 6) type #{ and invoke the completion > > 7) complete MyBean > > 8) type . and invoke cc again > > => x property is offered > > > > Do you have all the dependencies of the maven project resolved? > > > > If it doesn't work for you only in a specific project, can you attach it here > > packed? Or send it to me by email if confidential. Then please also reopen the > > bug again. Thanks for understanding.
closing then...
I have make some test If you make a new project and add JavaServer Faces its work. But if you add a new Maven Module like Project-api add this module to your ejb module, and your web module depend on your ejb module. And add one clase to your api module annotated with @ManagedBean and one class to your web module with annotation @Named, the autocomplete on your xhtml file dont work animore for the @Named annotation. Testet on: Ubuntu 10.04 Java 1.6.0_24-b07 Netbeans RC1
Marek, please evaluate for stopper status (and fix), if not considered as stopper I would waive it for 7.0 .
This is not a stopper issue.
I still cannot reproduce. Reporter, please make some testing environment for me - create all those mentioned projects, set the dependencies, pack them all and attach it here. Thanks.
Hi, I reproduced the steps with success. But the problem occurs when I open a project created with Netbeans 6.9.1 with Netbeans 7.0 RC1. If I create a new class and anotate it with @Named, the code completion works fine in expression language. But it doesn't work for 'old' classes anotated with @Named! It's a very strange behavior. (In reply to comment #13) > I still cannot reproduce. > > Reporter, please make some testing environment for me - create all those > mentioned projects, set the dependencies, pack them all and attach it here. > Thanks.
I do not consider this issue as a stopper for NB 7.0 -> waiver approved.
Ok.. I have a new testCase. Make a new EAR project. Add JavaServer Faces too the web project. Add a newClass annotatec with @Named. Autocomplete works. Now add to the dependencies the ejb module like. ... <scope>provided</scope> <type>ejb</type> Now make a Clean and buid from the parend maven project. And try again the autocomplete. The autocomple stop working on @Name class. Its a new EAR project create on Netbeans 7 RC2.
New and more simple test Case Netbeans Dev 2011040410-8bf8d986179b Bundled Maven 3.0.3 Ubuntu 10.04 Java build 1.6.0_24-b07 Make a new Maven EAR project. Add JSF Framefork. Add beans.xml Add newClass annotated with @Named. Test Auto complete on index.xhtml its work. Now make a clean an build of the entire and test Auto Complete again. And the the Auto complete stop to work on @Named class. Tanks for your time.
see Bug 198042
The case from comment #17 is reproducible and seems to be related to fix for issue #179923. I debug it a little bit and found out that WebBeansModelProviderImpl.getNamedElements() collect properly all @Named elements for CC but at the end of this method contain filter: PackagingFilter filter = new PackagingFilter(getModel()); filter.filter(result); And it seems that searching for beans.xml in Maven Web projects isn't handled there. Reassigning to the module owner.
It's not Maven related issue. This is bug in PackagingFilter class which is added as fix for issue #179923. It happens because of the same Java element is on the Compile classpath ( as result of project build ) and also is in the source classpath. One need to distinguish binary java elements that are result of compilation of java sources from regular project classpath.
*** Bug 198042 has been marked as a duplicate of this bug. ***
changeset: 193403:828dedac243a
Created attachment 108106 [details] Maven based web project, with mentioned defect. Please, check the attached project to see the mentioned behavior. This project was created with Netbeans 6.9.1, and the code completion in XHTML file works well in this IDE version. Using Netbeans 7.0, code completion does not work.
this bug is RESOLVED but we can still reproduce it. Can we reopen it ?
(In reply to comment #24) > this bug is RESOLVED but we can still reproduce it. Can we reopen it ? WHAT do you mean "we can still reproduce it" ? It is fixed TODAY. Did you use development version where the fix is available ? If you are able to reproduce it please reopen . Provide exact steps to reproduce ( or just mention them if they are already in the comments ) . BUT make sure that fix is in the build what do you use. Fixes is not available automatically in the NB. They are integrated in the code repository . So you need either build NB from recent sources or wait binary with fix. "Target Milestone" contains the version of NB where fix is available.
sorry... ignore it pls. I was not using the latest version from the repo.
Integrated into 'main-golden', will be available in build *201105050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/828dedac243a User: Denis Anisimov <ads@netbeans.org> Log: Fix for BZ#195636 - Code completion for EL is not working for classes with @Named .
This issue is not resolved. Please, check the attached project (Maven based web project, with mentioned defect).
is there any workaround in the mean time ?
(In reply to comment #28) > This issue is not resolved. > > Please, check the attached project (Maven based web project, with mentioned > defect). My CC problem as described in http://netbeans.org/bugzilla/show_bug.cgi?id=198042#c2 seems to be resolved in build 20110505, but now Bug http://netbeans.org/bugzilla/show_bug.cgi?id=198348 makes working with the build not attractive. Are these bugs related at code level?
(In reply to comment #30) > (In reply to comment #28) > > This issue is not resolved. > > > > Please, check the attached project (Maven based web project, with mentioned > > defect). > > My CC problem as described in > http://netbeans.org/bugzilla/show_bug.cgi?id=198042#c2 seems to be resolved in > build 20110505, but now Bug http://netbeans.org/bugzilla/show_bug.cgi?id=198348 > makes working with the build not attractive. Are these bugs related at code > level? No. The current issue is in CDI area. The mentioned issue #198042 is inside JSF area.
(In reply to comment #31) > (In reply to comment #30) > > (In reply to comment #28) > > > This issue is not resolved. > > > > > > Please, check the attached project (Maven based web project, with mentioned > > > defect). > > > > My CC problem as described in > > http://netbeans.org/bugzilla/show_bug.cgi?id=198042#c2 seems to be resolved in > > build 20110505, but now Bug http://netbeans.org/bugzilla/show_bug.cgi?id=198348 > > makes working with the build not attractive. Are these bugs related at code > > level? > > No. > The current issue is in CDI area. > The mentioned issue #198042 is inside JSF area. Sorry , its about issue #198348 .
Now the issue is specific to Maven. I can reproduce it after rebuilding the pointed attached project.
(In reply to comment #32) > (In reply to comment #31) > > (In reply to comment #30) > > > (In reply to comment #28) > > > > This issue is not resolved. > > > > > > > > Please, check the attached project (Maven based web project, with mentioned > > > > defect). > > > > > > My CC problem as described in > > > http://netbeans.org/bugzilla/show_bug.cgi?id=198042#c2 seems to be resolved in > > > build 20110505, but now Bug http://netbeans.org/bugzilla/show_bug.cgi?id=198348 > > > makes working with the build not attractive. Are these bugs related at code > > > level? > > > > No. > > The current issue is in CDI area. > > The mentioned issue #198042 is inside JSF area. > > Sorry , its about issue #198348 . Thank you. Mostly I wanted to signalize, that for me the CC on @Named beans seems to be resolved with the first touch of build 20110505.
(In reply to comment #34) > Thank you. Mostly I wanted to signalize, that for me the CC on @Named beans > seems to be resolved with the first touch of build 20110505. Thanks for that. No the problem is specific to Maven projects only.
(In reply to comment #29) > is there any workaround in the mean time ? I'm investigating the reason of the issue. Probably it is in the different area. The workaround is : clean ( not *build* ) your Maven project.
The problem is inside "foreign" code which has been introduced into Web Beans model to access it : WebBeansModelSupport.getClassPath() is incorrectly written ( copy/pasted ) . So its not pure CDI problem actually but I've fixed it.
changeset: 193518:516b7b84ebeb
(In reply to comment #30) > but now Bug http://netbeans.org/bugzilla/show_bug.cgi?id=198348 > makes working with the build not attractive. The issue has just been fixed. I'm sorry for the annoyance. Marek
(In reply to comment #36) > (In reply to comment #29) > > is there any workaround in the mean time ? > > I'm investigating the reason of the issue. > Probably it is in the different area. > > The workaround is : clean ( not *build* ) your Maven project. Thanks for that... but sadly it doesn't work all the times... I've noticed that restarting Netbeans would fix it (for a while....)
Integrated into 'main-golden', will be available in build *201105070000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/516b7b84ebeb User: Denis Anisimov <ads@netbeans.org> Log: Another one fix for BZ#195636 - Code completion for EL is not working for classes with @Named. ( Maven case )
I tried to reproduce it with project attached in comment #23 and it works fine, so for me it's verified... Product Version: NetBeans IDE 7.0.1 (Build 201107211357) Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17 System: Linux version 2.6.38-10-generic running on i386; UTF-8; en_US (nb)