-
Notifications
You must be signed in to change notification settings - Fork 4
GET
The GET datasource widget is used to retrive data from an external HTTP data source via a standard HTTP GET method. The widget is envoked when the templte is opened unless autoexecute is set to false. Data returned from the call can be bound using the standard 'Dot Notation' binding syntax. GET widgets can have multiple TRANSFORM widgets to selectively return data from a query. Data can be returned as JSON or XML (default).
- Overview
- Usage - Ideals: - Restrictions:
- Attributes
- Properties
- Examples - (fig. a) - (img. a) - (fig. b) - (fig. c)
- Other Widgets You May Find Useful:
The GET widget is used to return a data package to be used and bound to within the [FRAMEWORK]. Curly braces {} are used to denote bindable fields that return a value.
- To return bindable data to drive the the template.
- To populate populable widgets like [LIST] or [SELECT].
-
GETmust return valid xml or json.
| Name | Type | Default | Description | Req |
|---|---|---|---|---|
| id | string | null | The id of the widget used for databinding. | ✔ |
| url | string | null | The url the data is retrieved from. | ✔ |
| format | string | xml | The format the expected data will be in. Currently only supports xml. | |
| root | string | transparent | The root tag that the broker will look in for your xml fields. This can be a nested field | |
| autoexecute | bool | true | If the widget will fire when initially opening the template page. | |
| autoquery | int(s,m,h) | null | If set the broker fires on a timer set by the autoquery | |
| ttl | int(s,m,h) | 0s | The time that the Datasources data will be held in the cache. Saves requery and data. | |
| tti | int(s,m,h) | 5s | The time the Datasources status will stay as anything but idle. |
|
| onsuccess | string/Event | null | The string of events the Datasource will execute upon a successful query. | |
| onfail | string/Event | null | The string of events the Datasource will execute upon a failed query. | |
| showexception | bool | 'true' | The option to show error code popups. |
| Name | Type | Default | Description | Req |
|---|---|---|---|---|
| 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. | |
| httpstatus | string | null | Returns the generic message associated with the http status code. |
<GET id="UserData" url="api/users/" autoexecute="true" tti="25s" ttl="5m" root="USER"/>
<TEXT label="{UserData.username}"/>
<TEXT label="{UserData.age}"/>
<TEXT label="{UserData.gender}"/>
A GET with text bound to the data packet fields(#figb).

<USERS>
<USER>
<username>TheOlajos</username>
<age>27</age>
<gender>Male</gender>
<occupation>Wizard</occupation>
</USER>
</USERS>The data the GET is expecting.
<TEXT label="{UserData.status}"/>
<BUTTON onclick="fire('UserData')" label="Fire!"/>A [TEXT] widget reporting the status of the GET widget, and a [BUTTON] calling the fire() event.
Framework Markup Language is an open source programming language created by AppDaddy Software Solutions Inc. FML and is licensed under a fair source license agreement and is maintained by a community of developers.
- Quick Start
- Widget Structure
- Layout Basics
- Config
- Navigation
- Authentication
- Server Configuration
- Offline Use
- Resource Guides
-
<FML/>
- <BOX/>
- <CHART/>
- <COLUMN/>
- <DRAWER/>
- <FOOTER/>
- <FORM/>
- <GRID/>
- <HEADER/>
- <LIST/>
- <MAP/>
- <WINDOW/>
- <PAGER/>
- <ROW/>
- <SCROLLER/>
- <SPLITVIEW/>
- <STACK/>
- <TABLE/>
- <TABVIEW/>
- <TREEVIEW/>
- <WEBVIEW/>

Important Concepts