ItEr60S04ValidacionEProbasFuncionaisItEr59S04: [Bug #556] Fix bug.

Updating disability rules when entering creation form. When using zk
3.6.2 they were being updated due to onStatusChange being called when
entering the page. Now with 3.6.4 that is not happening anymore.
This commit is contained in:
Óscar González Fernández 2010-08-02 16:49:14 +02:00
parent e4a4c6ace0
commit e02c466593

View file

@ -847,6 +847,7 @@ public class OrderCRUDController extends GenericForwardComposer {
showOrderElementFilter();
showCreateButtons(false);
orderModel.prepareForCreate();
updateDisabilitiesOnInterface();
showEditWindow(_("Create order"));
checkCreationPermissions();
} catch (ConcurrentModificationException e) {
@ -1218,6 +1219,10 @@ public class OrderCRUDController extends GenericForwardComposer {
private OrderStatusEnum initialStatus;
public void onStatusChange() {
updateDisabilitiesOnInterface();
}
private void updateDisabilitiesOnInterface() {
Order order = (Order)orderModel.getOrder();
if(orderModel.userCanWrite(order, SecurityUtils.getSessionUserLoginName())
&& order.getState() != OrderStatusEnum.STORED) {