
Public Member Functions | |
| AjaxObserveField (String name, NSDictionary associations, WOElement children) | |
| void | appendToResponse (WOResponse response, WOContext context) |
| NSMutableDictionary | createAjaxOptions (WOComponent component) |
| WOActionResults | handleRequest (WORequest request, WOContext context) |
| WOActionResults | invokeAction (WORequest worequest, WOContext wocontext) |
Static Public Member Functions | |
| static void | appendToResponse (WOResponse response, WOContext context, AjaxDynamicElement element, String observeFieldID, boolean observeDescendentFields, String updateContainerID, boolean fullSubmit, NSMutableDictionary options) |
| static String | nameInContext (WOContext context, WOComponent component, AjaxDynamicElement element) |
Protected Member Functions | |
| void | addRequiredWebResources (WOResponse response, WOContext context) |
If you set an observeFieldID you must place the AjaxObserveField tag after the field you would like to observe.
If you leave of observeFieldID, AjaxObserveField must generate an HTML container, so that it can find the form fields that correspond to this component from the client side, so you will get an extra dom element when used as a container.
AjaxObserveFields observe specific instances of DOM elements. If you ajax replace the DOM elements being watched, the observe field will cease to function. To prevent this problem, you should always ensure that any ajax update of an observed field also updates the AjaxObserveField component as well. The rule of thumb is that all AjaxObserveFields should be in the same AjaxUpdateContainer as the fields they observe.
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.
| AjaxObserveField | ( | String | name, | |
| NSDictionary | associations, | |||
| WOElement | children | |||
| ) |
| void addRequiredWebResources | ( | WOResponse | response, | |
| WOContext | context | |||
| ) | [protected, virtual] |
Adds all required resources.
Implements AjaxDynamicElement.
| static void appendToResponse | ( | WOResponse | response, | |
| WOContext | context, | |||
| AjaxDynamicElement | element, | |||
| String | observeFieldID, | |||
| boolean | observeDescendentFields, | |||
| String | updateContainerID, | |||
| boolean | fullSubmit, | |||
| NSMutableDictionary | options | |||
| ) | [static] |
| void appendToResponse | ( | WOResponse | response, | |
| WOContext | context | |||
| ) |
Overridden to call addRequiredWebResources(WOResponse, WOContext).
Reimplemented from AjaxDynamicElement.
| NSMutableDictionary createAjaxOptions | ( | WOComponent | component | ) |
| WOActionResults handleRequest | ( | WORequest | request, | |
| WOContext | context | |||
| ) | [virtual] |
Override this method to return the response for an Ajax request.
| request | ||
| context |
Implements AjaxDynamicElement.
| WOActionResults invokeAction | ( | WORequest | request, | |
| WOContext | context | |||
| ) |
Execute the request, if it's comming from our action, then invoke the ajax handler and put the key AJAX_REQUEST_KEY in the request userInfo dictionary (request.userInfo()).
Reimplemented from AjaxDynamicElement.
| static String nameInContext | ( | WOContext | context, | |
| WOComponent | component, | |||
| AjaxDynamicElement | element | |||
| ) | [static] |
1.5.8