Expand my Community achievements bar.

SOLVED

AEM 6.2 classic ExtJS : Read property set on the parent node of listeners

Avatar

Level 8

Hi All,

We are referencing article provided in http://letsaem.blogspot.com/2015/12/implement-character-countdown-and.html to implement character count on one of the textfield in component dialog.

Here in article , there are 4 nodes shown. We are referring to the one circled in red. In this, for keyup, keypress & keydown events. there is a listener function written.

In those functions we need to read value of a property "customlength" of type "String" with value "5". This "customlength" is set on "heading" node.

Tried multiple things, but no luck.

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

cc.PNG

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi,

Did you try this.findParentByType('dialog').getField('./heading_field').getValue()  ? on contentload event listener

Thanks!

View solution in original post

2 Replies

Avatar

Level 10

You can look at trying to use Java JCR API to read those values. You can call a Servlet from an event handler and then read those node properties using a Strongly typed API.

Some similiar to what is dicussed here -- Adobe Experience Manager Help | Invoking Sling Servlets from Adobe Experience Manager xtype widgets

This is an older artilce written for Classic UI. In newer AEM versions - we will never do Classic UI examples as focus now is Touch UI.

Avatar

Correct answer by
Level 4

Hi,

Did you try this.findParentByType('dialog').getField('./heading_field').getValue()  ? on contentload event listener

Thanks!