Hello dear developers,
I have been searching for a long time how to make styles visible for a selected Lane.
As a result, I came to this decision...
But there was one problem. I can't assign the "selected" style to a Lane item in the Lanes list.
Could you tell me how to do this?
I have been searching for a long time how to make styles visible for a selected Lane.
As a result, I came to this decision...
Code:
ListGrid tasksLineProps = new ListGrid(); tasksLineProps.setSelectionType(SelectionStyle.SINGLE); tasksLineProps.setHoverWrap(false); tasksLineProps.setHoverAutoFitWidth(false); tasksLineProps.setShowGroupTitleInFrozenBody(false); tasksLineProps.setShowSelectedStyle(true); tasksLineProps.addSelectionChangedHandler(new SelectionChangedHandler() { @Override public void onSelectionChanged(SelectionEvent event) { ListGridRecord page = event.getRecord(); CalendarView calendarView = (CalendarView) event.getFiringCanvas(); String style = calendarView.getAttribute("labelColumnBaseStyle"); if(event.getState()) { style += "Selected"; } page.setAttribute("styleName", style); calendarView.redraw(); } }); ..... ..... tasksLine = new Timeline(); tasksLine.setAutoChildProperties("timelineView", tasksLineProps); tasksLine.setHeight("100%"); tasksLine.setHeaderLevels(headerLevels); tasksLine.setShowComplexFields(true); tasksLine.setShowQuickEventDialog(false); tasksLine.setShowEventDescriptions(false); tasksLine.setShowLaneFieldHovers(true); tasksLine.setCanEditLane(false); tasksLine.setLaneFields(pageTitleField, pageGroupField); tasksLine.setCanGroupLanes(true); tasksLine.setCanSelectEvents(true); tasksLine.setStartDate(currentDate); tasksLine.setCanRemoveEvents(false); tasksLine.setNameField(CONSTANT.TITLE); tasksLine.setDescriptionField(CONSTANT.HTMLTEXT); tasksLine.setStartDateField(CONSTANT.BEGINNING_DATE); tasksLine.setEndDateField(CONSTANT.DUE_DATE); tasksLine.setHideUnusedLanes(false); tasksLine.setResolution(headerLevels, TimeUnit.MONTH, 1, null); tasksLine.setLanes(tasksLanes); tasksLine.getSelectedView().setProperty("groupRowHeight", GROUP_ROW_HEIGHT);
But there was one problem. I can't assign the "selected" style to a Lane item in the Lanes list.
Could you tell me how to do this?
Comment