Axelor Doc

Customizing the toolbar

The views form (represented by the tag <form> ) and grids (represented by the tag <grid> ) can define the buttons in the toolbar.

The tag <tooolbar> to customize the buttons.

Form

<form name="some-form" title="Some Form" model="my-model">
 <toolbar>
   <button name="save" title="" hidden="true"/>
   <button name="copy" title="" hidden="false"/>
   <button name="hello" title="Hello..." onClick="some-action"/>
   <button name="world" title="World..." onClick="another-action"/>
 </toolbar>
  ...
</form>

Customizing the toolbar

In form view, the toolbar is enriched by two new buttons: hello and world. Natives buttons save and copy are hidden. Other native buttons retain their default behaviors.

Grid

<grid name="some-grid" title="Some grid" model="my-model">
 <toolbar>
   <button name="hello" title="Hello..." onClick="some-action"/>
   <button name="world" title="World..." onClick="another-action"/>
 </toolbar>
  ...
</grid>

Customizing the toolbar

Also for grid, toolbar is enriched by two new buttons: hello and world. Natives buttons have their default behaviors.

Use

Default buttons of the toolbar are customizable:

  • New: name = "new"
  • Edit: name = "edit"
  • Save: name = "save"
  • Cancel: name = "delete"
  • Copy: name = "copy"
  • Cancel: name = "cancel"
  • Update: name = "refresh"
  • Search: name = "search"

The attribute prompt = "" can be used to display a confirmation message before processing.

By default all buttons are displayed. They can, thereafter, be hidden by actions.

In grid view, context took action lists the "id" of the selected records.