Package org.ujorm.tools.web.ajax
Class JavaScriptWriter
java.lang.Object
org.ujorm.tools.web.ajax.JavaScriptWriter
- All Implemented Interfaces:
CharSequence,Injector
A prototype of ES6 Vanilla Javascript Writer of the Ujorm framework.
- Author:
- Pavel Ponec
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final HttpParameterJavascript ajax request parameterprotected StringJavascript ajax request parameterprotected @NotNull DurationAn AJAX timeout of the input responsestatic final HttpParameterDefault AJAX request parameter namestatic final DurationDefault durationstatic final HttpParameterDefault AJAX request parameter namestatic final DurationDefault timeouprotected @NotNull CharSequenceA subtitle selectorprotected @Nullable CharSequenceAn error message selectorprotected intFunction order of nameprotected StringForm selectorprotected @NotNull DurationAn AJAX delay to the input requestprotected final CharSequence[]Input selectorsprotected booleanAjax supportprotected CharSequenceNew line charactersprotected booleanOn load submit requestprotected final HttpParameterJavascript ajax request parameterprotected intJavaScript version number -
Constructor Summary
ConstructorsConstructorDescriptionJavaScriptWriter(@NotNull CharSequence... inputSelectors) JavaScriptWriter(@NotNull Duration idleDelay, @NotNull HttpParameter ajaxRequestParam, @NotNull HttpParameter sortRequestParam, @NotNull CharSequence... inputSelectors) -
Method Summary
Modifier and TypeMethodDescriptionintSet a function order namebooleanisAjax()Set a function order nameprotected StringsetAjax(boolean ajax) Set a function ordersetAjaxRequestPath(@NotNull String ajaxRequestPath) Assign an AJAX timeoutsetAjaxTimeout(@NotNull Duration ajaxTimeout) An AJAX timeout to get a responsesetErrorMessage(@Nullable CharSequence errorMessage) Assign an AJAX error messagesetFormSelector(String formSelector) setIdleDelay(@NotNull Duration idleDelay) An AJAX delay to the input requestsetNewLine(@NotNull CharSequence newLine) setOnLoadSubmit(boolean onLoadSubmit) setSortable(int fceOrder) Set a function ordersetSubtitleSelector(CharSequence errorSelector) Assign error message CSS selectorsetVersion(int version) Assign an AJAX timeoutvoidPerforms this operation on the given argument.voidWrite Javascript body for the AJAX support.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.CharSequence
codePoints, chars, isEmpty, toStringMethods inherited from interface org.ujorm.tools.web.ao.Injector
charAt, length, subSequence
-
Field Details
-
DEFAULT_AJAX_REQUEST_PARAM
Default AJAX request parameter name -
DEFAULT_SORT_REQUEST_PARAM
Default AJAX request parameter name -
DEFAULT_DELAY
Default duration -
DEFAULT_TIMEOUT
Default timeou -
ajaxRequestParam
Javascript ajax request parameter -
sortRequestParam
Javascript ajax request parameter -
inputCssSelectors
Input selectors -
idleDelay
An AJAX delay to the input request -
ajaxTimeout
An AJAX timeout of the input response -
formCssSelector
Form selector -
onLoadSubmit
protected boolean onLoadSubmitOn load submit request -
newLine
New line characters -
errorSelector
An error message selector -
errorMessage
A subtitle selector -
version
protected int versionJavaScript version number -
ajaxRequestPath
Javascript ajax request parameter -
fceOrder
protected int fceOrderFunction order of name -
isAjax
protected boolean isAjaxAjax support
-
-
Constructor Details
-
JavaScriptWriter
public JavaScriptWriter() -
JavaScriptWriter
-
JavaScriptWriter
public JavaScriptWriter(@NotNull @NotNull Duration idleDelay, @NotNull @NotNull HttpParameter ajaxRequestParam, @NotNull @NotNull HttpParameter sortRequestParam, @NotNull @NotNull CharSequence... inputSelectors)
-
-
Method Details
-
setFormSelector
-
setOnLoadSubmit
-
setNewLine
-
setSubtitleSelector
Assign error message CSS selector -
setErrorMessage
Assign an AJAX error message -
setAjaxTimeout
An AJAX timeout to get a response -
setIdleDelay
An AJAX delay to the input request -
setAjaxRequestPath
Assign an AJAX timeout -
setVersion
Assign an AJAX timeout -
setSortable
Set a function order -
getFceOrder
public int getFceOrder()Set a function order name -
setAjax
Set a function order -
isAjax
public boolean isAjax()Set a function order name -
write
Description copied from interface:InjectorPerforms this operation on the given argument. -
scriptTemplate
-
write
Write Javascript body for the AJAX support.
-