|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.ajax.attributes.AjaxRequestAttributes
public final class AjaxRequestAttributes
Attributes of an Ajax Request.
Nested Class Summary | |
---|---|
static class |
AjaxRequestAttributes.EventPropagation
The JavaScript event propagation type |
static class |
AjaxRequestAttributes.Method
The method to be used when submitting a form |
Field Summary | |
---|---|
static String |
XML_DATA_TYPE
|
Constructor Summary | |
---|---|
AjaxRequestAttributes()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String XML_DATA_TYPE
Constructor Detail |
---|
public AjaxRequestAttributes()
Method Detail |
---|
public CharSequence getChildSelector()
childSelector
public void setChildSelector(CharSequence childSelector)
childSelector
- The selector string that filters the descendantschildSelector
public boolean isMultipart()
Note that for multipart AJAX requests a hidden IFRAME will be used and that can have negative impact on error detection.
true
if the form submit should be multipart, false
otherwisepublic AjaxRequestAttributes setMultipart(boolean multipart)
Note that for multipart AJAX requests a hidden IFRAME will be used and that can have negative impact on error detection.
multipart
-
public AjaxRequestAttributes.Method getMethod()
GET
or POST
.
For a POST
request all URL arguments are submitted as body. This can be useful if
the URL parameters are longer than maximal URL length.
public AjaxRequestAttributes setMethod(AjaxRequestAttributes.Method method)
GET
or POST
.
For a POST
request all URL arguments are submitted as body. This can be useful if
the URL parameters are longer than maximal URL length.
method
- the type of the Ajax request
this
object for chainingpublic Duration getRequestTimeout()
null
in which case the
default request timeout will be used.
null for default timeout. Default: no timeout.
public AjaxRequestAttributes setRequestTimeout(Duration requestTimeout)
null
in which case the
default request timeout will be used.
requestTimeout
-
public List<IAjaxCallListener> getAjaxCallListeners()
IAjaxCallListener
s which will be notified during the the execution
of the Ajax call.public Map<String,Object> getExtraParameters()
getDynamicExtraParameters()
public List<CharSequence> getDynamicExtraParameters()
If there are no multivalued parameters then the function can return a simple JavaScript object. Example:
return { 'param1': document.body.tagName, 'param2': calculateParam2() }
If there are multivalued parameters then an array of objects may be used. Example:
return [ { name: 'param1', value: document.body.tagName }, { name: 'param1', value: calculateSecondValueForParam1() }, { name: 'param2', value: calculateParam2() } ]
getExtraParameters()
public boolean isAllowDefault()
isAllowDefault()
returns false
(which is default value), the link's URL
will not be followed. If the Ajax behavior is attached to a checkbox or a radio button then
the default behavior should be allowed to actually check the box or radio button, i.e. this
method should return true
.
true
if the default event handler should be invoked, false
otherwise.public AjaxRequestAttributes.EventPropagation getEventPropagation()
public AjaxRequestAttributes setAllowDefault(boolean allowDefault)
allowDefault
-
this
object for chainingisAllowDefault()
,
isAllowDefault()
public AjaxRequestAttributes setEventPropagation(AjaxRequestAttributes.EventPropagation eventPropagation)
eventPropagation
- the type of the stop
this
object, for chainingpublic AjaxRequestAttributes setAsynchronous(boolean async)
async
- a flag whether to do asynchronous Ajax call or not
this
object for chainingpublic boolean isAsynchronous()
public AjaxChannel getChannel()
public AjaxRequestAttributes setChannel(AjaxChannel channel)
channel
- the Ajax channel to use. Pass null
to use the default channel with name
0 and queueing type.
this
object for chainingpublic String[] getEventNames()
public AjaxRequestAttributes setEventNames(String... eventNames)
eventNames
- the names of the events which will trigger the Ajax call
this
object for chainingpublic String getFormId()
public AjaxRequestAttributes setFormId(String formId)
formId
- the id of the for that should be submitted
this
object for chainingpublic String getSubmittingComponentName()
public AjaxRequestAttributes setSubmittingComponentName(String submittingComponentName)
submittingComponentName
- the input name of the button/link that submits the form
this
object for chainingpublic boolean isWicketAjaxResponse()
true
.public AjaxRequestAttributes setWicketAjaxResponse(boolean wicketAjaxResponse)
wicketAjaxResponse
- a flag indicating whether the Ajax response should be processed by Wicket (i.e. to
replace components, execute scripts, etc.).
this
object for chainingpublic String getDataType()
public AjaxRequestAttributes setDataType(String dataType)
dataType
- the type of the data in the Ajax response.
this
object for chainingpublic ThrottlingSettings getThrottlingSettings()
public AjaxRequestAttributes setThrottlingSettings(ThrottlingSettings throttlingSettings)
throttlingSettings
- the settings to use when throttling is needed. Pass null
to disable
throttling.
this
object for chainingpublic boolean isSerializeRecursively()
public AjaxRequestAttributes setSerializeRecursively(boolean serializeRecursively)
serializeRecursively
- a flag indicating whether to collect (submit) the name/value pairs for all HTML form elements
children of the HTML element with the JavaScript listener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |