Smart Gwt组件未在html div标签中呈现 [英] Smart Gwt components are not rendered in html div tag

查看:114
本文介绍了Smart Gwt组件未在html div标签中呈现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用智能GWT开发我的应用程序,以创建我正在使用GWT组件的应用程序结构. HTML代码段如下:

I am using smart GWT to develop my application, to create the structure of the application I am using GWT components. The HTML code snippet is as below:

<div class="container">
    <div id="pagePanel" ></div>
</div>

在我的pagePanel div中,添加了所有组件.当我在pagePanel div中动态添加组件时,pagePanel div不会根据所添加组件的大小而扩大,并且所添加的智能gwt组件会使pagePanel div溢出.因此,我需要为智能gwt的每个div都提供css. 但是,由于GWT自行生成HTML结构,因此不可能在代码中找到所有的div.

In my pagePanel div all the components are added. As I add components dynamically in the pagePanel div, the pagePanel div does not enlarge as per the size of the added component and the added smart gwt components overflows the pagePanel div. So I need to give css to each and every div of smart gwt. But as the GWT generates HTML structure on its own it is not possible to find all the div in code.

因此,我正在使用flex表来构建我的页面,因此在Smart gwt的Canvas中添加了FlexTable.将Canvas添加到Composite超级类的initWidget中. 我将CSS分配给flex表和canvas,但是在canvas和flex表之间又生成了两个div,由于无法在代码中找到它们,因此我无法获得如何将CSS赋予这些div的信息.

As, I am using flex table to structure my page, FlexTable is added in Canvas of smart gwt. Canvas is added to initWidget of Composite super class. I gave css to flex table and canvas but between the canvas and flex table two more divs are generated and I cannot get how to give css to these divs as I am not able to find them in my code.

代码如下:

 NTCanvas smartContainer = new NTCanvas();
 smartContainer.setWidth("970px");
 smartContainer.setStyleName("smart-container");
 smartContainer.setStylePrimaryName("smart-container");
 initWidget((Widget) smartContainer);

任何人都可以告诉如何在代码中找到gwt生成的div.或如何解决PagePanel div中智能组件的溢出问题.

Can any body tell how to locate the gwt generated divs in code. Or how to solve the overflow problem of smart components from PagePanel div.

谢谢, 普南·普罗希特(Punam Purohit)

Thanks, Punam Purohit

推荐答案

包含在SmartGWT常见问题解答中:

Covered in the SmartGWT FAQ:

http://forums.smartclient.com/showthread.php?t= 8159#aMix

我可以混合使用Smart GWT和GWT小部件吗?

是的,有警告.

Smart GWT具有互操作性支持,该功能允许将Smart GWT小部件添加到GWT中 容器,并允许将GWT小部件添加到Smart GWT容器中,它适用于 将此用于:

Smart GWT has interoperability support that allows a Smart GWT widget to be added to a GWT container and allows a GWT widget to be added to a Smart GWT container, and it's appropriate to use this for:

  • 向Smart GWT的增量迁移,例如引入单个,复杂的Smart GWT 日历或CubeGrid等组件添加到现有GWT应用程序中

  • incremental migration to Smart GWT, such as introducing singular, sophisticated Smart GWT components like the Calendar or CubeGrid to an existing GWT application

在Smart GWT中使用复杂的第三方GWT小部件,而Smart GWT则没有 相应的内置功能

using sophisticated third-party GWT widgets within Smart GWT, where Smart GWT doesn't have corresponding built-in functionality

但是,自由混合Smart GWT和GWT(或其他)没有任何意义 组件,例如,您不应将GWT小部件放置在Smart GWT容器中 依次位于GWT容器中.通常,除非需要 功能会迫使您这么做.

However it does not make sense to freely intermix Smart GWT and GWT (or other) components, that is, for example, you should not place GWT widgets within a Smart GWT container that is in turn within a GWT container. In general, don't intermix widgets unless the need for a feature forces you to.

原因是两个Ajax小部件工具包在最大程度上存在限制 (包括GWT)可以互操作-没有标准允许 标签顺序管理区域,zIndex管理,像素完美布局,第508节 可访问性和多级模式.

The reason for this is that there are limits to the maximum degree that two Ajax widget kits (including GWT) can interoperate - there are no standards that allow interoperability in the areas of management of tab order, zIndex management, pixel-perfect layout, section 508 accessibility and multi-level modality.

这篇关于Smart Gwt组件未在html div标签中呈现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆