Пример #1
0
  public PresentationObject getPresentationObject(IWContext iwc) {
    if (this._addTextInput) {
      TextInput input = new TextInput(this.displayInputName + "_chooser");
      input.setDisabled(this.disabled);
      input.setId(input.getName());

      if (this._buttonImage != null) {
        this._buttonImage.setMarkupAttribute(
            ICBuilderConstants.CHOOSER_VALUE_VIEWER_ID_ATTRIBUTE, input.getId());
      }

      if (this._inputLength > 0) {
        input.setLength(this._inputLength);
      }

      if (this._style != null) {
        input.setMarkupAttribute("style", this._style);
      }
      if (this.isStyleClassSet) {
        input.setStyleClass(this.styleClassName);
      }

      if (this._stringDisplay != null) {
        input.setValue(this._stringDisplay);
      }

      input.setStyleClass(CoreConstants.BUILDER_PORPERTY_SETTER_STYLE_CLASS);
      return input;
    } else {
      HiddenInput input = new HiddenInput(this.displayInputName);
      if (this._stringDisplay != null) {
        input.setValue(this._stringDisplay);
      }
      return input;
    }
  }