List of usage examples for org.apache.wicket.ajax.attributes AjaxRequestAttributes setMethod
public AjaxRequestAttributes setMethod(final Method method)
GET
or POST
. From source file:com.gmail.volodymyrdotsenko.jqxwicket.core.ajax.JQueryAjaxPostBehavior.java
License:Apache License
@Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes.setMethod(Method.POST); if (this.components.length > 0) { StringBuilder serialize = new StringBuilder("var result = [];"); for (FormComponent<?> component : this.components) { serialize.append("result = result.concat(Wicket.Form.serializeElement(Wicket.$('") .append(component.getMarkupId()).append("')));"); }//from ww w . ja v a 2 s . co m serialize.append("return result;"); List<CharSequence> dynamicParameters = attributes.getDynamicExtraParameters(); dynamicParameters.add(serialize); } }
From source file:com.googlecode.wicket.jquery.ui.widget.dialog.ButtonAjaxPostBehavior.java
License:Apache License
/** * The form may intentionally be null// w w w . jav a 2s. c om */ @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); if (this.form != null) { attributes.setMethod(Method.POST); attributes.setFormId(this.form.getMarkupId()); attributes.setMultipart(this.form.isMultiPart()); } }
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); }/* w w w.ja va2s .c o m*/ if (form.getRootForm().isMultiPart()) { attributes.setMultipart(true); attributes.setMethod(Method.POST); } if (getComponent() instanceof IFormSubmittingComponent) { final String submittingComponentName = ((IFormSubmittingComponent) getComponent()).getInputName(); attributes.setSubmittingComponentName(submittingComponentName); } }
From source file:org.apache.openmeetings.web.room.wb.WbPanel.java
License:Apache License
@Override protected void updateWbActionAttributes(AjaxRequestAttributes attributes) { attributes.setMethod(Method.POST); }
From source file:org.efaps.ui.wicket.components.split.AjaxStorePositionBehavior.java
License:Apache License
@Override protected void updateAjaxAttributes(final AjaxRequestAttributes _attributes) { super.updateAjaxAttributes(_attributes); _attributes.setThrottlingSettings(new ThrottlingSettings("storeThrottel", Duration.seconds(2))); _attributes.setMethod(Method.POST); }
From source file:org.wicketstuff.js.ext.ExtMessageBoxCallback.java
License:Apache License
@Override protected void updateAjaxAttributes(final AjaxRequestAttributes attributes) { attributes.setMethod(AjaxRequestAttributes.Method.POST); attributes.getExtraParameters().put(POST_PARAM_BTN, "btn"); attributes.getExtraParameters().put(POST_PARAM_TEXT, "btn"); }
From source file:org.wicketstuff.stateless.behaviors.StatelessAjaxFormSubmitBehavior.java
License:Apache License
@Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); Form<?> form = findForm();/*from w w w. ja va 2 s . com*/ attributes.setFormId(form.getMarkupId()); String formMethod = form.getMarkupAttributes().getString("method"); if (formMethod == null || "POST".equalsIgnoreCase(formMethod)) { attributes.setMethod(Method.POST); } if (form.getRootForm().isMultiPart()) { attributes.setMultipart(true); attributes.setMethod(Method.POST); } attributes.setPreventDefault(true); }
From source file:wicket.contrib.tinymce.InPlaceSaveBehavior.java
License:Open Source License
@Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); attributes.setMethod(AjaxRequestAttributes.Method.POST); attributes.getDynamicExtraParameters().add("return {'" + PARAM_HTMLCONT + "': attrs.ep.content}"); }