Usage
Signature:
interface CLabelledLinkElement
Typescript Import Format
//To typecheck the element APIs, import as below.
import { CLabelledLinkElement } from "oj-c/labelled-link";
//For the transpiled javascript to load the element's module, import as below
import "oj-c/labelled-link";
For additional information visit:
Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
Attributes
-
column-span :number
-
Specifies how many columns this component should span. This only takes effect when this component is a child of a form layout that has direction 'row'.
Names
Item Name Property columnSpanProperty change event columnSpanChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-column-span-changed -
container-readonly :boolean
-
Specifies whether an ancestor container, like oj-c-form-layout, is readonly. This affects whether a readonly component renders in full or mixed readonly mode.
Names
Item Name Property containerReadonlyProperty change event containerReadonlyChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-container-readonly-changed -
href :string
-
Specifies the URL that the link points to. If the href is provided, clicking the link will trigger the default browser behavior and will open the link. The
ojActionevent will not be triggered. If the href property is not provided, then the default browser behavior will be prevented and theojActionevent will be triggered.Names
Item Name Property hrefProperty change event hrefChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-href-changed -
label-edge :"inside"|"none"|"start"|"top"
-
Specifies how the label of the component is positioned when the label-hint attribute is set on the component.
Supported Values:
Value Description insideThe label will be placed inside the component and above the link (default, if unspecified). noneThe component will not create a label, but instead set the aria-labelledby property on the anchor element. startThe label will be placed before the start of the component. topThe label will be placed on top of the component. Names
Item Name Property labelEdgeProperty change event labelEdgeChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-edge-changed -
label-hint* :string
-
Represents a hint for rendering a label on the component. This is used in combination with the label-edge attribute to control how the label should be rendered.
Names
Item Name Property labelHintProperty change event labelHintChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-hint*-changed -
label-start-width :(number|string)
-
The width of the label when labelEdge is 'start'.
This attribute accepts values of type
0 | `--${string}` | `${number}%` | `${number}x` | `calc(${string})`Names
Item Name Property labelStartWidthProperty change event labelStartWidthChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-start-width-changed -
label-wrapping :"truncate"|"wrap"
-
Should the labels wrap or truncate when there is not enough available space.
Supported Values:
Value Description truncateLabel will truncate if needed. wrapLabel will wrap if needed. Names
Item Name Property labelWrappingProperty change event labelWrappingChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-wrapping-changed -
target :string
-
Sets the target attribute of the link.
Names
Item Name Property targetProperty change event targetChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-target-changed -
text :string
-
Specifies the text that should appear in the field. If this property is not provided, then the URL provided using the
hrefproperty will be used as the text in the field.Names
Item Name Property textProperty change event textChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-text-changed -
text-align :"start"|"end"|"right"
-
Specifies how the text is aligned within the text field
Supported Values:
Value Description endAligns text right when reading direction is ltr and left when reading direction is rtl. rightAligns text right regardless of reading direction, often used for numbers. startAligns text left when reading direction is ltr and right when reading direction is rtl (default, if unspecified). Names
Item Name Property textAlignProperty change event textAlignChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-text-align-changed -
user-assistance-density :"reflow"|"efficient"|"compact"
-
The component does not support any assistive text. But, this property can be used to specify whether or not the component should reserve space to be consistent with the other form components in the Form Layout.
Supported Values:
Value Description compactThe field will not reserve any space. efficientThe field will reserve space to prevent reflow. reflowThe field will not reserve any space. Names
Item Name Property userAssistanceDensityProperty change event userAssistanceDensityChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-user-assistance-density-changed
Events
-
ojAction
-
Triggered when the link is clicked, whether by keyboard, mouse, or touch events. This event is triggered only when the href is not provided. If the href is provided, clicking the link will not trigger this event.
See Events and Listeners for additional information.
Methods
-
blur : {void}
-
Blurs the link.
Returns:
- Type
- void
-
focus : {void}
-
Sets focus on the link.
Returns:
- Type
- void
-
getProperty(property) : {any}
-
Retrieves the value of a property or a subproperty.
Parameters:
Name Type Description propertyThe property name to get. Supports dot notation for subproperty access. Returns:
- Type
- any
-
setProperties(properties) : {void}
-
Performs a batch set of properties.
Parameters:
Name Type Description propertiesAn object containing the property and value pairs to set. Returns:
- Type
- void
-
setProperty(property, value) : {void}
-
Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a corresponding event.
Parameters:
Name Type Description propertyThe property name to set. Supports dot notation for subproperty access. valueThe new value to set the property to. Returns:
- Type
- void