Focus Retention API

Version 3 by Ken Fyten
on Mar 07, 2016 16:25.


compared with
Current by Ken Fyten
on Mar 07, 2016 16:31.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 h2. 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:
  
  * h5. [ice.applyFocus(id) _or_ ice.af(id)|#applyFocus]
 * h5. [ice.setFocus(id) _or_ ice.sf(id)|#setFocus]
  * *{{[ice.applyFocus(id) _or_ ice.af(id)|#applyFocus]}}*
 * *{{[ice.setFocus(id) _or_ ice.sf(id)|#setFocus]}}*
  
 ----
 \\
 {anchor:applyFocus}
 {panel}
 h4. 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:_
  
 {code:javascript}ice.applyFocus(id);
 {code}
 {_}Parameters:_
  
 * id
 bq. The ID of the element.
 {panel}
 \\
 {anchor:setFocus}
 {panel}
 h4. 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:_
  
 {code:javascript}ice.setFocus(id);
 {code}
 {_}Parameters:_
  
 * id
 bq. The ID of the element.
 {panel}

© Copyright 2018 ICEsoft Technologies Canada Corp.