attribute.setAttributeValue(attributeValue);
OrderWrapper<T, E> orderWrapper = (OrderWrapper<T, E>) ((OrderLineTreeNode) orderLineTreeTableModel
.getRoot()).getObject();
calculateAttributes(orderWrapper.getOrderLines());
bufferedOrderLines.setValue(new ArrayListModel(orderWrapper
.getOrderLines()));
}
}
} else if (selectedNode != null) {
BufferedValueModel bufferedOrderLines = presentationModel
.getBufferedModel(ICostableModel.PROPERTY_ORDER_LINE_ARRAY_LIST_MODEL);
OrderLine line = (OrderLine) selectedNode.getObject();
String metric = line.getMetric();
if (metric != null) {
metric = "(" + metric + ")";
} else {
metric = "";
}
String numberOfValue = JOptionPane.showInputDialog(window
.getComponent(), "Gi antall" + metric, line
.getNumberOfItems());
if (!ValidationUtils.isNumeric(numberOfValue)) {
Util.showErrorDialog(window, "Feil", "Antall m� v�re et tall");
return;
}
if (numberOfValue != null && numberOfValue.length() != 0) {
line.setNumberOfItems(Integer.valueOf(numberOfValue.replace(
',', '.')));
OrderWrapper orderWrapper = (OrderWrapper) ((OrderLineTreeNode) orderLineTreeTableModel
.getRoot()).getObject();
bufferedOrderLines.setValue(new ArrayListModel(orderWrapper
.getOrderLines()));
}
}
}