Exemplo n.º 1
0
 @Override
 public void buttonClick(Button.ClickEvent clickEvent) {
   if (clickEvent.getSource() == myOkButton) {
     onOk((T) mySelect.getValue());
   } else {
     onCancel();
   }
 }
Exemplo n.º 2
0
 @SuppressWarnings("serial")
 @Override
 public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
   if (event.getSource() == btnCreate) {
     createCategory();
   } else if (event.getSource() == btnUpdate) {
     ConfirmDialog.show(
         UI.getCurrent(),
         "Confirm update",
         "Are you sure you want to the update the selected category details?",
         "Yes",
         "No",
         new ConfirmDialog.Listener() {
           @Override
           public void onClose(ConfirmDialog dialog) {
             if (dialog.isConfirmed()) {
               updateCategory();
             }
           }
         });
   } else if (event.getSource() == btnDelete) {
     ConfirmDialog.show(
         UI.getCurrent(),
         "Confirm deletion",
         "Are you sure you want to the delete the selected category?",
         "Yes",
         "No",
         new ConfirmDialog.Listener() {
           @Override
           public void onClose(ConfirmDialog dialog) {
             if (dialog.isConfirmed()) {
               deleteCategory();
             }
           }
         });
   }
 }
Exemplo n.º 3
0
 @Override
 public void buttonClick(Button.ClickEvent event) {
   okPressed = event.getSource() == okButton;
   close();
 }