Datasource - AppDaddy-Software-Solutions-Inc/framework-markup-language GitHub Wiki

Datasource : Widget

Datasource is an inherited class and cannot be created directly in markup.

Attributes

Name Type Default Description Req
url string null The url the data is sent to.
autoexecute bool true If the widget will fire when the template is first opened or on url change
autoquery int(s,m,h) null If set, the datasource executes on a timed frequency
tti int(s,m,h) 5s The time the Datasources status will stay as anything but idle.
online bool true If connected to the internet, the transaction executes immediately in the foreground while the user waits for it to complete.
offline bool true If offline="true" the transaction will be written to the persistent cache and executed at a future date by the POSTMASTER service in the background. This executes immediately if connected to the internet, otherwise, it executes as soon as the device comes back into view of the web.

Properties

Name Type Default Description Req
rowcount int 0 The number of records in the data bindable
status string idle The status of the broker, returns error, success or idle.
statusmessage string null Returns a status message (usually from the response on an exception ).
statuscode string null Returns the http status code.

Events

Name Description
onsuccess The string of events the broker will execute upon a successful query.
onfail The string of events the broker will execute upon a failed query.

Methods

Name Description
start() Fires the datasource. Invoked in any EVENT string using <id>.start()
stop() Stops the datasource. Invoked in any EVENT string using <id>.stop()
clear() Clears the datasource. Invoked in any EVENT string using <id>.clear()
insert(jsonOrXml, index) Adds record jsonOrXml to the datasource at the specified index. If index is not specified, the record is added to the end of the list.
delete(index) Deletes the record from the datasource at the specified index.
copy(from, to) Copies the record at index from to index to. If to is not specified, the record is added to the end of the list.
move(from, to) Moves the record at index from to index to. If to is not specified, the record is moved to the end of the list.
reverse() Reverses the datasource list

Other Widgets You May Find Useful:

⚠️ **GitHub.com Fallback** ⚠️