Hi,

I've a little question in glace with Magnolia (v2.5): 
In fact, I would like to add some content in the repository...

*Here is my website structure:
  MyWebsite
     Department 1
     Department 2
     Department 2
     Department 4 (template: "twoColumns")

*I would like to add some content for the paragraph named 
"rightColumnParagraph" of the "twoColumns" template used by the "Department 4" 
page.
For the moment, I am only able to connect myself on the repository and to get a 
node (I do not know really if this last is the content node that I am trying to 
find :-():
      Hashtable<String, String> env = new Hashtable<String, String>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFactory);
        env.put(Context.PROVIDER_URL, providerURL);
        InitialContext ctx = new InitialContext(env);

        RegistryHelper.registerRepository(ctx, "myRep", configFile, repHomeDir, 
true);

        // Obtain the repository through a JNDI lookup
        Repository r = (Repository) ctx.lookup("myRep");

        // Create a new repository session, after authenticating
        Session session = r.login(new SimpleCredentials(login, 
password.toCharArray()), null);

        Node rootNode = session.getRootNode();
        Node contentNode = 
rootNode.getNode("clio/news/rightColumnParagraphs/MetaData/jcr:content");

Can someone help me in order to complete this step (getting the right node and 
add some data like string to it)?
Thx in advance,

        Benjamin



----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to