private int selectedColumn = 0; private Map<Integer, Integer> columnMap; //id->column private int lastColumn = 0; public void handleSelectColumn() { Canvas[] columns = getChildren(); for (Canvas column : columns) { String columnId = column.getID(); if(!columnMap.containsKey(columnId)) { columnMap.put(columnId, lastColumn++); } if(columnMap.get(columnId) != selectedColumn) { column.hide(); }else { column.focus(); column.fireEvent(new com.smartgwt.client.widgets.events.ClickEvent(column.getJsObj())); } } }
Scheduler scheduler = Scheduler.get(); scheduler.scheduleDeferred(new ScheduledCommand() { @Override public void execute() { ... handleSelectColumn(); ... }});
Comment