protected Activity makeCreateActivity() { StudentEditView.instance().setCreating(true); final StudentRequest request = requests.studentRequest(); Activity activity = new CreateAndEditProxy<StudentProxy>( StudentProxy.class, request, ScaffoldApp.isMobile() ? StudentMobileEditView.instance() : StudentEditView.instance(), placeController) { @Override protected RequestContext createSaveRequest(StudentProxy proxy) { request.saveStudent(proxy); return request; } }; return new StudentEditActivityWrapper( requests, ScaffoldApp.isMobile() ? StudentMobileEditView.instance() : StudentEditView.instance(), activity, null); }
protected Activity makeEditActivity(ProxyPlace place) { StudentEditView.instance().setCreating(false); EntityProxyId<StudentProxy> proxyId = coerceId(place); Activity activity = new FindAndEditProxy<StudentProxy>( proxyId, requests, ScaffoldApp.isMobile() ? StudentMobileEditView.instance() : StudentEditView.instance(), placeController) { @Override protected RequestContext createSaveRequest(StudentProxy proxy) { StudentRequest request = requests.studentRequest(); request.saveStudent(proxy); return request; } }; return new StudentEditActivityWrapper( requests, ScaffoldApp.isMobile() ? StudentMobileEditView.instance() : StudentEditView.instance(), activity, proxyId); }