@groovy.transform.CompileStatic final class UiShowSpecifier<T> extends java.lang.Object
Class allowing to build a show graphical element in a block.
To add a show graphical element in a block, call BlockSpec.show
UiShowSpecifier buildShowItem(Item item, Subsidiary subsidiary) {
new UiShowSpecifier().ui item, {
inlineHtml(attachmentUiService.preview(item.attachments.find { it.type == AttachmentType.mainPicture && it.active
?.id, TaackSimpleAttachmentService.PreviewFormat.PREVIEW_MEDIUM), null)
field item.name, Style.BLUE + Style.EMPHASIS
field item.ref, Style.EMPHASIS
fieldLabeled item.itemStatus.style, item.itemStatus_
fieldLabeled item.labeling_
fieldLabeled item.gtin_
if (item.range)
fieldAction "Show Range", ActionIcon.SHOW * ActionIconStyleModifier.SCALE_DOWN, Bp2Controller.&showRange as MethodClosure, [id: item.range.id, subsidiary: subsidiary.toString()], false
fieldLabeled Style.BLUE, item.range_
fieldLabeled item.dateCreated_
fieldLabeled item.userCreated_
fieldLabeled item.lastUpdated_
fieldLabeled item.itemType_
}
}
}
Type | Name and description |
---|---|
java.lang.String |
action |
groovy.lang.Closure |
closure |
java.lang.String |
controller |
T |
object |
Constructor and description |
---|
UiShowSpecifier
() |
Type Params | Return Type | Name and description |
---|---|---|
|
UiShowSpecifier |
ui(T aObject, java.lang.String controller, java.lang.String action, groovy.lang.Closure closure) Describes the block to show |
|
UiShowSpecifier |
ui(T aObject, org.codehaus.groovy.runtime.MethodClosure action, groovy.lang.Closure closure) Describes the block to show |
|
void |
visitShow(IUiShowVisitor showVisitor) Visit the show description with a IUiShowVisitor |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Describes the block to show
aObject
- (optional) object to showcontroller
- (optional) place holder for future inline editionaction
- (optional) place holder for future inline editionclosure
- description of what to showDescribes the block to show
aObject
- (optional) object to showaction
- place holder for future inline editionclosure
- description of what to showVisit the show description with a IUiShowVisitor
showVisitor
- the visitorGroovy Documentation