Read property from parent node for touch ui component name for AEM6.3 | Community
Skip to main content
srinivas_chann1
Level 7
July 10, 2019

Read property from parent node for touch ui component name for AEM6.3

  • July 10, 2019
  • 1 reply
  • 5733 views

Hi,

I have a similar issue described in http://aemconcepts.blogspot.com/2017/05/read-and-write-to-parent-node-from.html

where i can write to jcr: content from a component dialog but cannot read  the property from component dialog

my node structure is

jcr:content

+     Mainpar

+ ..  componentNode  [here the property name which reads property from  jcr node like ]

for example name = "../../jcrbasedProperty"

Works:- When submit the dialog the value in jcrbasedProperty  is getting saved in jcr:content

Problem:- The  same property is not getting retrieved when dialog is open in touch ui.

Please provide any sample code that i could use for touch ui field with

sling:resourceType="granite/ui/components/coral/foundation/form/textfield"

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

arunpatidar
Community Advisor
Community Advisor
July 11, 2019

why are you saving properties in page node or other node. Save in the same node and retrieve wherever you want using java APIs.

If you want to save properties for page node then use page properties dialog.

What if there are two components in the same page and that would try to writes different values on same property?

Arun Patidar
srinivas_chann1
Level 7
July 12, 2019

We have this behavior already defined was part of classic UI and now i am converting that touch UI and facing this issue.Please let me know if there any solution to take from parent node with problem statement i mentioned

Thanks

arunpatidar
Community Advisor
Community Advisor
July 12, 2019

Hi,

I think as part of migration you can change the startegy.

Anyways to work this -

You need to write custom js , on dialog load, makes ajax call to parent node e.g.(http://localhost:4504/content/AEM64App/en/_jcr_content/root/responsivegrid/text.json ) where property is save and extracted the property and fill the textfield.

Arun Patidar