{
"display": "Supplier:",
"tooltip": "Name of the supplier.",
"fieldname": "lever_naam",
"length": 40,
"inputtype": "searchedit",
"grid": "suppliers",
"data": {
"endpoint": "\/tabfiles\/lever",
"buttons": ["select","add","edit","exit"],
"file": "suppliers",
"fieldname": "naam",
"pagetype": "tabgrid",
"pagesize": "xl",
"hidefilter": false,
"onclick": {
"endpoint": "\/tabfiles\/lever\/${id}",
"pagetype": "tabform",
"pagesize": "",
"hidefilter": false,
"buttons": ["save","exit"]
},
"onedit": {
"endpoint": "\/tabfiles\/lever\/${nummer}",
"pagetype": "modaltabform",
"pagesize": "xl",
"buttons": ["save","exit"]
}
},
"block": 1,
"newline": true,
"labelwidth": 2,
"fieldwidth": 10
},
|
-
inputtype: searchedit to have two buttons.
-
grid: name of the grid to open.
-
data: object to know where to search in the grid. This data defines where to search, what to show, which buttons.
When the user clicks on the search button, the following will start according to the data object:
-
endpoint: the endpoint to send the request to.
-
buttons: which buttons to make available in the popup.
-
file: name of the file/grid.
-
fieldname: name of the field of the form to use for the search in the grid. The content of that field will be the 'key' to search for.
-
pagetype: how the grid must appear, the modalgrid is the most logical, but other types can be used.
-
pagesize: size of the page to open.
-
hidefilter: show the filter or not.
-
onclick: Action to make when the user selects a row in the grid.
To provide the functionality to add or edit data during searching, you can define the onclick endpoint of the grid, so you define the form to open. When there is no onclick, a search can be done to select a row, but there will be no edit possibilities.
-
-
pagetype and pagesize: always needed for a form.
-
buttons: for the navigation. Since the parent is a grid, you can also use the next/previous buttons.
-
onedit: Action to make when the user clicks on the edit button.
-
endpoint: of the edit form.
-
pagetype and pagesize: always needed for a form.
-
buttons: for the navigation. Since the parent is a grid, you can also use the next/previous buttons.
|