Hi again. Trying to get the second working.
How does saveState work - does it call the getter to get the data and then when restoring build the bean from scratch and calling the setter? Is the order relevant - e.g. calling the setWrappedData clears the sorted things - any call previous to this one to set the sort order back from the savedState will be lost in this case - what to do here? I made some changes to the SortableModel so i can expose the lists and criteria which are responsible for sorting. I save the lists and sort criteria but because i am not very deep in saveState i cant get it work. Any comments helping to clear how it works more in detail would be nice. kind regards Am Montag, den 07.08.2006, 11:48 -0400 schrieb Mike Kienenberger: > Well, this sounds like a design issue in SortedDataModel. > There's two things that need to be saved. > One is the backing list -- that's being done. > The second is the sort order of the data. That seems like it needs > to be exposed in SortedDataModel so you can also preserve that. If > it were me (and it's not yet as I haven't needed to add sorting to any > of my tables), I'd look at the SortedDataModel and see what it'd take > to give it a sort order accessor (It could simply return a List of > Integers, where each integer represents the real index of the element > in the backing list). There may be some other sort state that needs > preserved as well (which columns are being used for sorting and the > direction of each sort). Actually, this second set of data should > be sufficient to recreate the sorted order of the data. > > On 8/7/06, Torsten Krah <[EMAIL PROTECTED]> wrote: > > *light on* > > > > Yeah thats right. > > > > But still it doesnt work like preserveDataModel - the list is still > > sorted like initial state if i go back to the page with a forward from a > > detail one, so saving only the data is not enough, because like someone > > already mentioned in the thread, the real list isn't sorted - this is > > done somewhere in the model ( correct me if i am wrong ), because of > > that i initially wanted to save the model - but thats not possible. > > > > So how can i preserve the state with saveState? > > > > Saving the SortCriteria + the Data did not help, neither saving the > > sortColumn - ideas?

