Re: JSF CDI code assist

2021-12-17 Thread Jason Abreu
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



Re: JSF CDI code assist

2021-12-09 Thread Josh Juneau
Thanks for the message and sorry for the issues Jason.  Along with the other 
suggestions that were mentioned, have you attempted to create a Maven project 
using Jakarta EE?

I also had similar issues when trying Jakarta EE 9.1 (jakarta.*) namespace.  
However, I was using PrimeFaces 10, which I later determined was not 
compatible.  I'll need to try again now with PrimeFaces 11 to see if EL code 
completion works.

Josh Juneau
juneau...@gmail.com
http://jj-blogger.blogspot.com
https://www.apress.com/us/search?query=Juneau

> On Dec 6, 2021, at 2:01 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
> 


Re: JSF CDI code assist

2021-12-09 Thread Eric Bresie
Your not using the version with the new Jakarta namespace instead of the javaee 
namespace are you?

Get Outlook for iOS<https://aka.ms/o0ukef>

From: Will Hartung 
Sent: Thursday, December 9, 2021 3:47:38 PM
To: NetBeans Mailing List 
Subject: Re: JSF CDI code assist



On Mon, Dec 6, 2021 at 12:00 PM Jason Abreu 
mailto:jace.ab...@gmail.com>> 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.

So if you open a legacy project, the behavior works? But with a new project, it 
does not?

Have you tried "cloning" the working project to see if it works today? Can you 
replicate your "SampleBean" example based on the older project? How do the new 
project and the old projects differ?

And, honestly, it is a deal breaker. Otherwise you may as well be using a 
"dumb" editor. Auto complete is part and parcel to the modern IDE experience.




Re: JSF CDI code assist

2021-12-09 Thread Will Hartung
On Mon, Dec 6, 2021 at 12: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.
>

So if you open a legacy project, the behavior works? But with a new
project, it does not?

Have you tried "cloning" the working project to see if it works today? Can
you replicate your "SampleBean" example based on the older project? How do
the new project and the old projects differ?

And, honestly, it is a deal breaker. Otherwise you may as well be using a
"dumb" editor. Auto complete is part and parcel to the modern IDE
experience.


Re: JSF CDI code assist

2021-12-06 Thread Jason Abreu
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



JSF CDI code assist

2021-12-05 Thread Jason Abreu
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