The base.module accessors
Most of the base.module.* accessors delegate to the ModuleContext instance of the module they access. Usually, the accessed module is the current module. However, the base.module.forName[...] accessor can be used to get an accessor to a module other than the current.
In a string context, the expression ${calyxo.base.module} itself can be used as a synonym for ${calyxo.base.module.name}.
name
Answers the name of the accessed module by delegating to ModuleContext.getName().
attribute[key]
Answers the value of a module scoped attribute for the given key by delegating to ModuleContext.getAttribute(Object).
path[action]
Answers the context relative path for the given action by delegating to ModuleContext.getPath(String).
The result will vary depending on the mapping for the accessed module. If it has been mapped using an extension mapping, the extension will be appended; if it has been mapped using a prefix mapping, the prefix will be prepended. The action may contain a query string (starting with '?') and anchor string (starting with '#').
Examples
The expression ${calyxo.base.module.path['/foo']} evaluates to
- "/foo.do" if the current module has been mapped to extension "*.do".
- "/cars/foo" if the current module has been mapped to prefix "/cars/*".
The expression ${calyxo.base.module.path['/foo?bar=1#top']} evaluates to
- "/foo.do?bar=1#top" if the current module has been mapped to extension "*.do".
- "/cars/foo?bar=1#top" if the current module has been mapped to prefix "/cars/*".
forName[name]
Answers a base.module accessor for the specified module by delegating to ModuleSupport.getModuleContext(String).
If the given module does not exist, null is answered.
Example
The expression ${calyxo.base.module.forName['foo'].path['/bar']} evaluates to the context relative path of action "/bar" in module "foo".


