Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
We have a component which exports data from a grid in CSV format. When we upgrade to 5.0.15 it broke because Grid doesn't initialize the SortModel until setupRender. This means that you can't get sorting information from a Grid if an event handler or if your component that references the Grid comes before it in the rendering/form processing.
One solution is to push the SortModel into to page but 1) the default implementation is part of the Grid and 2) this would be really gross and non-usable because the state information behind the default sort model is persisted in Grid (so the page would have to take care of this manually in each instance).
Another option would be to use @Cached on the getters for state-related stuff so that no matter when it gets called it's always lazy initialized, it's only initialized once, and it's always correct.
Attachments
Issue Links
- duplicates
-
TAP5-135 Attempting to set a default sort constraint on the Grid will cause an NullPointerException inside Grid.getSortConstraints()
- Closed