.getBean("postShipmentManager");
int index = tableOrders
.convertRowIndexToModel(transportableSelectionList
.getSelectionIndex());
if (index != -1) {
Transportable transportable = (Transportable) transportableSelectionList
.getElementAt(index);
if (transportable instanceof Order) {
Order order = (Order) transportable;
orderViewHandler
.lazyLoadOrder(order, new LazyLoadOrderEnum[] {
LazyLoadOrderEnum.POST_SHIPMENTS,
LazyLoadOrderEnum.COMMENTS,
LazyLoadOrderEnum.COLLIES });
} else {
PostShipment postShipment = (PostShipment) transportable;
postShipmentManager.lazyLoad(postShipment,
new LazyLoadPostShipmentEnum[] {
LazyLoadPostShipmentEnum.POST_SHIPMENT_REFS,
LazyLoadPostShipmentEnum.ORDER_COMMENTS,
LazyLoadPostShipmentEnum.COLLIES });
}
if (transportable.getPostShipments() != null
&& transportable.getPostShipments().size() != 0) {
Util.showErrorDialog(window1, "Ordre har etterleveringer",
"Kan ikke fjerne ordre som har etterleveringer.");
return;
}
transportable.setSentBool(false);
transportable.setTransport(null);
if (transportable instanceof Order) {
Order order = (Order) transportable;
orderViewHandler.lazyLoadOrder(order, new LazyLoadOrderEnum[] {