Class TextArea

TextArea

Deprecated. The UI service was deprecated on December 11, 2014. To create user interfaces, use the HTML service instead.

A text box that allows multiple lines of text to be entered.

Here is an example of how to use this widget:

function doGet() {
  var app = UiApp.createApplication();
  var text = app.createTextArea().setName("text");
  var handler = app.createServerHandler("count").addCallbackElement(text);
  app.add(text);
  app.add(app.createButton("Count", handler));
  app.add(app.createLabel("0 characters").setId("label"));
  return app;
}

function count(eventInfo) {
  var app = UiApp.createApplication();
  // Because the text area was named "text" and added as a callback element to the
  // button's click event, we have its value available in eventInfo.parameter.text.
  app.getElementById("label").setText(eventInfo.parameter.text.length + " characters");
  return app;
}

Internally, UiApp widgets are built on top of the Google Web Toolkit, and it can sometimes be helpful to look at the GWT documentation directly. You can find the TextArea documentation here.

Deprecated methods















































다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.