且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否可以在单独的war文件中创建可动态插入的GWT小部件/ portlet?

更新时间:2023-11-25 14:19:46

只不过是你自己编写的一个小部件(也许实现了一个通用接口)。

最难的部分是动态地允许预编译的gwt应用程序包含另一个gwt组件(在这种情况下为portlet),而不用再次编译源代码(这就是问题似乎暗示)。


Is it possible to create widgets / portlets in GWT that can be dynamically loaded and added to a GWT web application, and where the GWT widgets can reside in a separate war files?

To clarify my question: JSR168/JSR286 compliant portals make it possible to create portlets in separate projects (war files) and to dynamically load these into a portal page. Suppose you want to do something similar in a GWT application. So suppose we made a portal using only GWT for the GUI (no JSP or alike) and we want to dynamically add a "portlet" written in pure GWT. Would that be possible?

I can imagine that it could be done using an IFrame, but it would be nicer if such a GWT widget/portlet would be fully part of the GWT host "portal" application and share it's style sheets and other resources.

I'd imagine that a "GWT portlet" is nothing more than a widget that you write yourself (and perhaps implements a common interface).

The hard part is to dynamically allow a precompiled gwt app to include another gwt component (the portlet in this case) without compiling again with the source (which is what the question seems to imply).