Sads
Sads

Reputation: 557

Nested list back button sencha touch 2

I need to get value of back button in nested list sencha touch 2 .. but it returns only back because it set default to back .. is there any way to get the actual value of it ?

Upvotes: 4

Views: 1380

Answers (3)

Walter Fuchs
Walter Fuchs

Reputation: 175

Try this: useTitleAsBackText: true

Upvotes: 1

Sads
Sads

Reputation: 557

I got this working with the following code:

nestedlist.getBackButton().getText() 

Upvotes: 1

Saurabh Gokhale
Saurabh Gokhale

Reputation: 46395

Under navigationview, you have a property called as defaultBackButtonText which is used to set the default text for back button.

You can provide with your own text like this,

.....
defaultBackButtonText: 'PopView',
.....

To get the value of this text, you can simply make the below call ...

// Returns 'PopView'
navigationView.getDefaultBackButtonText();

Upvotes: 2

Related Questions