Fluent builder for an admin or website portlet contributed by an app, reached from controllerMappings.adminPortletController for admin pages or controllerMappings.websitePortletController for website pages. Set the target section, template and rendering function on the returned builder, then call build to create the mapping and, unless the app engine has already finished initialising, register it for rendering.
Group: Builders
Methods
portletSection(String portletSection)
Returns: PortletMappingBuilder
Sets the regular expression matched against the page section name this portlet renders into.
| Parameter | Description |
|---|---|
portletSection | the portlet section pattern |
addSectionResolver(String groupName, String resolver)
Returns: PortletMappingBuilder
Adds an extra resolver value, keyed by group name, made available to the portlet's template when rendering.
| Parameter | Description |
|---|---|
groupName | the key the resolver is looked up by in the template |
resolver | the resolver value |
templatePath(String templatePath)
Returns: PortletMappingBuilder
Sets the repository path of the template that renders this portlet's content.
| Parameter | Description |
|---|---|
templatePath | the template path |
method(String s)
Returns: PortletMappingBuilder
Sets the name of the JS function called to prepare this portlet before it is rendered.
| Parameter | Description |
|---|---|
s | the JS function name |
method(VarArgFunction f)
Returns: PortletMappingBuilder
Sets a direct reference to the JS function called to prepare this portlet before it is rendered.
| Parameter | Description |
|---|---|
f | the JS function reference |
enabled(boolean enabled)
Returns: PortletMappingBuilder
Sets whether this portlet is rendered into its section.
| Parameter | Description |
|---|---|
enabled | true to enable the portlet |
build()
Returns: PortletMapping
Builds the portlet mapping from the values set on this builder and, unless the app engine has already finished initialising and the mapping is not already present, registers it for rendering.