Example #1
0
 @UiHandler("newKeywordButton")
 void onNewKeywordButton(ClickEvent event) {
   if (parent.addSynonymToStandard(getText(), newKeywordText.getText())) {
     addSynonymToPanel(newKeywordText.getText());
   } else {
     MaterialToast.fireToast(
         "Error in adding keyword: " + getText() + ": " + newKeywordText.getText());
   }
 }
 @UiHandler("btnClearTxtBox")
 void onClearTxtBox(ClickEvent e) {
   txtBox.clearErrorOrSuccess();
 }
 @UiHandler("btnSuccessTxtBox")
 void onSuccessTxtBox(ClickEvent e) {
   txtBox.setSuccess("This is a success message for text box.");
 }
 @UiHandler("btnErrorTxtBox")
 void onErrorTxtBox(ClickEvent e) {
   txtBox.setError("This is an error message for text box.");
 }
Example #5
0
 void init() {
   newKeywordButton.setText("Add Synonym");
   keywordCloseButton.setText("Close");
   newKeywordText.setText("Synonym");
   newKeywordText.setPlaceholder("synonym");
 }