Groovy Documentation

org.grails.plugin.vaadin.gsp
[Groovy] Class GspEvaluator

java.lang.Object
  org.grails.plugin.vaadin.gsp.GspEvaluator

class GspEvaluator

Evaluates a Gsp body, adds any nested Vaadin components to the specified container and returns the resulting text and Vaadin components.

Authors:
Francis McKenzie


Nested Class Summary
protected class GspEvaluator.GspLayoutNode

A special GspComponentNode that keeps a collection of any Vaadin Components that are added to it, and returns an HTML snippet of the form <div location='component_0' /> to the child component, which should then add this snippet to the page's body text.

static class GspEvaluator.Result

Holds the result of an evaluation

 
Property Summary
Application application

The Vaadin application (required)

CustomLayout parent

The parent component (required)

boolean root

True if this is the root component (optional)

 
Constructor Summary
GspEvaluator()

Empty constructor

GspEvaluator(CustomLayout parent, Application application, boolean root = false)

Initialise with specified values.

 
Method Summary
GspEvaluator.Result evaluate(Closure body)

Executes the body closure (could be a tag body) and stores the resulting text and components.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Property Detail

application

Application application
The Vaadin application (required)


parent

CustomLayout parent
The parent component (required)


root

boolean root
True if this is the root component (optional)


 
Constructor Detail

GspEvaluator

GspEvaluator()
Empty constructor


GspEvaluator

GspEvaluator(CustomLayout parent, Application application, boolean root = false)
Initialise with specified values.
Parameters:
parent - The parent component
application - The Vaadin application
root - True if this is the root component


 
Method Detail

evaluate

GspEvaluator.Result evaluate(Closure body)
Executes the body closure (could be a tag body) and stores the resulting text and components.
Parameters:
parent - The parent component
application - The vaadin application
body - The closure to execute to obtain the GSP text and components
root - True if this is the root component
Returns:
The result of evaluating the body


 

Groovy Documentation