SmartClient_v90p_2013-08-05
We have implemented an interface that allows users to save the grid configuration. This uses getViewState() and setViewState() to save and set the grid configuration. This is working correctly with the following exception:
When the advancedFieldPicker interface is used, the user can change the title of a field. The title is updated in the grid's field header as expected. However, when I call getViewState(), this title is not exported, and therefore user's are unable to persist a custom title of the field.
Is this expected behavior?
Repro steps:
- Load test case
- Open advaned field picker
- change the title of the inspections field
- call gridObject.getViewState()
- observe that the inspections field does not contain a title property designating the new field title
We have implemented an interface that allows users to save the grid configuration. This uses getViewState() and setViewState() to save and set the grid configuration. This is working correctly with the following exception:
When the advancedFieldPicker interface is used, the user can change the title of a field. The title is updated in the grid's field header as expected. However, when I call getViewState(), this title is not exported, and therefore user's are unable to persist a custom title of the field.
Is this expected behavior?
Repro steps:
- Load test case
- Open advaned field picker
- change the title of the inspections field
- call gridObject.getViewState()
- observe that the inspections field does not contain a title property designating the new field title
Code:
<!DOCTYPE html>
<html>
<head>
<title >SNTQ-13062</title>
<script type="text/javascript" >
var isomorphicDir="http://localhost:8080/isomorphic/";
var data = [
{isDesignate:0, inspectorID:12345, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:206,observations:913,lastInspectionDate:new Date(2012, 8, 13),index:52.6, inspectionType: {id:123, name:"type1"}},
{isDesignate:0,inspectorID:67890, region:"United States", state:"Pennsylvania", city:"Butler", inspections:66,observations:null,lastInspectionDate:new Date(2013, 2,2),index:75.3, inspectionType: {id:123, name:"type1"}},
{isDesignate:1,inspectorID:88776, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:12,observations:null,lastInspectionDate:new Date(2013,2,3),index:75.3, inspectionType: {id:123, name:"type1"}},
{isDesignate:1,inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Butler", inspections:206,observations:12,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}},
{isDesignate:2,inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:34,observations:0,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}},
{isDesignate:1,inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:34,observations:0,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}},
{isDesignate:2,inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:109,observations:null,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}}
];
</script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Core.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Foundation.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Containers.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Grids.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Forms.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_DataBinding.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Drawing.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_PluginBridges.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Charts.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Tools.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script>
</head>
<body>
<script>
isc.DataSource.create({
ID: "ds",
fields: [
{name:"inspectorID", title:"Inspector ID", type:"integer"},
{name:"isDesignate", title:"Is Designate", type:"boolean" },
{name:"inspections", type:"integer", title:"Number of Inspections"},
{name:"region", type:"text", title:"Region/Country"},
{name:"observations", title:"# Observations", type:"integer"}
],
cacheData:data,
clientOnly: true
});
// create the actual grid object
var gridObject = isc.ListGrid.create({
dataSource: ds,
dataFetchMode : "local",
autoFetchData: true,
clientOnly: true,
width : "100%",
align : "center",
autoFitData : "vertical",
alternateRecordStyles : true,
canAddFormulaFields : true,
canAddSummaryFields : true,
canGroupBy : true,
canReorderFields : true,
showGroupSummary : true,
groupByMaxRecords : 100,
canMultiGroup : true,
useAdvancedFieldPicker : true,
advancedFieldPickerThreshold : 2
});
</script>
</body>
</html>