-
1. Re: Code assist in JBoss Tool HTML Editor for EL in XHTML
maxandersen Aug 31, 2011 6:37 AM (in response to torstenknopp)1 of 1 people found this helpful@ManagedBean we only added supported for lately (since CDI beans are much more integrated into JEE than @ManagedBean).
thus two options:
use CDI beans
or
try M3 nightly build or when it comes out
-
2. Re: Code assist in JBoss Tool HTML Editor for EL in XHTML
torstenknopp Aug 31, 2011 7:35 AM (in response to maxandersen)Thanks.
I changed my managedBean to CDI, but still no code assist!
here is my new bean:
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
/*
* customer profile
*/
@Named
@RequestScoped
public class Customer {
private String firstName;
private String lastName;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String save() {
return "/showCustomer.xhtml";
}
-
3. Re: Code assist in JBoss Tool HTML Editor for EL in XHTML
akazakov Aug 31, 2011 12:45 PM (in response to torstenknopp)Torsten, make sure you have enabled CDI support in JBoss Tools for the project (Project Properties -> CDI (Context and Dependency Injection) -> Enable CDI Support) and you have a beans.xml in <JavaSourceFolder>/META-INF in case of JAR or in <WebContentFolder>WEB-INF in case of WAR.
-
4. Re: Code assist in JBoss Tool HTML Editor for EL in XHTML
torstenknopp Sep 1, 2011 4:37 AM (in response to akazakov)Hello Alexey!
Thats it. CDI Support was'nt enabled!
Now code assist works fine when beans are anoteated with @javax.inject.Named
In my example beans.xml isnt't necassary!?!
Is code assist for faces-context planned in the future?
Thanks.
-
5. Re: Code assist in JBoss Tool HTML Editor for EL in XHTML
akazakov Sep 1, 2011 12:54 PM (in response to torstenknopp)In my example beans.xml isnt't necassary!?!
beans.xml is required by CDI container to recognize your project as CDI module (see JSR-299 spec.) So CDI Tools require beans.xml too.
Is code assist for faces-context planned in the future?
Not sure I got you.. What do you mean?
-
6. Re: Code assist in JBoss Tool HTML Editor for EL in XHTML
torstenknopp Sep 2, 2011 1:50 AM (in response to akazakov)Hello Alexey!
Two ways in JEE 6:
1. CDI - annotate your backend beans with @javax.inject.Named and javax.enterprise.context.SessionScoped (for example)
2. pure java faces , without CDI - annotate your backend beans with javax.faces.bean.ManagedBean and javax.faces.bean.SessionScoped;
with CDI - i get code assist by JBoss Tools HTML Editor for EL
without cdi - i didn't get code assist.
So, my question:
Is it planned in the future?
Thanks.
Torsten
-
7. Re: Code assist in JBoss Tool HTML Editor for EL in XHTML
akazakov Sep 2, 2011 2:00 AM (in response to torstenknopp)Yes, it will be available in JBoss Tools 3.3.0 M3