4 Replies Latest reply on Jan 23, 2013 6:21 AM by apark2900

    How to retrieve a property in a node?

    apark2900

      Hi,

       

      I am a newbee in CQ development. Please answer the following question even though it can be too obvious question.

       

      --------------------------------------------------------------------------------

      1) I know this.

      --------------------------------------------------------------------------------

      - page structure: home(page)->Jobs(page)->Nurses(page)

      - to get a "title" property in "Nurses" page, I can do this:

       

         Page rootPage = pageManager.getPage("/content/advanceweb/home/Jobs/Nurses");

         String title = rootPage.getProperties().get("title",String.class);

       

      --------------------------------------------------------------------------------

      2) I don't know this....:)

      --------------------------------------------------------------------------------

      - page and node structure:      home(page) - > Jobs(page) -> Nurses(page) -> jcr:content(node)->text(node)

      - how can I get a "text" property in "text" node??????

       

          something like this?????


          Node rootNode = nodeManager.getNode("/content/advanceweb/home/Jobs/Nurses/jcr:content/text");

          String text = rootNode.getProperties().get("text", String.class);

       

       

      *CRX page structure*

      2.jpg