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
Constructor and Description |
---|
MTAjaxObserveField(String name,
NSDictionary<String,com.webobjects.appserver.WOAssociation> associations,
com.webobjects.appserver.WOElement children) |
Modifier and Type | Method and Description |
---|---|
protected void |
addRequiredWebResources(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
Override this method to append the needed scripts for this component.
|
void |
appendToResponse(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context)
Overridden to call
AjaxDynamicElement.addRequiredWebResources(WOResponse, WOContext) . |
static void |
appendToResponse(com.webobjects.appserver.WOResponse response,
com.webobjects.appserver.WOContext context,
AjaxDynamicElement element,
String observeFieldID,
boolean observeDescendentFields,
String updateContainerID,
boolean fullSubmit,
NSMutableDictionary options) |
NSMutableDictionary |
createAjaxOptions(com.webobjects.appserver.WOComponent component) |
com.webobjects.appserver.WOActionResults |
handleRequest(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.WOContext context)
Override this method to return the response for an Ajax request.
|
com.webobjects.appserver.WOActionResults |
invokeAction(com.webobjects.appserver.WORequest request,
com.webobjects.appserver.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(com.webobjects.appserver.WOContext context,
com.webobjects.appserver.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,com.webobjects.appserver.WOAssociation> associations, com.webobjects.appserver.WOElement children)
public NSMutableDictionary createAjaxOptions(com.webobjects.appserver.WOComponent component)
public void appendToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
AjaxDynamicElement
AjaxDynamicElement.addRequiredWebResources(WOResponse, WOContext)
.appendToResponse
in class AjaxDynamicElement
response
- the current responsecontext
- context of the transactionpublic static void appendToResponse(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context, AjaxDynamicElement element, String observeFieldID, boolean observeDescendentFields, String updateContainerID, boolean fullSubmit, NSMutableDictionary options)
protected void addRequiredWebResources(com.webobjects.appserver.WOResponse response, com.webobjects.appserver.WOContext context)
AjaxDynamicElement
addRequiredWebResources
in class AjaxDynamicElement
response
- the current responsecontext
- context of the transactionpublic static String nameInContext(com.webobjects.appserver.WOContext context, com.webobjects.appserver.WOComponent component, AjaxDynamicElement element)
public com.webobjects.appserver.WOActionResults invokeAction(com.webobjects.appserver.WORequest request, com.webobjects.appserver.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 com.webobjects.appserver.WOActionResults handleRequest(com.webobjects.appserver.WORequest request, com.webobjects.appserver.WOContext context)
AjaxDynamicElement
handleRequest
in interface IAjaxElement
handleRequest
in class AjaxDynamicElement
request
- the current requestcontext
- context of the transactionCopyright © 2002 – 2020 Project Wonder.