コード例 #1
0
  protected Activity makeCreateActivity() {
    TalkEditView.instance().setCreating(true);
    final TalkRequest request = requests.talkRequest();
    Activity activity =
        new CreateAndEditProxy<TalkProxy>(
            TalkProxy.class,
            request,
            ScaffoldApp.isMobile() ? TalkMobileEditView.instance() : TalkEditView.instance(),
            placeController) {

          @Override
          protected RequestContext createSaveRequest(TalkProxy proxy) {
            request.saveTalk(proxy);
            return request;
          }
        };
    return new TalkEditActivityWrapper(
        requests,
        ScaffoldApp.isMobile() ? TalkMobileEditView.instance() : TalkEditView.instance(),
        activity,
        null);
  }
コード例 #2
0
  protected Activity makeEditActivity(ProxyPlace place) {
    TalkEditView.instance().setCreating(false);
    EntityProxyId<TalkProxy> proxyId = coerceId(place);
    Activity activity =
        new FindAndEditProxy<TalkProxy>(
            proxyId,
            requests,
            ScaffoldApp.isMobile() ? TalkMobileEditView.instance() : TalkEditView.instance(),
            placeController) {

          @Override
          protected RequestContext createSaveRequest(TalkProxy proxy) {
            TalkRequest request = requests.talkRequest();
            request.saveTalk(proxy);
            return request;
          }
        };
    return new TalkEditActivityWrapper(
        requests,
        ScaffoldApp.isMobile() ? TalkMobileEditView.instance() : TalkEditView.instance(),
        activity,
        proxyId);
  }