當前位置: 首頁>>代碼示例>>Java>>正文


Java Button.setDefaultFormProcessing方法代碼示例

本文整理匯總了Java中org.apache.wicket.markup.html.form.Button.setDefaultFormProcessing方法的典型用法代碼示例。如果您正苦於以下問題:Java Button.setDefaultFormProcessing方法的具體用法?Java Button.setDefaultFormProcessing怎麽用?Java Button.setDefaultFormProcessing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.wicket.markup.html.form.Button的用法示例。


在下文中一共展示了Button.setDefaultFormProcessing方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initExcluirButton

import org.apache.wicket.markup.html.form.Button; //導入方法依賴的package包/類
/**
 * Exclui um artigo
 */
private void initExcluirButton() {
	Button btn = new Button("excluir") {
		@Override
		public void onSubmit() {
			try {
				WikiLegisServiceUtil.excluiArtigo(EdicaoArtigoPage.this.getModelObject().getArtigoId());
			} catch (Exception e) {
				LOG.error("Erro ao excluir artigo", e);
			}
			setResponsePage(HomePage.class);
			setRedirect(true);
		}
	};
	btn.setDefaultFormProcessing(false);
	form.add(btn);
}
 
開發者ID:camaradosdeputadosoficial,項目名稱:edemocracia,代碼行數:20,代碼來源:EdicaoArtigoPage.java

示例2: UploadForm

import org.apache.wicket.markup.html.form.Button; //導入方法依賴的package包/類
public UploadForm(String id) {
            super(id);

            setMultiPart(true);
            setMaxSize(Bytes.megabytes(2));

            fileUploadField = new FileUploadField("upload");
            add(fileUploadField);

            add(new Button("continuebutton"));

            Button cancel = new Button("cancelbutton"){
                public void onSubmit() {
//                    info("Cancel was pressed!");
                    setResponsePage(new GradebookPage());
                }
            };
            cancel.setDefaultFormProcessing(false);
            add(cancel);
        }
 
開發者ID:steveswinsburg,項目名稱:gradebookNG,代碼行數:21,代碼來源:GradeImportUploadStep.java

示例3: initVoltar

import org.apache.wicket.markup.html.form.Button; //導入方法依賴的package包/類
private void initVoltar() {
	voltar = new Button("voltar") {
		@Override
		public void onSubmit() {
			getRequestCycle().setRequestTarget(
					new RedirectRequestTarget(viewUrl));
		}
	};
	voltar.setDefaultFormProcessing(false);
	form.add(voltar);
}
 
開發者ID:camaradosdeputadosoficial,項目名稱:edemocracia,代碼行數:12,代碼來源:EditPage.java

示例4: addCancelButton

import org.apache.wicket.markup.html.form.Button; //導入方法依賴的package包/類
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;
}
 
開發者ID:micromata,項目名稱:projectforge-webapp,代碼行數:9,代碼來源:AbstractStandardForm.java

示例5: onInitialize

import org.apache.wicket.markup.html.form.Button; //導入方法依賴的package包/類
@Override
public void onInitialize() {
	super.onInitialize();
	
	//get settings data
	GradebookInformation settings = this.businessService.getGradebookSettings();
	
	//setup page model
	GbSettings gbSettings = new GbSettings(settings);
       CompoundPropertyModel<GbSettings> formModel = new CompoundPropertyModel<GbSettings>(gbSettings);
		
	//form
	Form<GbSettings> form = new Form<GbSettings>("form", formModel) {
		private static final long serialVersionUID = 1L;

		@Override
		public void onSubmit() {
			
			GbSettings model = (GbSettings) this.getModelObject();
			
			System.out.println("settings: " + model.getGradebookInformation());
			
			//update settings
			businessService.updateGradebookSettings(model.getGradebookInformation());
			
			//TODO update the grading schema values (pull from model object also);
			
			
			getSession().info(getString("settingspage.update.success"));
			setResponsePage(new SettingsPage());
			
		}
	};
	
	//cancel button
	Button cancel = new Button("cancel") {
		private static final long serialVersionUID = 1L;
		@Override
		public void onSubmit() {
			setResponsePage(new GradebookPage());
		}
	};
	cancel.setDefaultFormProcessing(false);
       form.add(cancel);
	
	//panels
	form.add(new SettingsGradeEntryPanel("gradeEntryPanel", formModel));
	form.add(new SettingsGradeReleasePanel("gradeReleasePanel", formModel));
	form.add(new SettingsCategoryPanel("categoryPanel", formModel));
	form.add(new SettingsGradingSchemaPanel("gradingSchemaPanel", formModel));
	
	add(form);
	
}
 
開發者ID:steveswinsburg,項目名稱:gradebookNG,代碼行數:55,代碼來源:SettingsPage.java

示例6: createGroupComponents

import org.apache.wicket.markup.html.form.Button; //導入方法依賴的package包/類
@SuppressWarnings("serial")
private void createGroupComponents(final int number, final String key)
{
  gridBuilder.newGridPanel();
  final DivPanel section = gridBuilder.getPanel();
  section.add(new Heading3Panel(section.newChildId(), String.valueOf(number) + ". " + getString("task.wizard." + key)));
  section.add(new DivTextPanel(section.newChildId(), getString("task.wizard." + key + ".intro")));
  {
    final FieldsetPanel fs = gridBuilder.newFieldset(getString("group")).suppressLabelForWarning();
    final NewGroupSelectPanel groupSelectPanel = new NewGroupSelectPanel(fs.newChildId(), new PropertyModel<GroupDO>(this, key), parentPage,
        key + "Id");
    fs.add(groupSelectPanel);
    groupSelectPanel.setShowFavorites(false).init();
    final Button createGroupButton = new Button("button", new Model<String>("createGroup" + key)) {
      @Override
      public final void onSubmit()
      {
        parentPage.managerGroupCreated = "managerGroup".equals(key);
        final PageParameters params = new PageParameters();
        final StringBuffer buf = new StringBuffer();
        if (task != null) {
          buf.append(task.getTitle());
        }
        if (parentPage.managerGroupCreated == true) {
          if (task != null) {
            buf.append("-");
          }
          buf.append(getString("task.wizard.managerGroup.groupNameSuffix"));
        }
        params.add(GroupEditPage.PARAM_GROUP_NAME, buf.toString());
        final GroupEditPage editPage = new GroupEditPage(params);
        editPage.setReturnToPage(parentPage);
        setResponsePage(editPage);
      }

      @Override
      public boolean isVisible()
      {
        return task != null;
      }
    };
    createGroupButton.setDefaultFormProcessing(false);
    final SingleButtonPanel createGroupButtonPanel = new SingleButtonPanel(fs.newChildId(), createGroupButton,
        getString("task.wizard.button.createGroup"), SingleButtonPanel.NORMAL);
    WicketUtils.addTooltip(createGroupButton, getString("task.wizard.button.createGroup.tooltip"));
    fs.add(createGroupButtonPanel);
  }
}
 
開發者ID:micromata,項目名稱:projectforge-webapp,代碼行數:49,代碼來源:TaskWizardForm.java

示例7: init

import org.apache.wicket.markup.html.form.Button; //導入方法依賴的package包/類
@Override
@SuppressWarnings("serial")
protected void init()
{
  super.init();
  FieldsetPanel fs = gridBuilder.newFieldset(getString("address.sendSms.phoneNumber"));
  final PFAutoCompleteTextField<String> numberTextField = new PFAutoCompleteTextField<String>(InputPanel.WICKET_ID,
      new PropertyModel<String>(data, "phoneNumber")) {
    @Override
    protected List<String> getChoices(final String input)
    {
      final AddressFilter addressFilter = new AddressFilter();
      addressFilter.setSearchString(input);
      final List<String> list = new ArrayList<String>();
      for (final AddressDO address : addressDao.getList(addressFilter)) {
        buildAutocompleteEntry(list, address, address.getMobilePhone());
        buildAutocompleteEntry(list, address, address.getPrivateMobilePhone());
      }
      return list;
    }

    @Override
    protected List<String> getFavorites()
    {
      return getRecentSearchTermsQueue().getRecents();
    }
  };
  numberTextField.withMatchContains(true).withMinChars(2).withFocus(true);
  numberTextField.setRequired(true);
  fs.add(numberTextField);
  data.setMessage(getInitalMessageText());
  fs = gridBuilder.newFieldset(getString("address.sendSms.message"));
  final MaxLengthTextArea messageTextArea = new MaxLengthTextArea(TextAreaPanel.WICKET_ID, new PropertyModel<String>(data, "message"),
      MAX_MESSAGE_LENGTH);
  // messageTextArea.add(AttributeModifier.append("onKeyDown", "limitText(this.form.limitedtextarea,this.form.countdown,"
  // + MAX_MESSAGE_LENGTH
  // + ")"));
  // messageTextArea.add(AttributeModifier.append("onKeyUp", "limitText(this.form.limitedtextarea,this.form.countdown,"
  // + MAX_MESSAGE_LENGTH
  // + ")"));
  messageTextArea.add(AttributeModifier.append("maxlength", MAX_MESSAGE_LENGTH));
  fs.add(messageTextArea);
  fs = gridBuilder.newFieldset("");
  final DivTextPanel charsRemaining = new DivTextPanel(fs.newChildId(), "");
  charsRemaining.setMarkupId("charsRemaining");
  fs.add(charsRemaining);

  {
    final Button resetButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("reset")) {
      @Override
      public final void onSubmit()
      {
        data.setMessage(getInitalMessageText());
        data.setPhoneNumber("");
        numberTextField.modelChanged();
        messageTextArea.modelChanged();
      }
    };
    resetButton.setDefaultFormProcessing(false);
    final SingleButtonPanel resetButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), resetButton, getString("reset"),
        SingleButtonPanel.RESET);
    actionButtons.add(resetButtonPanel);

    final Button sendButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("send")) {
      @Override
      public final void onSubmit()
      {
        parentPage.send();
      }
    };
    sendButton.add(AttributeModifier.replace("onclick", "return showSendQuestionDialog();"));
    final SingleButtonPanel sendButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), sendButton, getString("send"),
        SingleButtonPanel.DEFAULT_SUBMIT);
    actionButtons.add(sendButtonPanel);
    setDefaultButton(sendButton);
  }
}
 
開發者ID:micromata,項目名稱:projectforge-webapp,代碼行數:78,代碼來源:SendSmsForm.java

示例8: init

import org.apache.wicket.markup.html.form.Button; //導入方法依賴的package包/類
@SuppressWarnings("serial")
@Override
protected void init()
{
  super.init();
  feedbackPanel = new FeedbackPanel("feedback");
  feedbackPanel.setOutputMarkupId(true);
  add(feedbackPanel);

  gridBuilder = newGridBuilder(this, "flowform");

  actionButtons = new MyComponentsRepeater<SingleButtonPanel>("buttons");
  add(actionButtons.getRepeatingView());
  {
    final Button cancelButton = new Button("button", new Model<String>("cancel")) {
      @Override
      public final void onSubmit()
      {
        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);
  }
}
 
開發者ID:micromata,項目名稱:projectforge-webapp,代碼行數:42,代碼來源:AbstractMassEditForm.java


注:本文中的org.apache.wicket.markup.html.form.Button.setDefaultFormProcessing方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。