public void actionPerformed(ActionEvent arg0) {
OrderLine orderLine = (OrderLine) orderArticleSelectionList
.getElementAt(tableArticleOrders
.convertRowIndexToModel(orderArticleSelectionList
.getSelectionIndex()));
ExternalOrderLine externalOrderLine = new ExternalOrderLine(null,
orderLine.getArticleName(), orderLine,
((ExternalOrderModel) presentationModel.getBean())
.getObject(), orderLine.getAttributeInfo(), null,
orderLine.getNumberOfItems());
orderLineManager
.lazyLoad(
orderLine,
new LazyLoadOrderLineEnum[] { LazyLoadOrderLineEnum.ORDER_LINE_ATTRIBUTE });
Set<OrderLineAttribute> orderLineAttributes = orderLine
.getOrderLineAttributes();
Set<ExternalOrderLineAttribute> externalOrderLineAttributes = new HashSet<ExternalOrderLineAttribute>();
ExternalOrderLineAttribute externalOrderLineAttribute;
if (orderLineAttributes != null) {
for (OrderLineAttribute orderLineAttribute : orderLineAttributes) {
externalOrderLineAttribute = new ExternalOrderLineAttribute(
null, externalOrderLine, orderLineAttribute
.getAttributeValue(), orderLineAttribute
.getAttributeName());
externalOrderLineAttributes.add(externalOrderLineAttribute);
}
}
externalOrderLine
.setExternalOrderLineAttributes(externalOrderLineAttributes);
boolean isCanceled = openEditExternalOrderLine(externalOrderLine,
window);
if (!isCanceled) {
externalOrderLine.setAttributeInfo(externalOrderLine
.getExternalOrderLineAttributesAsString());
Set<ExternalOrderLine> orderLines = (Set<ExternalOrderLine>) presentationModel
.getBufferedValue(ExternalOrderModel.PROPERTY_EXTERNAL_ORDER_LINES);
if (orderLines == null) {
orderLines = new HashSet<ExternalOrderLine>();