@groovy.transform.CompileStatic final class BlockSpec extends BlockTabSpec
UiBlockSpecifier.ui delegated class.
This class allows to draw the layout of a page, or to update part of a page after an ajax call.
Each block can contains many graphical elements, but it is better to have one graphical element (show, form, table, tableFilter ...) per block (modal, ajaxBlock ...)
Modifiers | Name | Description |
---|---|---|
static enum |
BlockSpec.Width |
Type | Name and description |
---|---|
int |
ajaxCounter |
int |
counter |
MenuSpec |
menuSpec |
Constructor and description |
---|
BlockSpec
(IUiBlockVisitor blockVisitor) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
ajaxBlock(java.lang.String id, java.lang.Boolean visitAjax, groovy.lang.Closure closure) Ajax block must be children of ajaxBlock. |
|
static groovy.lang.Closure<BlockSpec> |
buildBlockSpec(groovy.lang.Closure closure) Helper method allowing to split block creation. |
|
void |
closeModal(java.lang.String id, java.lang.String value, FieldInfo[] fields) Close the topmost modal. |
|
void |
closeModal(java.lang.Long id, java.lang.String value, FieldInfo[] fields) Close the topmost modal. |
|
void |
closeModal(FieldInfo[] fields) Close the topmost modal. |
|
void |
closeModalAndUpdateBlock(groovy.lang.Closure closure) Generic close. |
|
void |
inline(groovy.lang.Closure<BlockSpec> blockSpecClosure) Allow to inject a block part that has been created elsewhere. |
|
void |
modal(groovy.lang.Closure closure) Pop a modal. |
Methods inherited from class | Name |
---|---|
class BlockTabSpec |
tab |
class BlockLayoutSpec |
buildBlockLayoutSpec, col, row, simpleLog, tabs |
class BlockLeafSpec |
closeModal, closeModal, closeModal, custom, diagram, diagram, diagramFilter, form, iframe, processMenuBlock, show, simpleLog, table, tableFilter |
Ajax block must be children of ajaxBlock. Mandatory invisible block that enable ajax.
id
- uniq id in the page.visitAjax
- set to false to process block like non ajax blockclosure
- description of the user interfaceHelper method allowing to split block creation. See inline(groovy.lang.Closure) to inject this block into another block.
closure
- closure that should benefit from IDE completion and static type checkingClose the topmost modal. Usually, it passes an ID and a label to a form in a many to many relationship, if you open a modal using FormSpec.ajaxField.
id
- the ID of the objectvalue
- the label of the object (should use toString() obejct method)fields
- allow to update the form from which ajaxField has been called with the values of the fields listedClose the topmost modal. Usually, it passes an ID and a label to a form in a many to many relationship, if you open a modal using FormSpec.ajaxField.
id
- the ID of the objectvalue
- the label of the object (should use toString() obejct method)fields
- allow to update the form from which ajaxField has been called with the values of the fields listedClose the topmost modal. Usually, it passes an ID and a label to a form in a many to many relationship, if you open a modal using FormSpec.ajaxField.
fields
- allow to update the form from which ajaxField has been called with the values of the fields listedGeneric close. Close the topmost modal, and update the block of the pages.
closure
- describe how to update the page. This closure must not target elements that are in the current modal.Allow to inject a block part that has been created elsewhere. See buildBlockSpec(groovy.lang.Closure)
Pop a modal. Nested blocks will be displayed inside this modal.
firstPass
- (optional) if true create a new modal, if false, replace the content of the top modal.closure
- content of the modalGroovy Documentation