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:
Tried changes it to:
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.