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.

ParameterDescription
portletSectionthe 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.

ParameterDescription
groupNamethe key the resolver is looked up by in the template
resolverthe resolver value

templatePath(String templatePath)

Returns: PortletMappingBuilder

Sets the repository path of the template that renders this portlet's content.

ParameterDescription
templatePaththe template path

method(String s)

Returns: PortletMappingBuilder

Sets the name of the JS function called to prepare this portlet before it is rendered.

ParameterDescription
sthe 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.

ParameterDescription
fthe JS function reference

enabled(boolean enabled)

Returns: PortletMappingBuilder

Sets whether this portlet is rendered into its section.

ParameterDescription
enabledtrue 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.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.