×
Menu
Index

2.5. Buttons

 
In an applications there are a lot of buttons to use. There are different kind of buttons to add, select or delete, to navigate, to print or export data, to search for data and to get info of items. This is all provided with BOA. It is very easy to define the buttons you want. You can define them for each grid, each form and as elements in forms.
 
Buttons with radius value 0 on a grid: add, edit, delete, export, print, exit.
 

Radius of buttons

 
The radius of a button is defined at login time. In the result of the login, the radius can be set. BOA will use that radius through the application. You have to define it only once.
 
Buttons with radius value 5 on a form: save, add, delete, list, previous, next, exit.
 

Buttons for grids and forms.

 
When defining grids and forms you can always use a 'buttons' array to define which buttons you need. The following buttons are possible:
 
Grid buttons:
 
  • add: will open a new empty form.
  • edit: opens a form with the data of the selected row.
  • delete: send a request to delete the current row.
  • export: the content of the grid can be exported to different formats: XLS ,XML, CSV, TSV, HTML, JSON, PDF
  • print: creates a preview and startss the printer dialog.
  • exit: ends the grid and closes the parent of the grid.
Form buttons:
 
  • save: saves the current record with the PUT method.
  • add: starts a blanc form.
  • delete: delete for the current record with the DELETE method.
  • list: returns to the grid on the current position.
  • previous: send a GET with the previous ID found in the grid.
  • next: send a GET with the next ID found in the grid.
  • exit: closes the form.
     
 
As you can see in the section for the pagetypes, you only need to send the array of the buttons you want. BOA will present them always in the same order, and will use the default color according to Bootstrap. This way you will get a uniform view in your application.
BOA also uses the endpoint from the ONCLICK to create the actions for the buttons. The methods GET, POST, PUT, DELETE are used, so in the iAPI you know exactly what to do:
 
Export gives you the possibility
 
 

OK / CANCEL buttons in a modalform

 
These are special buttons to use in a form where a user can fill some data. At the moment the OK button is selected, the data is send to a new endpoint with a PUT method. This way it is a solution for forms where selections can be made. Example a form with selections before a grid is shown with the result of the selections. It can also be used to create reports with filters.
 
 

Form elements:

 
In a form buttons can be used to add extra functionality to a field, or buttons can be used a an element with a special action.
 
As extra functionality you can have a search to lookup for data. You can also use an edit button to view a form with more info. BOA also provide buttons to send email, calculator, phone, calendar or a user defined action.
 
 
Different buttons to search and to edit, also user defined buttons to open a new form or grid with special actions on the fields stock, sold, ...
For these buttons you can choose the icon from the font that is provided.
 
 
A button can be a separate element in a form. This type of buttons can be used to open a new grid, form or other special widgets as graphics, project, calendar, ...
 
 
A button as element which will open a new form with the graph widget. The icon and the action can be defined by the iAPI.
 
You can't think of an application without buttons. Buttons are needed for navigation, search for specific options, opening of new forms, ...
 

Navigation buttons

 
These are the buttons you find in the right upper corner of a grid of form. This are buttons where the system knows what to do.
 
If you have an ADD button in a grid, the system will open a blanco form that is connected to the onclick action of the grid. This will automatically use the GET method.
 
If you have a save button in a form, this will become active as soon as something in a field of the form has been changed. With a click on the save button, it will send a PUT to the endpoint, with all the data of the form.
 
Navigation buttons of a grid.
 
Navigation buttons of a form.