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.
oxy_combobox form control supports the following properties:visibility property to
-oxy-collapse-text to render the text only in the form
control that the oxy_editor function specifies.em,
ex), absolute (in, cm,
mm, pt, pc, px), and
percentage (followed by the % character) length units. The
width property takes precedence over the columns
property (if the two are used together).true (default value) and false.values property. The value of this property is a list of tooltip
messages separated by commas. If you want the tooltip to display a comma, use the ${comma} variable.(values, '1\\, 2\\, 3, 4') will
display a form control that has 1, 2, 3 for the first value and
4 for the second value.true or false (default value). To
make the form control inherit its font from its parent element, set the
fontInherit property to true.values property. Each item provides a literal
description of the items listed in the values property. These labels can
be translated using the ${i18n()}
editor variable.editable property is set to false).color property is
inherit, the form control has the same color as the element that was
used to insert it.p:before {
content: oxy_combobox(hoverPseudoclassName, 'showBorder')
}
p:showBorder {
border: 1px solid red;
}true and the combo box is not editable, then a new
<Empty> value is added in that combo box. This clears or removes the
value being edited, depending on if it edits an element or attribute.oxy_action()
function or referenced from the framework by its ID. After the action is executed, the cursor
remains in the combo box. Note that this property does not support actions defined by
JavaScript code.@xml:lang attribute is not specified explicitly on an ancestor
element.Example: oxy_combobox Form Control
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 .'));
}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.
For more information about form controls, watch our video demonstration: