Can't add calendar to the ExtJS 4.0.7 Web Desktop.

Community support for questions or issues specific to Extensible components

Can't add calendar to the ExtJS 4.0.7 Web Desktop.

Postby edykstra » Thu Nov 24, 2011 11:38 am

Hello,

I posted the issue I am having on the ExtJS forums here:

http://www.sencha.com/forum/showthread.php?157056-Can-t-remove-the-BogusMenuModule-from-the-Web-Desktop-or-add-the-Extensible-calendar.&p=679382#post679382

However, I am not sure if it is an issue with how I am using ExtJS or Extensible.

Basically, I can't seem to add the Extensible calendar to the ExtJS 4.0.7 Web Desktop.

Any direction on resolving this would be appreciated!

Thanks,

Eric
edykstra
 
Posts: 3
Joined: Tue Nov 22, 2011 1:59 pm

Re: Can't add calendar to the ExtJS 4.0.7 Web Desktop.

Postby brian.moeskau » Thu Nov 24, 2011 7:07 pm

No idea. What does your code look like that sets up the calendar and event store and adds them to the desktop? Do you have an example I can run?
Personal Blog: Extraneous / Twitter: @bmoeskau / Meetup: Austin Bleeding Edge Web
User avatar
brian.moeskau
Site Admin
Site Admin
 
Posts: 1328
Joined: Sat Sep 18, 2010 5:00 pm
Location: Austin, Texas

Re: Can't add calendar to the ExtJS 4.0.7 Web Desktop.

Postby edykstra » Fri Nov 25, 2011 8:22 am

Brian,

Here is the 'module' I add to the ExtJS desktop.

Note the comment in the code near the end. It is that line that causes the error;

"Uncaught TypeError: Cannot read property 'prototype' of undefined."

I believe it is because the ExtJS desktop code is expecting it to have a data store, and not just return JSON data. But I am not certain.

Thanks,

Eric

Code: Select all
Ext.require([
    'Ext.grid.*',
    'Ext.data.*',
    'Ext.util.*',
    'Ext.toolbar.Paging',
    'Ext.tip.QuickTipManager',
    'Ext.tab.Panel',
   
    'Ext.ux.desktop.Module'
    ,
    'Extensible.calendar.data.MemoryEventStore',
    'Extensible.calendar.data.MemoryCalendarStore',
    'Extensible.calendar.CalendarPanel',
    'Extensible.example.calendar.data.EventsCustom',
    'Extensible.example.calendar.data.CalendarsCustom',
    'Extensible.calendar.data.CalendarMappings',
    'Extensible.calendar.data.EventMappings'   
]);

Ext.tip.QuickTipManager.init();

Ext.define('DRMTrack.view.appointments.Module', {

    alias:                        'widget.appointmentsmodule',
    extend:                       'Ext.ux.desktop.Module',
    id:                           'appointments-module-window',
    itemId:                       'appointmentsmodule',
     
    init:                          function(){
        this.launcher = {
            handler:               this.createWindow,
            iconCls:              'icon-calendar',
            scope:                 this,
            text:                 'Calendar',
            windowId:             'appointments-module-window'
        }
    },
       
    initComponent:                 function(){

        var config = {

        };
       
        Ext.apply(this, Ext.apply(this.initialConfig, config));
        this.callParent(arguments);
    },
   
    createWindow:                    function(){

        var b = this.app.getDesktop();
        var a = b.getWindow('appointments-module-window');

        if(!a){

            a = b.createWindow({
                id:             "appointments-module-window",
                title:          "Calendar",
                width:           740,
                height:          480,
                iconCls:        "icon-calendar",
                animCollapse:    true,
                closeAction:    'hide',
                collapsible:     true,
                border:          false,
                constrainHeader: true,
                layout:         'fit',
                items:           [{
                    xtype:      'extensible.calendarpanel',
                    eventStore:  Ext.create('Extensible.calendar.data.MemoryEventStore', {
                        // ######## This following line causes the error.
                        data: Ext.create('Extensible.example.calendar.data.Events')
                    })
                }]
            });
        };
       
        a.show();
        return a
    }   
});
edykstra
 
Posts: 3
Joined: Tue Nov 22, 2011 1:59 pm


Return to Help & Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron