Attribute Sequencer Builder
In this topic ...
Related Topics ...
The Attribute Sequencer modifies existing elements in a repeated region on a page by replacing or adding to any HTML attribute values that those elements support. Use the Attribute Sequencer within a Repeated Region to set an HTML attribute to a changing value according to a sequential list of values specified. For example, the HTML below includes two regions at which to place the Repeated Region builder call and the Attribute Sequencer builder call:
<tr class="header"><td>State</td><td>Capitol</td></tr>
<tr name="alternatorAttachesHere"><td name="customerName"/> /></tr>
Quick Tips
- Be sure to associate the Attribute Sequencer with a named tag that supports the application of HTML styles. Also, make sure that the tag with which you associate the Attribute Sequencer supports the styles you are trying to apply.
- Use the Attribute Sequencer to add or modify attribute values not set by other builder calls. We can tailor the display of a control builder call by using the Attribute Sequencer to change the font, size, border, or any other supported attribute for the control.
- To use the Attribute Sequencer successfully, we need to know a little about HTML styles. Here's a good starting point for learning more about using HTML styles.
- We can use style class definitions to set multiple attribute values to one HTML element.
Specifying Inputs
The Attribute Sequencer builder takes the inputs described in the table below. For help on inputs common to many or all builders such as those in the Properties and HTML Attributes input groups, see "Using the Builder Call Editor."
Input Name Description Name Enter a name for this builder call. The Designer displays this name in the Builder Call List. Page Location Use the Page Location input to specify the page or pages on which this builder call will act. See "Locating Control Builders on Pages" for detailed documentation about the Page Location input and page location syntax.
Attribute Name The name of the HTML attribute for which the Attribute Sequencer will set values. If you have set up style classes in a <style> segment of the HTML, enter "class" here. If you are specifying the values for the HTML attribute directly in the Comma-delimited list of Values, enter the name of the HTML attribute such as bgcolor, font, size, etc.
Values (Comma separated) The list of style class definitions declared in the <style> tag or the individual attribute values. For example, if you are using style class definitions, the value for this input could be: blueRow, redRow, greenRow
If you are setting an individual HTML attribute directly, (Attribute Name = "bgcolor"), the value for this input could be:
cyan, yellow, orange
Using the Attribute Sequencer
We can set HTML attribute values with the Attribute Sequencer in two ways:
- Using In-Line Values - We can specify the HTML attribute to set for a particular HTML element by entering the HTML attribute name in the builder dialog for the Attribute Sequencer and then listing a set of values appropriate for the HTML attribute you named. For example, if you set the Attribute Name equal to "font" in the Attribute Sequencer's builder dialog, valid entries in the Comma-delimited list of Values input would be: 8pt Arial, 12 pt Courier, 16 pt Helvetica.
- Using Style Class Definitions - You can declare style class definitions in a <style> segment of your HTML page or in a style sheet and specify the appropriate class names as the HTML attribute values to apply. When you use the Attribute Sequencer in this way, enter "class" as the value for Attribute Name in the Attribute Sequencer's builder dialog and list the appropriate class names as the value for the Comma-delimited list of Values.
Using In-Line Values to Set Attributes
If you just want to set one HTML attribute for a repeated HTML element, we can specify the attribute name and the values in the Attribute Sequencer's builder dialog. To display text like the following:
Doug Appleton
Maria Jadis
Arthur DiCarlo
Theresa Popenoe
Max O'Neil
...in the Attribute Sequencer's builder dialog, set the Attribute Name value equal to "font" and the Comma-delimited list of Values value equal to: 8 pt Arial, 12 pt Arial, 14 pt Arial.
Using Style Class Definitions to Set Attributes
We can also apply the styles defined in a style class definition to an HTML element with the Attribute Sequencer. For example, if your style definitions are defined as follows:
<style type="text/css">
.one {background-color:#E0E0E0; font: 10 pt Arial}
.two {background-color:white; font: 10 pt Arial}
.header {background-color:purple; color:white; font-weight:bold}
</style>
Enter the value for the Attribute Name input would be "class" and the value for the Comma-delimited list of Values would be "one, two".