AEM 6.2 classic : Get list of fields in the component dialog which has a specific property set on it. | Community
Skip to main content
cquser1
Level 7
Sep 6, 2018 3:20 PM UTC
Solved

AEM 6.2 classic : Get list of fields in the component dialog which has a specific property set on it.

Hi All,

Suppose, I have a component on the page. The sling:resourceType of this component is xyz/components/abc/SAMPLECOMPONENT.

Under xyz/components/abc/SAMPLECOMPONENT, there is xtype=dialog, under which multiple fields like textfield, textarea etc are present.

On some of the fields, there is a CUSTOM string property set.

In my model class, I need to find only such properties and do some manipulation on it.

Any thoughts/pointers/reference code on this will be helpful.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Sep 7, 2018 10:31 AM UTC

you can do search using SQL2/Query Builder API and do manipulation using JCR Node API.

Query Builder API

Arun Patidar

3 replies

arunpatidar
arunpatidarAccepted solution
New Participant
Sep 7, 2018 10:31 AM UTC

you can do search using SQL2/Query Builder API and do manipulation using JCR Node API.

Query Builder API

Translate
Arun Patidar
cquser1
cquser1Author
Level 7
Sep 7, 2018 9:47 AM UTC

Hi Arun,

Sorry for not being very clear.

Had a requirement, wherein once I read the properties set on the component, for certain dialog fields in the component, had to check for some "custom" property set under /apps/..../component/dialog.  Only if that property is there, had to do some manipulations on that.

For now, with componentContext.getEditContext().getComponent().getDialogPath() able to get something.

Working on it.

Will update this thread by today.

Translate
arunpatidar
New Participant
Sep 7, 2018 9:39 AM UTC

Hi,

Why do you want to access Dialog property in Sling Model. Sling Model is act when page is rendered and Dialog properties when dialog is open.

Can you explain little bit more to understand what exactly you want to do?

Translate
Arun Patidar