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 211864 - No code completion and verification in inherited jsf managed bean with generic typed property
Summary: No code completion and verification in inherited jsf managed bean with generi...
Alias: None
Product: javaee
Classification: Unclassified
Component: JSF Editor (show other bugs)
Version: 7.4
Hardware: Macintosh Mac OS X
: P3 normal with 2 votes (vote)
Assignee: Martin Fousek
Depends on:
Reported: 2012-04-27 15:04 UTC by ravshansbox
Modified: 2016-09-20 08:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:

test project (100.60 KB, application/octet-stream)
2012-12-13 10:37 UTC, ravshansbox
inside index.xhtml ide can't detect property (6.26 KB, application/zip)
2015-04-18 18:57 UTC, ravshansbox

Note You need to log in before you can comment on or make changes to this bug.
Description ravshansbox 2012-04-27 15:04:29 UTC
No code completion and verification in inherited jsf managed bean with generic typed property:

public abstract class AbstractController<T extends EntityBase, F extends AbstractFacade<T>> implements Serializable {

    private LazyDataModel<T> model;

    public AbstractController() {
        model = new LazyDataModel<T>() {

            public List<T> load(int first, int pageSize, String sortField, org.primefaces.model.SortOrder sortOrder, Map<String, String> filters) {
                return getFacade().findRange(new int[]{first, first + pageSize});

            public Object getRowKey(T object) {
                return object.getId();

            public T getRowData(String rowKey) {
                return getFacade().find(Long.parseLong(rowKey));

    public LazyDataModel<T> getModel() {
        return model;

    protected abstract F getFacade();

public class UserController extends AbstractController<User, UserFacade> {

    private UserFacade userFacade;
    private User currentItem;

    public UserController() {

    protected UserFacade getFacade() {
        return userFacade;

    public User getCurrentItem() {
        if (currentItem == null) {
            currentItem = new User();
        return currentItem;

    public void setCurrentItem(User currentUser) {
        this.currentItem = currentUser;

    public void save() {

<p:dataTable id="list" value="#{userController.model}" var="user" selection="#{userController.currentItem}" selectionMode="single" rows="10">
                <p:column headerText="Id">
                    <h:outputText value="#{user.}"/>
                <p:column headerText="Username">
                    <h:outputText value="#{user.username}"/>
                <p:column headerText="Password">
                    <h:outputText value="#{user.password}"/>
Comment 1 ravshansbox 2012-04-27 15:07:09 UTC
Code have some logical mistakes.
Comment 2 Martin Fousek 2012-12-13 08:42:44 UTC
Thanks for entering that issue, but I wasn't fully able to reproduce your problem. I had to update sources a lot since many class definitions are missing and I tried out the completion on the userController where were offered 'currentItem', 'model', 'save' which looks correct to me.

Please could you ideally attach whole sample project where we could try out what's missing to you and better specify what are you missing there/where. Please reopen this issue then again. Thanks a lot...
Comment 3 ravshansbox 2012-12-13 10:37:49 UTC
Created attachment 129308 [details]
test project

i attached a test project, you can open index.xhtml and look for warning
Comment 4 Martin Fousek 2012-12-14 09:42:10 UTC
(In reply to comment #3)
> i attached a test project, you can open index.xhtml and look for warning

Thanks for providing the project, I helped a lot to understand your issue.
Comment 5 ravshansbox 2014-03-11 11:42:29 UTC
any changes? already more than 2 years.
Comment 6 opensolutions 2014-03-11 14:02:00 UTC
Problem still exists in 7.4 mac os x. This problem also effects cdi beans.
Comment 7 Martin Fousek 2014-03-21 06:01:46 UTC
(In reply to ravshansbox from comment #5)
> any changes? already more than 2 years.

Sorry, not fixed yet. Trying to target that to the Next.
Comment 8 ravshansbox 2015-04-18 18:57:45 UTC
Created attachment 153262 [details]
inside index.xhtml ide can't detect property
Comment 9 Martin Balin 2016-07-07 08:54:34 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 10 davti 2016-09-20 08:33:34 UTC
This is still an issue with the latest DEV build 20160920