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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:35:01+00:00 2026-06-11T21:35:01+00:00

Trying to have a button push to a different view ‘new profile’ and ‘profile

  • 0

Trying to have a button push to a different view ‘new profile’ and ‘profile page’ (second view) Of course I would have authentication, however just trying to get the views correct before implement the controllers and server side.

Having the following errors:

  1. Uncaught ReferenceError: view is not defined Main.js:116
  2. Uncaught ReferenceError: view is not defined Main.js:126

Google only brings back “ext is not defined” responses.

Forgive the shocking coding as this is my first app for my school assignment (please give feedback how to improve this if possible) I understand that the view needs to be defined, however in the Sencha Touch’s API is where I got the information.

Thanks for your time.

var pageFilterGame = {
    xtype: 'panel',  
    title: 'Filter Games',            
    items: [
        {
            xtype: 'fieldset',
            title: 'Filter games to find the perfect one',
            instructions: 'Please fill in atleast one field to start.',
            items: [
                {  
                    xtype: 'selectfield',
                    label: 'What enviroment will this game be played in',                    
                    options: [
                        { text: 'Outside on Grass', value: 'grass' },
                        { text: 'Outside on Concrete', value: 'concrete' },
                        { text: 'Inside', value: 'inside' }
                        ]        
                },
                {
                    xtype: 'selectfield',
                    name: 'equipment',                                
                    label: 'What equipment do you have',
                    options: [{text: 'DB form'}]
                },
                {
                    xtype: 'numberfield',
                    name : 'Player Numbers',
                    label: 'How many players do you have',
                    minValue: 2,
                    maxValue: 50
                },
                {
                    xtype: 'numberfield',
                    name: 'avgname',
                    label: 'Average age of players',
                    minValue: 2,
                    maxValue: 99
                },
                {
                    xtype: 'selectfield',
                    label: 'Sort result by:',
                    options: [
                        { text: 'Highest Rated', value: 'rated' },
                        { text: 'Equipment', value: 'equipment' },
                        { text: 'Alphabetically', value: 'alpha' }
                        ]
                },
            ],
        },                            
        {
            xtype: 'button',
            ui: 'action',
            text: 'Filter Games',
            action: '',
            maxWidth: '150px'                        
        }
    ]
};

var pageSearch = {
    xtype: 'panel',       
    title: 'Search',
    items: [
        {
            xtype: 'fieldset',
            title: 'Search',
            items: [
                {
                    xtype: 'searchfield',
                    label: 'Search',
                    name: 'search'
                }
            ]
        },
        {
            xtype: 'button',
            ui: 'action',
            text: 'Search',
            action: '',
            maxWidth: '100px'                   
        }
    ]
};

var pageProfileLogin = {
    xtype: 'panel',
    title: 'My Profile',
    items: [
        {
            xtype: 'fieldset',
            title: 'Please login to access your profile',                    
            items: [
                {
                    xtype: 'textfield',
                    name : 'username',
                    label: 'Username'                                
                },
                {
                    xtype: 'passwordfield',
                    name: 'password',                                
                    label: 'Password',
                    clearIcon: false                         
                }
            ]
        },  
        {
            xtype: 'toolbar',
            docked: 'bottom',
            items: [
                {
                    text: 'Login',
                    ui: 'confirm',
                    handler: function() { 
                    view.push({                            
                        title: 'Second View',
                        padding: 10,
                        })},
                },                      
                {
                    xtype: 'button',
                    ui: 'action',
                    text: 'Create New',                         
                    handler: function() {                          
                    view.push({
                        title: 'New Profile',
                        items: [
                            {
                                xtype: 'fieldset',
                                title: 'Please fill in the form to create your profile',                    
                                items: [
                                    {
                                        xtype: 'textfield',
                                        name : 'username',
                                        label: 'Username'                                
                                    },
                                    {
                                        xtype: 'passwordfield',
                                        name: 'password',                                
                                        label: 'Password',
                                        clearIcon: false                         
                                    },
                                    {
                                        xtype: 'textfield',
                                        name : 'name',
                                        label: 'Name'                                
                                    },
                                ],
                            },
                            {                               
                                xtype: 'toolbar',
                                docked: 'bottom',
                                items: [
                                    {
                                        text: 'Login',
                                        ui: 'confirm',                                         
                                    },
                                ]
                            }
                        ]        
                    });
                    }                           
                },

            ]
        },
    ]}

var viewTabConfig = {
    xtype: 'tabpanel', 
    styleHtmlContent: true,
    title: 'Get Creative!',
    items: [pageFilterGame, pageSearch, pageProfileLogin]
};

var viewDef = {
    //
    // Another new UI element introduced. This UI element allows one to add multiple panels in a 'stacked' like operation. A
    // new panel when pushed into the NavigationView will be displayed along with a back button. When the back button is tapped,
    // the visible view is 'popped' and the parent view gets displayed again. See demo in the lecture recording.
    //
    extend: 'Ext.NavigationView',
    id: 'navView',
    requires: [
        'Ext.TitleBar',
        'Ext.Video',
        'Ext.field.Password',
        'Ext.field.Select',
        'Ext.field.Number',
        'Ext.field.Search',
        'Ext.form.FieldSet',
        'Ext.tab.Panel',    
        'Ext.data.Store',
        'Ext.data.reader.Xml'
    ],
    config: {
        fullscreen: true, 
        items: [viewTabConfig]
    }   
};

Ext.define("a2.view.Main", viewDef);
  • 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-11T21:35:02+00:00Added an answer on June 11, 2026 at 9:35 pm

    I had to add extra models and view to the app.js file and it worked fine.

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

Sidebar

Related Questions

I have a view controller that i'm trying to push onto the navigation stack.
I am trying to have some controls appear when you push a button and
I am trying to have the button to display to the right of the
I'm trying to have a button on the self.navigationItem.rightButton that toggles a segmented control
I am trying to have a button with an icon and text. The icon
I am trying to have an onclick button print a check and run my
I am trying to have my interface dynamically generate a customized button when I
I'm trying to use $(button).button(); but jquery-ui-1.8.16.custom.min.js used by SlickGrid doesn't have the button
I'm trying to create a UIButton programmatically. I have a button called addCash (which
I have been trying to add an askquestion dialog box to a delete button

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.