10.8 Add Custom Attributes
Description: This attribute is used to add custom attribute, i.e. attribute not supported by the tool.
Components to accept the input: Switch, Input box
When user enables the switch, it will display two input boxes and two switches as shown in the image. User can add more attributes using the link “Add attribute” highlighted in green and can delete the attribute using the icon highlighted in red.
- Input boxes:
- Enter attribute: This field represents the attribute name.
- Enter value: This field represents the attribute value. It supports both strings and variables. For strings use double quotes(“”).
- Switch:
Attributes support two types of bindings: one way binding and two way binding. To understand one way binding and two way binding refer: https://knockoutjs.com/documentation/value-binding.html
- Use colon: This option is only valid if the user is using one way binding to add attributes to the JET components, for example, oj-input-text, oj-select-one etc. Use this field as some of the JET attributes need colon before attribute name. If this switch is enabled, attribute name will start with colon. Refer JET site to know whether the attribute needs colon or not. http://jet.us.oracle.com/6.1.0/jetCookbook.html
- Use curly braces: If this switch is enabled, attribute value
will be surrounded by curly braces.
For one way binding, use square brackets.
For two way binding, use curly brackets.
Example: User can use this attribute in two cases.
- User has a list and wants to refresh it whenever the data changes. To refresh the list, its ID attribute is required. Tool generates ID for every element but it is random and will change every time the component is edited. Therefore, this ID cannot be used to refresh the list. Hence, user can add new id attribute. It will replace the id generated by the tool. In the below example, “listview” is taken as an attribute.
Usage: Enable the switch.
Enter the attribute name in “Enter Attribute” field. Attribute name is “id”.
Enter the attribute value in “Enter Value” field. Attribute value is “listview”. As it is a simple string, use double quotes as shown in the image below.
This id attribute needs colon. enable the switch.
This attribute needs one way binding, it needs square brackets. Hence, do not enable the switch as shown in the image below.
- A single element can support many attributes and it is not feasible to add each attribute. Therefore, there will be some attributes, which will not be available inside the tool user can add such attributes using this custom attribute.
Parent topic: Available Attributes


