List of usage examples for org.apache.wicket.ajax.attributes AjaxRequestAttributes setSubmittingComponentName
public AjaxRequestAttributes setSubmittingComponentName(String submittingComponentName)
From source file:name.martingeisse.wicket.component.stateless.StatelessAjaxFormSubmitBehavior.java
License:Apache License
@Override protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); final Form<?> form = getForm(); attributes.setFormId(form.getMarkupId()); final String formMethod = form.getMarkupAttributes().getString("method"); if (formMethod == null || "POST".equalsIgnoreCase(formMethod)) { attributes.setMethod(Method.POST); }//from w w w . j av a2 s. c om if (form.getRootForm().isMultiPart()) { attributes.setMultipart(true); attributes.setMethod(Method.POST); } if (getComponent() instanceof IFormSubmittingComponent) { final String submittingComponentName = ((IFormSubmittingComponent) getComponent()).getInputName(); attributes.setSubmittingComponentName(submittingComponentName); } }