예제 #1
0
  /* (non-Javadoc)
   * @see gwtupload.client.Uploader#onFinishUpload()
   */
  @Override
  protected void onFinishUpload() {
    super.onFinishUpload();
    if (getStatus() == Status.REPEATED) {
      getStatusWidget().setError(getI18NConstants().uploaderAlreadyDone());
    }
    getStatusWidget().setStatus(Status.UNINITIALIZED);
    reuse();
    assignNewNameToFileInput();
    for (Widget i : formWidgets) {
      if (i instanceof Hidden) {
        Hidden h = (Hidden) i;
        if (h.getValue().startsWith(fileInputPrefix)) {
          h.setValue(getInputName());
        }
      }
    }

    getFileInput().getWidget().setVisible(true);
    if (button != null) {
      setEnabledButton(true);
      button.removeStyleName("changed");
      if (!autoSubmit) {
        button.setVisible(true);
      }
    }
    if (autoSubmit) {
      getFileInput().setText(i18nStrs.uploaderBrowse());
    }
  }
예제 #2
0
  /*
   * (non-Javadoc)
   * @see monbulk.shared.view.iMenuWidget#setActiveMenu(java.lang.String)
   *
   *
   */
  @Override
  public final void setActiveMenu(String activeItem) {

    int count = this._MenuStack.getRowCount();
    int i = 0;
    //		GWT.log("SetActiveMenu Called" + activeItem + count);
    while (i < count) {
      Hidden tmpItem = (Hidden) this._MenuStack.getWidget(i, 1);
      ///			GWT.log("ItemFound:" + tmpItem.getText() + activeItem + tmpItem.getText().length() +
      // activeItem.length());
      GWT.log("Item collected is: " + tmpItem.getValue());
      if (tmpItem != null) {
        if (tmpItem.getValue().contains(activeItem)
            && tmpItem.getValue().length() == activeItem.length()) {
          _MenuStack.getFlexCellFormatter()
              .getElement(i, 0)
              .setAttribute("style", "font-weight:bold;color:#345484;");
          // _MenuStack.getFlexCellFormatter().getElement(i, 1).setAttribute("style",
          // "padding-left:5px;background-color:#345484;");
          // d	_MenuStack.getFlexCellFormatter().getElement(i, 2).setAttribute("style",
          // "background-color:#345484;");
          GWT.log("ItemFound:" + activeItem);
        } else {
          GWT.log("Item reset is " + tmpItem.getValue());
          _MenuStack.getFlexCellFormatter()
              .getElement(i, 0)
              .setAttribute("style", "font-weight:normal;");
          // _MenuStack.getFlexCellFormatter().getElement(i, 1).setAttribute("style",
          // "padding-left:5px;");
          // _MenuStack.getFlexCellFormatter().getElement(i, 2).setAttribute("style", "");
        }
      }
      // tmpItem.setActive(activeItem);
      i++;
    }
  }