Hello.
I'm working with the Timeline component and I have 2 problems with the Headers :
Can you give me a feedback about the points 1 and 2? Thanks.
Regards.
PS: I use SmartGWTpro-5.0p
I'm working with the Timeline component and I have 2 problems with the Headers :
- The current week number is written twice.
- The dates are fixed in the format "MM/dd"
Code:
// Date standards[INDENT]DateUtil.setShortDatetimeDisplayFormatter(DateUtil.TOEUROPEANSHORTDATETIME); DateUtil.setShortDateDisplayFormatter(DateUtil.TOEUROPEANSHORTDATE); DateUtil.setNormalDateDisplayFormatter(DateUtil.TOEUROPEANSHORTDATE); DateUtil.setNormalDatetimeDisplayFormatter(DateUtil.TOEUROPEANSHORTDATETIME); this.planning = new Timeline(); this.planning.setID("BannerFormViewImpl_planning"); this.planning.setHeight(354); this.planning.setWidth100(); Date today = new Date(); this.planning.setStartDate(today); CalendarUtil.addDaysToDate(today, Constant.BFM_PLANNING_DURATION_IN_DAYS); this.planning.setEndDate(today); this.planning.setCanEditLane(false); this.planning.setShowEventDescriptions(false); this.planning.setShowControlsBar(false); this.planning.setCanAcceptDrop(true); this.planning.setAutoFetchData(false); this.planning.setCanEditEvents(false); this.planning.setCanCreateEvents(false); this.planning.setEventOverlap(false); // Useless this.planning.setDateFormatter(DateDisplayFormat.TOEUROPEANSHORTDATE); HeaderLevel[] headerLevels = new HeaderLevel[] { new HeaderLevel(TimeUnit.WEEK), new HeaderLevel(TimeUnit.DAY) }; this.planning.setHeaderLevels(headerLevels); this.planning.setLaneFields(new HTMLEscapedListGridField[] { new HTMLEscapedListGridField("title", "Page", 80) }); this.planning.setLanes(TimelineLaneData.getRecords()); [/INDENT]
Code:
I suppose I may use this method :[INDENT]this.planning.setDateHeaderCustomizer(new DateHeaderCustomizer() { @Override public String getHeaderTitle(Date date, int dayOfWeek, String defaultValue, CalendarView calendarView) { // TODO Auto-generated method stub return null; } }); [/INDENT]But there is no example about it.
Regards.
PS: I use SmartGWTpro-5.0p
Comment