Portlet Factory, Version 6.1.2


 

Data View builder inputs

The Data View builder takes common and service-specific inputs.

 

Specifying inputs

The inputs for the specific service types supported by this builder share a common set of inputs called display settings. The display settings are described in the following section:

Specifying display inputs The following sections describe inputs for configuring this builder for a specific service type:

 

Specifying display inputs

The common settings govern how data is displayed. The following table describes all common display settings. Depending on the type of service you choose, a subset of these settings are available for configuration. Refer to this table when configuring any of the settings for the specific service types listed in Specifying inputs.

Table 1. Common display settings inputs
Display setting input name Description
Page URL Specify the URL of a page that will be used to display the application. This page must contain a tag located where you want data displayed.

Use the default data_view page or select a page you have created for this purpose.

Make URLs Absolute Enable this whenever the HTML coming from the Page URL input has relative URLs in it, whether or not this is a local file.

Disable if you are using a page that references other web sites so that external links will work.

Error Page URL Specify the URL of an HTML page that will be displayed if the data source is not available.
Display Location Select an HTML tag to be used to locate data on the page.

If the list is empty, the page does not contain any named tags.

Display Type Choose one of the following:

Display directly as HTML

To use an HTML builder to render the data from the data source and place returned data on HTML tag.

Tabular Format for structured/repeated data

To use the Data Page builder to create the display. If multiple rows of data are available, this builder will repeat over data and build a table that you can page through.
Paged Data Display Enable to break the repeated data into pages. When enabled, you can specify the following additional inputs:

Rows Per Page

Number of rows to display each iteration

Add Paging Buttons

Adds a default set of paging buttons to allow navigation between pages of data.

Note: If you enable paging, use a variable as a datasource, and format variable data with a Simple Schema Generator builder, builder order becomes important.

Because the Simple Schema Generator must modify the variable to format the data for display, place the Simple Schema Generator before the Data View builder in the builder list.

Create UI from Schema Enable to instruct the Data Page builder to create tags on the page for every element in the data schema. If this setting is not enabled, a search is made for matching tags on DataViewPage, and the builder maps data only to the tags it finds.
Style Sheet URL Specify a CSS file to be used to format the displayed page.

 

Specifying inputs for a WSDL service

The Data View builder accepts the following inputs for a WSDL service.

Table 2. WSDL service inputs
Input Name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Data source inputs

Data Source type Enable the WSDL radio button.
WSDL URL Enter the URL for the WSDL document describing the service. For example:
 http://www.xmethods.net/sd/2001/BabelFishService.wsdl 

Click Fetch/refresh WSDL to display the operations exposed for the web service.

Operation Select the operation to execute.
Arguments The builder call editor displays the argument names for the selected operation as inputs to the service call.

You can use the reference chooser to specify an appropriate value from a model element or you can enter a text string directly. (Type does not apply to the WSDL services.)

Advanced inputs

Data path An XPath expression used to select for display a subnode of the data coming from the source.

While this input works for all data source types, it is most helpful for web clipping uses. It allows you to use a page from an HTTP source, but show only a portion of the page as opposed to the whole HTML page. For example, the third table in the second DIV.

Generate Main Method Allow this builder to automatically generate a Main action. This action will start application operation and cause the display of the application page.

Disable this check box to use a custom Main action.

Log Request/Response Display the service request and response in the application server console and log this information in the IBM® WebSphere Portlet Factory log file.
Add Builder name to artifacts  
Model The name of model to import. This model forms the basis of the data view. The default setting for this input imports the data_view model. This model contains all the builders required for the application to function and, as a result, this input should not be changed.

However, in some cases a custom model might be required, and this input allows an alternate model to be selected.

 

Specifying inputs for an HTTP service

The Data View accepts the following inputs for an HTTP service:

Table 3. HTTP service inputs
Input name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Data source inputs

Data Source type Enable the HTTP radio button.
URL The URL where service is located. For example:
 http://www.airnav.com/ugi-bin/airport-search 
HTTP Request Type Select either GET or POST.

By default, HTTP services use GET request type

HTML Processing Processing to be performed on incoming HTML. You can select:

None

No processing is performed.

Convert relative URLs to absolute

Relative URLs on the page will be converted to absolute URLs (recommended).
Advanced inputs

Data Path An XPath expression used to select for display a subnode of the data coming from the source.

While this input works for all data source types, it is most helpful for web clipping uses. It allows you to use a page from an HTTP source, but show only a portion of the page as opposed to the whole HTML page. For example, the third table in the second DIV.

Generate Main Allow this builder to automatically generate a Main action. This action will start application operation and cause the display of the application page.

Disable this check box to use a custom Main action.

Log Request/Response Display the service request and response in the application server console and log this information in the IBM WebSphere Portlet Factory log file.
Add builder name to artifacts  
Model The name of model to import. This model forms the basis of the data view. The default setting for this input imports the data_view model. This model contains all the builders required for the application to function and, as a result, this input should not be changed.

However, in some cases a custom model might be required, and this input allows an alternate model to be selected.

Unsupported local DB  

 

Specifying inputs for a database

The Data View accepts the following inputs for a database:

Table 4. Inputs for a database
Input name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Data source inputs

Data Source type Enable the Database radio button.
Fetch DataSource Names Press this button to fetch a list of JDBC DataSources defined on the application server that supports the WebSphere Portlet Factory Designer. The list will be inserted as choices for the SQL DataSource input. If no DataSource names are listed in the SQL DataSource input, then the WebSphere Portlet Factory Designer may not be properly configured to query an application server, the server might not be running, or there are no DataSources defined by the application server.

Note: Any valid datasource name can be typed into the SQL DataSource builder input. The Fetch Datasource Names button, however, will only list those data sources whose full names begin with jdbc/, jdbc/v4/, or jdbc/v5/. If you know that there is a valid data source with a name that does not match any of these patterns, enter the name. If the name is correct, it should work.

Depending on the performance of the application server, it might take several seconds to load the list of data source names.

This button is not displayed if the builder is configured to use an override SQL DataSource.

DataSource JNDI Name Specify a valid datasource JNDI name. For example:
 jdbc/my_datasource_name 
SQL Query Enter one or more SQL statements with optional positional parameters.

The SQL that you enter here is not validated for correct syntax. Be sure to use legal SQL syntax when creating SQL statements.

Use Column Labels Apply a column database name or label to the XML element name.

Note: You might have to edit the database name/label slightly to have it conform to XML markup standards.

Statement parameters

Input Parameter Bindings Use this input to control the creation of variables used to store information related to any positional input parameter in the SQL statement. By manipulating the content of these variables, you can dynamically drive positional input values of a statement.

Manual

Enable to prevent the creation of positional parameter variables. You can use manual binding if you have existing variables to bind to statement parameters or if you want to supply non-variable values.

Auto-create Distinct variables

Enable to have builder automatically create a variable for each positional parameter in the SQL statement. You can do this to access parameter values by pointing at a variable. In the WebApp, variable names appear as:
builderName_arginput1, builderName_arginput2, ...

Auto-create XML Variable

Enable to create a single positional parameter variable of type XML. You can use this variable to define all positional parameters based on an XML schema. This is useful when profiling is involved. However, accessing an individual value node within the XML structure requires you to use X-path references. In the WebApp, the variable name appears as: builderNameXmlInputs.
Input Parameters Use these for all SELECT operations or stored procedures. Input parameters allow for substitution in the SQL statement in place of fields denoted by question mark (?) characters. The following information is required for an Input parameter:

Position

Numeric location of the ? within the statement. Position numbering starts at 1 which represents the first ? character.

JDBC Type Cast

All standard JDBC type names are supported. (Refer to JDBC documentation for specifics on each type available.) In addition, Automatic can be selected to instruct the builder to use automatic JDBC type conversion when setting up parameters. Custom can be selected to use a custom method to set up a complex column type. This setting is handy when working with driver-specific implementations of BLOB (binary large object) or CLOB (character large object) objects.

Value or Set Method

When using Custom JDBC type casting, use this setting to select the name of a method to be used to handle custom processing. The builder will call this method and pass to it the prepared statement it has built. The method is then responsible for setting the type required.

Sample Data

Use this setting to define the sample data that is picked up by the SQL Transform to XML Schema builder. Data that you enter here is used to generate a sample row that forms the basis of a generated schema.
Output parameters Use these settings when calling a stored procedure. Output parameter definitions are substituted into the callable SQL statement in place of fields denoted by question mark (?) characters. The following information is required for an output parameter:

Position

Numeric location of the ? within the statement. Position numbering starts at 1 which represents the first ? character.

JDBC Type Cast

JDBC type expected to be returned from the stored procedure call. All standard JDBC type names are supported. (Refer to JDBC documentation for specifics on each type available.) In addition, Custom can be selected to use a custom method to apply some custom logic to define. This setting is handy when you define driver-specific structures. For example, if a person struct is returned, you can use this setting to define that struct as an oracle.types.oracle structure.

Cast Method

When using Custom JDBC type casting, use this setting to select the name of a method to be used to handle custom processing. The builder will call this method and pass to it the prepared statement it has built. The method is then responsible for setting the type required.

Transform Method

Use this setting to define a method that will be used to provide special handling of the results returned by this builder. This method will transform an executed statement result into XML.
Label translation settings

Create Resource Bundle Click Create Resource Bundle to create a properties file that contains the label name and default value for each element used in the form.

You can use this generated property file as the basis for creating the final resource bundle used by this page.

Resource Bundle Name Enter the name of the resource bundle, either a property file or Java>ava.util.ResourceBundle. The resource bundle must be either in (or below) the WEB-INF/work/source directory or in a .jar file in the WEB-INF/lib directory.
Remote JNDI server definition inputs

JNDI Context Factory The context WebSphere Portlet Factory class associated with a remote JNDI server.

If you do not have a local JNDI server running, use this setting to specify a remote server on your network. The syntax of this entry depends on the application server or JNDI server you are using. For example, for WebSphere:

com.ibm.ws.naming.util.WsnInitCtxFactory
JNDI URL A URL that identifies the port and server on the network where a JNDI server is listening for requests. For example, for WebSphere:
iiop://host_name:9001
Principal If the JNDI server requires authentication, enter the identity of the user for authentication to the remote JNDI server.

Application servers handle this input in different ways. For example, on WebSphere, the Principal and Credentials inputs you provide in this builder will override the ones provided by the datasource on the application server.

Credentials If the JNDI server requires authentication, enter the password of the user for authentication to the remote JNDI server.

Application servers handle this input in different ways. For example, on WebSphere, the Principal and Credentials inputs you provide in this builder will override the ones provided by the datasource on the application server.

Advanced inputs

Data Path An XPath expression used to select for display a subnode of the data coming from the source.

While this input works for all data source types, it is most helpful for web clipping uses. It allows you to use a page from an HTTP source, but show only a portion of the page as opposed to the whole HTML page. For example, the third table in the second DIV.

Generate Main Allow this builder to automatically generate a Main action. This action will start application operation and cause the display of the application page.

Disable this check box to use a custom Main action.

Log Request/Response Display the service request and response in the application server console and log this information in the IBM WebSphere Portlet Factory log file.
Add Builder name to artifacts  
Model The name of model to import. This model forms the basis of the data view. The default setting for this input imports the data_view model. This model contains all the builders required for the application to function and, as a result, this input should not be changed.

However, in some cases a custom model might be required, and this input allows an alternate model to be selected.

Unsupported local DB  

 

Specifying inputs for a variable

The Data View accepts the following inputs for a variable:

Table 5. Inputs for a variable
Input name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Data source inputs

Data Source type Enable the Variable radio button.
Variable Enter the name of an existing variable to use as a data source.
Label translation settings

Create Resource Bundle Click Create Resource Bundle to create a properties file that contains the label name and default value for each element used in the form.

You can use this generated property file as the basis for creating the final resource bundle used by this page.

Resource Bundle Name Enter the name of the resource bundle, either a property file or Java>java.util.ResourceBundle. The resource bundle must be either in (or below) the WEB-INF/work/source directory or in a .jar file in the WEB-INF/lib directory.
Advanced inputs

Data Path An XPath expression used to select for display a subnode of the data coming from the source.

While this input works for all data source types, it is most helpful for web clipping uses. It allows you to use a page from an HTTP source, but show only a portion of the page as opposed to the whole HTML page. For example, the third table in the second DIV.

Generate Main Allow this builder to automatically generate a Main action. This action will start application operation and cause the display of the application page.

Disable this check box to use a custom Main action.

Log Request/Response Display the service request and response in the application server console and log this information in the IBM WebSphere Portlet Factory log file.
Add builder name to artifacts  
Model The name of model to import. This model forms the basis of the data view. The default setting for this input imports the data_view model. This model contains all the builders required for the application to function and, as a result, this input should not be changed.

However, in some cases a custom model might be required, and this input allows an alternate model to be selected.

 

Specifying inputs for a local service

The Data View accepts the following inputs for a local service:

Table 6. Inputs for a local service
Input name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Data source inputs

Data Source type Enable the Local Service radio button.
Model Enter the URL for the model that implements the service.

Click Fetch/refresh WSDL to display the operations exposed for the web service.

Operation Select the operation to execute.
Arguments The builder call editor displays the argument names for the selected operation as inputs to the service call.

You can use the reference chooser to specify an appropriate value from a model element or you can enter a text string directly. (Type does not apply to the WSDL services.)

Label translation settings

Create Resource Bundle Click Create Resource Bundle to create a properties file that contains the label name and default value for each element used in the form.

You can use this generated property file as the basis for creating the final resource bundle used by this page.

Resource Bundle Name Enter the name of the resource bundle, either a property file or Java>java.util.ResourceBundle. The resource bundle must be either in (or below) the WEB-INF/work/source directory or in a .jar file in the WEB-INF/lib directory.
Advanced inputs

Data path An XPath expression used to select for display a subnode of the data coming from the source.

While this input works for all data source types, it is most helpful for web clipping uses. It allows you to use a page from an HTTP source, but show only a portion of the page as opposed to the whole HTML page. For example, the third table in the second DIV.

Generate Main Allow this builder to automatically generate a Main action. This action will start application operation and cause the display of the application page.

Disable this check box to use a custom Main action.

Log Request/Response Display the service request and response in the application server console and log this information in the IBM WebSphere Portlet Factory log file.
Add Builder name to artifacts  
Model The name of model to import. This model forms the basis of the data view. The default setting for this input imports the data_view model. This model contains all the builders required for the application to function and, as a result, this input should not be changed.

However, in some cases a custom model might be required, and this input allows an alternate model to be selected.

Parent topic: Data View builder


Library | Support |