PDA

View Full Version : [FIXED] Issue on DataList.setCheckable(true)



LukasP
17 May 2008, 2:14 AM
I get an Exception when setting DataList checkable:



public void onModuleLoad() {

Listener l = new Listener<ComponentEvent>() {
public void handleEvent(ComponentEvent ce) {
DataList l = (DataList) ce.component;
List checked = l.getChecked();
Window.alert(checked.toString());
}
};

final DataList list = new DataList();
list.setSelectionMode(SelectionMode.MULTI);
list.setBorders(true);
list.addListener(Events.CheckChange, l);
list.setWidth(100);
list.setFlatStyle(true);
// Issue here:
list.setCheckable(true);
DataListItem i1 = new DataListItem("Element A");
DataListItem i2 = new DataListItem("Element B");
DataListItem i3 = new DataListItem("Element C");
list.add(i1);
list.add(i2);
list.add(i3);

ContentPanel panel = new ContentPanel();
panel.setHeading("DataList checkable Test");
panel.setLayout(new FlowLayout());
panel.add(list);
panel.layout(true);
RootPanel.get().add(panel);

}
Maybe this issue is already solved in SVN (?) or has this feature been removed as I can not see an example in the Explorer Demo? - Begging for Beta 3 release ;)

Cheers

darrellmeyer
19 May 2008, 8:04 AM
The fix is in SVN, beta 3 will go out later today.