Sorry, this is the fixed solution:
[code]
@Override
public void generate(Node areaNode) throws RepositoryException {
if (!areaNode.hasNode("component")) {
Node text = areaNode.addNode("text",NodeTypes.Component.NAME);
text.setProperty(NodeTypes.Renderable.TEMPLATE,
"acmeModule:components/text");
text.setProperty("heading", "Auto generated");
text.setProperty("text", "<p>This text was autogenerated!</p>");
areaNode.getSession().save();
}
}[/code]
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=737da5fe-480a-4412-9f76-62b41cf65086
----------------------------------------------------------------
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: <[email protected]>
----------------------------------------------------------------