Package com.jalios.jcms.uicomponent
Class AjaxRefreshButtonDataAttribute
java.lang.Object
com.jalios.jcms.uicomponent.AjaxRefreshButtonDataAttribute
- Since:
- jcms-10.0.7 / JCMS-9734
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DataAttributeprotected Stringprotected Stringprotected intprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddOption(AjaxRefreshButtonDataAttribute.AjaxRefreshOption ajaxRefreshOption) focusElement(String selector) Sets the element to focus after the Ajax refresh.innerTarget(String innerTarget) intersection(Object threshold, Object rootMargin) Shorthand to put optionAjaxRefreshButtonDataAttribute.AjaxRefreshOption.NO_HISTORYnoScroll()Shorthand to put optionAjaxRefreshButtonDataAttribute.AjaxRefreshOption.NO_SCROLLAdds multiple parameters to the Ajax refresh request in a fluent way.timeout(int timeout)
-
Field Details
-
url
-
ajaxRefreshOptions
-
timeout
protected int timeout -
params
-
target
-
innerTarget
-
targetPosition
-
dataAttribute
-
-
Constructor Details
-
AjaxRefreshButtonDataAttribute
public AjaxRefreshButtonDataAttribute()
-
-
Method Details
-
getDataAttributes
-
url
-
addOption
public AjaxRefreshButtonDataAttribute addOption(AjaxRefreshButtonDataAttribute.AjaxRefreshOption ajaxRefreshOption) -
noHistory
Shorthand to put optionAjaxRefreshButtonDataAttribute.AjaxRefreshOption.NO_HISTORY- Returns:
- this
AjaxRefreshButtonDataAttributeinstance (for fluent usage) - Since:
- jcms-11.0.0 / JCMS-11698
-
noScroll
Shorthand to put optionAjaxRefreshButtonDataAttribute.AjaxRefreshOption.NO_SCROLL- Returns:
- this
AjaxRefreshButtonDataAttributeinstance (for fluent usage) - Since:
- jcms-11.0.0 / JCMS-11698
-
timeout
-
params
-
intersection
-
intersection
- Parameters:
threshold- Either a single number or an array of numbers which indicate at what percentage of the target's visibility the observer's callback should be executed.rootMargin- the Margin around the root.- Returns:
- this
AjaxRefreshButtonDataAttributeinstance (for fluent usage) - Since:
- jcms-11.0.0
-
param
- Parameters:
key- the param namevalue- the param value- Returns:
- this
AjaxRefreshButtonDataAttributeinstance (for fluent usage) - Since:
- jcms-11.0.0
-
params
Adds multiple parameters to the Ajax refresh request in a fluent way.This method accepts a variable number of arguments which must be provided as key/value pairs. Each key must be a
String, and each value can be anyObject.Example:
AjaxRefreshButtonDataAttribute attr = new AjaxRefreshButtonDataAttribute() .url("/do/ajax") .params("id", 42, "mode", "edit", "refresh", true);- Parameters:
keyValues- a sequence of key/value pairs where keys areStringand values are arbitraryObject. Must contain an even number of arguments.- Returns:
- this
AjaxRefreshButtonDataAttributeinstance (for fluent usage) - Throws:
IllegalArgumentException- if the number of arguments is odd or if a key is not aString- Since:
- jcms-11.0.0
-
target
-
focusElement
Sets the element to focus after the Ajax refresh.- Parameters:
selector- CSS selector of the element to focus in the refreshed DOM- Returns:
- this
AjaxRefreshButtonDataAttributeinstance (for fluent usage) - Since:
- jcms-11.0.0
-
innerTarget
-