.getBean("postShipmentManager");
DeviationViewHandler deviationViewHandler = deviationViewHandlerFactory.create(transportlistable.getOrder(), false,
false, false, null, true);
Deviation deviation = new Deviation();
DeviationModel deviationModel = new DeviationModel(deviation, true);
deviationModel.setOrderLines(orderLines);
deviationModel.setPostShipment(postShipment);
deviationModel.setOrder(transportlistable.getOrder());
EditDeviationView editDeviationView = new EditDeviationView(false,
deviationModel, deviationViewHandler, true, true);
JDialog dialog = new JDialog(ProTransMain.PRO_TRANS_MAIN, "Avvik", true);
dialog.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
WindowInterface window = new JDialogAdapter(dialog);
window.add(editDeviationView.buildPanel(window), BorderLayout.CENTER);
window.pack();
Util.locateOnScreenCenter(window);
window.setVisible(true);
postShipment = deviation.getPostShipment();
// postShipment.setDeviation(deviation);
postShipment.setOrder(transportlistable.getOrder());
postShipment.cacheComments();