focusManager

You are viewing an old version (v. 7) of this page.
The latest version is v. 12, last edited on Nov 21, 2014 (view differences | )
<< View previous version | view page history | view next version >>

Overview

You can use the icecore:focusManager tag to manage where focus will be applied on page load.

Getting Started

To use the icecore:focusManager tag, first declare the core namespace:

<html ... xmlns:icecore="http://www.icefaces.org/icefaces/core">

Then add the tag to your page enclosing the components that you want to have the focus managed:

<h:body> 
    ... 
    <icecore:focusManager>
        ....
        <h:form>
            <h:inputText .../>
            <h:inputText .../>
            ....
            ....
           <ace:autoCompleteEntry ..../>
        </h:form>
        ....
    </icecore:focusManager>
    ... 
</h:body>

The focus manager provides the following automatic focus setting features when it is included inside a form component:

  • The first visible (enabled) input element in the form has focus set on it initially.
  • Alternatively, if there is an invalid component in the form (failed validation), the first visible (enabled) invalid component will receive focus instead.
  • The application also can specify a component to have focus set on it via the "for" attribute.
<h:form id="form"> 
    ... 
    <icecore:focusManager for="A">
        <h:inputText .../>
        <h:inputText id="A" .../>
        ....
        ....
        <ace:autoCompleteEntry ..../>
    </icecore:focusManager>
    ... 
</h:form>

Attributes

for Use this attribute to specify the ID of the component that will receive focus.

The focusManager tag was added in ICEfaces EE 3.3.0.GA_P02, 4.0.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2017 ICEsoft Technologies Canada Corp.