|Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
11g Release 1 (184.108.40.206.0)
The scrollComponentIntoViewBehavior tag is a declarative way to have a command component (e.g. a button) scroll a component into view and optionally set focus in it. This tag will be ignored for any server-rendered components, as it is only supported for the rich client.
The scrollComponentIntoViewBehavior 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.
This example will scroll "idInputText" into view and set focus inside its content when the button is clicked.
<af:commandButton immediate="true" text="Scroll into view"> <af:scrollComponentIntoViewBehavior componentid="idInputText" subTargetid="content" focus="true"/> </af:commandButton>
If this is used on an inputText like the following:
<af:inputText inlineStyle="width: 350px" id="idInputText2" clientComponent="true" label="String Value with Large Label"/>
you need to set clientComponent="true" or it will not set focus on the input element.
|componentId||String||yes||The ID of the component, relative to this component. An ID beginning with a colon will be treated as absolute (after trimming off the colon).|
|focus||boolean||yes||Indicates if we should focus on the component or simply scroll the component into view.|
|subTargetId||String||yes||optional component dependent DOM sub-id that needs to be scrolled/focused into view. For RichTextEditor or InlineFrame component, the subTargetId can refer to any element inside the secondary document contained by these components. For all other cases the subTargetId should be used with caution even though the sub-ids are present in the DOM structure. Only the ones documented in the tag documentation of the components are supported.|