Package org.projectforge.web.wicket

Examples of org.projectforge.web.wicket.AbstractSecuredPage


    }
  }

  private void addBookmarkDialog()
  {
    final AbstractSecuredPage parentPage = (AbstractSecuredPage) getPage();
    bookmarkDialog = new BookmarkDialog(parentPage.newModalDialogId());
    bookmarkDialog.setOutputMarkupId(true);
    parentPage.add(bookmarkDialog);
    bookmarkDialog.init();
  }
View Full Code Here


    }

    private BookmarkDialog redraw()
    {
      clearContent();
      final AbstractSecuredPage page = (AbstractSecuredPage) NavTopPanel.this.getPage();
      {
        final FieldsetPanel fs = gridBuilder.newFieldset(getString("bookmark.directPageLink")).setLabelSide(false);
        final TextArea<String> textArea = new TextArea<String>(fs.getTextAreaId(), new Model<String>(page.getPageAsLink()));
        fs.add(textArea);
        textArea.add(AttributeModifier.replace("onClick", "$(this).select();"));
      }
      final PageParameters params = page.getBookmarkableInitialParameters();
      if (params.isEmpty() == false) {
        final FieldsetPanel fs = gridBuilder.newFieldset(getString(page.getTitleKey4BookmarkableInitialParameters())).setLabelSide(false);
        final TextArea<String> textArea = new TextArea<String>(fs.getTextAreaId(), new Model<String>(page.getPageAsLink(params)));
        fs.add(textArea);
        textArea.add(AttributeModifier.replace("onClick", "$(this).select();"));
      }
      return this;
    }
View Full Code Here

   */
  @Override
  protected void onInitialize()
  {
    super.onInitialize();
    final AbstractSecuredPage parentPage = (AbstractSecuredPage) getPage();
    recurrenceChangeDialog = new RecurrenceChangeDialog(parentPage.newModalDialogId(), new ResourceModel(
        "plugins.teamcal.event.recurrence.change.title"));
    parentPage.add(recurrenceChangeDialog);
    recurrenceChangeDialog.init();
  }
View Full Code Here

  public Menu getMenu()
  {
    if (menu != null) {
      return menu;
    }
    AbstractSecuredPage securedPage = null;
    if (getPage() instanceof AbstractSecuredPage) {
      securedPage = ((AbstractSecuredPage) getPage());
      menu = (Menu) securedPage.getUserPrefEntry(USER_PREF_MENU_KEY);
      if (menu != null) {
        return menu;
      }
    }
    if (log.isDebugEnabled() == true) {
      log.debug("Build new menu.");
    }
    menu = menuBuilder.getMenu(PFUserContext.getUser());
    if (securedPage != null) {
      securedPage.putUserPrefEntry(USER_PREF_MENU_KEY, menu, false);
    }
    return menu;
  }
View Full Code Here

  @Override
  protected void onInitialize()
  {
    super.onInitialize();
    if (showModalDialog == true && getPage() != null && getPage() instanceof AbstractSecuredPage) {
      final AbstractSecuredPage parentPage = (AbstractSecuredPage) getPage();
      modalDialog = new ModalDialog(parentPage.newModalDialogId()) {
        @Override
        public void init()
        {
          setTitle(getString("changes"));
          init(new Form<String>(getFormId()));
          {
            final FieldsetPanel fs = gridBuilder.newFieldset(getString("history.oldValue")).setLabelSide(false);
            final TextArea<String> textArea = new TextArea<String>(fs.getTextAreaId(), oldText);
            fs.add(textArea).setAutogrow(1, 10);
            textArea.add(AttributeModifier.replace("onClick", "$(this).select();"));
          }
          {
            final FieldsetPanel fs = gridBuilder.newFieldset(getString("history.newValue")).setLabelSide(false);
            final TextArea<String> textArea = new TextArea<String>(fs.getTextAreaId(), newText);
            fs.add(textArea).setAutogrow(1, 10);
            textArea.add(AttributeModifier.replace("onClick", "$(this).select();"));
          }
        }
      };
      modalDialog.setBigWindow();
      modalDialog.setLazyBinding();
      parentPage.add(modalDialog);
      final AjaxEventBehavior behavior = new AjaxEventBehavior("onClick") {
        @Override
        protected void onEvent(final AjaxRequestTarget target)
        {
          if (modalDialog.isBound() == false) {
View Full Code Here

      }
    });
    this.removeFileSelection.setOutputMarkupPlaceholderTag(true);
    if (fs != null) {
      fs.add(this);
      final AbstractSecuredPage parentPage = (AbstractSecuredPage) getPage();
      deleteExistingFileDialog = new ModalQuestionDialog(parentPage.newModalDialogId(), new ResourceModel(
          "file.panel.deleteExistingFile.heading"), new ResourceModel("file.panel.deleteExistingFile.question")) {
        /**
         * @see org.projectforge.web.dialog.ModalQuestionDialog#onCloseButtonSubmit(org.apache.wicket.ajax.AjaxRequestTarget)
         */
        @Override
        protected boolean onCloseButtonSubmit(final AjaxRequestTarget target)
        {
          super.onCloseButtonSubmit(target);
          if (isConfirmed() == true) {
            file.setObject(null);
            filename.setObject(null);
            main.setVisible(true);
            if (textLinkPanel != null) {
              textLinkPanel.getLabel().modelChanged();
              target.add(textLinkPanel.getLink());
            }
            target.add(deleteFileButton.getButton(), main, removeFileSelection);
          }
          return true;
        }
      };
      parentPage.add(deleteExistingFileDialog);
      deleteExistingFileDialog.init();
      // fs.add(new UploadProgressBar("progress", form, this.fileUploadField));
    }
  }
View Full Code Here

TOP

Related Classes of org.projectforge.web.wicket.AbstractSecuredPage

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.