// try {
PostShipmentManager postShipmentManager = (PostShipmentManager) ModelUtil
.getBean("postShipmentManager");
MainPackageVManager mainPackageVManager = (MainPackageVManager) ModelUtil
.getBean("mainPackageVManager");
OrderManager orderManager = (OrderManager) ModelUtil
.getBean("orderManager");
refreshing = true;
setSums();
List<MainPackageV> orders = new ArrayList<MainPackageV>(
mainPackageVManager.findAll());
Collections.sort(orders, new MainPackageVComparator());
orderSelectionList.clearSelection();
mainPackageVList.clear();
if (orders.size() != 0) {
mainPackageVList.addAll(orders);
}
orderSelectionList.clearSelection();
tableOrders.scrollRowToVisible(0);
postShipmentSelectionList.clearSelection();
postShipmentList.clear();
List<PostShipment> postShipments = postShipmentManager.findAllNotSent();
if (postShipments != null) {
for (PostShipment postShipment : postShipments) {
orderManager.lazyLoadOrder(postShipment.getOrder(),
new LazyLoadOrderEnum[] { LazyLoadOrderEnum.COMMENTS });
}
Collections.sort(postShipments, new PostShipmentComparator());
postShipmentList.addAll(postShipments);
}