Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

GeneratedPropertyContainer doesn't work with generated columns #8

Open
bcmedeiros opened this issue Dec 13, 2016 · 2 comments
Open

Comments

@bcmedeiros
Copy link

In this code:

        if (((GeneratedPropertyContainer) componentConfiguration.getGrid()
                .getContainerDataSource()).getWrappedContainer() != null) {
            obj = ((GeneratedPropertyContainer) componentConfiguration.getGrid()
                    .getContainerDataSource()).getWrappedContainer()
                    .getContainerProperty(itemId, visibleColumns[columns])
                    .getValue();
        }

Why is it trying to get the wrapped container instead of accessing the container normally? Going directly through breaks generated properties, which only exists in the GeneratedPropertyContainer.

I don't understand the reason for checking container types instead of just calling Container#getContainerProperty() for any container.. can you explain that?

@PhineasClick
Copy link

Is there a new status for this issue? With version 1.0.4, Generated Properties are still causing a NPE.

@bcmedeiros
Copy link
Author

@PhineasClick I released a version containing this fix that is suitable for Vaadin 8, it's in my company's repo.
If it's useful for you, you can check on issue #29

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants