I customized the EventEditor fields in the following way:
Now I would like to have the value from the "authorValue"-Field as the title of the CalendarEvent instead of the default Name-Field which is hidden.
How can I manage this?
Thanks for your help.
(smartgwt-2.4.jar)
Code:
eventDS = new DataSource(); DataSourceSequenceField eventIdField = new DataSourceSequenceField("eventId"); eventIdField.setPrimaryKey(true); DataSourceDateField startDateField = new DataSourceDateField("startDate"); DataSourceDateField endDateField = new DataSourceDateField("endDate"); eventDS.setFields(eventIdField, startDateField, endDateField); eventDS.setClientOnly(true); CalendarEvent[] eventsArray = new CalendarEvent[this.calendarEvents.size()]; eventDS.setTestData(this.calendarEvents.toArray(eventsArray)); calendar.setDataSource(eventDS); eventsArray = new CalendarEvent[calendarEvents.size()]; calendar.setData(calendarEvents.toArray(eventsArray)); calendar.setAutoFetchData(true); //custom fields below TextItem authorValue = new TextItem(); authorValue.setName(AUTHOR); authorValue.setTitle("Author"); authorValue.setWidth(60); authorValue.setDefaultValue(DEFAULT_USER); authorValue.setColSpan(4); TextItem weightValue = new TextItem(); weightValue.setName(WEIGHT); weightValue.setTitle("Weight"); weightValue.setWidth(60); weightValue.setDefaultValue(200); weightValue.setColSpan(4); // hides Default-Feld name TextItem nameField = new TextItem("name", "Name"); nameField.setVisible(false); nameField.setDisabled(true); TextItem descriptionField = new TextItem("description", "Description"); descriptionField.setVisible(false); calendar.setEventEditorFields(descriptionField, nameField, authorValue, weightValue);
How can I manage this?
Thanks for your help.
(smartgwt-2.4.jar)