private UiMenuSpecifier buildMenu(String q = null) {
new UiMenuSpecifier().ui { (1)
menu CrewController.&index as MC
menu CrewController.&listRoles as MC
menu CrewController.&hierarchy as MC
menuIcon ActionIcon.CONFIG_USER, this.&editUser as MC (4)
menuIcon ActionIcon.EXPORT_PDF, this.&downloadBinPdf as MC
menuSearch this.&search as MethodClosure, q (2)
menuOptions(SupportedLanguage.fromContext()) (3)
}
}
-
Rendered into HTML
-
Rendered into Mails
-
Rendered into PDF
-
Rendered into CSV
Menu DSL associate menu entries with top level actions.
Menu DSL supports only 2 levels max (without taking into account section
).
1 | Create a new menu |
2 | Search menu |
3 | Languages entries |
4 | Icon entries (hoover message automatically deduced) .Corresponding Menu Rendering. |
Figure 1. Symbol’s hierarchy diagram for Menu DSL