Package org.grails.scaffolding.markup
Interface ContextMarkupRenderer
-
public interface ContextMarkupRendererUsed 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description groovy.lang.ClosureembeddedInputContext(DomainProperty property, groovy.lang.Closure content)Defines the context for rendering a the input of an embedded domain class propertygroovy.lang.ClosureembeddedOutputContext(DomainProperty property, groovy.lang.Closure content)Defines the context for rendering a the output of an embedded domain class propertygroovy.lang.ClosureinputContext(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.ClosureinputContext(DomainProperty property, groovy.lang.Closure content)Defines the context for rendering a single domain class property input (select, textarea, etc)groovy.lang.ClosurelistOutputContext(org.grails.datastore.mapping.model.PersistentEntity domainClass, java.util.List<DomainProperty> properties, groovy.lang.Closure content)Defines the context for rendering a list of domain class instancesgroovy.lang.ClosureoutputContext(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.ClosureoutputContext(DomainProperty property, groovy.lang.Closure content)Defines the context for rendering a single domain class property output
-
-
-
Method Detail
-
listOutputContext
groovy.lang.Closure listOutputContext(org.grails.datastore.mapping.model.PersistentEntity domainClass, java.util.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 renderedproperties- The properties to be renderedcontent- 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 renderedcontent- 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 renderedcontent- 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 renderedcontent- 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 renderedcontent- 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 renderedcontent- 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 renderedcontent- The content to be rendered- Returns:
- The closure to be passed to an instance of
MarkupBuilder
-
-