* @param window
*/
@SuppressWarnings("unchecked")
void changeBeanPostShipment(WindowInterface window) {
try {
PostShipmentManager postShipmentManager = (PostShipmentManager) ModelUtil
.getBean("postShipmentManager");
orderSelectionList.clearSelection();
orderLineSelectionList.clearSelection();
if (!refreshing) {
checkBuffering(window);
ownOrderLineList.clear();
if (orderComments.size() != 0) {
orderComments.clear();
}
if (postShipmentSelectionList.hasSelection()) {
int selectedIndex = postShipmentSelectionList
.getSelectionIndex();
int realIndex = tablePostShipment
.convertRowIndexToModel(selectedIndex);
if (realIndex != -1 && realIndex < postShipmentList.size()) {
PostShipment postShipment = (PostShipment) postShipmentSelectionList
.getElementAt(realIndex);
if (postShipment != null) {
postShipmentManager
.lazyLoad(
postShipment,
new LazyLoadPostShipmentEnum[] {
LazyLoadPostShipmentEnum.COLLIES,
LazyLoadPostShipmentEnum.ORDER_LINES,