Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    New calendar event getting null is null exception

    Hi,

    While creating a new event in calendar, i am getting "null is null" exception. Also the event is not created in the calendar also.

    And it's working fine in firefox, giving exception in IE.

    Can anyone explain what is the cause for this?

    #2
    Unless you post code we cannot help. Please read the FAQ on how to ask questions. It should include a minimal standalone testcase, or a modification to an existing showcase sample.

    Comment


      #3
      New calendar event getting null is null exception

      Code:
      eventDS.setTestData(records);
      		calendar  = new Calendar();
      		calendar.setEventNameFieldTitle("Meeting Name");
      		calendar.setSaveButtonTitle("Create Meeting");
      		calendar.setCancelButtonTitle("Cancel Meeting");
      		//calendar.setCanCreateEvents(false);
      		calendar.setCanEditEvents(false);
      		calendar.setCanDeleteEvents(false);
      		calendar.setPixelSize(850, 425);
      		calendar.setDataSource(eventDS);   
      		calendar.setAutoFetchData(true);
      		eventDS.setTestData(records);
      		calendar.setDataSource(eventDS);
      		calendar.setAutoFetchData(true);
      		calendar.draw();
      		calendarPanel.add(calendar);
      And also I have listeners to calenders like below.

      Code:
      		calendar.addEventAddedHandler(new EventAddedHandler() {
      			
      			@Override
      			public void onEventAdded(CalendarEventAdded event)
      			{
      				CalendarEvent calendarEvent = event.getEvent();
      				if(isNewEvent) {
      					createNewEvent(calendarEvent);
      					isNewEvent = true;
      				}
      			}
      		});
      		
      		calendar.addEventClickHandler(new EventClickHandler() {
      
      			@Override
      			public void onEventClick(CalendarEventClick event)
      			{
      				final CalendarEvent createdEvent = event.getEvent();
      				calendar.setVisible(false);
      				MessageBox.confirm("Create or Update", "If you wish to update the existing meeting click YES else NO",
      						new MessageBox.ConfirmCallback() {
      					public void execute(String btnID) {
      						if(btnID.equals("yes")){
      							calendar.setVisible(true);
      							updateSrf(createdEvent);
      						}
      						else {
      							calendar.setVisible(true);
      							createSrf(createdEvent);
      						}
      					}
      				});
      			}
      			
      		});
      This is my code snippets. and when i am trying to create a new event in calendar its showing "null is null" exception. But its working fine in firefox. I can able to create events in firefox.

      Comment

      Working...
      X