public SPDetailsReviewAnamnesisTableSubView addAnamnesisCheckTitle(
      AnamnesisCheckTitleProxy title) {
    Log.info("initializing anamnesis check title table and putting it on tab");
    String titleText = "";

    if (title.getText() != null) {
      titleText = title.getText();
    }

    SPDetailsReviewAnamnesisTableSubView tableSubView =
        new SPDetailsReviewAnamnesisTableSubViewImpl();

    anamnesisTabs.add((Widget) tableSubView, titleText);

    // anamnesisTabs.getTabWidget(0).getParent().addStyleName("chnagedTabStyle");

    /*if (anamnesisTabs.getWidgetCount() == 1) {
    	anamnesisTabs.addSelectionHandler(new SelectionHandler<Integer>() {
    		@Override
    		public void onSelection(SelectionEvent<Integer> event) {
    			//delegate.performAnamnesisSearch();
    			//delegate.storeDisplaySettings();
    		}
    	});
    }*/
    return tableSubView;
  }
Ejemplo n.º 2
0
  @Override
  public void editTitle(AnamnesisCheckTitleProxy title, UIObject refObj) {
    //		if (titlePopupView != null && titlePopupView.isShowing()) {
    //			titlePopupView.hide();
    //			titlePopupView = null;
    //		}
    editedTitle = title;
    titlePopupView = new AnamnesisCheckTitlePopupViewImpl(refObj);
    titleEditorDriver = titlePopupView.createEditorDriver();
    titlePopupView.setDelegate(this);
    requests
        .anamnesisCheckTitleRequest()
        .findAnamnesisCheckTitle(title.getId())
        .fire(
            new OSCEReceiver<AnamnesisCheckTitleProxy>() {

              @Override
              public void onSuccess(AnamnesisCheckTitleProxy response) {
                AnamnesisCheckTitleRequest request = requests.anamnesisCheckTitleRequest();
                request.persist().using(response);
                titleEditorDriver.edit(response, request);
                titleEditorDriver.flush();
              }
            });
  }
Ejemplo n.º 3
0
  /**
   * get Fileter Title AnamnesisCheckProxy
   *
   * @return AnamnesisCheckProxy
   */
  private AnamnesisCheckTitleProxy getSelectedFilterTitle() {
    for (AnamnesisCheckTitleProxy title : anamnesisCheckTitles) {
      // Issue # 122 : Replace pull down with autocomplete.
      /*if (view.getFilterTitle().getSelectedIndex() != -1 && getSelectedTitleId().equals(String.valueOf(title.getId()))) {
          return title;
      }
      */
      if (view.getNewFilterTitle().getSelected() != null
          && getSelectedTitleId().equals(String.valueOf(title.getId()))) {
        return title;
      }

      // Issue # 122 : Replace pull down with autocomplete.
    }
    return null;
  }
Ejemplo n.º 4
0
  @SuppressWarnings("deprecation")
  @Override
  public void deleteTitle(final AnamnesisCheckTitleProxy title) {

    deletedTitle = title;

    requests
        .anamnesisCheckTitleRequest()
        .deleteTitleFromSpPortal(deletedTitle.getId())
        .fire(
            new OSCEReceiver<Boolean>() {

              @Override
              public void onSuccess(Boolean response) {
                if (response == null) {
                  showErrorMessageToUser(
                      "System could not delete AnamnesisCheckTitle from SpPortal for id : "
                          + deletedTitle.getId());
                } else {

                  requests
                      .anamnesisCheckTitleRequest()
                      .remove()
                      .using(title)
                      .fire(
                          new OSCEReceiver<Void>() {

                            @Override
                            public void onSuccess(Void response) {

                              removeDataProvider(title);
                              view.filterTitle(null);
                              fireGetAllTitlesRequest(new FilterTitleReceiver());
                              getTitlesBySearchStringAndFilter();
                            }
                          });
                }
              }
            });
  }