Package com.google.wave.api

Examples of com.google.wave.api.FormView.replace()


    FormElement distributePoll = formView.getFormElement(DISTRIBUTE_POLL_BUTTON);
   
    boolean isPressed = "clicked".equals(distributePoll.getValue());
    if (isPressed) {
      distributePoll.setValue(distributePoll.getDefaultValue());
      formView.replace(distributePoll);
    }
   
    return isPressed;
  }
}
View Full Code Here


   */
  public void setQuestion(String question) {
    FormView formView = blip.getDocument().getFormView();
    FormElement questionLabel = formView.getFormElement(PREV_QUESTION_LABEL);
    questionLabel.setValue(question);
    formView.replace(questionLabel);
  }

  /**
   * Dynamically updates the list of choices in the preview. In order to do
   * this as the user types, added and removed choices must be detected and
View Full Code Here

    for (int i = 0; i < existingCount; ++i) {
      String choiceLabel = PREV_CHOICE_PREFIX + String.valueOf(i) + PREV_CHOICE_LABEL_SUFFIX;
      FormElement label = formView.getFormElement(choiceLabel);
      if (!choices.get(i).equals(metadata.getChoices().get(i))) {
        label.setValue(choices.get(i));
        formView.replace(label);
      }
    }
   
    // Add new labels.
    if (existingCount < choices.size()) {
View Full Code Here

    FormElement submitPoll = formView.getFormElement(PREV_SUBMIT_POLL_BUTTON);
   
    boolean isPressed = "clicked".equals(submitPoll.getValue());
    if (isPressed) {
      submitPoll.setValue(submitPoll.getDefaultValue());
      formView.replace(submitPoll);
    }
   
    return isPressed;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.