Portlet Factory, Version 6.1.2


 

Setting text attributes

This example will explain how to use an Attribute Setter builder to display the text in red at 7 pts.

  1. Place a <font> tag before the text you want to manipulate, and assign a name for the name attribute, as shown below.
    <font name="Text">

    The formatting of this text depends on the attribute setter.

  2. Open IBM® WebSphere Portlet Factory Designer and assign an Attribute Setter builder call to the model. Make sure the builder call is assigned to the name provided in the font tag. In the example above, the Attribute Setter builder would be assigned to the Text tag.

  3. Assign the color attribute to the text by doing the following:

    1. In the Name field, select the color attribute.

    2. In the Value field, type in a pointer to a variable. For example, ${Variables/Color} You can also type in the color directly; however, by storing the value in a variable you can dynamically change the variable's value at run time.

    3. Add a Variable builder call of type string to the model.

    4. In the Value field, type the color name. For example, red.

  4. Assign the size attribute by doing the following:

    1. Open the attribute builder call you modified in Step 3.

    2. In the Name field, select the size attribute.

    3. In the Value field, type the point size. For example, 7. You can also type in a pointer to a variable; however, keep in mind you will need to create a Variable builder call of type string that contains the value.

    4. Click OK.

Parent topic: Attribute Setter builder


Library | Support |