setActiveView

Community support for questions or issues specific to Extensible components

setActiveView

Postby botsko » Thu Oct 27, 2011 10:08 am

I want to change the CalendarPanel's activeView after component is loaded. I saw there is a setActiveView function which is marked private. It has a single id parameter. I tired it and the view indeed changed but with error at the line:
l.setActiveItem(id); -> Uncaught TypeError: Cannot read property 'xtype' of undefined

Any directions would be much appreciated
botsko
 
Posts: 5
Joined: Tue Aug 02, 2011 10:33 pm

Re: setActiveView

Postby brian.moeskau » Mon Oct 31, 2011 11:41 am

The id should be the internally-assigned view id (which is why it's private). What are you trying to accomplish? Most likely you'll want to either use the view's moveX methods (CalendarPanel.getActiveView().moveXX()) or call CalendarPanel.setStartDate() if you want to refresh the view based on a date.
Personal Blog: Extraneous / Twitter: @bmoeskau / Meetup: Austin Bleeding Edge Web
User avatar
brian.moeskau
Site Admin
Site Admin
 
Posts: 1344
Joined: Sat Sep 18, 2010 5:00 pm
Location: Austin, Texas

Re: setActiveView

Postby wolberspl » Thu Mar 03, 2016 1:06 am

I also want to set the view dynamically. Because the user can set the active view.
Is there a way to get the ineternal ID of a view?

I just found out how: ID of the view is the ID of the calendarpanel + '_month' .. (or day, multiday, week, multiweek)
wolberspl
 
Posts: 2
Joined: Thu Jan 21, 2016 1:08 am

Re: setActiveView

Postby LeroyWa » Thu Nov 30, 2017 8:58 am

wolberspl wrote:I also want to set the view dynamically. Because the user can set the active view.
Is there a way to get the ineternal ID of a view?

I just found out how: ID of the view is the ID of the calendarpanel + '_month' .. (or day, multiday, week, multiweek)


Ah, thanks wolber! That works.
LeroyWa
 
Posts: 1
Joined: Mon Nov 20, 2017 2:47 am


Return to Help & Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron