Expand my Community achievements bar.

SOLVED

How to get component path using EXTJS?

Avatar

Level 4

Hi

I need to know the component path when clicking on the ok button.

i have written handler for ok button and it is working fine.

Now, i need to get the component path.

Any help?

Thanks,

Vikram.

1 Accepted Solution

Avatar

Correct answer by
Level 1

Hi Vikram,

talking of extjs, I assume you are have a dialog?

I you handler add a an onclick listener to your button.

After clicking the button, use the field to fine the dialog.

From the dialog you can get your component path.

Exemple:

function listnerOnButton(field) {

var dialogPath = field.findParentByType("dialog");

//TODO: split path to remove dialog

}

View solution in original post

3 Replies

Avatar

Correct answer by
Level 1

Hi Vikram,

talking of extjs, I assume you are have a dialog?

I you handler add a an onclick listener to your button.

After clicking the button, use the field to fine the dialog.

From the dialog you can get your component path.

Exemple:

function listnerOnButton(field) {

var dialogPath = field.findParentByType("dialog");

//TODO: split path to remove dialog

}

Avatar

Level 4

var dialogPath = field.findParentByType("dialog").responseScope.path;

give the current component path which the dialog belongs to.