When I have a Vaadin application does it download all the gui widgets to the client or does it download them on demand.
(当我拥有Vaadin应用程序时,它会将所有gui小部件下载到客户端,还是按需下载它们。)
(我问是因为我有一些仅使用某些小部件而不使用其他小部件的客户端。)
The default loading method is eager ( EagerWidgetMapGenerator ).
(默认的加载方法是eager( EagerWidgetMapGenerator )。)
(您有几种选择来加载小部件。)
(这里是其中的一些:)
Lazy
(懒)
You can choose to use the LazyWidgetMapGenerator by adding this to your widgetset (.gwt.xml):
(您可以通过将其添加到小部件集中(.gwt.xml)来选择使用LazyWidgetMapGenerator :)
<generate-with class="com.vaadin.terminal.gwt.widgetsetutils.LazyWidgetMapGenerator"> <when-type-is class="com.vaadin.terminal.gwt.client.WidgetMap" /> </generate-with>
This will load the widgets only when requested.
(仅在请求时才加载小部件。)
Widget-defined
(小部件定义)
Same as above, but replace LazyWidgetMapGenerator with WidgetMapGenerator .
(与上面相同,但是用WidgetMapGenerator替换LazyWidgetMapGenerator 。)
(这将使用小部件的加载首选项,并且我相信大多数都被推迟了。)
Custom #1
(自定义#1)
Create a custom widget map generator by subclassing CustomWidgetMapGenerator and defining it in your widgetset (same as above but replace LazyWidgetMapGenerator with your class).
(通过子类化CustomWidgetMapGenerator并在您的小部件集中定义它来创建一个自定义小部件地图生成器(与上面相同,但是用您的类替换LazyWidgetMapGenerator)。)
Custom #2
(自定义#2)
Create a custom widget map generator by subclassing WidgetMapGenerator (mostly deferred, defined by widgets) or EagerWidgetMapGenerator (every widget loaded EAGERly), setting only some of the widgets LAZY (or DEFERRED, or EAGER) and defining it in your widgetset.
(通过子类化WidgetMapGenerator (大部分是延迟的,由窗口小部件定义)或EagerWidgetMapGenerator (每个加载了EAGERly的窗口小部件),仅设置一些窗口小部件LAZY(或DEFERRED,或EAGER)并在您的窗口小部件集中定义来创建自定义窗口小部件地图生成器。)
For more info, check the API doc and this out: http://dev.vaadin.com/wiki/WidgetSet
(有关更多信息,请查看API文档以及相关内容: http : //dev.vaadin.com/wiki/WidgetSet)
1.4m articles
1.4m replys
5 comments
57.0k users