|
1 | 1 | <!--New AJUI_BreadCrumb ( {template_obj} ) -> AJUI BreadCrumb instance --> |
2 | 2 |
|
3 | | -# New AJUI_BreadCrumb |
4 | 3 |
|
5 | | -## Parameters |
6 | 4 |
|
7 | | - * (object) (optional) template : |
8 | | - * (text) templateName : Represents the name of the JSON file to import (template). If the file is not found, the method will return a new instance of AJUI_Breadcrumb. |
9 | | - * (text) (optional) templatePath : You can specify a path to recover the file otherwise, the component will search in the default folder located in the host database resources (.../Resources/AJUI_BreadCrumb_Templates/). |
10 | | - |
11 | | -## Return value |
| 5 | +## Description |
12 | 6 |
|
13 | | -(object) instance of an AJUI BreadCrumb |
| 7 | +This method returns an object variable (breadcrump) that represents an instance of AJUI_BreadCrumb. It contains all the properties and their default values as well as the formulas (member functions) to manipulate them.It is possible to pass an object as a parameter to it in order to import an AJUI Breadcrumb template (JSON file). |
14 | 8 |
|
15 | | -## Description |
| 9 | +```4d |
| 10 | + New AJUI_BreadCrumb ( {template} ) -> instance |
| 11 | +``` |
16 | 12 |
|
17 | | -This method returns an object variable (breadcrump) that represents an instance of AJUI_BreadCrumb. It contains all the properties and their default values as well as the formulas (member functions) to manipulate them. |
| 13 | +| Parameter | Type | In/Out | Description | |
| 14 | +| --------- | ---- | ------ | ----------- | |
| 15 | +| template | object | in | Properties :<br> - (text) templateName : Name of the folder containing the JSON file to import (template). If the file is not found, the method will return a new instance of AJUI BreadCrumb.<br> - (text) (optional) templatePath : You can specify a path to retrieve the file otherwise, the component will search in the default folder located in the resources (.../Resources/AJUI_BreadCrumb_Templates/). | |
| 16 | +| instance | object | out | instance of AJUI_BreadCrumb with all the member functions | |
18 | 17 |
|
19 | 18 | ## Example |
20 | 19 |
|
21 | | -``` |
22 | | - C_Object($myBC;$template_obj) |
23 | | - C_String($path;$templateName) |
24 | | -
|
25 | | - $template_obj:=New object("templateName";$templateName;"templatePath";$path) |
26 | | - $myBC:=New AJUI_BreadCrumb ($template_obj) |
| 20 | +```4d |
| 21 | +
|
| 22 | + //Import template and add callback with params from the lab (HDI groupedButtons) |
| 23 | + Case of |
| 24 | + : (Form event code=On Load) |
| 25 | + C_OBJECT($bc) |
| 26 | + $bc:=New object() |
| 27 | + $bc.templateName:="groupedBtn_selection.json" |
| 28 | + |
| 29 | + Form.bc1:=New AJUI_BreadCrumb ($bc) |
| 30 | + Form.bc1.Name("bc1") |
| 31 | + |
| 32 | + //add callback |
| 33 | + $section_obj:=New object |
| 34 | + $section_obj.onClickCB:="HDI_setNote" |
| 35 | + $params:=New object |
| 36 | + $params.notationNB:=1 |
| 37 | + For ($i;1;5) |
| 38 | + $params.note:=$i |
| 39 | + $section_obj.onClickCBParams:=OB Copy($params) |
| 40 | + Form.bc1.UpdateSection("note"+String($i);$section_obj) |
| 41 | + End for |
| 42 | + |
| 43 | + End case |
| 44 | +
|
| 45 | + Form.bc1.Draw() |
27 | 46 | ``` |
0 commit comments