I'm facing an issue with Gridrowediting. Only the first row of the grid is retaining the edited values on save. The rest of the rows dont show me the new value on save. I have created a MapValueProvider class which would get the grid data instead of PropertyAccess.Below is the snippet of my code.


for(DataColumn column : columns){

ColumnConfig<ReportObject, ?> columnConfig = new ColumnConfig<ReportObject, T>(new MapValueProvider(column.getName()), column.getDefaultWidth(), column.getColumnHeading());

listColumnConfig.add(columnConfig);
mapColumnConfig.put(column.getName(),columnConfig);

}

columnModel = new ColumnModel<ReportObject>(listColumnConfig);

for(DataColumn columnIter : columns){
if(columnIter.getDataType().equals(DataType.String)){
editing.addEditor(mapColumnConfig.get(columnIter.getName()), new TextField());
}}


public class MapValueProvider<T> implements ValueProvider<ReportObject, T> {
private T field;

public MapValueProvider(T field) {
this.field = field;
}

@Override
public String getPath() {
return (String) field;
}

@Override
public T getValue(ReportObject object) {
return (T)object.getDataMap().get(field);
}

@Override
public void setValue(ReportObject object, T value) {
}


My application retrives a resultset from a db table and returns list of ReportObject which contains a map where in the key is the column name and the value is the column value.