Portlet Factory, Version 6.1.2

 

Variable builder

 

+

Search Tips   |   Advanced Search

 

Use a Variable builder call to store temporary or persistent data in a model.

Use this builder when you want to create an XML variable or a simple schema, or if you have a schema, but do not have any sample data. The Variable builder let you type or paste XML data; the Import To XML builder imports an XML file.

Use Variable builder to create an XML variable with the desired structure, and then use Simple Schema Generator to make a schema from that Variable.

Use the variable builder to generate some sample data. Select the Variable builder and use the Type select to navigate to your schema. After you have selected the schema, a “Create Sample Data” button will appear. Click this to generate your sample data.

Other builders within your model can use a variable value as a data source or modify or process variable content in any way. Variables are not accessible to builders outside of the model in which they reside. To expose a variable value to a linked model, create accessor methods that get and set any variable values.

 

Quick tips

Naming a variable

Use an easy to understand name for a variable. This name is displayed in the tree-based source lists of many other builder edit pages. Using a concise name facilitates locating a variable within a tree.

Accessing variable values

You can access variable values by using the reference chooser, available for most builder inputs, or from Method builder calls and linked Java objects.

Using methods

You access your model variables and their values by calling the method webAppAccess.getVariables(). These interfaces are documented in the IBM WebSphere Portlet Factory API Javadoc.


Parent topic

Builder help