Combo Box Form Control

The oxy_combobox built-in form control is used for providing a graphical user interface object that is a drop-down menu of proposed values. This form control can also be used for a combination of a drop-down menu and an editable single-line text field.

The oxy_combobox form control supports the following properties:

Example: oxy_combobox Form Control

This example uses a combo box form control to edit an attribute value. Each time the value changes, it triggers an action that inserts an element into the attribute's parent element.
comboBox:before {
    content: "A combo box that edits an attribute value. 
               The possible values are provided from CSS:"
        oxy_combobox(           
            edit, "@attribute",
            editable, false,
            values, "value1, value2, value3",
            labels, "Value no1, Value no2, Value no3",
            onChange, oxy_action(
                name, 'Insert',
                operation, 'XQueryUpdateOperation',
                arg-script, 'insert node <product>{xs:string(@attribute)}</product>
                          as last into .'));
}
Tip: To insert a sample of the oxy_combobox form control in a CSS file , invoke the Content Completion Assistant by pressing Ctrl + Space and select the oxy_combobox code template.

To see more detailed examples and more information about how form controls work in Oxygen XML Author Eclipse plugin, see the sample files in the following directory: [OXYGEN_INSTALL_DIR]/samples/form-controls.

Resources

For more information about form controls, watch our video demonstration: