Portlet Factory, Version 6.1.2


 

Overview of builder architecture

A builder is a discrete bundle of functionality in the construction of a WebApp.

Of the builders that are supplied in IBM® WebSphere Portlet Factory, some are primitive and do very simple things, like adding a page to the WebApp, or putting a button on a page. Others are complex, and can construct an entire form along with the Java™ code required to move data between the form and a variable.

There are three critical pieces to a builder.

Builder Definition file (bdef)

This XML file defines the builder for the WebSphere Portlet Factory to know both how to invoke it and how to display instances of it to the user of the builder. Among other things, it defines what the inputs are to this builder. In our example, the builder has only two inputs, the name of the builder and the directory which contains the HTML files to which it is going to create links.

Builder class

This is a Java class which performs the automation task. It is run at generate time, and it is expected to make some changes to the WebApp.

Coordinator class (optional)

This Java class is run when you edit an instance of the builder, a builder call. The coordinator can modify the builder user interface on-the-fly to hide or show input fields, for example, to change the list of choices in a list. Typically, the coordinator is just used to set the initial value of one of the inputs to a value that is calculated. (If the initial value were static, you can set it in the builder definition file.)

Parent topic: Working with WebSphere Portlet Factory Parent topic: About adding elements to pages in the web application


Library | Support |