1 Reply Latest reply on Oct 25, 2012 7:01 AM by rush_pawan

    Text component editing text on jcr:content node

    danchapmanme Level 1

      I have some text on the jcr:content node that I would like a text component to be able to edit. I have copied the OOB text component and changed its "name" property from ./text to ../text so that it now saves the text on the jcr:content node. I now need to modify the text.jsp and change the "property" attribute, but when I change it to ../text it does not work. Any ideas what I need to do?

       

      Existing text.jsp code:

      <cq:text property="text"/>

       

      Tried changes it to:

      <cq:text property="../text"/>

        • 1. Re: Text component editing text on jcr:content node
          rush_pawan Level 4

          It will not work because the properties object in component does hold valuemap objects only for component related data (so it just like you can think of setting some data in map and getting). To get parent property you have to take it through parent resource properties.

           

          It works while storing because while creating the node it takes relative path and as put '..' it maps accordingly and store it in parent resource. I hope it clears your doubt.

          1 person found this helpful