Package org.projectforge.web.wicket.components

Examples of org.projectforge.web.wicket.components.SingleButtonPanel


   * @return
   */
  public SingleButtonPanel insertNewAjaxActionButton(final AjaxCallback ajaxCallback, final int position, final String label,
      final String... classnames)
  {
    final SingleButtonPanel result = addNewAjaxActionButton(ajaxCallback, label, classnames);
    this.actionButtons.add(position, result);
    return result;
  }
View Full Code Here


        if (ajaxCallback instanceof AjaxFormSubmitCallback) {
          ((AjaxFormSubmitCallback) ajaxCallback).onError(target, form);
        }
      }
    };
    final SingleButtonPanel buttonPanel = new SingleButtonPanel(this.actionButtons.newChildId(), button, label, classnames);
    buttonPanel.add(button);
    return buttonPanel;
  }
View Full Code Here

        fs.add(gidNumberField);
        fs.addHelpIcon(gridBuilder.getString("ldap.gidNumber.tooltip"));
        dependentLdapPosixFormComponentsList.add(gidNumberField);
        if (ldapGroupValues.isPosixValuesEmpty() == true) {
          final Button createButton = newCreateButton(dependentLdapPosixFormComponentsList);
          fs.add(new SingleButtonPanel(fs.newChildId(), createButton, gridBuilder.getString("create"), SingleButtonPanel.NORMAL));
          WicketUtils.addTooltip(createButton, gridBuilder.getString("ldap.gidNumber.createDefault.tooltip"));
        }
      }
    }
    if (posixConfigured == true) {
View Full Code Here

  }

  protected SingleButtonPanel addCancelButton(final Button cancelButton)
  {
    cancelButton.setDefaultFormProcessing(false); // No validation of the form.
    final SingleButtonPanel cancelButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cancelButton, getString("cancel"),
        SingleButtonPanel.CANCEL);
    actionButtons.add(cancelButtonPanel);
    return cancelButtonPanel;
  }
View Full Code Here

            AbstractEditForm.this.error(parentPage.translateParams(ex));
          }
        }
      };
      cancelButton.setDefaultFormProcessing(false); // No validation of the
      final SingleButtonPanel cancelButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cancelButton, getString("cancel"),
          SingleButtonPanel.CANCEL);
      actionButtons.add(cancelButtonPanel);
    }
    {
      final Button markAsDeletedButton = new Button("button", new Model<String>("markAsDeleted")) {
        @Override
        public final void onSubmit()
        {
          try {
            parentPage.markAsDeleted();
          } catch (final UserException ex) {
            AbstractEditForm.this.error(parentPage.translateParams(ex));
          }
        }
      };
      markAsDeletedButton.add(AttributeModifier.replace("onclick", "return showDeleteQuestionDialog();"));
      markAsDeletedButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), markAsDeletedButton, getString("markAsDeleted"),
          SingleButtonPanel.DELETE);
      actionButtons.add(markAsDeletedButtonPanel);
    }
    {
      final Button deleteButton = new Button("button", new Model<String>("delete")) {
        @Override
        public final void onSubmit()
        {
          try {
            parentPage.delete();
          } catch (final UserException ex) {
            AbstractEditForm.this.error(parentPage.translateParams(ex));
          }
        }
      };
      deleteButton.add(AttributeModifier.replace("onclick", "return showDeleteQuestionDialog();"));
      deleteButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), deleteButton, getString("delete"), SingleButtonPanel.DELETE);
      deleteButton.setDefaultFormProcessing(false);
      actionButtons.add(deleteButtonPanel);
    }
    {
      final Button resetButton = new Button("button", new Model<String>("reset")) {
        @Override
        public final void onSubmit()
        {
          try {
            parentPage.reset();
          } catch (final UserException ex) {
            AbstractEditForm.this.error(parentPage.translateParams(ex));
          }
        }
      };
      final SingleButtonPanel resetButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), resetButton, getString("reset"),
          SingleButtonPanel.RESET);
      resetButtonPanel.setVisible(false);
      actionButtons.add(resetButtonPanel);
    }
    {
      updateButton = new Button("button", new Model<String>("update")) {
        @Override
        public final void onSubmit()
        {
          try {
            parentPage.update();
          } catch (final UserException ex) {
            AbstractEditForm.this.error(parentPage.translateParams(ex));
          }
        }
      };
      updateButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), updateButton, getString("update"));
      actionButtons.add(updateButtonPanel);
    }
    {
      updateAndNextButton = new Button("button", new Model<String>("updateAndNext")) {
        @Override
        public final void onSubmit()
        {
          try {
            parentPage.updateAndNext();
          } catch (final UserException ex) {
            AbstractEditForm.this.error(parentPage.translateParams(ex));
          }
        }
      };
      updateAndNextButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), updateAndNextButton, getString("updateAndNext"));
      actionButtons.add(updateAndNextButtonPanel);
    }
    {
      createButton = new Button("button", new Model<String>("create")) {
        @Override
        public final void onSubmit()
        {
          try {
            parentPage.create();
          } catch (final UserException ex) {
            AbstractEditForm.this.error(parentPage.translateParams(ex));
          }
        }
      };

      createButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), createButton, getString("create"));
      actionButtons.add(createButtonPanel);
    }
    {
      undeleteButton = new Button("button", new Model<String>("undelete")) {
        @Override
        public final void onSubmit()
        {
          try {
            parentPage.undelete();
          } catch (final UserException ex) {
            AbstractEditForm.this.error(parentPage.translateParams(ex));
          }
        }
      };
      undeleteButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), undeleteButton, getString("undelete"));
      actionButtons.add(undeleteButtonPanel);
    }
    markDefaultButtons();
    updateButtonVisibility();
  }
View Full Code Here

        public final void onSubmit()
        {
          parentPage.cloneData();
        }
      };
      final SingleButtonPanel cloneButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cloneButton, getString("clone")) {
        /**
         * @see org.apache.wicket.Component#isVisible()
         */
        @Override
        public boolean isVisible()
View Full Code Here

        {
          getParentPage().onCancelSubmit();
        }
      };
      cancelButton.setDefaultFormProcessing(false);
      cancelButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cancelButton, getString("cancel"), SingleButtonPanel.CANCEL);
      actionButtons.add(cancelButtonPanel);
    }
    {
      final Button resetButton = new Button("button", new Model<String>("reset")) {
        @Override
        public final void onSubmit()
        {
          getParentPage().onResetSubmit();
        }
      };
      resetButton.setDefaultFormProcessing(false);
      resetButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), resetButton, getString("reset"), SingleButtonPanel.RESET);
      actionButtons.add(resetButtonPanel);
    }
    {
      final Button listViewButton = new Button("button", new Model<String>("listView")) {
        @Override
        public final void onSubmit()
        {
          getParentPage().onListViewSubmit();
        }
      };

      listViewButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), listViewButton, getString("listView"),
          SingleButtonPanel.NORMAL);
      actionButtons.add(listViewButtonPanel);
    }
    {
      final Button searchButton = new Button("button", new Model<String>("search")) {
        @Override
        public final void onSubmit()
        {
          getParentPage().onSearchSubmit();
        }
      };
      searchButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), searchButton, getString("search"),
          SingleButtonPanel.DEFAULT_SUBMIT);
      actionButtons.add(searchButtonPanel);
      setDefaultButton(searchButton);
    }
    setComponentsVisibility();
View Full Code Here

        {
          parentPage.cancel();
        }
      };
      cancelButton.setDefaultFormProcessing(false); // No validation of the form.
      final SingleButtonPanel callButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cancelButton, getString("cancel"),
          SingleButtonPanel.CANCEL);
      actionButtons.add(callButtonPanel);
    }
    {
      final Button sendButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("send")) {
        @Override
        public final void onSubmit()
        {
          parentPage.sendFeedback();
        }
      };
      WicketUtils.addTooltip(sendButton, getString("feedback.send.title"));
      final SingleButtonPanel sendButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), sendButton, getString("send"),
          SingleButtonPanel.DEFAULT_SUBMIT);
      actionButtons.add(sendButtonPanel);
      setDefaultButton(sendButton);
    }
  }
View Full Code Here

        {
          parentPage.cancel();
        }
      };
      cancelButton.setDefaultFormProcessing(false); // No validation of the
      final SingleButtonPanel cancelButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cancelButton, getString("cancel"),
          SingleButtonPanel.CANCEL);
      actionButtons.add(cancelButtonPanel);
    }
    {
      final Button updateAllButton = new Button("button", new Model<String>("updateAll")) {
        @Override
        public final void onSubmit()
        {
          parentPage.updateAll();
        }
      };
      final SingleButtonPanel updateAllButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), updateAllButton,
          getString("updateAll"), SingleButtonPanel.DEFAULT_SUBMIT);
      updateAllButton.add(AttributeModifier.replace("onclick", "return showUpdateQuestionDialog()"));
      actionButtons.add(updateAllButtonPanel);
      setDefaultButton(updateAllButton);
    }
View Full Code Here

      exportFormatChoiceRenderer.addValue(EXPORT_SVG, getString("gantt.export.svg"));
      final DropDownChoice<String> exportFormatChoice = new DropDownChoice<String>(fs.getDropDownChoiceId(), new PropertyModel<String>(
          this, "exportFormat"), exportFormatChoiceRenderer.getValues(), exportFormatChoiceRenderer);
      exportFormatChoice.setNullValid(false);
      fs.add(exportFormatChoice);
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("export")) {
        @Override
        public final void onSubmit()
        {
          parentPage.export(exportFormat);
        }
      }, getString("export"), SingleButtonPanel.NORMAL));
    }
    gridBuilder.newGridPanel();
    {
      final DivPanel panel = gridBuilder.getPanel();
      ganttChartEditTreeTablePanel = new GanttChartEditTreeTablePanel(panel.newChildId(), this, getData());
      panel.add(ganttChartEditTreeTablePanel);
      ganttChartEditTreeTablePanel.init();
      ganttChartEditTreeTablePanel.setOpenNodes(getSettings().getOpenNodes());
      gridBuilder.getPanel().add(imagePanel = new DivPanel(panel.newChildId()));
    }
    {
      // Redraw:
      redrawButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("redraw")) {
        @Override
        public final void onSubmit()
        {
          parentPage.refresh();
        }
      };
      redrawButton.setDefaultFormProcessing(false);
      WicketUtils.addTooltip(redrawButton, getString("gantt.tooltip.returnKeyCallsRedraw"));
      final SingleButtonPanel redrawButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), redrawButton, getString("redraw"),
          SingleButtonPanel.DEFAULT_SUBMIT);
      actionButtons.add(3, redrawButtonPanel);
    }
    if (isNew() == false && data.isDeleted() == false) {
      // Clone:
      final Button cloneButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("clone")) {
        @Override
        public final void onSubmit()
        {
          getData().setId(null);
          this.setVisible(false);
          updateButtonVisibility();
        }
      };
      cloneButton.setDefaultFormProcessing(false);
      final SingleButtonPanel cloneButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cloneButton, getString("clone"),
          SingleButtonPanel.NORMAL);
      actionButtons.add(3, cloneButtonPanel);
    }

    // final SubmitLink addPositionButton = new SubmitLink("addActivity") {
View Full Code Here

TOP

Related Classes of org.projectforge.web.wicket.components.SingleButtonPanel

Copyright © 2018 www.massapicom. 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.