Results 1 to 5 of 5

Thread: Ext.field.Select and Ext.field.DatePicker unable to show picker/options

  1. #1
    Sencha User
    Join Date
    Oct 2014
    Posts
    12

    Default Ext.field.Select and Ext.field.DatePicker unable to show picker/options

    I am using Extjs6 modern toolkit.

    Ext.field.Select and Ext.field.DatePicker unable to show picker/options when Ext.application is not in used.

    SelectField and DateField is not showing picker menu or options.jpg

    Code:
    var birthday = new Ext.field.DatePicker({		label: 'Birthday',
    		value: new Date()
    });
    
    Ext.create('Ext.Container', {			fullscreen: true,
    			renderTo: Ext.getBody(),
    			items: [
    			        birthday 
    			        ]
    		});
    If I put this code under Ext.application(), it will work. However, without Ext.application, the error happens as shown in the picture.

    Is there any solution for this?

    Thanks

    Note: I am integrating this framework into a legacy system. So, I cannot use Sencha cmd, No Ext.application, and No client MVC.

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985
    Answers
    506

    Default

    Can I ask why you are unable to use Ext.application? How are you ensuring that the framework is loaded before running the app?

  3. #3
    Sencha User
    Join Date
    Oct 2014
    Posts
    12

    Default

    Quote Originally Posted by Gary Schlosberg View Post
    How are you ensuring that the framework is loaded before running the app?

    I include the framework by putting the following code in my HTML/JSP
    HTML Code:
    <script type="text/javascript" src="https://cdn.sencha.com/ext/commercial/6.0.2/build/ext-all-debug.js"></script>        
    <script type="text/javascript" src="https://cdn.sencha.com/ext/commercial/6.0.2/build/ext-modern-all-debug.js"></script>        
    <script type="text/javascript" src="https://cdn.sencha.com/ext/commercial/6.0.2/build/modern/theme-neptune/theme-neptune-debug.js"></script>        
    <script type="text/javascript" src="https://cdn.sencha.com/ext/commercial/6.0.2/build/packages/charts/modern/charts-debug.js"></script>        
    <link rel="stylesheet" href="https://cdn.sencha.com/ext/commercial/6.0.2/build/modern/theme-neptune/resources/theme-neptune-all-debug.css" />        
    <link rel="stylesheet" href="https://cdn.sencha.com/ext/commercial/6.0.2/build/packages/charts/modern/modern-neptune/resources/charts-all-debug.css" />        
    <script type="text/javascript" src="myPage.js"></script>
    In myPage.js:
    Code:
    Ext.onReady(function() {
            Ext.create('Ext.Container', {
                fullscreen: true,
                renderTo: Ext.getBody(),
                items: [
                        new Ext.field.DatePicker({
                                  label: 'Birthday',
                              value: new Date()
                                });
                        ]
            });
    });
    ========================
    Quote Originally Posted by Gary Schlosberg View Post
    Can I ask why you are unable to use Ext.application?
    Like I said, I am working on a legacy system. It is using server MVC architecture but not client MVC. One JSP is mapped to One Action (struts). The legacy system is already having thousand of pages. I understand that in client MVC as introduced in ExtJS6 is using One Ext.Application hosting on multiple views, view is considered a page or subpage (at least that is how I understand it), each view is mapped to one viewController. Controller will communicate with the Action. Yes, I understand how awesome it is to have Sencha Cmd to handle most of the process, the benefit of client MVC, etc... But I can't possibly ask my company to change, let's revamp the whole structure of our legacy system, OR modify those existing thousand of pages.

    If you are telling me that I must use the Ext.Application to get this thing work and it must be in this way or no way, there is no flexibility in this matter, then how about those thousands of existing pages that were built since ExtJS3.4? That's sound like a lot of work, no? and my company is not able to accept the idea of having Ext.Application running per page (like I said, No client MVC, just simple One JSP with One JS mapped with One Action, clear cut, nobody is stepping anybody toes). Plus, I am not the boss.

    With the above explanation, I hope you fully understand that ExtJS is really a great product, used by a lot of MNC big company where they have existing product of their own and adopting this new awesome technology is not easy as revamping an existing small school project. So, No Sencha cmd, No client MVC, No multi-Application for a legacy system.

    Question: is there any other way I can still use ExtJS framework to build a rich UI web page and get it work without Ext.Application?

    P/S: I am sorry if any of my explanation sound a bit harsh and rush. It is quite stressful to teach a dinosaur (big and old company) with new tech (ExtJS6)

  4. #4
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,250
    Answers
    758

    Default

    Just to be clear, the modern toolkit evolved from Sencha Touch, the classic toolkit evolved from Ext JS. if you're porting an application from Ext 3 with no (or minimal) modification, then you definitely won't want to be using modern.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  5. #5
    Sencha User
    Join Date
    Oct 2014
    Posts
    12

    Default

    Thanks, then I will conclude that Ext.Application is a required component for extjs6 mobile toolkit components such as DatePicker, SelectField to work properly. Otherwise, it is advisable not to use extjs6 mobile toolkit.

Similar Threads

  1. select Field add options
    By PhilChill in forum Ext: Q&A
    Replies: 3
    Last Post: 24 Mar 2016, 12:26 AM
  2. Select field with your own picker
    By gmenuet in forum Sencha Touch 1.x: Discussion
    Replies: 11
    Last Post: 20 Feb 2014, 6:43 PM
  3. Set picker height for select field
    By amghw in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 1 Jun 2012, 10:38 AM
  4. Disable select field options
    By jiindal1988 in forum Sencha Touch 1.x: Q&A
    Replies: 2
    Last Post: 14 Nov 2011, 9:26 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •