@UiHandler({"form0", "form1", "form2", "form3", "form4"})
  void onSubmitComplete(SubmitCompleteEvent event) {
    if (submittedForms.contains(event.getSource())) {
      submittedForms.remove(event.getSource());
      statList.get(formList.indexOf(event.getSource())).clearStatus("");
    }

    String results2 = event.getResults();
    String results = Format.stripTags(results2);
    Splittable split = StringQuoter.split(results);
    IPCFileUploadField field = fufList.get(formList.indexOf(event.getSource()));
    if (split.isUndefined("file") || (split.get("file") == null)) {
      field.markInvalid(I18N.ERROR.fileUploadFailed(field.getValue()));
      IplantAnnouncer.getInstance()
          .schedule(new ErrorAnnouncementConfig(I18N.ERROR.fileUploadFailed(field.getValue())));
    } else {
      eventBus.fireEvent(new FileUploadedEvent(uploadDest, field.getValue(), results));
    }

    if (submittedForms.size() == 0) {
      hide();
    }
  }
예제 #2
0
 private String wrappedQueryExcludingTrash(String query) {
   return Format.substitute("{\"bool\":{\"must_not\":[],\"must\":[{0}]}}", query);
 }
예제 #3
0
 private String wrappedNegatedQuery(String query) {
   return Format.substitute("{\"bool\":{\"must_not\":[{0}],\"must\":[]}}", query);
 }
  private void initDestPathLabel() {
    String destPath = uploadDest.getPath();

    htmlDestText.setHTML(Format.ellipse(I18N.DISPLAY.uploadingToFolder(destPath), 80));
    new ToolTip(htmlDestText, new ToolTipConfig(destPath));
  }