cellBrowser 放置在复合材料中 - 我是否必须直接附加到 rootpanel(或 rootlayoutpanel)

发布于 2024-10-02 19:26:28 字数 94 浏览 0 评论 0原文

当使用 cellbrowser 并将该小部件添加到流程面板(放置在下游的任何位置)时,由于某种原因,最终结果是死的(空白屏幕)...与如果我直接添加到根面板(或布局面板)相比

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

十二 2024-10-09 19:26:28

也有同样的问题。我必须使用 作为 CellBrowser 的父级(如 GWT 展示中所示)。

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

何止钟意 2024-10-09 19:26:28

您有一些可以重现此问题的示例代码吗?

Do you have some sample code that will reproduce this?

回梦 2024-10-09 19:26:28

下面是复合材料的代码...本质上,我想做的是在另一个类中,将此复合材料附加到 flowpanel 并用它做任何事情...但是,现实是,我必须直接附加到 RootPanel(或 RootLayoutPanel)...任何其他抽象都会导致它放弃,

例如

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);
 }

}

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);
 }

}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文