IDEMPIERE-454 Easy import - peer review
This commit is contained in:
parent
08d0c19de4
commit
fb4bfb1e01
|
@ -1038,7 +1038,7 @@ public class GridTabCSVImporter implements IGridTabImporter
|
|||
}
|
||||
}
|
||||
}
|
||||
gridTab.getTableModel().dataRequery(pquery.getWhereClause());
|
||||
gridTab.getTableModel().dataRequery(pquery.getWhereClause(), false, 0, false);
|
||||
if (isInsertMode()){
|
||||
if(gridTab.getTableModel().getRowCount()>=1)
|
||||
logMsg = Msg.getMsg(Env.getCtx(), "AlreadyExists")+" "+pquery;
|
||||
|
|
|
@ -100,7 +100,7 @@ public class GridTable extends AbstractTableModel
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 4727235099287761006L;
|
||||
private static final long serialVersionUID = 5782826500266625861L;
|
||||
|
||||
public static final String DATA_REFRESH_MESSAGE = "Refreshed";
|
||||
|
||||
|
@ -2917,9 +2917,10 @@ public class GridTable extends AbstractTableModel
|
|||
* @param whereClause sql where clause
|
||||
* @param onlyCurrentRows only current rows
|
||||
* @param onlyCurrentDays how many days back
|
||||
* @param fireEvents if tabledatachanged and datastatusievent must be fired
|
||||
* @return true if success
|
||||
*/
|
||||
public boolean dataRequery (String whereClause, boolean onlyCurrentRows, int onlyCurrentDays)
|
||||
public boolean dataRequery (String whereClause, boolean onlyCurrentRows, int onlyCurrentDays, boolean fireEvents)
|
||||
{
|
||||
if (log.isLoggable(Level.INFO)) log.info(whereClause + "; OnlyCurrent=" + onlyCurrentRows);
|
||||
close(false);
|
||||
|
@ -2931,29 +2932,16 @@ public class GridTable extends AbstractTableModel
|
|||
m_changed = false;
|
||||
m_rowChanged = -1;
|
||||
m_inserting = false;
|
||||
if (fireEvents) {
|
||||
fireTableDataChanged();
|
||||
fireDataStatusIEvent(DATA_REFRESH_MESSAGE, "");
|
||||
}
|
||||
return true;
|
||||
} // dataRequery
|
||||
|
||||
/**
|
||||
* Requery with new whereClause
|
||||
* @param whereClause sql where clause
|
||||
* @return true if success
|
||||
*/
|
||||
public boolean dataRequery (String whereClause)
|
||||
public boolean dataRequery (String whereClause, boolean onlyCurrentRows, int onlyCurrentDays)
|
||||
{
|
||||
if (log.isLoggable(Level.INFO)) log.info(whereClause + "; OnlyCurrent=" + 0);
|
||||
close(false);
|
||||
m_onlyCurrentDays = 0;
|
||||
setSelectWhereClause(whereClause,false, m_onlyCurrentDays);
|
||||
open(m_maxRows);
|
||||
// Info
|
||||
m_rowData = null;
|
||||
m_changed = false;
|
||||
m_rowChanged = -1;
|
||||
m_inserting = false;
|
||||
return true;
|
||||
return dataRequery (whereClause, onlyCurrentRows, onlyCurrentDays, true);
|
||||
} // dataRequery
|
||||
|
||||
/**************************************************************************
|
||||
|
|
Loading…
Reference in New Issue