Package org.projectforge.web.wicket.components

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


          this.error(getString("plugins.poll.event.error"));
        }
      }
    };
    nextButton.setDefaultFormProcessing(false);
    final SingleButtonPanel nextButtonPanel = new SingleButtonPanel("continueButton", nextButton, getString("next"),
        SingleButtonPanel.DEFAULT_SUBMIT);
    nextButtonPanel.setOutputMarkupId(true);
    form.add(nextButtonPanel);

    entryContainer.add(eventEntries);
    entryContainer.setOutputMarkupId(true);
    form.add(entryContainer);
View Full Code Here


        {
          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

            }
          }
          refresh();
        }
      };
      final SingleButtonPanel addPositionButtonPanel = new SingleButtonPanel(panel.newChildId(), addPositionButton, getString("add"));
      addPositionButtonPanel.setTooltip(getString("fibu.rechnung.tooltip.addPosition"));
      panel.add(addPositionButtonPanel);
    }
  }
View Full Code Here

      accessEditTablePanel.init();
    }
    {
      // Templates
      final FieldsetPanel fs = gridBuilder.newFieldset(getString("access.templates")).suppressLabelForWarning();
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("clear")) {
        @Override
        public final void onSubmit()
        {
          data.clear();
        }
      }, getString("access.templates.clear"), SingleButtonPanel.NORMAL));
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("guest")) {
        @Override
        public final void onSubmit()
        {
          data.guest();
        }
      }, getString("access.templates.guest"), SingleButtonPanel.NORMAL));
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("employee")) {
        @Override
        public final void onSubmit()
        {
          data.employee();
        }
      }, getString("access.templates.employee"), SingleButtonPanel.NORMAL));
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("leader")) {
        @Override
        public final void onSubmit()
        {
          data.leader();
        }
      }, getString("access.templates.leader"), SingleButtonPanel.NORMAL));
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("administrator")) {
        @Override
        public final void onSubmit()
        {
          data.administrator();
        }
View Full Code Here

      // {
      // // Doesn't work with DatePicker (because DatePicker updates the value after onblur event.
      // }
      // });
      fs.add(dependentFormComponents[1] = weekDatePanel);
      fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("calendarWeek")) {
        @Override
        public final void onSubmit()
        {
        }
      }.setDefaultFormProcessing(false), new Model<String>() {
        @Override
        public String getObject()
        {
          if (data.getWeek() != null) {
            return getString("calendar.weekOfYearShortLabel") + " " + DateTimeFormatter.formatWeekOfYear(data.getWeek());
          } else {
            return getString("calendar.weekOfYearShortLabel");
          }
        }

      }, SingleButtonPanel.NORMAL).setTooltip(getString("recalculate")));
      final DivPanel checkBoxDiv = new DivPanel(fs.newChildId(), DivType.BTN_GROUP) {
        /**
         * @see org.apache.wicket.Component#isVisible()
         */
        @Override
        public boolean isVisible()
        {
          return data.hasDeletedEntries();
        }
      };
      fs.add(checkBoxDiv);
      checkBoxDiv.add(new CheckBoxButton(checkBoxDiv.newChildId(), new PropertyModel<Boolean>(this, "showDeletedOnly"),
          getString("onlyDeleted")) {
        /**
         * @see org.projectforge.web.wicket.flowlayout.CheckBoxButton#onSelectionChanged(java.lang.Boolean)
         */
        @Override
        protected void onSelectionChanged(final Boolean newSelection)
        {
          super.onSelectionChanged(newSelection);
          refresh();
        }

        @Override
        protected boolean wantOnSelectionChangedNotifications()
        {
          return true;
        }
      });
      if (isNew() == true) {
        fs.add(new SingleButtonPanel(fs.newChildId(), new Button(SingleButtonPanel.WICKET_ID, new Model<String>("predecessor")) {
          @Override
          public final void onSubmit()
          {
            if (getPredecessor() != null && predecessor.getEntries() != null) {
              final Iterator<HRPlanningEntryDO> it = getData().getEntries().iterator();
              while (it.hasNext() == true) {
                if (it.next().isEmpty() == true) {
                  it.remove();
                }
              }
              for (final HRPlanningEntryDO entry : predecessor.getEntries()) {
                getData().addEntry(entry.newClone());
              }
            }
            predecessor = null;
            refresh();
          }
        }.setDefaultFormProcessing(false), getString("hr.planning.entry.copyFromPredecessor")) {
          /**
           * @see org.apache.wicket.Component#isVisible()
           */
          @Override
          public boolean isVisible()
          {
            return getPredecessor() != null;
          }
        });
      }
    }
    gridBuilder.newGridPanel();
    entriesRepeater = gridBuilder.newRepeatingView();
    refresh();
    if (getBaseDao().hasInsertAccess(getUser()) == true && showDeletedOnly == false) {
      final DivPanel panel = gridBuilder.newGridPanel().getPanel();
      final Button addPositionButton = new Button(SingleButtonPanel.WICKET_ID) {
        @Override
        public final void onSubmit()
        {
          getData().addEntry(new HRPlanningEntryDO());
          refresh();
        }
      };
      final SingleButtonPanel addPositionButtonPanel = new SingleButtonPanel(panel.newChildId(), addPositionButton, getString("add"));
      addPositionButtonPanel.setTooltip(getString("hr.planning.tooltip.addEntry"));
      panel.add(addPositionButtonPanel);
    }
    WicketUtils.addShowDeleteRowQuestionDialog(this, hrPlanningEntryDao);
  }
View Full Code Here

          if (entry.getId() != null) {
            button.add(AttributeModifier.prepend("onclick", "if (showDeleteQuestionDialog() == false) return false;"));
          }
        }
        button.setDefaultFormProcessing(false);
        fs.add(new SingleButtonPanel(fs.newChildId(), button, buttonLabel, classNames) {

        });
      }
      posGridBuilder.newSplitPanel(GridSize.COL50);
      {
View Full Code Here

          parentPage.addError(status.getLocalizedMessage());
        }
      }
    };
    setDefaultButton(loginButton);
    add(new SingleButtonPanel("loginButton", loginButton, getString("login"), SingleButtonPanel.DEFAULT_SUBMIT));
  }
View Full Code Here

        {
          filter.reset();
        }
      };
      resetButton.setDefaultFormProcessing(false);
      final SingleButtonPanel resetButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), resetButton, getString("reset"),
          SingleButtonPanel.RESET);
      actionButtons.add(resetButtonPanel);

      final Button searchButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("search"));
      final SingleButtonPanel sendButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), searchButton, getString("search"),
          SingleButtonPanel.DEFAULT_SUBMIT);
      actionButtons.add(sendButtonPanel);
      setDefaultButton(searchButton);
    }
  }
View Full Code Here

    csrfTokenHandler = new CsrfTokenHandler(form);
    mainSubContainer.add(form);
    form.add(gridContentContainer);
    form.add(buttonBarContainer);
    if (showCancelButton == true) {
      final SingleButtonPanel cancelButton = appendNewAjaxActionButton(new AjaxCallback() {
        @Override
        public void callback(final AjaxRequestTarget target)
        {
          csrfTokenHandler.onSubmit();
          onCancelButtonSubmit(target);
          close(target);
        }
      }, getString("cancel"), SingleButtonPanel.CANCEL);
      cancelButton.getButton().setDefaultFormProcessing(false);
    }
    closeButtonPanel = appendNewAjaxActionButton(new AjaxFormSubmitCallback() {

      @Override
      public void callback(final AjaxRequestTarget target)
View Full Code Here

    return "form";
  }

  public SingleButtonPanel appendNewAjaxActionButton(final AjaxCallback ajaxCallback, final String label, final String... classnames)
  {
    final SingleButtonPanel result = addNewAjaxActionButton(ajaxCallback, label, classnames);
    this.actionButtons.add(result);
    return result;
  }
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.