* @param combo
*/
@SuppressWarnings("unchecked")
void refreshTableOrder(OrderLine updatedOrderLine, boolean removeColli,
WindowInterface window, boolean combo) {
AbstractOrderModel abstractOrderModel=lazyLoadPackable();
OverviewManager overviewManager = (OverviewManager) ModelUtil
.getBean(abstractOrderModel.getManagerName());
int rowCount = tableOrderLines.getRowCount();
if (combo) {
rowCount--;
}
boolean colliDone = true;
if (removeColli) {
List<OrderLine> orderLineList1 = (abstractOrderModel
.getOrderLines());
OrderLine orderLine = orderLineList1.get(orderLineList1
.indexOf(updatedOrderLine));
orderLine.setColli(null);
if (rowCount == 0) {
colliDone = false;
}
}
tableOrders.revalidate();
tablePostShipment.revalidate();
abstractOrderModel.setStatus(null);
if (abstractOrderModel.getPackageStarted() == null)
abstractOrderModel.setPackageStarted(Calendar.getInstance()
.getTime());
if (rowCount == 0 && colliDone) {
abstractOrderModel.setColliesDone(1);
} else {
abstractOrderModel.setColliesDone(0);
}
try {
overviewManager.saveObject(abstractOrderModel.getObject());
} catch (ProTransException e) {
Util.showErrorDialog(window, "Feil",
"Ordre er oppdatert av noen andre, oppdater f�r lagring");
e.printStackTrace();
} catch (HibernateOptimisticLockingFailureException e) {