Skip to content

HowToAction

iraichi edited this page Apr 24, 2015 · 9 revisions

How to add an action button to the toolbar in a View

Please refer here for general informations about Views and Action Controllers.

if you want to add one or more action buttons to a View toolbar, you have to implement a ToolController in MainTable/Controller/ToolViews node and set the specific parametrers for the tool.

Example from HelloKitto: two buttons added to export data in Text and CSV format

# view dolls.yalm

Type: Data
.....
MainTable:
  Model: Doll
  Fields:
.....
  Controller:
.....
    ToolViews:
      DownloadText:
        DisplayLabel: _(Download in TXT)
        Controller: ExportTextTool
          RequireSelection: False
          IncludeHeader: False
          ClientFileName: DollList.txt
      DownloadCSV:
        DisplayLabel: _(Download in CSV)
        ImageName: download
        Controller: ExportCSVTool
          RequireSelection: False

Clone this wiki locally