Class OnSubmit
java.lang.Object
com.webfirmframework.wffweb.tag.core.AbstractTagBase
com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute
com.webfirmframework.wffweb.tag.html.attribute.event.AbstractEventAttribute
com.webfirmframework.wffweb.tag.html.attribute.event.form.OnSubmit
- All Implemented Interfaces:
TagBase
,EventAttribute
,AAttributable
,Serializable
,Cloneable
onsubmit
attribute for the element. This attribute is supported
by multiple tags.- Since:
- 2.0.0
- See Also:
-
Constructor Summary
ConstructorDescriptionOnSubmit()
OnSubmit
(boolean preventDefault, ServerAsyncMethod serverAsyncMethod) OnSubmit
(boolean preventDefault, ServerAsyncMethod serverAsyncMethod, Object serverSideData) OnSubmit
(boolean preventDefault, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody) OnSubmit
(boolean preventDefault, String jsPreFunctionBody, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody) OnSubmit
(boolean preventDefault, String jsPreFunctionBody, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody, Object serverSideData) OnSubmit
(ServerAsyncMethod serverAsyncMethod) OnSubmit
(ServerAsyncMethod serverAsyncMethod, Object serverSideData) OnSubmit
(String jsPreFunctionBody, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody) OnSubmit
(String jsPreFunctionBody, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody, Object serverSideData) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
init()
invokes only once per objectboolean
This is applicable for some special attributes like OnSubmit.void
setPreventDefault
(boolean preventDefault) true to call event.preventDefault(); on event, it will prevent form submission to action url if it is added on form.Methods inherited from class com.webfirmframework.wffweb.tag.html.attribute.event.AbstractEventAttribute
getJsFilterFunctionBody, getJsPostFunctionBody, getJsPreFunctionBody, getServerAsyncMethod, getServerSideData, getValue, setAttributeName, setJsFilterFunctionBody, setJsPostFunctionBody, setJsPreFunctionBody, setPreIndexedAttribute, setServerAsyncMethod, setServerAsyncMethod, setServerAsyncMethod, setServerAsyncMethod, setServerSideData, setValue
Methods inherited from class com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute
addAllToAttributeValueMap, addAllToAttributeValueSet, addAllToAttributeValueSet, addToAttributeValueMap, addToAttributeValueSet, addValueChangeListener, beforePrintStructure, beforePrintStructureCompressedByIndex, beforeWffPrintStructure, getAttributeName, getAttributeValue, getAttributeValueMap, getAttributeValueSet, getBinaryStructureCompressedByIndex, getBinaryStructureCompressedByIndex, getCharset, getOwnerTag, getOwnerTags, getPrintStructure, getPrintStructure, getReadLocks, getValueChangeListeners, getWffPrintStructure, getWriteLocks, lockAndGetReadLocks, lockAndGetReadLocksWithAttrLock, lockAndGetWriteLocks, lockAndGetWriteLocksWithAttrLock, removeAllFromAttributeValueMap, removeAllFromAttributeValueSet, removeAllFromAttributeValueSet, removeFromAttributeValueMap, removeFromAttributeValueMap, removeFromAttributeValueMapByKeys, removeFromAttributeValueSet, removeValueChangeListener, replaceAllInAttributeValueSet, replaceAllInAttributeValueSet, setAttributeValue, setAttributeValue, setAttributeValueMap, setAttributeValueSet, setCharset, setModified, setModifiedLockless, setOwnerTag, toCompressedBytesByIndex, toCompressedBytesByIndex, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toString, toWffString, unsetOwnerTag
Methods inherited from class com.webfirmframework.wffweb.tag.core.AbstractTagBase
equals, getData, hashCode, isModified, isRebuild, setData, setRebuild
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.webfirmframework.wffweb.tag.core.TagBase
toHtmlString, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toHtmlString, toString
-
Constructor Details
-
OnSubmit
public OnSubmit() -
OnSubmit
- Parameters:
serverAsyncMethod
- This method will invoke at server side with an argumentwffBMObject
. ThewffBMObject
is the representational JavaScript object returned byjsFilterFunctionBody
.
-
OnSubmit
public OnSubmit(String jsPreFunctionBody, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody) - Parameters:
jsPreFunctionBody
- the body part JavaScript function (without function declaration). It must return true/false. This function will invoke at client side beforeserverAsyncMethod
. If the jsPrefunction returns true then onlyserverAsyncMethod
method will invoke (if it is implemented). It has implicit objects likeevent
andsource
which gives the reference of the current tag.
Eg:-if (source.type == 'button') { return true; } return false;
serverAsyncMethod
- This method will invoke at server side with an argumentwffBMObject
. ThewffBMObject
is the representational JavaScript object returned byjsFilterFunctionBody
.jsFilterFunctionBody
- The body part of a JavaScript function (without function declaration). It can return a JavaScript object so that it will be available at server side inserverAsyncMethod
aswffBMObject
parameter. There are implicit objectsevent
andsource
in the scope.
Eg:-var bName = source.name; return {buttonName: bName, author:'wff', dateOfYear: 2014};
jsPostFunctionBody
- The body part of a JavaScript function (without function declaration). ThewffBMObject
returned byserverAsyncMethod
will be available as an implicit objectjsObject
in the scope. There are common implicit objectsevent
andsource
in the scope.
-
OnSubmit
-
OnSubmit
- Parameters:
serverAsyncMethod
- This method will invoke at server side with an argumentwffBMObject
. ThewffBMObject
is the representational JavaScript object returned byjsFilterFunctionBody
.serverSideData
- this data will be available in the Event object of ServerAsyncMethod.asyncMethod method.- Since:
- 3.0.2
-
OnSubmit
public OnSubmit(String jsPreFunctionBody, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody, Object serverSideData) - Parameters:
jsPreFunctionBody
- the body part JavaScript function (without function declaration). It must return true/false. This function will invoke at client side beforeserverAsyncMethod
. If the jsPrefunction returns true then onlyserverAsyncMethod
method will invoke (if it is implemented). It has implicit objects likeevent
andsource
which gives the reference of the current tag.
Eg:-if (source.type == 'button') { return true; } return false;
serverAsyncMethod
- This method will invoke at server side with an argumentwffBMObject
. ThewffBMObject
is the representational JavaScript object returned byjsFilterFunctionBody
.jsFilterFunctionBody
- The body part of a JavaScript function (without function declaration). It can return a JavaScript object so that it will be available at server side inserverAsyncMethod
aswffBMObject
parameter. There are implicit objectsevent
andsource
in the scope.
Eg:-var bName = source.name; return {buttonName: bName, author:'wff', dateOfYear: 2014};
jsPostFunctionBody
- The body part of a JavaScript function (without function declaration). ThewffBMObject
returned byserverAsyncMethod
will be available as an implicit objectjsObject
in the scope. There are common implicit objectsevent
andsource
in the scope.serverSideData
- this data will be available in the Event object of ServerAsyncMethod.asyncMethod method.- Since:
- 3.0.2
-
OnSubmit
- Parameters:
preventDefault
- true to call event.preventDefault(); on eventserverAsyncMethod
- This method will invoke at server side with an argumentwffBMObject
. ThewffBMObject
is the representational JavaScript object returned byjsFilterFunctionBody
.- Since:
- 3.0.15
-
OnSubmit
public OnSubmit(boolean preventDefault, String jsPreFunctionBody, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody) - Parameters:
preventDefault
- true to call event.preventDefault(); on eventjsPreFunctionBody
- the body part JavaScript function (without function declaration). It must return true/false. This function will invoke at client side beforeserverAsyncMethod
. If the jsPrefunction returns true then onlyserverAsyncMethod
method will invoke (if it is implemented). It has implicit objects likeevent
andsource
which gives the reference of the current tag.
Eg:-if (source.type == 'button') { return true; } return false;
serverAsyncMethod
- This method will invoke at server side with an argumentwffBMObject
. ThewffBMObject
is the representational JavaScript object returned byjsFilterFunctionBody
.jsFilterFunctionBody
- The body part of a JavaScript function (without function declaration). It can return a JavaScript object so that it will be available at server side inserverAsyncMethod
aswffBMObject
parameter. There are implicit objectsevent
andsource
in the scope.
Eg:-var bName = source.name; return {buttonName: bName, author:'wff', dateOfYear: 2014};
jsPostFunctionBody
- The body part of a JavaScript function (without function declaration). ThewffBMObject
returned byserverAsyncMethod
will be available as an implicit objectjsObject
in the scope. There are common implicit objectsevent
andsource
in the scope.- Since:
- 3.0.15
-
OnSubmit
public OnSubmit(boolean preventDefault, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody) - Parameters:
preventDefault
- true to call event.preventDefault(); on eventserverAsyncMethod
- This method will invoke at server side with an argumentwffBMObject
. ThewffBMObject
is the representational JavaScript object returned byjsFilterFunctionBody
.jsFilterFunctionBody
- The body part of a JavaScript function (without function declaration). It can return a JavaScript object so that it will be available at server side inserverAsyncMethod
aswffBMObject
parameter. There are implicit objectsevent
andsource
in the scope.
Eg:-var bName = source.name; return {buttonName: bName, author:'wff', dateOfYear: 2014};
jsPostFunctionBody
- The body part of a JavaScript function (without function declaration). ThewffBMObject
returned byserverAsyncMethod
will be available as an implicit objectjsObject
in the scope. There are common implicit objectsevent
andsource
in the scope.- Since:
- 3.0.15
-
OnSubmit
- Parameters:
preventDefault
- true to call event.preventDefault(); on eventserverAsyncMethod
- This method will invoke at server side with an argumentwffBMObject
. ThewffBMObject
is the representational JavaScript object returned byjsFilterFunctionBody
.serverSideData
- this data will be available in the Event object of ServerAsyncMethod.asyncMethod method.- Since:
- 3.0.15
-
OnSubmit
public OnSubmit(boolean preventDefault, String jsPreFunctionBody, ServerAsyncMethod serverAsyncMethod, String jsFilterFunctionBody, String jsPostFunctionBody, Object serverSideData) - Parameters:
preventDefault
- true to call event.preventDefault(); on eventjsPreFunctionBody
- the body part JavaScript function (without function declaration). It must return true/false. This function will invoke at client side beforeserverAsyncMethod
. If the jsPrefunction returns true then onlyserverAsyncMethod
method will invoke (if it is implemented). It has implicit objects likeevent
andsource
which gives the reference of the current tag.
Eg:-if (source.type == 'button') { return true; } return false;
serverAsyncMethod
- This method will invoke at server side with an argumentwffBMObject
. ThewffBMObject
is the representational JavaScript object returned byjsFilterFunctionBody
.jsFilterFunctionBody
- The body part of a JavaScript function (without function declaration). It can return a JavaScript object so that it will be available at server side inserverAsyncMethod
aswffBMObject
parameter. There are implicit objectsevent
andsource
in the scope.
Eg:-var bName = source.name; return {buttonName: bName, author:'wff', dateOfYear: 2014};
jsPostFunctionBody
- The body part of a JavaScript function (without function declaration). ThewffBMObject
returned byserverAsyncMethod
will be available as an implicit objectjsObject
in the scope. There are common implicit objectsevent
andsource
in the scope.serverSideData
- this data will be available in the Event object of ServerAsyncMethod.asyncMethod method.- Since:
- 3.0.15
-
-
Method Details
-
isPreventDefault
public boolean isPreventDefault()Description copied from class:AbstractEventAttribute
This is applicable for some special attributes like OnSubmit.- Overrides:
isPreventDefault
in classAbstractEventAttribute
- Returns:
- true or false. true means to call event.preventDefault() on event otherwise false.
-
setPreventDefault
public void setPreventDefault(boolean preventDefault) true to call event.preventDefault(); on event, it will prevent form submission to action url if it is added on form. It will set only if there isServerAsyncMethod
.- Overrides:
setPreventDefault
in classAbstractEventAttribute
- Parameters:
preventDefault
- true to call event.preventDefault(); on event otherwise false.- Since:
- 3.0.15
-
init
protected void init()invokes only once per object- Overrides:
init
in classAbstractEventAttribute
- Since:
- 2.0.0
-