Builder Definition: Enhances attribute setting development when a common attribute is required to be set for multiple fields across different (or same) page locations. The attribute values are defined in properties file, with key being the page location name. Properties can be present within the project or on server filesystem but should be available in classpath.
Name: Name of the builder (optional)
Page Location: Required. Specify location of fields for which the attribute needs to be applied.
Attribute Name: common attribute to be set for various form fields, can also be populated indirectly.
Properties Location: filepath of properties file, can also be populated indirectly in case properties path is on server file system.
Fig. 1 iAttributeSetter builder inputs
Scenario- Simple Input Form fields: In this example, we will utilize iAttributeSetter builder to set tooltip for input form fields using ‘title’ attribute for various form fields. See Fig.1 for builder inputs.
Fig. 2 w/o iAttributeSetter and w/ iAttributeSetter
Using Attribute Setter builder requires more number of builders and is less manageable, whereas using iAttributeSetter builder not only reduces the number of builders required to ONE but also since values are defined in properties file, code is easier to maintain.