Portlet Factory, Version 6.1.2


 

View & Form builder

The View & Form builder provides support to call a method and display its results on a page.

If the method does not have result data to display, use the Input Form builder rather than this builder. The View & Form builder creates view and form pages based on data from a data service. The view page can display a table or single record of data from the service results. You can also create the following associated pages.

  • An input page for the specified operation, with optional validation

  • A detail page that displays either data from the selected row in the view page or data from another data service or method

  • An update page for editing details or results data

Typically this builder is used with a data service operation. You select the operation from the DataServices tree in the View Data Operation input. If you do not have a data service available, you can also select a method. If you select a method, the method should write its results into a schema-typed variable.

 

Key inputs

In most common applications of this builder, you will need to specify the following inputs.

Name

This input is used to form the names of generated pages and methods.

View Data Operation

This is the operation you want to call and from which results are displayed.

 

Key objects this builder creates

This builder creates the following key objects.

buildername_ShowResults method

This method (the view method) calls the operation specified in the View Data Operation input and then shows the view page (buildername_ViewPage).

main method

This method calls the buildername_ShowResults method. If the Create Input Page input is selected, main displays the buildername_InputPage page. Otherwise, main invokes the buildername_ShowResults method and displays the view page. You can disable the creation of a main method in the Advanced inputs section of the builder call editor.

buildername_ViewPage page

Page that displays the view method results. This page shows the results of the operation called by the buildername_ShowResults method.
If you enable the Create Input Page input, the builder creates the following object.

buildername_InputPage page

The input page. This page contains all the input fields from the operation specified in the View Data Operation input.
If you enable the Create Link to Details input, the builder creates the following objects.

  • buildername_SelectRow method

  • buildername_SelectedRowData variable
If you enable the Create Link to Details input and, in the Details Action Type input, select Get details directly from selected row, the builder creates the following object.

  • buildername_DetailsPage page
If you enable the Create Update Page input, the builder creates the following objects.

  • buildername_DoUpdate method

  • buildername_ShowUpdatePage method

  • buildername_UpdatePage page

 

Sample

The following is the primary model supplied with IBM® WebSphere Portlet Factory that shows the use of the View & Form builder.

models/samples/gettingstarted/OrdersServiceConsumer.model

The View & Form builder in this model generates a results table page, a details page, and an update page. Three different service operations are used. Static data is used so that you can see results without having to configure a database. This model also shows the use of the Input Form builder to create a form for a service operation that does not have any results to display.
The following models are also provided.

models/samples/gettingstarted/SimpleServiceConsumer.model

The View & Form builder in this model generates a search input page, a results table page, and a details page. Two different service operations are used. Static data is used so that you can see results without having to configure a database.

modesolutions/basics/EP_View_and_Form_Solution.model

The View & Form builder in this model creates a view page that uses paging, a details page, and an update page.

Parent topic: Builder help


Library | Support |