Hi!
I'm struggling with a Celltable that I'd like to use in a ui binding
env. My problem is that it shows only the loading progress bar, never
the actual data that I loaded into it.
Here is my entry point module:
List<SomeGTO> dummy = new ArrayList<SomeGTO>();
dummy.add(new SomeGTO());
dummy.add(new SomeGTO());
RootLayoutPanel rp = RootLayoutPanel.get();
BankTervUI bui = new BankTervUI();
rp.add(bui);
bui.setData(dummy);
=====================
<!-- BankTervUI.ui.xml -->
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:c='urn:import:com.google.gwt.user.cellview.client'>
<g:VerticalPanel ui:field='vp'>
<g:SimplePanel>
<c:CellTable ui:field='table' />
</g:SimplePanel>
</g:VerticalPanel>
</ui:UiBinder>
====================
public class BankTervUI extends Composite {
interface MyUiBinder extends UiBinder<Widget, BankTervUI> {}
private static MyUiBinder uiBinder = GWT.create(MyUiBinder.class);
@UiField
CellTable<SomeGTO> table;
public BankTervUI() {
table = new CellTable<SomeGTO>();
SingleSelectionModel<SomeGTO> selectionModel = new
SingleSelectionModel<SomeGTO>();
table.setSelectionModel(selectionModel);
table.setSelectionEnabled(true);
table.addColumn(new Column<SomeGTO, String>(new TextCell()) {
@Override
public String getValue(SomeGTO object) {
return "demo";
}
}, "dummy");
initWidget(uiBinder.createAndBindUi(this));
}
public void setData(List<SomeGTO> data) {
table.setData(1, data.size(), data);
table.redraw();
}
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.