ICEfaces Core 3.3.0
Java API Documentation

org.icefaces.util
Class FocusController

java.lang.Object
  extended by org.icefaces.util.FocusController

public class FocusController
extends java.lang.Object

Utility API for managing the element focus in the browser.


Constructor Summary
FocusController()
           
 
Method Summary
static java.lang.String getFocus(javax.faces.context.FacesContext context)
          Get the element ID the will receive focus during next update.
static java.lang.String getReceivedFocus(javax.faces.context.FacesContext context)
          Acquire the ID of the currently focused element in the browser.
static boolean isFocusSet(javax.faces.context.FacesContext context)
          Test if focus is defined for a certain element.
static void setFocus(javax.faces.context.FacesContext context, java.lang.String id)
          Set the element ID that should received focus during next update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FocusController

public FocusController()
Method Detail

getReceivedFocus

public static java.lang.String getReceivedFocus(javax.faces.context.FacesContext context)
Acquire the ID of the currently focused element in the browser.

Parameters:
context - the FacesContext
Returns:
the element ID

setFocus

public static void setFocus(javax.faces.context.FacesContext context,
                            java.lang.String id)
Set the element ID that should received focus during next update.

Parameters:
context - the FacesContext
id - the element ID

getFocus

public static java.lang.String getFocus(javax.faces.context.FacesContext context)
Get the element ID the will receive focus during next update.

Parameters:
context - the FacesContext
Returns:
the element ID

isFocusSet

public static boolean isFocusSet(javax.faces.context.FacesContext context)
Test if focus is defined for a certain element.

Parameters:
context - the FacesContext
Returns:
return true if focus is defined

ICEfaces Core 3.3.0
Java API Documentation

Copyright 2013 ICEsoft Technologies Canada Corp., All Rights Reserved.