Cannot add columns to a Grid which was not created using the Grid(Class) constructor
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
Using Vaadin 8.0.0, tried to create Grid using the (String, DataProvider) constructor. However, when I try to add columns to such Grid, the following exception occurs:
java.lang.IllegalStateException: A Grid created without a bean type class literal or a custom property set doesn't support finding properties by name.
at com.vaadin.ui.Grid$1.getProperty(Grid.java:2008)
at com.vaadin.ui.Grid.addColumn(Grid.java:2200)
at com.vaadin.ui.Grid.addColumn(Grid.java:2171)
I thought that the columns were pre-created, but nope, Grid.getColumns() returns an empty list.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Grid.java at Grid$1.getProperty and Grid.addColumn, reproducing the String/DataProvider constructor path described in the issue. No test file is named; verify the behavior around Grid.getColumns(). Done means columns can be added without the reported IllegalStateException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100