(Quick Reference)

location

Purpose

Adds the tag's body to the specified location in the parent container.

Examples

Take a GSP layout template called /grails-app/views/vaadin/layouts/greetinglayout.gsp with the following content:

<h1>Greeting<h1>
<div location="mygreeting"></div>

This could then be applied as a layout template for another GSP, like so:

<v:layout name="greetinglayout">
  <v:location name="mygreeting">
    <div>Hello World!</div>
  </v:location>
</v:label>

The resulting HTML would (effectively) be:

<h1>Greeting<h1>
<div location="mygreeting"><div>Hello World!</div></div>

This is an indication of the type of HTML that would be created, but it is not exact as Vaadin has its own rules for rendering CustomLayout components.

Description

This tag should be always be used with the layout tag, for constructing GSPs using layout templates.

Body

  • Can contain any GSP content.

Attributes

Specific
  • name or location (required) The location slot in the parent container to which this GSP content should be added.

General
  • var (optional) Uses Grails's set tag to set the value of the specified variable to be this component.
  • class (optional) The CSS class name to add to the component using the addStyleName() method
  • sizeUndefined (optional) Calls setSizeUndefined() on the component. (Attribute value is ignored)
  • sizeFull (optional) Calls setSizeFull() on the component. (Attribute value is ignored)
  • wrapperClass, wrapperStyle (optional) Special styling for wrapper <div>.

See Vaadin CustomLayout API docs for full list of allowed attributes.