There may be times when you want to control your portlet's window state. You can use the portlet APIs to automatically minimize or maximize.
Here are some of the techniques illustrated in this sample:
- This sample demonstates how to minimize and maximize your portlet.
- This sample makes use of the JSR-168 APIs and does not include information for the IBM® portlet API.
Notes on running the sample and prerequisites
Import the attached zip file into your project using the Import WebSphere Portlet Factory Archive command.
You will need to add the portlet.jar to your plugin as well in order to make use of the Portlet APIs.
To add portlet.jar to your plugin:
- Close your IDE.
- Add the portlet.jar to the plugin lib directory.
For example C:\Program Files\IBM\WebSphere Portlet Factory\WPFDesigner\eclipse\plugins\com.bowstreet.designer.core_6.0.1\lib
- Make an entry in the plugin.xml file. Add the following XML between the tags:
- Set the -clean option on the target for your IDE.
- Restart your IDE.
This sample needs to be added to a portal page in order to demonstate the functionality.
In order to observe the different states, you should add the portlet to a portal page that contains other portlets.
Note that when running it as a portlet, the links for changing state won't be available when the portlet is minimized and you will have to use the menu off the portlet title bar in order to restore or maximize it.