Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.7RC1, 1.8.1, 2.0.0
-
Fix Version/s: 2.0.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:All
-
ICEsoft Forum Reference:
Description
Upon examination of com.icesoft.faces.component.commandsortheader.CommandSortHeader.broadcast(-), it appears that HtmlDataTable.setSortColumn(-) and HtmlDataTable.setSortAscending(-) are not being called in the right phase, and are also being called after the commandSortHeader's actionListener.
We should decide if we want to follow the typical EditableValueHolder paradigm for HtmlDataTable's sortColumn and sortAscending properties, and make them UpdatableProperties that CommandSortHeader sets on decode ( queueEvent(-) ), or if we want to follow the UICommand paradigm for CommandSortHeader, and have it use the immediate property, which would necessitate setting HtmlDataTable's sortColumn and sortAscending properties immediately before the ActionEvent is broadcast.
We should decide if we want to follow the typical EditableValueHolder paradigm for HtmlDataTable's sortColumn and sortAscending properties, and make them UpdatableProperties that CommandSortHeader sets on decode ( queueEvent(-) ), or if we want to follow the UICommand paradigm for CommandSortHeader, and have it use the immediate property, which would necessitate setting HtmlDataTable's sortColumn and sortAscending properties immediately before the ActionEvent is broadcast.
I have encountered this issue myself in 1.7.1. The ascending property in the backing bean gets set during the invoke application phase AFTER the action listener. This should definitely be happening during the update model values phase.
Furthermore, it seems to not set the bound sort column of the backing bean at all. I can see it getting the value, but not setting it. I was forced to get the value from the compenent class directly.
Also, the initial page load is not reading the sort column value from the backing bean. It is fine on post back, but not the initial render. I was forced to do this by manually instanciating a new HtmlDataTable to the bound property, and setting the sort column directly on the class in @PostConstruct in the backing bean. I guess this could also be done in the before render response phase, but this should be read automatically from the instanciated backing bean, should it not?
Voted.
Kurzweil4