Is there any way to save the current filter data as part of the view state? If not, how would I go about doing this?
Announcement
Collapse
No announcement yet.
X
-
Please run the attached testcase.
Once loaded, sort the column "nReference - Select Field".
Now click on the "Get View state button". This will print out the viewstate below. Note that the sortSpecifier is using the propert name as the field's displayField.
Code:({selected:"[]",field:"[{name:\"int_RBH\",width:null},{name:\"nRef_SF\",width:210},{name:\"cwPK__\",width:null}]",sort:"({fieldName:\"nRef_SF\",sortDir:\"ascending\",sortSpecifiers:[{property:\"nRef_SF$DF\",direction:\"ascending\",$78e:null}]})",hilite:null,group:""})
Now click "Set view state with actual field name". This button will attempt to set the same view state except with the following change:
Code:sortSpecifiers:[{property:\"nRef_SF\",direction:\"ascending\",$78e:null}]
Are we setting something that makes this happen? Is this a bug?Attached Files
Comment
-
This is working for us, regardless of which of the two buttons we use to reset the state. In both cases the UI updates to show the field in a sorted state (with sorted header icon and sorted data) after click.
We have made a recent change somewhat in this area - it seems slightly unlikely to be related but would still be worth verifying. Please try the next nightly build (dated October 4 or greater) and see if you continue to experience this issue. If so let us know and we'll revisit in case we somehow missed something.
Thanks
Isomorphic Software
Comment
-
Sorry but this still does not work in the 8.2p branch with the latest build. It DOES WORK in 8.3 though but we cannot afford to move to 8.3 right now. We tried last week and ran into quite a bit of problems that we do not have time to look into before our next release. Please test with 8.2p. Thanks
Comment
-
This is a regression that has been fixed locally (this morning) but made it into the nightly build.
We caught this and have removed this particular set of builds from circulation (though of course - this is after you already picked up the bad version).
Sorry for the inconvenience. Rest assured that this will be fixed in the next nightly build.
Comment
-
Hi,
we have another issue regarding to the view state. For the same example in this thread, if we click the "Set view state with display field name" button, the field is correctly sorted but "Table.sortField" or "Table.getSortField()" returns null. We are using "SmartClient_v82p_2012-10-09_PowerEdition".
We were tracking the "sortField" in our Selenium test cases. But they all failed now because Table.sortField always returns null even the fields are sorted. Can you please help? Should the "sortField" be null if we set the view state with display field name? Thanks!
Comment
-
getSortField() only returns a field if the sort-field is visible.
In this case it's a little ambiguous - you're technically sorted by a field that isn't displayed (but of course the data is visible in another field due to the 'displayField' settings).
Internally we're looking at whether there's a better way to handle this.
Regardless - The best way for your application code to reliably figure out how the grid is currently sorted is to make use of the "getSort()" API.
Regards
Isomorphic Software
Comment
Comment