Focus Retention API

You are viewing an old version (v. 3) of this page.
The latest version is v. 4, last edited on Mar 07, 2016 (view differences | )
<< View previous version | view page history | view next version >>

Focus Retention API

The Focus Retention API allows developers direct access to ICEfaces' focus retention mechanism. Focus retention is used to ensure that the appropriate element receives focus after an ajax DOM update is applied.

The following Focus APIs are available:



ice.applyFocus(id) or ice.af(id)

Accepts an element ID. By calling this function the client will move the focus on the specified element and also call ice.setFocus so that the server will be informed about the focus change.

Usage:

ice.applyFocus(id);

Parameters:

  • id

    The ID of the element.


ice.setFocus(id) or ice.sf(id)

Accepts an element ID. By calling this function the client will send the ID to the server next time a form submit is invoked. The focus is not moved on the specified element.

Usage:

ice.setFocus(id);

Parameters:

  • id

    The ID of the element.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2017 ICEsoft Technologies Canada Corp.