Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9193587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:12:08+00:00 2026-06-17T21:12:08+00:00

I face some problem i can not declare global variable in extjs 4.1 controller

  • 0

I face some problem i can not declare global variable in extjs 4.1 controller if any one can help me how can i declare it.I donot know how i declare it
here is my code

Ext.define('Ext4Example.controller.poscontroller', {
    extend: 'Ext.app.Controller',    
    //models: ['Vat','Rebate','Customer','Product','Invoice','Item','Order','Paymethod'],
    stores: ['InvoiceIdFromSession','Vats','Rebates','Customers','Products','Invoices','Items','Paymethods'], //'Orders', ,'InvoiceIdFromSession','Products'  
    id : 'poscontroller',
    views   : ['stock.SaleWindow','stock.ItemForm2','stock.ItemsGrid','stock.CalculationForm'],
    refs: [{
        ref: 'itemForm',
        selector: 'form'
    }],
    init: function() {
        this.control({
            'itemsgrid': {
                removeitem: this.removeUser
            },
            'salewindow button[action=resetAll]': {
                click: this.resertform
            },            
            'salewindow button[action=saveOrder]' : {
                click : this.onsaveOrder
            },
            'salewindow button[action=PDF]' : {
                click : this. pdfreport
            }
        });
    },

    onsaveOrder : function(button){
            // i want declare this variable to global variable  

            var  itemform  = Ext.getCmp('itemform2');
            var  calculation_Form =Ext.getCmp('calculation-form');
            var ItemFrmdata = itemform.getForm().getValues(); 
            var calcFrmdata = calculation_Form.getForm().getValues();


}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:12:09+00:00Added an answer on June 17, 2026 at 9:12 pm

    At last i do it …..

    Ext.define('Ext4Example.controller.poscontroller', {
      extend: 'Ext.app.Controller',    
      //models: ['Vat','Rebate','Customer','Product','Invoice','Item','Order','Paymethod'],
      stores: ['InvoiceIdFromSession','Vats','Rebates','Customers','Products','Invoices','Items','Paymethods'], //'Orders', ,'InvoiceIdFromSession','Products'  
      id : 'poscontroller',
      views : ['stock.SaleWindow','stock.ItemForm2','stock.ItemsGrid','stock.CalculationForm'],
      refs: [{
        ref: 'itemForm',
        selector: 'form'
      }],
      init: function() {
        itemform  = Ext.getCmp('itemform2');
        calculation_Form = Ext.getCmp('calculation-form');
        ItemFrmdata = itemform.getForm().getValues(); 
        calcFrmdata = calculation_Form.getForm().getValues();
        this.control({
          'itemsgrid': {
            removeitem: this.removeUser
          },
          'salewindow button[action=resetAll]': {
            click: this.resertform
          },            
          'salewindow button[action=saveOrder]' : {
            click : this.onsaveOrder
          },
          'salewindow button[action=PDF]' : {
            click : this. pdfreport
          }
        });
      },
    
      onsaveOrder : function(button){           
      }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can some one explain why I face problem with backgroundworker backgroundWorker1_RunWorkerCompleted works just fine
I face a recurring problem in the code I write: modifying some global value
I face following problem with three20 photobrowser app : 1: Some time images are
few days to start the iPad development and i face the some problem, In
I am newbie about octopress, so i can face some problems. At the beginning,
I often face this problem with git: I clone a git repo of some
I have previous experience with MATLAB, but the problem that I face is some
This script is analysing face reactions with Face.com API. for some reason pygame can't
Not sure how I can reproduce this one in jsFiddle but I will try
I have a project that's been using font-face without problem for some time. Today

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.