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:
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:
Parameters:
- id
The ID of the element.