42Lines / wicket-fullcalendar

Integration of FullCalendar javascript lib with Wicket
Other
24 stars 22 forks source link

Add a new Event into the Calendar #2

Closed golrokh closed 13 years ago

golrokh commented 13 years ago

Hi,

I try to add a new Event into the Calendar in these following steps:

  1. I do calendar.setOutputMarkupId(true) to make it refreshable.
  2. On "onDateRangeSelected" I open a ModalWindow, which user can define a new Event in it.
  3. On "Modal.setWindowClosedCallback()" I save the Event in the Database and I do "target.addComponent(calendar)"
  4. Calendar re-fetches all the events but the new event is not shown in the calendar!
  5. When I refresh the whole page, then I can see the new added event.

How can I make the Calendar to be refreshed after closing the modalWindow??

/Goli

jeffkpayne commented 13 years ago

Try calling response.refetchEvents(), using the CalendarResponse passed into onDateRangeSelected, after the event is persisted.

ivaynberg commented 13 years ago

you can also create your own instance of CalendarResponse if you dont have one