How to get component path using EXTJS? | Community
Skip to main content
vikramca06
Level 4
October 16, 2015
Solved

How to get component path using EXTJS?

  • October 16, 2015
  • 3 replies
  • 1835 views

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.

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

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

}

3 replies

christopher_nd1
christopher_nd1Accepted solution
October 16, 2015

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

}

vikramca06
Level 4
October 16, 2015

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

give the current component path which the dialog belongs to.