[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
bug? Initial sorting of FixGrid  XML
Forum Index -> Development
Author Message
rheinrichs

Power User
[Avatar]

Joined: 08/05/2009 10:05:36
Messages: 209
Offline

Hi,

the initial sorting of FixGrids aktual doesn't work.
with <code>getGridxxx().sort("view.beendetAm", true)</code> we try to sort the Elements.
The FixGrid shows this little icon, but the elements aren't in the right order.

Cause: In the class
FIXGRIDListBinding#sortGrid(String sortReference, String objectBindingString, boolean ascending)
the parameter objectBindingString == null. After that the sort value is unknown (null)

best regards
rheinrichs

Power User
[Avatar]

Joined: 08/05/2009 10:05:36
Messages: 209
Offline

sorry, my fault!
After sorting in hook-methode <code>initialize</code> it works fine.

best regards
levy

Power User

Joined: 12/03/2008 16:38:22
Messages: 308
Location: XpertCenter
Offline

Hi,

I also want to use the convenience sort method:
Code:
getPotentialRows().sort(".{year}", true);


But it doesn't work at all. In the console, it is written:
2010:05:11 11:03:14:138 | 13 | INFO | Grid sort, reference is null/potentialRows.year
11.05.2010 11:03:14 INFO [ch.xpertcenter.recourse.log.LogOutputDelegator, http-64201-4]: Grid sort, reference is null/potentialRows.year
2010:05:11 11:03:14:138 | 13 | INFO | Update of sbvalue in grid null 


If I sort from the client, the log in the console is:
11.05.2010 11:08:44 INFO [ch.xpertcenter.recourse.log.LogOutputDelegator, http-64201-3]: Grid action in grid: d.d_2.d_3.CaseUI.potentialRows
2010:05:11 11:08:44:625 | 12 | INFO | Grid sort, reference is d.d_2.d_3.CaseUI.potentialRows/year
11.05.2010 11:08:44 INFO [ch.xpertcenter.recourse.log.LogOutputDelegator, http-64201-3]: Grid sort, reference is d.d_2.d_3.CaseUI.potentialRows/year
2010:05:11 11:08:44:625 | 12 | INFO | Update of sbvalue in grid d.d_2.d_3.CaseUI.potentialRows
11.05.2010 11:08:44 INFO [ch.xpertcenter.recourse.log.LogOutputDelegator, http-64201-3]: Update of sbvalue in grid d.d_2.d_3.CaseUI.potentialRows 


Can you please give me a hint?

Regards, Daniel
[WWW]
rheinrichs

Power User
[Avatar]

Joined: 08/05/2009 10:05:36
Messages: 209
Offline

sure, here the reason:
At the time of sorting the table the first time, the objectbinding for the grid is missing.
<jdoc>
/**
* This method is called one time - after the grid is first time contacted
* by the server side FIXGRID component. This happens in the rendering phase,
* when the grid is first time touches by the component processing. Grid
* properties (like the objectbinding) are avaiable at this point of time
* earliest - before the grid is just an object without reference to a
* component processin.
*/
public void initialize()
</jdoc>

so you have to override this method for sorting the tabel. Example:
<code>
private FixGridListBinding<GridItem> m_gridPotentialRows = new FixGridListBinding<GridItem>(){
@Override
public void initialize() {
super.initialize();
super.sort(".year", true);
}
};
</code>
...hf ;o)
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team