Difference between revisions of "TreeView Options"

From Lianjapedia
Jump to: navigation, search
(Notes on Client Support)
(Notes on Client Support)
Line 111: Line 111:
 
[[Category:Attribute Categories]]
 
[[Category:Attribute Categories]]
 
[[Category:Sections]]
 
[[Category:Sections]]
 +
[[Category:WebView Based Sections]]

Revision as of 10:18, 12 April 2024

See Also

TreeView Section Attributes

TreeView Section

TreeView Section: example_treeview App


The 'Lianja Treeview Demo' (example_treeview) App demonstrates the use of a TreeView Section.

TreeView Section



The App consists of one Page and two Sections. The top Section is a TreeView Section, the lower a Form Section (section4).

Clicking on the arrows (>) expands the TreeView. Double-clicking on a Company Name loads the details for that Customer in the Customers Form Section.



TreeView Section: Section Attributes



The TreeView Options in the Section Attributes define the data and organization for the TreeView.

Note: the database and table are specified in the Details at the top of the Section Attributes.


Attribute Description
Title The name of the column containing the title to be displayed for each leaf node of the tree.
Key The key expression to be associated with the tree node. This will be passed as the second argument to the click or dblclick delegates.
Group By A comma separated list of expressions that the tree will be organized by.
Filter The filter expression that restricts which records will be included in the tree
TreeView Section



Here is how the Attribute definitions relate to the data displayed.



The double click event delegate for the TreeView Section has the following code:

////////////////////////////////////////////////////////////////
// Event delegate for 'dblclick' event
function page1_section1_dblclick(title, key)
{
	Lianja.showDocument("page:page1.section4?action=search&text="+key);	
};
TreeView Section: Filter



The example_treeview App does not have a Filter specified, but you can specify a condition to display only the matching records.

For example, here I have restricted the TreeView to records where the country is 'Canada' or 'USA' using the INLIST() function.


TreeView Section: Form Section Search field



Note that to use showdocument() with the search action, the Section being searched must have its Search field set.


This is set in the Field Attributes for the key Field.


Notes on Client Support

Attribute Notes
Title -
Key -
Group By -
Filter -
Double Click Delegate -