Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
11g Release 1 (11.1.1.6.0)

E12419-08

<af:insertTextBehavior>

insertTextBehavior insert text behavior


The insertTextBehavior tag is a declarative way to have a command component (e.g. a button) insert some text into an input component when clicked. This tag will be ignored for any server-rendered components, as it is only supported for the rich client.

The insertTextBehavior tag cancels server-side event delivery automatically - so actionListener or action attributes on the parent component will be ignored. This cannot be disabled. Developers that need to also trigger server-side functionality can add an additional client listener that uses AdfCustomEvent and af:serverListener to deliver a server-side event.

Examples:

This example will insert "hello world" in place of the selection in the inputText with the id "someInput" when the button is clicked.


            <af:commandToolbarButton text="Insert text at Selection">
                <af:insertTextBehavior for="someInput" value="hello world"/>
            </af:commandToolbarButton>

Attributes

Name Type Supports EL? Description
for String yes The ID of the input component to which the insertion will be performed. An ID beginning with a colon will be treated as absolute (after trimming off the colon). All other ids will be resolved relative to the component which contains the input.
value String yes The String representing the text that will be inserted at the current cursor position or selection when invoked.
triggerType String no the event type which will trigger the text to be inserted. By default, this is "action".