@SuppressWarnings("unchecked")
void doEditAllOrderLines(WindowInterface window) {
Collection<OrderLine> bufferedOrderLines = (Collection<OrderLine>) presentationModel
.getBufferedValue(ICostableModel.PROPERTY_ORDER_LINE_ARRAY_LIST_MODEL);
OrderWrapper rootOrder = (OrderWrapper) ((OrderLineTreeNode) orderLineTreeTableModel
.getRoot()).getObject();
if (bufferedOrderLines != null && bufferedOrderLines.size() != 0) {
List<OrderLine> lines = new ArrayList<OrderLine>();
for (OrderLine line : bufferedOrderLines) {
if (line.getOrderLineRef() == null) {
lines.add(line);
}
}
openOrderLineView(lines, window);
BufferedValueModel bufferedOrderLinesModel = presentationModel
.getBufferedModel(ICostableModel.PROPERTY_ORDER_LINE_ARRAY_LIST_MODEL);
bufferedOrderLinesModel.setValue(new ArrayListModel(
bufferedOrderLines));
calculateAttributes(bufferedOrderLines);
rootOrder
.setOrderLines(new ArrayList<OrderLine>(bufferedOrderLines));
orderLineTreeTableModel.fireChanged();
}
}