Example usage for org.apache.wicket.ajax.form AjaxFormSubmitBehavior setDefaultProcessing

List of usage examples for org.apache.wicket.ajax.form AjaxFormSubmitBehavior setDefaultProcessing

Introduction

In this page you can find the example usage for org.apache.wicket.ajax.form AjaxFormSubmitBehavior setDefaultProcessing.

Prototype

public void setDefaultProcessing(boolean defaultProcessing) 

Source Link

Usage

From source file:org.wickedsource.wickedforms.wicket6.components.fields.AbstractInputFieldPanel.java

License:Apache License

@SuppressWarnings({ "unchecked", "rawtypes" })
private void addActions(final FormComponent component) {
    AbstractInputFieldModel model = (AbstractInputFieldModel) this.getWickedFormModel();
    for (final FormActionModel<T> action : (List<FormActionModel<T>>) model.getActions()) {
        AjaxFormSubmitBehavior submitBehavior = new AjaxFormSubmitBehavior("onchange") {
            @Override//from  w  ww .j  av a2 s. co  m
            protected void onSubmit(AjaxRequestTarget target) {
                AbstractInputFieldPanel.this.updateUserInput(this.getForm(), action.getTriggerInputFields());
                List<AbstractFormElementModel> changedModels = action.execute();
                AbstractInputFieldPanel.this.rerenderComponents(target, this.getForm(), changedModels);
            }
        };
        submitBehavior.setDefaultProcessing(false);
        component.add(submitBehavior);
    }
}