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 po开发者_JS百科rtlets themselves who's content is rendered into the primary portlet.
Has anybody ever done something like this?
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.
精彩评论