Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ViewState persistence

$
0
0
We noticed there has been a change in the ViewState format.

Previous:

Code:

({selected:"[]",field:"[{name:"formField",width:30},{name:"auditType",width:100},{name:"auditDate",width:150},{name:"source",width:100},{name:"status",width:100},{name:"description",width:1},{name:"sysId",visible:false,width:null},{name:"sysUpdatedBy",width:1},{name:"sysUpdatedOn",width:150},{name:"sysCreatedBy",visible:false,width:null},{name:"sysCreatedOn",visible:false,width:150}]",sort:"({fieldName:"auditDate",sortDir:"descending",sortSpecifiers:[{property:"auditDate",direction:"descending"}]})",hilite:null,group:""})
Current:
Code:

({selected:"[]",field:"[{name:\"formField\",width:30},{name:\"auditType\",width:100},{name:\"auditDate\",width:150},{name:\"source\",width:100},{name:\"status\",width:100},{name:\"description\",width:1},{name:\"sysId\",visible:false,width:null},{name:\"sysUpdatedBy\",width:1},{name:\"sysUpdatedOn\",width:150},{name:\"sysCreatedBy\",visible:false,width:null},{name:\"sysCreatedOn\",visible:false,width:150}]",sort:"({fieldName:\"auditDate\",sortDir:\"descending\",sortSpecifiers:[{property:\"auditDate\",direction:\"descending\"}]})",hilite:null,group:""})
We allow our users to save user preferences, one of those preferences being which columns they want selected by default, the default sort, etc. We do this by saving/restoring their preferred ViewState.

It looks like the new format is escaping the quotes around the field names.

We notice that the older persisted ViewStates were being ignored with the following exception.

Code:

Unable to parse viewState object passed in: "({selected:"[]",field:"[{name:"formField",width:30},{name:"auditType",width:100},{name:"auditDate",width:150},{name:"source",width:100},{name:"status",width:100},{name:"description",width:1},{name:"sysId",visible:false,width:null},{name:"sysUpdatedBy",width:1},{name:"sysUpdatedOn",width:150},{name:"sysCreatedBy",visible:false,width:null},{name:"sysCreatedOn",visible:false,width:150}]",sort:"({fieldName:"auditDate",sortDir:"descending",sortSpecifiers:[{property:"auditDate",direction:"descending"}]})",hilite:null,group:""})" Ignoring.
SmartClient Version: v9.1p_2014-05-11/Pro Deployment (built 2014-05-11)

Viewing all articles
Browse latest Browse all 4756

Trending Articles