I have narrowed down the breakage of the code completion for CDI beans.
It occurs when using the jakarta ee 9 api, when the "javax" package name
changed to the "jakarta" package name. Projects that use the "javax" API
have working code completion in JSF/JSP EL.
Creating a project (gradle or ant) against Jakarta EE 8 (still using
javax.* packages) has functioning code completion for CDI beans within
JSF/JSP page expressions.
Creating a project (gradle or ant) against Jakarta EE 9 (using new
jakarta.* packages) has broken code completion for CDI beans within
JSF/JSP page expressions.
I think this may be something to file a bug report for.
Thanks for all the feeback!
Jason
On 12/6/21 3:00 PM, Jason Abreu wrote:
I have also created a sample web project using Ant and observe the
same behavior. With the new Jakarta EE, the code assist in JSP EL
("${...}") and JSF EL ("#{...}") does not show any of my CDI beans,
only a "No suggestions" message. This occurs with both Ant and Gradle
projects. The code completion DOES work when using an older Java EE
API project.
Has anybody else observed this behavior? While it's not a
deal-breaker, because it does not affect building, it does add much
time to development because I have to open any referenced classes and
flip back and forth between them all to ensure I get the methods name
correct. This is a very big annoyance that I'd like to figure out a
remedy to quickly.
Thanks,
Jason
On 12/5/21 1:45 PM, Jason Abreu wrote:
I'm using NetBeans 12.5 with a new Gradle 7 web project and am having
issues with code completion working within JSF EL (Jakarta JSF 3.0).
I could definitely use some assistance figuring this out.
Steps Taken:
1. Created new Gradle Web project (declared dependency for jakarta
ee 9.1 api)
2. Created a CDI Bean (using @Named and @SessionScoped annotations),
"SampleBean" with a sample method, "(get|set)SampleString," returning
a String.
3. Defined the JSF servlet within web.xml
4. Edit the JSF page (.xhtml) and added a JSF EL reference to my
Sample Bean, #{sampleBean.sampleString}
The project built and packaged as a WAR successfully and deployed and
executed in GlassFish 6.2.2 as expected.
However, when I use code completion (Ctl-Space) within the JSF EL I
do not see my CDI bean as an option to select nor does code
completion work to show me the methods of the CDI bean after I type
the bean name. Code completion works on all tags, even when using a
framework such as PrimeFaces, just not with my custom CDI beans
within JSF EL.
I have tried a work-around mentioned for a JSP issue by editing my
Gradle build script to include the webapp source in the java
sourceSet, but this does not resolve the issue.
Thank you,
Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists