Trying to play around with this much-needed feature for our release later this year and running into some issues.
The build I have is the latest one as of this post timestamp.
I have a ds descriptor as follows:
My code is as follows:
Whenever I set setShowTimeline(true) on a Calendar object, I get a stacktrace error and nothing happens. Whenever I try to create a Timeline object, I get the same error. There are no errors in the console or logs - just a popup error.
That aside, what is the correct use of StartDateField, EndDateField, LeadingDateField, TrailingDateField, etc. We are trying to show events that span multiple days and are unable to do so. I've tried using the same fields as the start and end dates for the leading and trailing and that doesn't seem to work.
Any thoughts on these issues?
The build I have is the latest one as of this post timestamp.
I have a ds descriptor as follows:
Code:
<fields> <field name="JIT_SCHD_CONST_PK" type="sequence" sequenceName="JIT_SCHEDULE_CONST_SEQ" title="JIT_SCHD_CONST_PK" primaryKey="true" hidden="true"></field> <field name="PROGCOMP_FK" type="int" title="PROGCOMP_FK" hidden="true"></field> <field name="START_DATE" type="datetime" title="Exclusion Date"> <!-- <validators> <validator type="dateRange" min="$currentDate"/> </validators> --> </field> <field name="END_DATE" type="datetime" title="End Date"></field> <field name="NAME" type="text" title="Name" required="true"></field> <field name="DESCRIPTION" type="text" title="Description"></field> <field name="USER_ID" type="string" title="USER_ID" hidden="true"></field> <field name="ROW_TIMESTAMP" type="datetime" title="ROW_TIMESTAMP" hidden="true"></field> </fields> <operationBindings> <operationBinding operationType="fetch"> <orderClause>START_DATE, END_DATE, NAME</orderClause> </operationBinding> <operationBinding operationType="add"> <!-- <values fieldName="PROGCOMP_FK" value="-1"></values> --> <!-- <values fieldName="END_DATE" value="$values.START_DATE"></values> --> </operationBinding> <operationBinding operationType="update"/> <operationBinding operationType="remove"/> </operationBindings>
Code:
public class CalendarDetailsViewer extends VLayout { private TabSet detailsTabSet; private static DataSource calendarDS = DataSource.getDataSource("jitCalendar"); private Tab calendarTab = null; private Tab timelineTab = null; public static int MEMBER_MARGIN = 8; public CalendarDetailsViewer(TabSet detailsTabSet){ this.detailsTabSet = detailsTabSet; setupContents(); } private void setupContents() { calendarTab = new Tab("Calendar"); Calendar calendar = new Calendar(); calendar.setStartDateField("START_DATE"); calendar.setLeadingDateField("START_DATE"); calendar.setEndDateField("END_DATE"); calendar.setTrailingDateField("END_DATE"); calendar.setNameField("NAME"); calendar.setDescriptionField("DESCRIPTION"); calendar.setDataSource(calendarDS); calendar.setAutoFetchData(true); // calendar.setShowDayView(false); // calendar.setShowWeekView(false); // calendar.setCanCreateEvents(false); // calendar.setCanEditEvents(false); // calendar.setShowTimelineView(true); calendarTab.setPane(calendar); detailsTabSet.addTab(calendarTab); // timelineTab = new Tab("Timeline"); // Timeline timeline = new Timeline(); // timeline.setStartDateField("START_DATE"); // timeline.setEndDateField("END_DATE"); // timeline.setNameField("NAME"); // timeline.setDescriptionField("DESCRIPTION"); // timeline.setDataSource(calendarDS); // // timelineTab.setPane(timeline); // detailsTabSet.addTab(timelineTab); } }
That aside, what is the correct use of StartDateField, EndDateField, LeadingDateField, TrailingDateField, etc. We are trying to show events that span multiple days and are unable to do so. I've tried using the same fields as the start and end dates for the leading and trailing and that doesn't seem to work.
Any thoughts on these issues?
Comment