Creating extra fields in grid stores with the web UI framework
The WUF binding framework is used to populate data into a grid. This framework uses the bindingData provided for the grid to create the store. The column configuration is used by the framework to create fields in the store.
Sometimes, more fields (more than the number of columns) may be required in the store for a grid. To add these fields, the bindingData of a grid accepts the fields property.
The following shows an example of a table bindingData object:
bindingData: {
sourceBinding : ["getFlightServiceList:FlightServiceList.FlightService"],
targetBinding : ["getFlightServiceList:FlightServiceList.FlightService"],
storeConfig: {
// ... extra parameters used to create the store
}
}
The following shows an example of a column configuration:
{
dataIndex: '',
bindingData: {
sFieldConfig : {
mapping : "FlightServiceKey"
},
tAttrBinding : "FlightServiceKey"
}
}
The configuration of the fields property that is required when adding fields in the store for a grid is shown below:
fields: [{
name: 'fieldName',
mapping: 'fieldMapping'
}]
The following shows an example of the table bindingData object in which the fields property is used:
bindingData: {
sourceBinding : ["getFlightServiceList:FlightServiceList.FlightService"],
targetBinding : ["getFlightServiceList:FlightServiceList.FlightService"],
storeConfig: {},
fields: [{
name: 'fieldName',
mapping: 'fieldMapping'
}]
}
Using extensibility, you can add the extn_bindingData property for an existing table (a table which was originally present on the screen, i.e., it was not added to the screen by a user during extensibility).
The following shows an example of an extn_bindingData object that implements the fields property:
extn_bindingData: {
fields: [{
name: 'fieldName',
mapping: 'fieldMapping'
}]
}