org.apache.wicket.markup.html.form.Button.setDefaultFormProcessing()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(139)

本文整理了Java中org.apache.wicket.markup.html.form.Button.setDefaultFormProcessing()方法的一些代码示例,展示了Button.setDefaultFormProcessing()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setDefaultFormProcessing()方法的具体详情如下:
包路径:org.apache.wicket.markup.html.form.Button
类名称:Button
方法名:setDefaultFormProcessing

Button.setDefaultFormProcessing介绍

[英]Sets the defaultFormProcessing property. When false (default is true), all validation and form updating is bypassed and the onSubmit method of that button is called directly, and the onSubmit method of the parent form is not called. A common use for this is to create a cancel button.
[中]设置defaultFormProcessing属性。如果为false(默认值为true),则绕过所有验证和表单更新,并直接调用该按钮的onSubmit方法,而不调用父表单的onSubmit方法。这通常用于创建“取消”按钮。

代码示例

代码示例来源:origin: micromata/projectforge

/**
 * @param defaultFormProcessing
 * @return this for chaining.
 * @see Button#setDefaultFormProcessing(boolean)
 */
public IconButtonPanel setDefaultFormProcessing(final boolean defaultFormProcessing)
{
 button.setDefaultFormProcessing(defaultFormProcessing);
 return this;
}

代码示例来源:origin: MarcGiffing/wicket-spring-boot

private Component cancelButton() {
  Button cancelButton = new Button("cancel"){
    @Override
    public void onSubmit() {
      if(pageReferenceId != null){
        setResponsePage(new PageReference(pageReferenceId).getPage());
      } else {
        setResponsePage(CustomerListPage.class);
      }
    }
    
  };
  cancelButton.setDefaultFormProcessing(false);
  return cancelButton;
}

代码示例来源:origin: org.onehippo.jcr.console/hippo-jcr-console-api

@Override
protected Button decorate(Button b) {
  b.setDefaultFormProcessing(false);
  return super.decorate(b);
}

代码示例来源:origin: MarcGiffing/wicket-spring-boot

private Button cancelButton() {
  Button cancelButton = new Button("cancel") {
    @Override
    public void onSubmit() {
      customerFilterModel.setObject(new CustomerFilter());
      getForm().clearInput();
      filterForm.clearInput();
    }
  };
  cancelButton.setDefaultFormProcessing(false);
  return cancelButton;
}

代码示例来源:origin: stackoverflow.com

Button cancel = new CancelButton();
 cancel.setDefaultFormProcessing(false);

代码示例来源:origin: apache/wicket

/**
 * Constructor
 *
 * @param id
 *            component id
 * @param goModel
 *            model for the label of the 'go' button
 * @param clearModel
 *            model for the label of the 'clear' button
 * @param originalState
 *            the object to use as original state
 */
public GoAndClearFilter(final String id, final IModel<String> goModel,
    final IModel<String> clearModel, Object originalState)
{
  super(id, goModel);
  this.originalState = originalState;
  clear = new Button("clear", clearModel)
  {
    private static final long serialVersionUID = 1L;
    @Override
    public void onSubmit()
    {
      onClearSubmit(this);
    }
  };
  clear.setDefaultFormProcessing(true);
  add(clear);
}

代码示例来源:origin: org.jabylon/rest.ui

protected Component createDeleteAction(final IModel<Project> model) {
  Button button = new DeleteAction("delete", model, nls("WorkspaceConfigSection.delete.action.confirmation",model.getObject().getName()));
  button.setDefaultFormProcessing(false);
  return button;
}

代码示例来源:origin: org.jabylon/rest.ui

protected Component createDeleteAction(ProgressPanel progressPanel, final IModel<ProjectVersion> model) {
  Button button = new DeleteAction("delete", model, nls("ProjectVersionsConfigSection.delete.action.confirmation", model.getObject().getName()));
  button.setDefaultFormProcessing(false);
  return button;
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

@Override
  protected Button decorate(final Button button) {
    button.add(new AjaxEventBehavior("onclick") {
      @Override
      protected void onComponentTag(final ComponentTag tag) {
        super.onComponentTag(tag);
        tag.put("type", "button");
      }
      @Override
      protected void onEvent(final AjaxRequestTarget target) {
        onSubmit();
      }
    });
    button.setDefaultFormProcessing(false);
    return super.decorate(button);
  }
};

代码示例来源:origin: micromata/projectforge

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;
}

代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service

/**
 * Constructor
 * 
 * @param id
 *            component id
 * @param form
 *            filter form of the filter toolbar
 * @param goModel
 *            model for the label of the 'go' button
 * @param clearModel
 *            model for the label of the 'clear' button
 */
public GoAndClearFilter(String id, FilterForm<?> form, IModel<String> goModel,
  IModel<String> clearModel)
{
  super(id, goModel);
  originalState = Objects.cloneModel(form.getDefaultModelObject());
  clear = new Button("clear", clearModel)
  {
    private static final long serialVersionUID = 1L;
    @Override
    public void onSubmit()
    {
      onClearSubmit(this);
    }
  };
  clear.setDefaultFormProcessing(true);
  add(clear);
}

代码示例来源:origin: org.opensingular/singular-form-wicket

clearButton.setDefaultFormProcessing(false);
currentLocationButton.setDefaultFormProcessing(false);

代码示例来源:origin: org.jabylon/updatecenter

button.setDefaultFormProcessing(false);
button.add(new AttributeModifier("value", resource.getBundleId()));
button.add(new AttributeModifier("class", "btn btn-small"));

代码示例来源:origin: micromata/projectforge

cancelButton.setDefaultFormProcessing(false); // No validation of the
final SingleButtonPanel cancelButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cancelButton, getString("cancel"),
  SingleButtonPanel.CANCEL);

代码示例来源:origin: micromata/projectforge

cancelButton.setDefaultFormProcessing(false);
final SingleButtonPanel cancelButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cancelButton, getString("cancel"),
  SingleButtonPanel.CANCEL);

代码示例来源:origin: micromata/projectforge

cancelButton.getButton().setDefaultFormProcessing(false);

代码示例来源:origin: micromata/projectforge

resetButton.setDefaultFormProcessing(false);
final SingleButtonPanel resetButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), resetButton,
  getString("reset"),

代码示例来源:origin: micromata/projectforge

cancelButton.setDefaultFormProcessing(false);
final SingleButtonPanel cancelButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cancelButton, getString("cancel"),
  SingleButtonPanel.CANCEL);

代码示例来源:origin: micromata/projectforge

cancelButton.setDefaultFormProcessing(false); // No validation of the form.
final SingleButtonPanel callButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), cancelButton,
  getString("cancel"),

代码示例来源:origin: org.geoserver.web/gs-web-core

cancel.setDefaultFormProcessing(false);

相关文章