I found the solution. You need to change de "generate" function:

[code]@Override
public void generate(Node areaNode) throws RepositoryException {
if (!areaNode.hasNode("component")) {
Node text = areaNode.addNode("text",NodeTypes.Content.NAME);
Node metadata = text.addNode(NodeTypes.MetaData.NAME);
metadata.setProperty("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]>
----------------------------------------------------------------

Reply via email to