UiBlockSpecifier b = new UiBlockSpecifier() (1)
b.ui {
modal { (2)
form f (3)
}
}
Foreword about Block DSL
The Block DSL enables the specification of the page layout by defining blocks that contain graphical elements. A block can be updated by actions. AJAX blocks can be targeted using their ID. Blocks can also be nested.
For more information, please refer to the dedicated page on Block DSL. PDFs have their own block management through Printable Blocks, where the show, table and diagram DSLs are also applicable.
| 1 | Create the block, constructed via the ui method |
| 2 | This block will contain a modal window, which is also a block |
| 3 | The modal contains one form |
Block Elements DSLs
-
Form DSL: Allows defining a form to be included in a block
-
Show DSL: Allows showing an object summary. It supports limited field edition
-
Table and Table filter DSL: a Table is associated to one or zero filter. Filters cannot be displayed without a table.
-
Table DSL allows grouping and sorting columns
-
Pagination is included
-
Table can also represent a tree
-
Rows can be edited inline (
rowQuickEdit) -
The filter can be displayed beside the table or as a toolbar above it (
FilterLayout)
-
-
Diagram DSL: Allows drawing diagrams (bar, line, area, scatter, pie, whiskers, timeline) into a block, a PDF or a mail
-
Kanban DSL: Allows drawing a Kanban board with drag & drop between columns
-
custom: Allows inserting custom HTML code into a block.
Page Level DSLs
-
Menu DSL: Describes the page menu (entries, sub-menus, icons, search box, options)
-
Printable Block DSL: Describes the layout of a PDF document