BUG 11086 "Rows are being ignored after adding them next to an empty

row" SOLVED

-When you try to add a row into a pmTable, if you leave an empty row the
next added rows are being ignored and not saved.
-Solved, The final user cant leave a row without at least the primary
keys columns filled up, to be saved and if by accident the user leaves
an empty row the aplication shows up an error message.
This commit is contained in:
marcelo
2013-04-15 10:35:12 -04:00
parent 4871bd2b4f
commit 3f9af3be92

View File

@@ -188,7 +188,8 @@ Ext.onReady(function(){
editor = new Ext.ux.grid.RowEditor({
saveText : _("ID_UPDATE"),
listeners : {
beforeedit:function(){
}
}
});
}
@@ -213,10 +214,10 @@ Ext.onReady(function(){
return false;
PMExt.error(_('ID_ERROR'), msg);
PMExt.error(_('ID_ERROR'), msg);
infoGrid.store.reload();
});
E
var proxy = new Ext.data.HttpProxy({
//url: '../pmTablesProxy/getData?id=' + tableDef.ADD_TAB_UID
api: {
@@ -397,12 +398,17 @@ NewPMTableRow = function(){
var row = new PMRow(new props);
len = infoGrid.getStore().data.length;
if (infoGrid.store.getAt(len-1).data[tableDef.FIELDS[0].FLD_NAME]=="") {
PMExt.error( _('ID_ERROR'), _('ID_EMPTY_ROW'));
store.load();
} else{
editor.stopEditing();
store.insert(len, row);
infoGrid.getView().refresh();
infoGrid.getSelectionModel().selectRow(len);
editor.startEditing(len);
editor.stopEditing();
store.insert(len, row);
infoGrid.getView().refresh();
infoGrid.getSelectionModel().selectRow(len);
editor.startEditing(len);
}
};
//Load PM Table Edition Row Form