What is a descriptor?
A descriptor is an element or term that has the method of describing or identifying.
What is a descriptor?
A descriptor is an element or term that has the method of describing or identifying.
Property | Required | Description |
---|---|---|
category | Yes | Component Category |
alias | If not set, the Class Name will be used as default. | |
priority | Sorting priority of category | |
description | Overview description of component |
Component properties must be set and shown on the FormEditor’s properties screen.
Declaration how to
property : {
text : {
type : "string",
category : "Setup",
priority : 1,
},
size : {
type : "size",
editor : "SizeEditor",
category : "Decoration",
priority : 4,
description : "",
},
}
Name | Required | Description |
---|---|---|
type | Yes | Property variable type ▣ Reference Supported variable type editor list and Editor type list |
category | Yes | Similar properties are grouped together in the same category |
priority | Yes | Sorting priority of category |
alias | If not set, the Class Name will be used as default. | |
description | Overview description of component | |
editor | Editor types for modifiable properties ▣Editor Type List |
|
related | Property used when a component property refers to another related component property. | |
hidden | Property used when wanting to disable a components property following a version update to increase compatibility. The components property is disabled if this property is set to True. | |
valueChanged | Property used when two properties in the same component change according to one another. |
Caution: Property must first declare a class member variable
Type Name | Representative Editor | Description |
---|---|---|
int | Editor property setting not required | |
string | Editor property setting not required | |
MultiLineText | MultiLineTextEditor | Editor property setting not required |
Html | HtmlEditor | |
Reference | DataStoreEditor | |
Map | LinkValueEditor, FormLinkDataEditor |
Key value table format for Data |
Array | editor property setting not required | |
function | FunctionEditor | Javascript function Editor |
StringTable | StringTableEditor | Table format for string Data |
size | Visual Component Size | |
style | Visual Component Css Style | |
padding | Visual Component padding Style | |
margin | Visual Component margin Style | |
[] | Enumeration type editor property setting not required
|
Editor | Type |
---|---|
SizeEditor | size |
StyleEditor | style |
PaddingEditor | padding |
MarginEditor | margin |
StyleClassSelectionEditor | string |
DataStoreEditor | Component |
DataColumnEditor | string |
HtmlEditor | Html |
ImageFileSelectionEditor | string |
MultiLineTextEditor | string |
ColorEditor | color |
KeyValueArrayEditor | KeyValueArray |
FunctionEditor | function |
GroupKeyValueArrayEditor | GroupKeyValueArray |
RegExEditor | string |
ImageTableEditor | StringTable |
RenderFunctionEditor | function |
ValueEditor | string |
FormValueEditor | map |
ValidatorEditor | StringTable |
ImageMapAreaEditor | StringTable |
Example:
- Member Variable Declaration Section
Button : function() {
var clazz = function(id) {
this.id = id;
this.text = undefined;
this.size = {};
this.style = {};
};
- Property Description
property : {
text : {
type : "string",
category : "Setup",
priority : 1,
},
size : {
type : "size",
editor : "SizeEditor",
category : "Decoration",
priority : 1,
description : "",
},
style : {
type : "style",
editor : "StyleEditor",
category : "Decoration",
priority : 2,
description : "",
},
}
Method descriptor processes action functions. It can only process funcitons declared in the component class. The methods declared in the component class are responsible for the actions. The method must be redclared within the methord descriptor to process the functions.
For example: when VisualComponent shows, hides, enables, or disables; the method must be redeclared within its method descriptor.
Declaration how to
method : {
show : {
priority : 1,
description : "",
},
hide : {
priority : 2,
description : "",
},
disable : {
priority : 3,
description : "",
},
enable : {
priority : 4,
description : "",
},
},
Showing method on Form Editor
Event descriptor processes action functions. It can only process funcitons declared in the component class. The method declared in the component class are responsible for the actions. The method must be redclared within the event descriptor to process the functions.
For example: The button’s click event requires the on top method to be redeclared within its event descriptor.
Declaration how to
event : {
onTap : {
priority : 1,
description : "Tap/Click Event",
},
},
Event on Form Editor
Bundle descriptor must declare the component files being deployed to the FormEditor.
When the component is added to FormEditor the component files are copied
Declaration how to
bundle : {
include : ["select3/select3-full.js", "select3/select3.css"],
},
Caution: Applicable files must be located in “component/include” directory
In order to use a special function such as GPS for Android applications and Windows mobile application, the application will require a permission file that will be automatically provided by NEST during the applications build time.
Declaration how to
permission : {
android : ["android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_LOCATION", "android.permission.ACCESS_GPS", "android.permission.ACCESS_ASSISTED_GPS"],
},
Note: Windows phone application uses an Android application permission file that is automatically converted.
Automatically generated AndroidManifest.xml example
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
</manifest>