public RequisitionFormControllerImpl() { super(); currentUser = MainControllerImpl.getCurrentUser(); ArrayList<Criterion> l = new ArrayList<Criterion>(); model = new RequisitionModel(l, this); model.setCurrentUser(currentUser); detailsModel = new RequisitionDetailsModel(this); }
@Override public void createView() { view = new RequisitionFormViewImpl(this, model, detailsModel); masterObs.registerStateObserver(view.getMasterObs()); detailObs.registerStateObserver(view.getDetailObs()); if (view instanceof IObserver) { model.registerObserver((IObserver) view); } masterObs.setState(State.BROWSE); detailObs.setState(State.BROWSE); }