Interface ContextMarkupRenderer


public interface ContextMarkupRenderer
Used to output context surrounding any given content. Context is any markup that will be rendered along with any markup for domain property input or output. Input is used in this class to mean any HTML input type element (A way to retrieve users input). Output is used in this class to mean the display of a domain property on the page.

An example of what might be returned with inputContext(DomainProperty, Closure)


 { ->
      div([class: "form-group"]) {
          label('', [for: property.name])
          content.delegate = delegate
          content.call()
      }}
 
  • Method Summary

    Modifier and Type
    Method
    Description
    groovy.lang.Closure
    embeddedInputContext(DomainProperty property, groovy.lang.Closure content)
    Defines the context for rendering a the input of an embedded domain class property
    groovy.lang.Closure
    embeddedOutputContext(DomainProperty property, groovy.lang.Closure content)
    Defines the context for rendering a the output of an embedded domain class property
    groovy.lang.Closure
    inputContext(org.grails.datastore.mapping.model.PersistentEntity domainClass, groovy.lang.Closure content)
    Defines the context for rendering a list of domain class properties inputs (form)
    groovy.lang.Closure
    inputContext(DomainProperty property, groovy.lang.Closure content)
    Defines the context for rendering a single domain class property input (select, textarea, etc)
    groovy.lang.Closure
    listOutputContext(org.grails.datastore.mapping.model.PersistentEntity domainClass, List<DomainProperty> properties, groovy.lang.Closure content)
    Defines the context for rendering a list of domain class instances
    groovy.lang.Closure
    outputContext(org.grails.datastore.mapping.model.PersistentEntity domainClass, groovy.lang.Closure content)
    Defines the context for rendering a list domain class properties (show page)
    groovy.lang.Closure
    outputContext(DomainProperty property, groovy.lang.Closure content)
    Defines the context for rendering a single domain class property output
  • Method Details

    • listOutputContext

      groovy.lang.Closure listOutputContext(org.grails.datastore.mapping.model.PersistentEntity domainClass, List<DomainProperty> properties, groovy.lang.Closure content)
      Defines the context for rendering a list of domain class instances
      Parameters:
      domainClass - The domain class to be rendered
      properties - The properties to be rendered
      content - The content to be rendered for each property
      Returns:
      The closure to be passed to an instance of MarkupBuilder
    • inputContext

      groovy.lang.Closure inputContext(org.grails.datastore.mapping.model.PersistentEntity domainClass, groovy.lang.Closure content)
      Defines the context for rendering a list of domain class properties inputs (form)
      Parameters:
      domainClass - The domain class to be rendered
      content - The content to be rendered
      Returns:
      The closure to be passed to an instance of MarkupBuilder
    • inputContext

      groovy.lang.Closure inputContext(DomainProperty property, groovy.lang.Closure content)
      Defines the context for rendering a single domain class property input (select, textarea, etc)
      Parameters:
      property - The domain property to be rendered
      content - The content to be rendered
      Returns:
      The closure to be passed to an instance of MarkupBuilder
    • outputContext

      groovy.lang.Closure outputContext(org.grails.datastore.mapping.model.PersistentEntity domainClass, groovy.lang.Closure content)
      Defines the context for rendering a list domain class properties (show page)
      Parameters:
      domainClass - The domain class to be rendered
      content - The content to be rendered
      Returns:
      The closure to be passed to an instance of MarkupBuilder
    • outputContext

      groovy.lang.Closure outputContext(DomainProperty property, groovy.lang.Closure content)
      Defines the context for rendering a single domain class property output
      Parameters:
      property - The domain property to be rendered
      content - The content to be rendered
      Returns:
      The closure to be passed to an instance of MarkupBuilder
    • embeddedOutputContext

      groovy.lang.Closure embeddedOutputContext(DomainProperty property, groovy.lang.Closure content)
      Defines the context for rendering a the output of an embedded domain class property
      Parameters:
      property - The domain property to be rendered
      content - The content to be rendered
      Returns:
      The closure to be passed to an instance of MarkupBuilder
    • embeddedInputContext

      groovy.lang.Closure embeddedInputContext(DomainProperty property, groovy.lang.Closure content)
      Defines the context for rendering a the input of an embedded domain class property
      Parameters:
      property - The domain property to be rendered
      content - The content to be rendered
      Returns:
      The closure to be passed to an instance of MarkupBuilder