Focus Retention API

Table of Contents

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 2018 ICEsoft Technologies Canada Corp.