Announcement

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

    Calendar: update when creating new event

    I cannot create events in a calender that is not using the quickEventDialog.

    I cannot add any events to the calendar, since smartgwt tries to do an update, not an insert.

    Using smartgwt 5.0p 25.03 power.
    Last edited by edulid; 30 Mar 2015, 04:24.

    #2
    EntryModule:
    Code:
    public void onModuleLoad() {
    
    		VLayout layout = new VLayout();
    		Calendar calendar = new Calendar();
    		calendar.setDataSource(DataSource.get("calendar"));
    		calendar.setStartDateField("f_from");
    		calendar.setEndDateField("f_to");
    		calendar.setDescriptionField("f_text");
    		calendar.setNameField("f_title");
    		calendar.setTitleField("f_title");
    		calendar.setTimeFormatter(TimeDisplayFormat.TOSHORTPADDED24HOURTIME);
    		calendar.setTodayBackgroundColor("#E8E8E8");
    		calendar.setEventNameFieldTitle("name");
    		calendar.setSaveButtonTitle("save");
    		calendar.setRemoveButtonTitle("cancel");
    		calendar.setTwentyFourHourTime(true);
    		calendar.setWorkdayStart("8:00am");
    		calendar.setWorkdayEnd("8:00pm");
    		calendar.setShowWorkday(true);
    		calendar.setScrollToWorkday(true);
    		calendar.setCanResizeEvents(false);
    		calendar.setCanDragCreateEvents(false);
    		calendar.setShowQuickEventDialog(false);
    		
    		calendar.setDisableWeekends(false);
    		calendar.setShowWeekends(true);
    
    		layout.setWidth100();
    		layout.setHeight100();
    		layout.addMember(calendar);
    
    		layout.draw();
    	}
    If necessary: the ds.xml:
    Code:
    <DataSource ID="calendar" serverType="sql" tableName="t_calendar">
    
    	<fields>
    		<field name="f_id" type="sequence" primaryKey="true" />
    		<field name="f_title" type="text" />
    		<field name="f_text" type="text" />
    
    		<field name="f_from" type="datetime" />
    		<field name="f_to" type="datetime" />
    
    	</fields>
    
    </DataSource>

    Comment


      #3
      We see this issue and it's been fixed for builds dated April 2 and later.

      Comment

      Working...
      X