This quick start guides you through the steps to create and test a widget locally, then remotely upload the widget to IBM® InfoSphere® MashupHub.
You then publish the widget to IBM Lotus® Mashups. It is good practice to develop and test against a locally-installed Lotus Mashups server before exporting to a remote server. Follow the steps in this document if you are unable to install a local Lotus Mashups server, or when you are done testing locally and ready to publish to a remote Lotus Mashups server.
IBM WebSphere Portlet Factory works in conjunction Lotus Mashups to create the widgets that become part of the mashups page. Typically, developers create the widgets on their local systems, publish them, and test them locally. However, in some cases, developers work in an environment in which they do not have the resources to run a local Lotus Mashups server or perhaps multiple members of the development team must publish widgets to a common Lotus Mashups server. When local development and testing is done, the team publishes the newly-created widgets to a remote server. The remote server could be a production server, an integration server, or quality assurance server.
WebSphere Portlet Factory installs an IBM WebSphere Application Server Community Edition (CE) application server. WebSphere Application Server CE is an open source Java 2 Platform, Enterprise Edition (J2EE) application server based on Apache Geronimo. WebSphere Application Server CE provides lightweight testing capabilities for WebSphere Portlet Factory. You can test and run the widgets in this environment.
In some development environments, many users must have access to a common server. As WebSphere Portlet Factory is integrated with Lotus Mashups and InfoSphere MashupHub, it supports publishing widgets to a remote server.
The process of creating a widget that is useful in creating mashups involves the use of multiple products.
- WebSphere Portlet Factory
- Create the widget in WebSphere Portlet Factory.
- Run and test against a locally installed Lotus Mashups server if possible. If not, then test on the locally installed WebSphere Application Server Community Edition (CE).
- Export a production WAR file.
- InfoSphere MashupHub
- Upload the WAR file as an iWidget package file through the InfoSphere MashupHub.
- From the details page of the widget in the InfoSphere MashupHub, choose Add to Lotus Mashups to publish the widgets to the Lotus Mashups server and publish the widget to the Lotus Mashups Toolbox.
- Lotus Mashups
Setting up a Lotus Mashups server configuration
Follow these steps to setup a Lotus Mashups server.
- Click Window -> Preferences -> WebSphere Portlet Factory Designer -> Server Configurations.
- Click Create sever configuration, select WebSphere Application Server and IBM Mashup Server 2.0, and click OK.
- In Server Configuration, enter a name.
- In Server Host, enter the hostname of your server.
If your Lotus Mashups server is local, keep localhost. If you are running Lotus Mashups remotely, enter a full DNS host name. In most cases, SOAP Connector Port can remain 8880.
Note: If the soap connector port is not correct, you can check the SOAP port of your server by accessing the Admin Console. In the admin console, select Servers/Server Types/WebSphere Application Servers. Select server1 from the list, then select Ports. You will see your Soap connector Address listed here.
- In User Name and Password, enter the information for an account that has administrative access to Lotus Mashups.
- Click the Test Connection button to validate your entries.
- Click OK to save the Server Configuration.
If you are deploying to a remote Lotus Mashups server, map a drive to the InstalledApps
folder on the server to take advantage of the Auto Synchronize feature. If you do not setup a mapped drive, you must Publish your project before running it to see your changes.
From WebSphere Portlet Factory create a widget
Create a widget.
- Create a WebSphere Portlet Factory project.
- Go to File -> New -> WebSphere Portlet Factory Project.
- Enter a name for the widget in the Project name field and click Next.
- Under Integration Extensions, select Widget Extension and Spreadsheet Extension and click Next.
- Select the Server Configuration to use when you publish the project and click Finish.
- Click Yes when asked to publish the project.
- In the project, create a model.
- Click File -> New -> WebSphere Portlet Factory Model.
- Select the project for which you want to create the model and click Next.
- Select the model type. In this case, select Spreadsheet View & Form and click Next.
- Select Deploy this model as a widget and leave Deploy this model as a portlet unselected and click Next.
- Enter the widget title and, in Widget Category, select the Lotus Mashups Toolbox category under which you want the widget to appear and click Next.
- In Spreadsheet settings, specify the spreadsheet to import and the method to find the content. Click Next.
If you do not have a spreadsheet available, a default one is provided. The default file is available if your project includes the Tutorials And Samples feature set.
- In Paging settings, specify whether to have the data display paged. Paging improves performance. Click Next.
- Optionally, enter the column settings and click Next.
- Optionally, enter the Details Page settings and click Next.
- Enter the model name and click Finish.
- Run and modify the widget locally until you are satisfied.
- Right-click the project name. Click Export and select the correct WAR for your environment.
- Click Finish. WebSphere Portlet Factory creates the WAR file in your workspace. The widget must be in a package file that is located on an accessible file path or on a URL, either locally or on a common sever. To publish to Lotus Mashups, the package file must be a WAR.
From InfoSphere MashupHub upload the widget
Follow these steps to upload the widget to the InfoSphere MashupHub.
- On the InfoSphere MashupHub Home tab, in the Create panel, click on Upload Widget.
- From the Upload Widget tab
- Select the type of widget you want to upload, in this case iWidgets. Click Next.
- Select Upload File. The package file must be a WAR file
- Specify the location of the widget package file.
- Click Next.
- Specify the following information about the widget you are uploading:
- Specify a title, a description, and a version for the widget.
- Optionally, specify tags that are associated with your widget. You can use the list of existing tags as a guide for the tags that you apply.
- Optionally, select the permissions that you want to apply to your widget.
- Optionally select the categories that you want the widget to be associated with. The categories provide a general classification for the widget.
- Optionally, in the Related Entries section, specify the objects in the catalog that can be used with the widget you are uploading.
- Optionally, specify the URL to any technical documentation for the widget.
- Click Finish. A confirmation appears indicating that the widget was saved. The widget is now listed in the InfoSphere MashupHub catalog and available to other users as indicated by the permissions you selected in step c.
- From the widget uploaded tab or from your widget tab if you closed the finished page and came back through the list widgets link:
- Click View iWidget details. The widget details are displayed. This Window also contains an Action menu lets you add the widget directly to Lotus Mashups.
- Click Actions -> Add to Lotus Mashups.
- Enter the User ID and the password to access the Lotus Mashups server.
- Click Next.
- Enter the title and description of the widget to be added to Lotus Mashups.
- Select the category of the widget. The category appears on the Toolbox of the Lotus Mashups page. All the widgets that were defined in the WAR appear in the same category with the model names.
- Click Finish.
From Lotus Mashups build your mashup
- Login to Lotus Mashups to check if the widget appears under the specified category in the Toolbox.
Note: If you are already logged into , you must log out and log in again. The only time that Lotus Mashups refreshes the toolbox is at login.
- Test the widget on the Lotus Mashups palette to see if it performs as expected.
- If the widget requires modification, it is recommended that you return to the developer environment to modify the widget.
- Create a new Production WAR.
- Remove the old WAR from InfoSphere MashupHub using the WebSphere Application Server admin console.
- Republish the revised WAR file to InfoSphere MashupHub.
- Delete the old widget from Lotus Mashups Palette.
- From InfoSphere MashupHub push the revised widget to Lotus Mashups.
Parent topic: Tutorials for IBM WebSphere Portlet Factory