Author |
Message |
17/12/2009 07:21:05
|
asingla
Active
Joined: 12/12/2009 15:13:10
Messages: 5
Offline
|
Hi,
I have created a fixGrid with one column being used to delete the entire row.
However, when I press the delete button on any row, I do not get the selected row Index.
Rather I get the complete object of the selected row.
Wouldnt it be convenient to return the selected row index as well as selected row object?
I have been using richfaces till date wherein I get both the selected row index and object.
If this feature is already present, please let me know.
Thanks,
Akash
|
|
|
17/12/2009 07:35:25
|
Admin
Power User
Joined: 21/11/2007 11:36:10
Messages: 37
Offline
|
Hi,
please take a look into the demo workplace:
Grids and Trees => Grids and Trees ==> Simpe Grid (the very first grid example).
This exactly does what you want to do (at least that's what I believe).
In case the example does not respond to your question: please continue this discussion...
Regards! Björn
|
|
|
17/12/2009 11:15:24
|
asingla
Active
Joined: 12/12/2009 15:13:10
Messages: 5
Offline
|
Hi,
I am already using this method to remove objects from the list.
However, my point was that if I need to store somewhere the index of the row that was being removed, I will have have to write extra line,
Code:
I was thinking if according to the user requirement, either the row no. or the selected object be returned from the page. Currently, there is option for only selected object
Thanks
Akash
|
|
|
20/12/2009 12:44:49
|
CaptainCasa
Power User
Joined: 21/11/2007 12:23:06
Messages: 5520
Offline
|
Hi,
yes, what you say is right + "by intention". Lists by default support sorting (with keeping the selection), so the index is quite unstable, that's the background. Same with adding items into the list.
...of course you may write the object index into your row object (the one extending from FIXGRIDListItem) in case you want to have a "ultra-quick" access to the index information, but then must keep track of the index yourself (in case of sorting, adding items in front of selection).
Regards, Björn
|
Björn Müller, CaptainCasa GmbH |
|
|
|