Oct 18, 2012, 6:28 AM
[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:
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]