Joe NaPuu
Joe NaPuu

Reputation: 79

cellBrowser placed in composite - do I have to attach directly to the rootpanel (or rootlayoutpanel)

when using a cellbrowser and adding that widget to a flowpanel (to be placed wherever, downstream), for some reason the end result is dead (a blank screen)...vs if I add directly to the rootpanel (or layout panel)

Upvotes: 1

Views: 181

Answers (3)

David Cloutier
David Cloutier

Reputation: 11

Also had the same problem. I had to use a <g:HTMLPanel> as the parent of the CellBrowser (as seen in the GWT Showcase).

Upvotes: 1

Joe NaPuu
Joe NaPuu

Reputation: 79

below is the code for the composite...essentially, what I'd like to do is in another class, attached this composite to a flowpanel and do whatever with it...but, the reality is, I have to attach is directly to the RootPanel (or RootLayoutPanel)...any other abstraction causes it to bail

for example

FlowPanel fp = new FlowPanel();
V2_M76Rolodex v = new V2_M76Rolodex();

fp.add(v); // not going to work

RootPanel.get.add(v) works


public class V2_M76Rolodex extends Composite {

/*
a bunch of code here for getting data and 
populating the tree - works, not at issue or relevant
*/

 public V2_M76Rolodex() {
       TreeViewModel model = new CustomTreeModel();
       CellBrowser browser = new CellBrowser(model, null);
       browser.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);
       browser.addStyleName("rolodex_cell_browser");
       initWidget(browser);
 }

}

Upvotes: 0

Jan Vladimir Mostert
Jan Vladimir Mostert

Reputation: 12972

Do you have some sample code that will reproduce this?

Upvotes: 0

Related Questions