[CLOSED] Calendar: how to read events with DirectEvent or DirectMethod

  1. #1

    [CLOSED] Calendar: how to read events with DirectEvent or DirectMethod

    Hello,

    I'm trying to load events into a CalendarPanel using a DirectMethod or a DirectEvent. I would like to load events only when a new temporal window is shown, like the Remote Data example, but without a web service.
    How achieve this? I see it uses an AjaxProxy. Should I use a DirectProxy? I tried unsuccessfully:

    <ext:CalendarPanel ID="CalendarPanel1" runat="server" Region="Center" ShowWeekView="True"
                WeekText="Settimana" DayText="Giorno" ShowDayView="True" ShowMonthView="False" TodayText="Oggi"
                Header="False" ActiveIndex="1" ShowNavBar="False" >
                <CalendarStore runat="server">
                  <Calendars>
    <ext:CalendarModel CalendarId="2" Title="Work" />
                  </Calendars>
                </CalendarStore>
                <EventStore ID="EventStore1" runat="server" NoMappings="true" OnLoadData="OnLoadEvents">
                  <Proxy>
                    <ext:DirectProxy>
                      <DirectFn Fn="App.direct.GetEvents"></DirectFn>
                    </ext:DirectProxy>
                  </Proxy>
                  <Mappings>
                    <ext:ModelField Name="StartDate" Type="Date" DateFormat="M$" />
                    <ext:ModelField Name="EndDate" Type="Date" DateFormat="M$" />
                  </Mappings>
                  <Listeners>
                    <BeforeSync Handler="Ext.Msg.alert('Sync', 'The EventStore initiates a sync request after that action. The EventStore synchronization is not implemented in that example.'); 
                                                             this.commitChanges();
                                                             return false;" />
                  </Listeners>
                </EventStore>
              </ext:CalendarPanel>
    Last edited by Daniil; Oct 22, 2012 at 1:12 PM. Reason: [CLOSED]
  2. #2
    Hi @sbg,

    1. PageProxy + Store OnReadData handler (it is a DirectEvent)
    https://examples2.ext.net/#/GridPane..._Sorting/Page/

    2. PageProxy + DirectMethod
    https://examples2.ext.net/#/GridPane..._DirectMethod/

Similar Threads

  1. Calendar Recurring Events
    By vwagoner in forum 1.x Help
    Replies: 1
    Last Post: Apr 09, 2012, 11:49 AM
  2. No optimized events on calendar
    By reiben in forum 1.x Help
    Replies: 4
    Last Post: Dec 06, 2011, 6:27 PM
  3. Replies: 2
    Last Post: May 02, 2011, 9:08 PM
  4. [CLOSED] Difference between DirectMethod , DirectEvent, Static DirectMethod
    By syllabusarq in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 01, 2011, 11:37 AM
  5. Replies: 15
    Last Post: Feb 03, 2011, 1:27 PM

Tags for this Thread

Posting Permissions