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 180749

Summary: Methods and Properties of different CDI beans not shown correctly autocomplete window
Product: javaee Reporter: mithridates <mithridates>
Component: JSF EditorAssignee: Marek Fukala <mfukala>
Status: VERIFIED FIXED    
Severity: normal CC: alexismp, hwaastad, iacovel, javahaxxor, peternew_za, pjiricka, sustaining
Priority: P1    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Autocompletion for ClassOne shows methods and properties of ClassTwo
web.jsf.editor module with the fix for Nb 6.8 U1

Description mithridates 2010-02-15 14:14:44 UTC
Autocompletion only shows the same methods and properties from one CDI-Bean for all CDI-Beans. Methods and properies from others are never shown. 
Create new webapplication with CDI-support.
Create two(ore more) classes with @Named annotation. Create different properties and Methods in both classes.
Autocompletion for #{classOne} shows properties and methods of classTwo.
See attached Screenshot.
Same behaviour on MacOs. I had no oppertunity to test on Windows so far.

Used Classes:
ClassOne.java

package test;
import java.io.Serializable;
import javax.inject.Named;

@Named
public class ClassOne implements Serializable{

    private String testOne;

    public String actionOne(){
        return null;
    }

    public String getTestOne() {
        return testOne;
    }

    public void setTestOne(String test) {
        this.testOne = test;
    }

    public ClassOne() {
    }
}

ClassTwo.java
package test;

import java.io.Serializable;
import javax.inject.Named;

@Named
public class ClassTwo implements Serializable{

    private String testTwo;

    public String actionTwo(){
        return null;
    }

    public String getTestTwo() {
        return testTwo;
    }

    public void setTestTwo(String test) {
        this.testTwo = test;
    }

    public ClassTwo() {
    }
}
Comment 1 mithridates 2010-02-15 14:16:48 UTC
Created attachment 94174 [details]
Autocompletion for ClassOne shows methods and properties of ClassTwo

missed the screenshot
Comment 2 mithridates 2010-02-17 01:19:19 UTC
After reading http://wiki.netbeans.org/BugPriorityGuidelines again I think this is a regression (P1)
Comment 3 Petr Jiricka 2010-02-17 02:50:16 UTC
Hi, which build of NetBeans are you using?
Comment 4 mithridates 2010-02-17 03:16:05 UTC
(In reply to comment #3)
> Hi, which build of NetBeans are you using?

I'm using current NetBeans IDE 6.8 (Build 200912041610) with Patch1 applied via update center.
Comment 5 Petr Jiricka 2010-02-17 04:55:51 UTC
Can you please try the NetBeans 6.9 Milestone 1 build to see if that works well? We know some things were not propagated correctly to the 6.8 patch1, so this may be related.
Comment 6 Marek Fukala 2010-02-17 06:05:56 UTC
This issues had already been fixed in trunk, but the changeset hasn't been transplanted into release68_fixes repository.

http://hg.netbeans.org/web-main/rev/156946f97b17

The cause is a typo but the effect is that all non-default base objects (managed beans, web beans) in EL expresions have properties of a first web bean from the classpath. 

Please transplant the changeset and make it a part of patch2
Comment 7 Marek Fukala 2010-02-17 06:06:59 UTC
*** Bug 180796 has been marked as a duplicate of this bug. ***
Comment 8 Marek Fukala 2010-02-17 06:07:47 UTC
*** Bug 180373 has been marked as a duplicate of this bug. ***
Comment 9 mithridates 2010-02-17 07:51:18 UTC
(In reply to comment #5)
> Can you please try the NetBeans 6.9 Milestone 1 build to see if that works
> well? We know some things were not propagated correctly to the 6.8 patch1, so
> this may be related.

Works with 6.9 Milestone 1 build. 
Please provide a patch ASAP as this is an essential feature. 
Thank You.
Comment 10 Marek Fukala 2010-02-17 09:30:40 UTC
Created attachment 94238 [details]
web.jsf.editor module with the fix for Nb 6.8 U1

I'm not sure when the fix will be published on AU, I heard it may take some time so for those who do not want to go back to 6.8 because of this stopper I created a jar file with the errorneous module containg the trunk's fix.

Please replace the original the jar from ${nbhome}/enterprise6/modules/org-netbeans-modules-web-jsf-editor.jar  by the attached one.

I do apologize for the complications.
Comment 11 mithridates 2010-02-17 09:45:47 UTC
(In reply to comment #10)
> Created an attachment (id=94238) [details]
> web.jsf.editor module with the fix for Nb 6.8 U1

It works.
Thank You very much!
Comment 12 Marek Fukala 2010-02-17 09:51:35 UTC
*** Bug 180702 has been marked as a duplicate of this bug. ***
Comment 13 alexismp 2010-02-17 10:04:28 UTC
verified here as well. thank you.
Comment 14 Marek Fukala 2010-03-10 10:57:32 UTC
*** Bug 181776 has been marked as a duplicate of this bug. ***
Comment 15 pgebauer 2010-03-15 13:38:15 UTC
The fix has been ported into the release68_fixes branch.
http://hg.netbeans.org/release68_fixes/rev/7214ced16d5d
Comment 16 Marek Fukala 2010-04-26 08:26:15 UTC
*** Bug 183971 has been marked as a duplicate of this bug. ***