Jetspeed 2.2 将一个 portlet 嵌套或呈现在另一个 portlet 中
我需要在 portlet 中构建可扩展的向导。该向导将列出已安装的组件,并将用户转发到特定于组件的子向导。
要求是组件由其他人开发并动态插入到此向导中(Jetspeed 重新启动即可)。我希望能够将组件定义为 portlet 本身,其内容将呈现到主 portlet 中。
有人做过这样的事吗?
I have a requirement to build an extensible wizard in a portlet. This wizard will list components that are installed and forward the user to a sub-wizard that is component specific.
The requirement is that the components are to be developed by other people and dynamically plugged into this wizard (Jetspeed reboot is okay). I would like to be able to define the components as portlets themselves who's content is rendered into the primary portlet.
Has anybody ever done something like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我终于找到了解决我的问题的方法。我无法将注入的部分实现为 portlet,但它们是可插入的,无需更改父项目。
要做到这一点需要多个项目,而不是一个项目。您需要将项目的API部分放在tomcat lib库中,主要向导的实现在它自己的portlet中。注入向导的实现分为两个项目,一个使用velocity模板的API项目和一个具有java代码的jetspeed lib项目。
然后,我使用弹簧注入在会话创建时连接所有内容。
I did finally manage to figure out a way to solve my problem. I wasn't able to implement the injected parts as portlets, but they are pluggable without changes to the parent project.
To do this requires multiple projects instead of just one. You need to put the API part of the project in the tomcat lib library, the implementation of the main wizard is in it's own portlet. and the implmentation of the injected wizards are separated into two projects, an API project that uses velocity templates, and a jetspeed lib project that has the java code.
I then use spring injection to wire everything up at session creation time.