Best regards Jens
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
// defining
private SingleSelectionModel<MyType> selectionModel =
new SingleSelectionModel<MyType>();
// inside TreeViewModel ctor (or in a better place)
selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent event) {
// fire rpc, a place change or something else
// event.getSelectedObject() contains the selected element
}
});
// return the DefaultNodeInfo with info about the selection strategy
public <T> NodeInfo<?> getNodeInfo(T value) {
// do something with the value and return the right DefaultNodeInfo
if(value instanceof MyType1) {
return new DefaultNodeInfo<SectionDTO>(
new SectionDataProvider(),
new MyCustomCellOrADefaultOne(),
selectionModel,
null);
}
else if ...
}