public class JavaScriptWriter extends Object implements Injector
Modifier and Type | Field and Description |
---|---|
protected HttpParameter |
ajaxRequestParam
Javascript ajax request parameter
|
protected String |
ajaxRequestPath
Javascript ajax request parameter
|
protected Duration |
ajaxTimeout
Ajax Timeout
|
static HttpParameter |
DEFAULT_AJAX_REQUEST_PARAM
Default AJAX request parameter name
|
static Duration |
DEFAULT_DURATION
Default duration
|
static HttpParameter |
DEFAULT_SORT_REQUEST_PARAM
Default AJAX request parameter name
|
protected CharSequence |
errorMessage
A subtitle selector
|
protected int |
fceOrder
Function order of name
|
protected String |
formSelector
Form selector
|
protected Duration |
idleDelay
Input idle delay
|
protected CharSequence[] |
inputCssSelectors
Input selectors
|
protected boolean |
isAjax
Ajax support
|
protected boolean |
isSortable
Is the table sortable
|
protected CharSequence |
newLine
New line characters
|
protected boolean |
onLoadSubmit
On load submit request
|
protected HttpParameter |
sortRequestParam
Javascript ajax request parameter
|
protected CharSequence |
subtitleSelector
A subtitle selector
|
protected int |
version
JavaScript version
|
Constructor and Description |
---|
JavaScriptWriter() |
JavaScriptWriter(Duration idleDelay,
HttpParameter ajaxRequestParam,
HttpParameter sortRequestParam,
CharSequence... inputSelectors) |
JavaScriptWriter(CharSequence... inputSelectors) |
Modifier and Type | Method and Description |
---|---|
int |
getFceOrder()
Set a function order name
|
boolean |
isAjax()
Set a function order name
|
JavaScriptWriter |
setAjax(boolean ajax)
Set a function order
|
JavaScriptWriter |
setAjaxRequestPath(String ajaxRequestPath)
Assign an AJAX timeout
|
JavaScriptWriter |
setAjaxTimeout(Duration ajaxTimeout)
Assign an AJAX timeout
|
JavaScriptWriter |
setErrorMessage(CharSequence errorMessage)
Assign an AJAX error message
|
JavaScriptWriter |
setFormSelector(String formSelector) |
JavaScriptWriter |
setNewLine(CharSequence newLine) |
JavaScriptWriter |
setOnLoadSubmit(boolean onLoadSubmit) |
JavaScriptWriter |
setSortable(boolean isSortable)
Assign a Sortable table
|
JavaScriptWriter |
setSortable(int fceOrder)
Set a function order
|
JavaScriptWriter |
setSubtitleSelector(CharSequence subtitleSelector)
Assign a subtitle CSS selector
|
JavaScriptWriter |
setVersion(int version)
Assign an AJAX timeout
|
void |
write(Element parent)
Generate a Javascript
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
charAt, length, subSequence
codePoints, chars, toString
public static final HttpParameter DEFAULT_AJAX_REQUEST_PARAM
public static final HttpParameter DEFAULT_SORT_REQUEST_PARAM
public static final Duration DEFAULT_DURATION
protected final HttpParameter ajaxRequestParam
protected final HttpParameter sortRequestParam
protected final CharSequence[] inputCssSelectors
protected String formSelector
protected boolean onLoadSubmit
protected CharSequence newLine
@Nullable protected CharSequence subtitleSelector
@Nonnull protected CharSequence errorMessage
protected int version
protected String ajaxRequestPath
protected boolean isSortable
protected int fceOrder
protected boolean isAjax
public JavaScriptWriter()
public JavaScriptWriter(@Nonnull CharSequence... inputSelectors)
public JavaScriptWriter(@Nonnull Duration idleDelay, @Nonnull HttpParameter ajaxRequestParam, @Nonnull HttpParameter sortRequestParam, @Nonnull CharSequence... inputSelectors)
public JavaScriptWriter setFormSelector(String formSelector)
public JavaScriptWriter setOnLoadSubmit(boolean onLoadSubmit)
public JavaScriptWriter setNewLine(@Nonnull CharSequence newLine)
public JavaScriptWriter setSubtitleSelector(CharSequence subtitleSelector)
public JavaScriptWriter setErrorMessage(@Nullable CharSequence errorMessage)
public JavaScriptWriter setAjaxTimeout(@Nonnull Duration ajaxTimeout)
public JavaScriptWriter setAjaxRequestPath(@Nonnull String ajaxRequestPath)
public JavaScriptWriter setVersion(int version)
public JavaScriptWriter setSortable(boolean isSortable)
public JavaScriptWriter setSortable(int fceOrder)
public int getFceOrder()
public JavaScriptWriter setAjax(boolean ajax)
public boolean isAjax()
Copyright 2019-2022, Pavel Ponec