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 196690

Summary: Spring beans not offered in CC
Product: javaee Reporter: Tomas Mysik <tmysik>
Component: JSF EditorAssignee: Martin Fousek <marfous>
Status: RESOLVED FIXED    
Severity: normal CC: jholder, masaki, mfukala, pjiricka
Priority: P2 Keywords: PLAN
Version: 7.1   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: sample project

Description Tomas Mysik 2011-03-14 16:10:53 UTC
Our scenario:
- have an existing project with Spring
- decide to use JSF for view layer
- CC in editor does not offer any bean since we use Spring and not JSF annotations for "controllers"

Currently, this issue is a stopper for me, I need to use another IDE.

BTW I think that this could be perhaps fixed quite easily, at least I hope so because NetBeans already has support for Spring so it could already know the right beans to offer, right?

Thanks a lot.

Product Version: NetBeans IDE Dev (Build 110310-6948d24b1a4f)
Java: 1.6.0_24; Java HotSpot(TM) 64-Bit Server VM 19.1-b02
System: Linux version 2.6.37-02063702-generic running on amd64; UTF-8; cs_CZ (nb)
Comment 1 Marek Fukala 2011-03-15 12:15:17 UTC
Tome, could you please attach a sample project w/ some beans and a simple scenario how to reproduce for me? I'm not a spring expert but I did some changes in the spring editor when migrating the EL to the web.el module. Thanks in advance...
Comment 2 Tomas Mysik 2011-03-15 13:20:40 UTC
Created attachment 107019 [details]
sample project

Steps:
- open attached Maven project
- open index.xhtml
- invoke CC in #{|}, Spring bean is missing

If you open faces-config.xml, you will find out that the EL resolver comes from Spring [1] (if you run it, you will see that the project works as expected). All the Spring beans should be offered in CC.

[1] http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/web/jsf/el/SpringBeanFacesELResolver.html
Comment 3 Marek Fukala 2011-03-15 13:54:53 UTC
Reproducible. I need to investigate whether the metadata got from the Spring model contains the bean or not.
Comment 4 Marek Fukala 2011-03-15 15:48:12 UTC
The nb spring support is a "bit" outdated so there's no support for the spring annotation-s model.
Comment 5 Tomas Mysik 2011-03-15 16:29:43 UTC
(In reply to comment #4)
> The nb spring support is a "bit" outdated so there's no support for the spring
> annotation-s model.

Too bad :/
Comment 6 Martin Fousek 2011-05-19 14:11:16 UTC
Implemented in http://hg.netbeans.org/web-main/rev/7ac30ca4fff0.

For now there is support for default Spring beans annotations: Component, Controller, Repository, Service and only implicit naming or naming defined by annotation value.
Comment 7 Martin Fousek 2011-05-19 14:13:05 UTC
*** Bug 183959 has been marked as a duplicate of this bug. ***
Comment 8 Martin Fousek 2011-05-19 14:13:28 UTC
*** Bug 151814 has been marked as a duplicate of this bug. ***
Comment 9 Quality Engineering 2011-05-20 08:52:18 UTC
Integrated into 'main-golden', will be available in build *201105200400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/7ac30ca4fff0
User: Martin Fousek <marfous@netbeans.org>
Log: #196690 - Annotated Spring beans not offered in CC of EL