<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=How_to_Create_a_Tree_Selector</id>
	<title>How to Create a Tree Selector - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=How_to_Create_a_Tree_Selector"/>
	<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=How_to_Create_a_Tree_Selector&amp;action=history"/>
	<updated>2026-04-06T16:45:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.infinite-erp.co.id/index.php?title=How_to_Create_a_Tree_Selector&amp;diff=1115&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;{{(!)| This feature is available from '''Openbravo PR14Q2'''}}  == Introduction ==  The Tree Selector described in this manual is a variant of the [http://wiki.openbravo.com/w...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=How_to_Create_a_Tree_Selector&amp;diff=1115&amp;oldid=prev"/>
		<updated>2021-07-11T01:48:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{(!)| This feature is available from &amp;#039;&amp;#039;&amp;#039;Openbravo PR14Q2&amp;#039;&amp;#039;&amp;#039;}}  == Introduction ==  The Tree Selector described in this manual is a variant of the [http://wiki.openbravo.com/w...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{(!)| This feature is available from '''Openbravo PR14Q2'''}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Tree Selector described in this manual is a variant of the [http://wiki.openbravo.com/wiki/Selectors Openbravo Selector]. It can only be applied on tables with [http://wiki.openbravo.com/wiki/How_to_Define_a_Table_as_a_Tree trees defined].&lt;br /&gt;
&lt;br /&gt;
Both the implementation of the tree selector and its use is similar to the standard selector. The main difference is that instead of using a grid for the form item drop down and the popup, the Tree Selector uses a tree grid:&lt;br /&gt;
&lt;br /&gt;
Drop down tree:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:TreeDropDown.png|center|700px]]&lt;br /&gt;
&lt;br /&gt;
Popup tree:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:TreePopup.png|center|700px]]&lt;br /&gt;
&lt;br /&gt;
== Defining a Tree Selector ==&lt;br /&gt;
&lt;br /&gt;
Defining a tree selector is very similar to defining a standard selector. &lt;br /&gt;
&lt;br /&gt;
=== Define a Reference ===&lt;br /&gt;
&lt;br /&gt;
Open the Reference window and create a new record in the header tab. This are the most relevant fields:&lt;br /&gt;
&lt;br /&gt;
* Name, Description and Help should be set to a value specific for the reference you are creating&lt;br /&gt;
* Base Reference must be set to false&lt;br /&gt;
* Parent Reference must be set to Tree Reference&lt;br /&gt;
* Model, WAD and Runtime UI Implementation can be left empty most of the time if the reference is not a base reference.&lt;br /&gt;
&lt;br /&gt;
[[Image:TreeReferenceHeader.png|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Define the Tree Selector ===&lt;br /&gt;
Create a new record in the Tree Reference tab. &lt;br /&gt;
&lt;br /&gt;
[[Image:TreeReferenceWithoutFields.png|center|700px]]&lt;br /&gt;
&lt;br /&gt;
* Table: Tree Table this selector points to.&lt;br /&gt;
* Table Tree Category: Table Tree Category that will be used to represent hierarchically the data of the selected table.&lt;br /&gt;
* Column: the column in the referenced table to which the foreign key column points. If nothing is set here (the default) then the primary key column is used.&lt;br /&gt;
* Value Field:  this tree selector field is set as the value and stored in the database as the foreign key field.&lt;br /&gt;
* Display Field: this selector field is displayed in the drop-down of the suggestion box.&lt;br /&gt;
* HQL Where Clause: this where clause is used to filter the data read from the database.&lt;br /&gt;
* HQL Where Clause for Root Nodes: this where clause is used to specify what are the root nodes for this tree. If it is not set, then the root nodes will be those who have parentId = null or parentId = '0'.&lt;br /&gt;
&lt;br /&gt;
At this point no Tree Selector Fields have been defined yet, so the Value Field and Display Field are empty.&lt;br /&gt;
&lt;br /&gt;
=== Define the Tree Selector Fields ===&lt;br /&gt;
&lt;br /&gt;
The next step is to define the Tree Selector Fields. A selector field can have several purposes:&lt;br /&gt;
* Be used as Value Field&lt;br /&gt;
* Be used as Display Field&lt;br /&gt;
* Be shown in the drop down tree&lt;br /&gt;
* Be shown in the popup tree.&lt;br /&gt;
&lt;br /&gt;
A selector must have at least two fields:&lt;br /&gt;
* One field will be used as Value Field&lt;br /&gt;
* The other field will be used as Display Field and shown in the drop down tree and popup tree.&lt;br /&gt;
&lt;br /&gt;
[[Image:TreeSelectorField.png|center|700px]]&lt;br /&gt;
&lt;br /&gt;
* Name: Name of the field. It will be used in the title of the column in the popup.&lt;br /&gt;
* Property: is a column/property from the table selected in the Tree Reference tab.&lt;br /&gt;
* Central Maintenance: if checked then the name, description and help/comment are copied/used from the column.&lt;br /&gt;
* Show in Picklist: if checked this field will be visible in the drop down tree.&lt;br /&gt;
* Search in Suggestion Box: if checked, this field will be used to filter the results when text is entered in the tree form item.&lt;br /&gt;
* Show in Grid: if checked this field will be visible in the popup tree.&lt;br /&gt;
* Record Sort No: Sequence number of the field. It is used to establish the field order in the drop down tree and the popup tree.&lt;br /&gt;
* Filter: If set, this field will be filterable in the popup&lt;br /&gt;
* Sort: If set, this field will be sortable in the popup&lt;br /&gt;
&lt;br /&gt;
=== Set the Value and Display Fields of the Tree Selector ===&lt;br /&gt;
&lt;br /&gt;
Once the Tree Selector Fields have been defined, the Value Field and Display Field fields of the Tree Reference tab can be set.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:TreeReferenceWithFields.png|center|700px]]&lt;br /&gt;
&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>