mahesh
mahesh

Reputation: 3207

How to bind data to label in sencha touch

I want bind the data to label control at controller level. i have a main Tab-Panel view within view have two more view like example1 view and specification view. in specification tab view have a label is id: lblSpecification, for this label i am going to bind data at controller level as shown below. But it is not working. controller code is here:

config: {
  refs: {
    specificationPage: "specification",
    specificationLabel: "#lblSpecification"
  },

  control: {
    specificationPage: {
      initialize: "SpecificationInitialize"
    }
  },

  SpecificatiTabInitialize: function () {
    this.getSpecificationLabel().setHtml("Welcome");
  }
}

I have created another similar project, where I am not using tab panel, I have followed similar steps as code mentioned above, its working fine, please can I know its the problem due to tabpanel or is their any alternate way to achieve this?

Upvotes: 1

Views: 749

Answers (1)

Dmytro Plekhotkin
Dmytro Plekhotkin

Reputation: 1993

Try to setHtml when label is initialized but not a panel.

Upvotes: 1

Related Questions