TreeView
TreeView
controls are used in detail components to structure data on any number of levels and to display it clearly in a tree structure.
TreeView
controls can be used in all available layout types:
BoxLayout
FlowLayout
GridLayout
ResponsiveLayout
TabLayout
Note:
The <TreeView>
can include the following action:
<SelectAction/>
(see Action "Select")<DoubleClickAction/>
(see Action "DoubleClick")
The following attributes can be defined for a TreeView
control:
Attribute | Description |
---|---|
background | Defines a color for the background of the control.
Possible values:
|
disabled | Defines if the user can interact with the control.
Possible values:
|
enabled | Defines if the user can interact with the control.
Possible values:
|
fontFamily | Defines the font family.
Possible values:
|
fontSize | Defines the font size.
Possible values:
|
fontStretch | Sets the width of the single characters.
This attribute overrides the default width of the characters of the Web App for this control.
Possible values:
This attribute doesn't work with the
Image , Maps , Charts and HtmlDocument controls.
|
fontStyle | Defines the font style.
This attribute overrides the default style of the characters of the Web App for this control.
Possible values:
This attribute doesn't work with the
Image , Maps and HtmlDocument controls.
|
fontWeight | Defines the font weight.
This attribute overrides the default font weight of the Web App for this control.
Possible values:
This attribute doesn't work with the
Image , Maps and HtmlDocument controls.
|
foreground | Defines a color for the foreground (texts, etc.) of the control.
Possible values:
|
horizontalAlign | Direction in which the elements flow. The order of the elements corresponds to their declaration. Possible values:
|
icon | Icon for the
Possible values:
This attribute cannot be used at the same time as
iconUrl .
|
iconColor | Defines the icon color. Possible values:
Do not use a hash in front of the color value!
Do not use a shortened notation of the color value!
|
id | Specifies a unique identifier of the element. Possible values:
|
objectList | Required. Source of the data. The number of entries defines the number of displayed elements. Possible values:
|
parentId | Specifies a unique identifier of the parent element. Possible values:
|
textOverflow | Defines what happens if the page is full. Possible values:
|
title | Title of the control Possible values:
|
visible | Defines whether the control is visible.
Possible values:
|
Example
<?xml version="1.0" encoding="UTF-8"?>
<DetailComponent xmlns="http://softproject.de/webapp/1.0" process="loadTreeView.wrf">
<Properties>
<Property name="TV_List" type="List">
<Property name="id" type="String"></Property>
<Property name="pid" type="String"></Property>
<Property name="entryName" type="String" />
</Property>
</Properties>
<FlowLayout>
<Header value="TreeView in FlowLayout" />
<FlowLayout>
<TreeView objectList="#TV_List" id="#id" parentId="#pid" title="#entryName">
<SelectAction componentName="Dashboard_Copy" />
</TreeView>
</FlowLayout>
</FlowLayout>
</DetailComponent>
Output Format of the Process
The Technical Process loadTreeView.wrf
mentioned in the above example generates the following output:
<?xml version="1.0" encoding="UTF-8"?>
<Ok>
<TV_List>
<id>0-1</id>
<pid>0</pid>
<entryName>Root</entryName>
</TV_List>
<TV_List>
<id>1-1</id>
<pid>0-1</pid>
<entryName>Entry 1 on first sub-level</entryName>
</TV_List>
<TV_List>
<id>1-2</id>
<pid>0-1</pid>
<entryName>Entry 2 on first sub-level</entryName>
</TV_List>
<TV_List>
<id>1-3</id>
<pid>0-1</pid>
<entryName>Sub-root</entryName>
</TV_List>
<TV_List>
<id>2-1</id>
<pid>1-3</pid>
<entryName>Entry 1 on second sub-level</entryName>
</TV_List>
<TV_List>
<id>0-2</id>
<pid>0</pid>
<entryName>Second root</entryName>
</TV_List>
</Ok>
The above code generates the following output in the web app: