Documentation

DataProcessor

Handles client-server data saving operations.

Methods
attachEvent attaches the handler to an inner event of the component (allows behaviour customizations)
attachProgress asssigns handler for data saving actions
blockEvent temporarily blocks triggering of ALL events of the calling object
callEvent calls an inner event
clearValidation removes "data incorrect" highlighting from invalid text fields
define redefines a single configuration property (or a hash of properties)
detachEvent detaches a handler from an event (which was attached before by the attachEvent method)
escape escapes data
getItemState return update state for the item in question
getState gets the current DataProcessor state
hasEvent checks whether the component has the specified event
ignore the code that you pass here as the parameter will not react on any data changes (will not be affected by 'onStoreUpdated' event handler)
mapEvent routes events from one object to another
off disables dataProcessor
on enables dataProcessor
processResult process data saving results
reset reset updated state for all items
save mark data record as changed and initiates data saving
send sends a request to server. Allows to save data changes on server.
setItemState set update state for the item
unblockEvent cancels blocking events that was enabled by the 'blockEvent' command
validate checks data in the component during adding new item or editing existing ones
Events
onAfter
onAfterDataSend fires the moment data has gone to server
onAfterDelete fires after successfull data deletion
onAfterInsert fires after successfull data insertion
onAfterSave fires after serverside responce has been received and processed
onAfterSaveError fires for data saving errors
onAfterSync called when server side response received and processed
onAfterUpdate fires after successfull data insertion
onAfterValidation fires after data has been validated
onBefore fires each time before data sending of any data item
onBeforeDataSend called before sending data to server side
onBeforeDelete fires before sending data for item insertion
onBeforeInsert fires before sending data for item insertion
onBeforeSaveError fires for data saving errors
onBeforeSync called when server side response received, but not processed yet
onBeforeUpdate fires before sending data for item insertion
onBeforeValidate called before runing validation
onLoadError occurs when server side response is invalid and can't be procesed
onValidationError fires when the form fails to pass validation
onValidationSuccess fires after the form has passes validation successfully
Properties
autoupdate enables automatic data updating on server while any changes on client-side are done
escape custom escaping function
id the component ID
master the linked data source. It can be both some independent data source and one of components operated on data (e.g. grid)
mode type of request
on allows attaching custom handlers to inner events of the component
operationName name of parameter which will hold operation type
rules defines a set of rules for input field(s) of the form(htmlform)
store allows to define datastore which will be monitored for changes
trackMove enables data moving tracking
updateFromResponse server data update mode
url server side data saving script
Other
config all options from initial component configuration
name indicates the name of the component (a read-only property)
Back to top