public class MTAjaxObserveField extends AjaxDynamicElement
Name | Description |
---|---|
id | the ID of the observe field container (only useful if you leave off observeFieldID). |
elementName | element to use for the observe field container. Defaults to div .
(Only used if you leave off observeFieldID) |
observeFieldID | the ID of the field to observe |
updateContainerID | the ID of the container to update. Specify "_parent" to use the nearest one. |
action | the action to call when the observer fires |
onBeforeSubmit | called prior to submitting the observed content; return false to deny the submit |
observeFieldFrequency | the polling observe frequency (in seconds) |
observeDelay | the minimum time between submits (in seconds) |
fullSubmit | When false, only the value of the field that changed is sent to the server (partial submit), when true, the whole form is sent. Defaults to false. Caution: Partial submit doesn't work correctly if you manually set the name on your inputs. |
class | CSS class to use on the container. (Only used if you leave off observeFieldID) |
style | CSS style to use on the container. (Only used if you leave off observeFieldID) |
onCreate | Takes a JavaScript function which is called after the form has been serialized, but befor the Ajax request is sent to the server. Useful e.g. if you want to disable the form while the ajax request is running. |
ERXDynamicElement.ContextData<T>
log
_children
_ConstructorParameters
Constructor and Description |
---|
MTAjaxObserveField(String name,
NSDictionary<String,WOAssociation> associations,
WOElement children) |
Modifier and Type | Method and Description |
---|---|
protected void |
addRequiredWebResources(WOResponse response,
WOContext context)
Override this method to append the needed scripts for this component.
|
void |
appendToResponse(WOResponse response,
WOContext context)
Overridden to call
AjaxDynamicElement.addRequiredWebResources(WOResponse, WOContext) . |
static void |
appendToResponse(WOResponse response,
WOContext context,
AjaxDynamicElement element,
String observeFieldID,
boolean observeDescendentFields,
String updateContainerID,
boolean fullSubmit,
NSMutableDictionary options) |
NSMutableDictionary |
createAjaxOptions(WOComponent component) |
WOActionResults |
handleRequest(WORequest request,
WOContext context)
Override this method to return the response for an Ajax request.
|
WOActionResults |
invokeAction(WORequest request,
WOContext context)
Execute the request, if it's coming from our action, then invoke the ajax handler and put the key
AJAX_REQUEST_KEY in the request userInfo dictionary (request.userInfo() ). |
static String |
nameInContext(WOContext context,
WOComponent component,
AjaxDynamicElement element) |
_containerID, addScriptResourceInHead, addScriptResourceInHead, addStylesheetResourceInHead, addStylesheetResourceInHead, shouldHandleRequest
afterProcessing, appendTagAttributeToResponse, arrayValueForBinding, arrayValueForBinding, associations, beforeProcessing, bindingIsSettable, bindingNamed, booleanValueForBinding, booleanValueForBinding, hasBinding, id, integerValueForBinding, nameInContext, secureInContext, setValueForBinding, stringValueForBinding, stringValueForBinding, valueForBinding, valueForBinding
addChildElement, appendChildrenToResponse, childrenElements, EmptyGroup, hasChildrenElements, invokeChildrenAction, takeChildrenValuesFromRequest, takeValuesFromRequest, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
valueForBinding, valueForBinding
public MTAjaxObserveField(String name, NSDictionary<String,WOAssociation> associations, WOElement children)
public NSMutableDictionary createAjaxOptions(WOComponent component)
public void appendToResponse(WOResponse response, WOContext context)
AjaxDynamicElement
AjaxDynamicElement.addRequiredWebResources(WOResponse, WOContext)
.appendToResponse
in class AjaxDynamicElement
response
- the current responsecontext
- context of the transactionpublic static void appendToResponse(WOResponse response, WOContext context, AjaxDynamicElement element, String observeFieldID, boolean observeDescendentFields, String updateContainerID, boolean fullSubmit, NSMutableDictionary options)
protected void addRequiredWebResources(WOResponse response, WOContext context)
AjaxDynamicElement
addRequiredWebResources
in class AjaxDynamicElement
response
- the current responsecontext
- context of the transactionpublic static String nameInContext(WOContext context, WOComponent component, AjaxDynamicElement element)
public WOActionResults invokeAction(WORequest request, WOContext context)
AjaxDynamicElement
AJAX_REQUEST_KEY
in the request userInfo dictionary (request.userInfo()
).invokeAction
in class AjaxDynamicElement
request
- the current requestcontext
- context of the transactionpublic WOActionResults handleRequest(WORequest request, WOContext context)
AjaxDynamicElement
handleRequest
in interface IAjaxElement
handleRequest
in class AjaxDynamicElement
request
- the current requestcontext
- context of the transactionCopyright © 2002 – 2024 Project Wonder.