|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectcom.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractComponentContainer
com.vaadin.ui.AbstractLayout
com.vaadin.ui.CustomLayout
org.grails.plugin.vaadin.ui.GspBodyLayout
class GspBodyLayout extends CustomLayout
A Vaadin CustomLayout that uses a Grails GSP body as the template.
Field Summary | |
---|---|
protected Map |
bodyComponents
Components resulting from rendering the body |
protected boolean |
rendered
Prevent rendering twice |
Property Summary | |
---|---|
Closure |
body
The gsp body closure - automatically set to null when evaluated |
def |
log
|
boolean |
root
If true, indicates this Gsp is the top-level Gsp, and not a Gsp rendered inside another. |
Constructor Summary | |
GspBodyLayout()
Create an empty layout |
|
GspBodyLayout(Closure body)
Create a layout from a Gsp body |
|
GspBodyLayout(GspBodyLayout other)
Initialises this GspLayout from the other specified layout. |
Method Summary | |
---|---|
void
|
attach()
Render when attached |
protected Map
|
removeBodyComponents()
Removes the body components from this layout, because they're needed for another layout |
protected void
|
render()
Renders the gsp body. |
protected void
|
renderBody()
Initialises the superclass CustomLayout using the specified tag body as the template. |
protected Map
|
replaceBodyComponents(Map bodyComponents)
Removes the existing body components and adds the specified components in their place |
void
|
requestRender(boolean force = false)
Requests the render to take place if not yet done. |
protected def
|
requireVaadinApplication()
Helper method for situations where a Vaadin Application is required |
String
|
toString()
This component as a String - mainly useful for logging purposes. |
Field Detail |
---|
protected Map bodyComponents
protected boolean rendered
Property Detail |
---|
Closure body
def log
boolean root
Constructor Detail |
---|
GspBodyLayout()
GspBodyLayout(Closure body)
GspBodyLayout(GspBodyLayout other)
Note that this method will remove all body components from the specified layout and add them to this one instead.
layout
- The existing layout to apply the new template touri
- The uri of the new template Gsp to apply
Method Detail |
---|
void attach()
protected Map removeBodyComponents()
protected void render()
protected void renderBody()
Any Vaadin Components in the tag body are automatically added to this CustomLayout, in the order in which they appear.
protected Map replaceBodyComponents(Map bodyComponents)
void requestRender(boolean force = false)
Note that rendering should only be done after the component has been attached, as the Vaadin application is required.
force
- Force the render, even if already done
protected def requireVaadinApplication()
String toString()
Groovy Documentation