问题
I'm trying to build a website similar to kayak.com, at least with respect to how it displays and filters results. I'm using GWT and have built a Composite widget which uses a CellList to display the results.
I'm not happy with how the cells are selectable. I've tried setting the SelectionModel of the CellList to an instance of NoSelectionModel, but that doesn't seem to work. Really, I just want to display some text and a few hyperlinks in each cell and only give the user visual feedback (change the mouse pointer, etc.) when the mouse is over a hyperlink.
回答1:
See if this works for you:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/2327336e09ab29d1
回答2:
Use
cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
to disable selection on a CellList.
来源:https://stackoverflow.com/questions/5456273/disable-selection-for-gwt-celllist