- java.lang.Object
-
- org.omnifaces.util.AjaxLocal
-
public final class AjaxLocal extends Object
Collection of utility methods for the Faces API with respect to working with
PartialViewContext
.The difference with
Ajax
is that no one method ofAjaxLocal
obtains theFacesContext
from the current thread byFacesContext.getCurrentInstance()
. This job is up to the caller. This is more efficient in situations where multiple utility methods needs to be called at the same time. InvokingFacesContext.getCurrentInstance()
is at its own an extremely cheap operation, however as it's to be obtained as aThreadLocal
variable, it's during the call still blocking all other running threads for some nanoseconds or so.- Since:
- 4.6
- Author:
- Bauke Scholtz
- See Also:
Ajax
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
data(FacesContext context, Object... namesValues)
static void
data(FacesContext context, String name, Object value)
static void
data(FacesContext context, Map<String,Object> data)
static PartialViewContext
getContext(FacesContext context)
static boolean
isExecuted(FacesContext context, String clientId)
static void
load(FacesContext context, String libraryName, String resourceName)
static void
oncomplete(FacesContext context, String... scripts)
static void
update(FacesContext context, String... clientIds)
static void
updateAll(FacesContext context)
static void
updateColumn(FacesContext context, UIData table, int index)
static void
updateRow(FacesContext context, UIData table, int index)
-
-
-
Method Detail
-
getContext
public static PartialViewContext getContext(FacesContext context)
- See Also:
Ajax.getContext()
-
update
public static void update(FacesContext context, String... clientIds)
- See Also:
Ajax.update(String...)
-
updateAll
public static void updateAll(FacesContext context)
- See Also:
Ajax.updateAll()
-
updateRow
public static void updateRow(FacesContext context, UIData table, int index)
- See Also:
Ajax.updateRow(UIData, int)
-
updateColumn
public static void updateColumn(FacesContext context, UIData table, int index)
- See Also:
Ajax.updateColumn(UIData, int)
-
load
public static void load(FacesContext context, String libraryName, String resourceName)
- See Also:
Ajax.load(String, String)
-
oncomplete
public static void oncomplete(FacesContext context, String... scripts)
- See Also:
Ajax.oncomplete(String...)
-
data
public static void data(FacesContext context, String name, Object value)
- See Also:
Ajax.data(String, Object)
-
data
public static void data(FacesContext context, Object... namesValues)
- See Also:
Ajax.data(Object...)
-
data
public static void data(FacesContext context, Map<String,Object> data)
- See Also:
Ajax.data(Map)
-
isExecuted
public static boolean isExecuted(FacesContext context, String clientId)
- See Also:
Ajax.isExecuted(String)
-
-