You can use IBM® Web Experience Factory to
help you create custom widgets. With IBM Web Experience Factory,
application developers of all skill levels can create widgets that
will run in Business Space,
Before you begin
To develop
Business Space widgets,
you will need know the following:
Depending on the functionality of the widgets that you
are developing, you might need to know the following:
- Programming or scripting language for the widget if you are not
using JavaScript with
Dojo
- Java™ 2 Platform, Enterprise
Edition (J2EE)
- Representational State Transfer (REST)
Before you begin, set up your development environment
by installing the following software:
- IBM Web Experience Factory version
7.0.1 or higher.
- If you want to test your widgets, install one of the products
that contains the Business Space component.
Alternatively, ensure that you can access an application server with
a profile that contains Business Space.
- The application server that is hosting Business Space must have
security enabled.
About this task
The following procedure uses the "Hello World" model included
in IBM Web Experience Factory to
demonstrate the steps that you take to create and deploy a widget
into Business Space.
Procedure
- Create a IBM Web Experience Factory project
for your custom widget.
- Click . The Create WebSphere Portlet Factory Project wizard
opens.
- In the first page, type the name of the project and
click Next. You can leave the other
fields with default values.
- In the Feature Set page, select the features that you
need to include in the project. The project must include
the Widget Extension feature in the Integration Extensions group.
The project must also include the Dojo Extension feature in the Dojo
Ajax group if your widget is using Dojo. Click Next.
- In the Server Configuration page, click Create
Server Configuration. The Create
Server Configuration window opens.
- Select IBM WebSphere Application Server and
IBM Mashup Center 2.0 and then click OK. The Mashup Center server
is the Business Space server. The Edit Server Configuration window
opens.
- Provide a name and description for the server configuration
and then provide the information necessary to connect to it.
Restriction: The name can only have letters, numbers, dots (.)
or underscores (_). It cannot have spaces or other characters.
- In the Edit Server Configuration window,
click OK to close it. The
Server Configuration page of the wizard now lists the server configuration
that you created. Make sure that the new server configuration is the
only one that is selected.
- Click Finish.
- When the Publish request window
opens, click Yes. The wizard
completes creating the project and then publishes it to the server
configuration. The publish action runs in the background and may take
some time to complete.
- Create the IBM Web Experience Factory model
for your custom widget.
- Click . The Create WebSphere Portlet Factory Model wizard
opens.
- In the first page, select the project to contain the
model and click Next.
- In the Select Model page, select the model type that
you want to use as the base for the model and then click Next. The following page or pages that open next depend on the
model type that you selected.
- In the following page or pages, make any appropriate
selections and click Next. For example,
if you selected Main and Page in the previous
page, on this page you select between using a simple page or an imported
page as the home for your widget. The imported page option provides
a field in which you can select which file to import.
Tip: With
some model types, you can select to publish widgets to the server
as an action of the wizard. You can select this option or defer publishing
until later.
Keep making appropriate choices
for your model until the wizard displays the Save New Model page.
- Specify where to save the model to the project and then
click Finish.
- Develop your widget until it has the functionality that
you want.
- Create image files to serve as the
preview and icon images for your custom widget and put them somewhere
in the WebContent directory. Make
the icon image 28 pixels by 28 pixels and make the preview image 160
pixels wide by 128 pixels high.
- Test your widget by publishing it to a Business Space server:
- Open the model to edit it.
- Right-click the model and select Add Builder
Call. The Builder Picker opens.
- Select Widget Adapter for the
builder type and then click OK. The
Widget Adapter page opens.
- Provide the information for the widget and then click OK. The widget title is the name that Business Space displays.
The widget category is the category that contains the widget on the
widget palette.
- Save your changes.
- Right-click the IBM Web Experience Factory project
and select .
- From the list of widgets, select your widget and then
click OK.
- In a web browser, browse to the Business Space URL. The URL will be something like http://localhost:9080/BusinessSpace.
- Log into Business Space and then
test your widgets.