The pushTo method is the engine that drives all data source record generation.
It takes two parameters, cxt, a PushContext object, and
dl a DataListener object. This section will describe the
available methods provided by these two objects and the supporting objects
on which they depend.
The PushContext provides useful methods for other data sources, but is unlikely to be useful within JavaScript as the functions it provides can be done directly.
${substitution}
in JavaScript instead of calling this method, as substitutions
are detected and will be included in prompts, whereas calls to
getParameter will not be detected.${substitution} replacement on an input string.
Again, this is not useful within JavaScript, as you can use
${substitution} strings directly in the code.
A DataListener receives data from a DataSource for subsequent processing.
For Java use, DataListener (an interface) and all the classes referenced by it
are in the com.elixirtech.data2 package. The methods listed are all public.
src should be this
(the ObjectDataSource itself).endGroup and endData calls to gracefully
terminate the operation. The same applies if exceptions are caught
- you should still send the necessary symmetrical endXXX calls to
balance the startXXX calls you have already made.startGroup should be matched with a corresponding
call to endGroup after the necessary records have been processed.src should be this.
DataGroups delimits a set of sorted records into groups.
A DataRecord supplies an array of objects conforming to the
DataSource schema to the DataListener. The ObjectDataSource supplies
a method newRecordInstance() to instantiate a record
with the appropriate structure. Note that records cannot be reused - once a record
has been passed to the DataListener, you cannot modify it and pass it again.