|This topic describes how to create and edit your own custom widgets. You can either use the widget builder in the catalog to create widgets based on a set of templates, or you can create and edit widget projects as a set of individual files that you can import and export.
This topic describes how to create and edit your own custom widgets. You can either use the widget builder in the catalog to create widgets based on a set of templates, or you can create and edit widget projects as a set of individual files that you can import and export.
About this task
When using the mashup builder, select to create a new widget from the Actions
menu. This option contains the following three choices:
- Create a new widget in a Dialog Box
- Create a new widget as a New Page
- Work with the widget editor
The first two options open the widget builder in the catalog either as a dialog box or as a new page. The widget builder contains a set of templates for creating a variety of sophisticated widgets. For example, you can create widgets from text feeds, numeric data feeds, media feeds, and web content. You can also import existing widgets from non-IBM vendors such as Google and OpenSocial. For more information about the templates that are available with the widget builder, see Creating widgets in Mashup Center
To create and edit widgets, do the following steps:
- In the mashup builder, select Actions -> Create a New Widget. This action opens the Widget Builder window.
- To open the widget builder, click either Create a new widget in a Dialog Box or Create a new widget as a New Page. For details about using the built-in templates that are available with the widget builder, skip the following steps in this topic, and go to Creating
widgets in Mashup Center.
- To work with a widget project as a set of files for exporting and importing, click Work with the widget editor.
- To create a new project for your custom widget, click Create a New Widget Project.
- In the Widget Builder window, do the following steps:
- In the Name your project field, type a unique name for your project. Be sure to use a name that clearly indicates the purpose of the project.
- In the Widget Project Type section, select one of the following types of project that you want to use as a starting point:
In the Widget Icon section, select an icon for the widget. This is the icon that displays beside the widget in the palette and also in the title bar of the widget after you drag it onto the page. You can either select a default icon from the list, or you can upload an icon from your local machine.
Click Create Project.
- Create a widget from starter files: This option allows you to create a new widget using two starter files for the widget, including catalog.xml (the widget definition file) and iwidget.xml. The iwidget.xml file is a file that displays a simple Hello World string.
- Create a blank widget project: This option starts a blank project. The widget builder provides catalog.xml, but no other files.
- Create a widget from your existing files: This option creates a new widget project based on a ZIP file that is stored on your local machine. Browse to the files and select Upload.
If you are finished creating your widget project, click Export at the top of the window. You can add your new widget to the current page, the palette, or the catalog. You can also export it as a ZIP file onto your local machine and import it back into the widget builder when creating a new widget project.
To save your project, click Done. Now, when you open the widget editor again, you can select your new project and edit it as desired.
Parent topic: Working with widgets