-
Notifications
You must be signed in to change notification settings - Fork 1
/
api_results-elements.Rmd
79 lines (44 loc) · 1.29 KB
/
api_results-elements.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
title: Results Elements
---
This document describes the properties and methods of the results elements:
- Image
- Group
- Array
- Preformatted
- Html
Table is described [here](api_table.html).
The values of properties can be accessed using the `$` operator. For example, to retrieve the title of an element, one can go:
```
element$title
```
The methods of a results elements are called using the `$` operator as well. For example:
```
element$setTitle('An awesome title')
```
## Elements
The following properties and methods are common to all results elements
### Properties
#### name
a string specifying the name of the element
#### title
a string specifying the title of the element
#### visible
`TRUE` or `FALSE`, whether the element is visible or not
#### status
a string, one of `'complete'`, `'error'`, `'inited'`, `'running'`
#### rowKeys
a list of 'keys'
#### state
the state
### Methods
#### setStatus(status)
sets the element's status, should be one of `'complete'`, `'error'`, `'inited'`, `'running'`
#### setVisible(visible=TRUE)
overrides the elements default visibility
#### setTitle(title)
sets the element's title
#### setError(message)
sets the element's status to 'error', and assigns the error message
#### setState(object)
sets the state object on the element