-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathCustomDropdown.xml
More file actions
177 lines (177 loc) · 10.7 KB
/
CustomDropdown.xml
File metadata and controls
177 lines (177 loc) · 10.7 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?xml version="1.0" encoding="utf-8"?>
<widget id="mendix.customdropdown.CustomDropdown" pluginWidget="true" needsEntityContext="true" offlineCapable="true"
supportedPlatform="Web"
xmlns="http://www.mendix.com/widget/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mendix.com/widget/1.0/ ../node_modules/mendix/custom_widget.xsd">
<name>Custom Dropdown</name>
<description>Widget to make a selection in a dropdown menu.</description>
<icon/>
<properties>
<propertyGroup caption="General">
<property key="contextObjId" type="attribute" >
<caption>Context object id</caption>
<description>Id attribute of the context object.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="contextObjLabel" type="attribute" >
<caption>Context object label</caption>
<description>Label attribute of the context object.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="paginate" type="boolean" required="true" defaultValue="true" >
<caption>Enable pagination</caption>
<description>Retrieves the dropdown values in smaller set</description>
</property>
<property key="pageSize" type="integer" required="true" defaultValue="10" >
<caption>Page size for pagination</caption>
<description>Number of records retrived per page(not used if "Enable pagination" is set to false)</description>
</property>
</propertyGroup>
<propertyGroup caption="Data source">
<propertyGroup caption="Default value">
<property key="defaultValue" type="datasource" isList="true" required="true">
<caption>Data source</caption>
<description>Please use a microflow to retrieve. Get the default value that has to be set. Currently it is only possible to return lists in this datasource property, therefore make sure to return a list only containing the object you want to have as the default value. For options the same object type must be selected.</description>
</property>
<property key="objIdDefaultValue" type="attribute" required="true" dataSource="defaultValue">
<caption>Object id default value</caption>
<description>Id attribute of the object.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="firstLabelDefaultValue" type="attribute" required="true" dataSource="defaultValue">
<caption>First label default value</caption>
<description>The first label attribute of the selectable objects.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="secondLabelDefaultValue" type="attribute" required="false" dataSource="defaultValue">
<caption>Second label default value</caption>
<description>The second label attribute of the selectable objects.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="imgUrlDefaultValue" type="attribute" required="false" dataSource="defaultValue">
<caption>Image URL default value</caption>
<description>The image url attribute of the selectable objects.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="dynamicClassDefault" type="textTemplate" required="false" dataSource="defaultValue">
<caption>Dynamic class default value</caption>
<description>The dynamic class string of the default object.</description>
</property>
</propertyGroup>
<propertyGroup caption="Options">
<property key="options" type="datasource" isList="true" >
<caption>Data source</caption>
<description>Please use a microflow to retrieve. Get all the objects you want to suggest as options. The same object type as for the default value must be selected.</description>
</property>
<property key="objIdOptions" type="attribute" required="false" dataSource="options">
<caption>Object id options</caption>
<description>Id attribute of the object.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="refreshOnContextChange" type="boolean" required="true" defaultValue="false" >
<caption>Refresh on context change</caption>
<description>Forces a refresh of the data source when the context object is changed. This way you can refresh your default options.</description>
</property>
<property key="firstLabelOptions" type="attribute" required="true" dataSource="options">
<caption>First label options</caption>
<description>The first label attribute of the selectable objects.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="secondLabelOptions" type="attribute" required="false" dataSource="options">
<caption>Second label options</caption>
<description>The second label attribute of the selectable objects.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="imgUrlOptions" type="attribute" required="false" dataSource="options">
<caption>Image URL options</caption>
<description>The image url attribute of the selectable objects.</description>
<attributeTypes>
<attributeType name="String"/>
</attributeTypes>
</property>
<property key="classOptions" type="textTemplate" required="false" dataSource="options">
<caption>Dynamic class options</caption>
<description>The dynamic class string of the selectable object.</description>
</property>
</propertyGroup>
</propertyGroup>
<propertyGroup caption="Events">
<property key="selectOption" type="action" >
<caption>Select option microflow</caption>
<description>Microflow to be executed when a option is selected.</description>
</property>
<property key="enableCreate" type="boolean" defaultValue="true">
<caption>Enable create</caption>
<description>Enable the Custom Dropdown to create options when none are found when searching.</description>
</property>
<property key="createValue" type="action" >
<caption>Create value microflow</caption>
<description>Microflow to be executed when a new value is created.</description>
</property>
<property key="enableClear" type="boolean" defaultValue="true">
<caption>Enable clear</caption>
<description>Enable the Custom Dropdown to clear the selected value.</description>
</property>
<property key="clearValue" type="action" >
<caption>Clear value microflow</caption>
<description>Microflow to be executed when the selected value is cleared.</description>
</property>
<property key="enableSearch" type="boolean" defaultValue="true">
<caption>Enable searching</caption>
<description>Enable the Custom Dropdown to search for options.</description>
</property>
<property key="refreshDatasource" type="boolean" defaultValue="false">
<caption>Refresh datasource</caption>
<description>Refresh the datasource when filtering. Enabled this option only if there is a filter action in the datasource. (not used if "Enable searching" is set to false)</description>
</property>
<property key="onFocus" type="action" >
<caption>On focus action</caption>
<description>Action to be executed when the widget element is focussed.</description>
</property>
</propertyGroup>
<propertyGroup caption="Styling">
<property key="useDefaultStyle" type="boolean" defaultValue="true">
<caption>useDefaultStyle</caption>
<description>Do you want to use the default styling?</description>
</property>
<property key="useAvatar" type="boolean" defaultValue="true">
<caption>useAvatar</caption>
<description>Do you want add an avatar image to the select values?</description>
</property>
<property key="placeholder" type="string" required="false">
<caption>Placeholder</caption>
<description>Placeholder text for when there are no labels.</description>
</property>
<property key="className" type="string" required="false" defaultValue="CustomDropdown">
<caption>ClassName</caption>
<description>Custom class name.</description>
</property>
<property key="classNamePrefix" type="string" required="false" defaultValue="PrefixCustomDropdown">
<caption>ClassNamePrefix</caption>
<description>Custom Class name prefix.</description>
</property>
<property key="menuHeight" type="integer" defaultValue="150">
<caption>Menu height</caption>
<description>Max dropdown menu height in pixels</description>
</property>
</propertyGroup>
</properties>
</widget>