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 7850709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:57:08+00:00 2026-06-02T18:57:08+00:00

Hello friends I am stuck at a point in sencha touch 2.0.I am creating

  • 0

Hello friends I am stuck at a point in sencha touch 2.0.I am creating a screen in my app in which i need to get the checkbox values(checked or unchecked). i am referring this example from sencha documentation,but i am unable to understand how to use Ext.ComponentQuery.query(‘what here comes?’)[0].

EDIT

here’s my code:-

Ext.define('MyApp.view.groupList',{
    extend : 'Ext.navigation.View',
    requires: ['Ext.field.Search', 'Ext.TitleBar'],
    alias: "widget.groupList",
    itemId: "gList",
    initialize: function(){
        this.callParent(arguments),
        var checkBox = {
            xtype: 'checkboxfield',
              name : 'all',
            //  label: 'All',
              value: 'all',
              lableWidth: "0",
              width: 1,
              padding: '0 0 15 30',
              checked: false
        };

        var sendBtn = {
                itemId: 'sendBtn',
                xtype: 'button',
                text: 'Send',
                ui: 'action',
                handler: function() {
                    var check = Ext.ComponentQuery.query('navigationview')[0],
                        values = check.getValues();

                    Ext.Msg.alert(null,
                        "Selected All: " + ((values.all) ? "yes" : "no")

                    );
                }     
        };

        var topToolbar = {
            xtype : "toolbar",
            title : "Groups",
            docked : "top",
            items: [
                    checkBox,
                    {xtype: 'spacer'},      
                  //  searchBtn, 
                    sendBtn
            ],
        };
        var list = {
                xtype: "grlist",
                store: Ext.getStore("grStore")
        };

        this.add([list,topToolbar]);
    },

    config: {
        navigationBar: {
            hidden: true,
        },
    }
});

I am getting the following error:-

TypeError: Result of expression 'check.getValues' [undefined] is not a function. at
 file:///android_asset/www/app/view/group_list.js

So please make me understand how Ext.ComponentQuery works with some sample code or tutorial.

Thanx in advance.

  • 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-02T18:57:09+00:00Added an answer on June 2, 2026 at 6:57 pm

    Ext.ComponentQuery accepts 3 types of parameters:

    • xtype, eg: Ext.ComponentQuery.query('navigationview')
    • id, eg: Ext.ComponentQuery.query('my-nav-view-id')
    • attributes, eg: Ext.ComponentQuery.query('navigationview[name="my nav view"]')

    No matter which type the param is of, Ext.ComponentQuery.query() always returns an array of matched components. In the example, they add [0] because it’s assured that the result array contains only 1 item.

    In your code, it seems that you tried to query a component of xtype navigationview, this kind of component does NOT have getValues methods (which is only available to Ext.form.Panel and derived classes). So if you want to retrieve the values, you have to use queries like this:

    Ext.ComponentQuery.query('checkboxfield')[0]

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello friends i need to get user information from facebook i am using code
hello friends , I need a publish my app in different-different market but not
Hello Friends, I make one app in android, in which i take three radio
Hello friends i am running code given below which contains the setLogTimeEntery function and
Hello friends i need a book/ tutorials for rails without using scoffold. All the
hello friends i am having two frames, each frame has a html form which
hello friends i am trying to get a list of user id and want
hello friends i have a check box list which contains all the courses kept
• hello friends, • I have one solution say sol1 ’ which contain one
Hello friends, I am developing an app in Titanium and I have a tableview

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.