UiShowSpecifier (taack-ui 0.5.7-SNAPSHOT API)
Package: taack.ui.dsl

[Groovy] Class UiShowSpecifier<T>

    • taack.ui.dsl.UiShowSpecifier


    • @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_
            }
        }
       }

      • Properties Summary

      • Constructor Summary

      • Methods Summary

          Methods 
          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
      • Inherited Methods Summary

          Inherited Methods 
          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()
      • Property Detail

        • java.lang.String action

        • groovy.lang.Closure closure

        • java.lang.String controller

        • T object

      • Constructor Detail

        • UiShowSpecifier()

      • Method Detail

        • UiShowSpecifier ui(T aObject, java.lang.String controller, java.lang.String action, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_ONLY, value: ShowSpec) groovy.lang.Closure closure)

          Describes the block to show

          Parameters:
          aObject - (optional) object to show
          controller - (optional) place holder for future inline edition
          action - (optional) place holder for future inline edition
          closure - description of what to show
          Returns:
          itself

        • UiShowSpecifier ui(T aObject, org.codehaus.groovy.runtime.MethodClosure action, @groovy.lang.DelegatesTo(strategy: Closure.DELEGATE_ONLY, value: ShowSpec) groovy.lang.Closure closure)

          Describes the block to show

          Parameters:
          aObject - (optional) object to show
          action - place holder for future inline edition
          closure - description of what to show
          Returns:
          itself