![]() |
|
|
Change By:
|
Federico Grilli
(20/Nov/14 9:46 AM)
|
Description:
|
We can leverage the great Groovy support for creating fluent builders (http://groovy.codehaus.org/Make+a+builder) and achieve something like this {code} session = ctx.getJCRSession('config')
def builder = new GroovyBuilder(session.getNode('/modules'))
builder.my-module(type: 'mgnl:content') { apps(type:'mgnl:content') { my-app { 'class'('info.magnolia.ui.api.app.registry.ConfiguredAppDescriptor') appClass('info.magnolia.ui.contentapp.ContentApp') icon('app-icon') label('app-display-name') subApps { browser { 'class'(
"
'
info.magnolia.ui.contentapp.browser.BrowserSubAppDescriptor
"
'
) subAppClass(
"
'
info.magnolia.ui.contentapp.browser.BrowserSubApp
"
'
) label('app-display-name') } } } } }
session.save() {code}
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <dev-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------