|
ICEfaces 1.x Compatibility Library 3.3.0 Java API Documentation |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.icesoft.faces.context.effects.JavascriptContext
public class JavascriptContext
Used to send Javascript to the browser
Field Summary | |
---|---|
static java.lang.String |
DYNAMIC_CODE_ID
ID of script node used to send Javascript in a dom update |
static java.lang.String |
ICE_BRIDGE
URL of the ICE Bridge lib |
static java.lang.String |
ICE_EXTRAS
URL of the ICE Extras lib |
static java.lang.String |
LIB_KEY
Request Scope Key, indicating that extras needs to be included |
Constructor Summary | |
---|---|
JavascriptContext()
|
Method Summary | |
---|---|
static void |
addJavascriptCall(javax.faces.context.FacesContext facesContext,
java.lang.String call)
Add a javascript call to be executed on the browser. |
static void |
applicationFocus(javax.faces.context.FacesContext facesContext,
java.lang.String id)
Set the application focus for the current request, overrides and setFocus call. |
static java.lang.String |
applyEffect(Effect effect,
java.lang.String id,
javax.faces.context.FacesContext context)
Wrap the effect in a javascript method to be called later. |
static void |
fireEffect(Effect effect,
java.lang.String id,
javax.faces.context.FacesContext context)
Fire an effect at the end of the current render cycle. |
static void |
fireEffect(Effect effect,
javax.faces.component.UIComponent component)
Fire an effect at the end of the current render cycle |
static void |
fireEffect(Effect effect,
javax.faces.component.UIComponent component,
javax.faces.context.FacesContext facesContext)
Fire an effect at the end of the current render cycle |
static void |
fireEffect(javax.faces.component.UIComponent uiComponent,
javax.faces.context.FacesContext facesContext)
Fire an effect at the end of the current render cycle |
static void |
focus(javax.faces.context.FacesContext context,
java.lang.String id)
\ Set focus on an HTML element. |
static java.lang.String |
getEffectFunctionForEvent(javax.faces.component.UIComponent uiComponent,
java.lang.String event,
java.lang.String id,
javax.faces.context.FacesContext facesContext)
Get the Effect function for a given event |
static java.lang.String[] |
getIncludedLibs(javax.faces.context.FacesContext facesContext)
Get the included javascript libraries |
static java.lang.String |
getJavascriptCalls(javax.faces.context.FacesContext facesContext)
Add a javascript call to this request |
static java.lang.String |
getJavascriptCalls(java.util.Map map)
Get javascript calls from the Request map |
static void |
includeLib(java.lang.String libname,
javax.faces.context.FacesContext facesContext)
Include a script tag in the <head> section of the page with the src attribute set to libname. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LIB_KEY
public static final java.lang.String DYNAMIC_CODE_ID
public static final java.lang.String ICE_BRIDGE
public static final java.lang.String ICE_EXTRAS
Constructor Detail |
---|
public JavascriptContext()
Method Detail |
---|
public static void includeLib(java.lang.String libname, javax.faces.context.FacesContext facesContext)
libname
- the source of the javascript filefacesContext
- The facescontext this file is needed forpublic static java.lang.String[] getIncludedLibs(javax.faces.context.FacesContext facesContext)
facesContext
-
public static void addJavascriptCall(javax.faces.context.FacesContext facesContext, java.lang.String call)
helloWorld(name}{ alert('Hello [' + name + ']'); }
Would need to be written as this['helloWorld'] = function(name){
alert('Hello [' + name + ']'); }
facesContext
- call
- Javascript code to executepublic static java.lang.String getJavascriptCalls(javax.faces.context.FacesContext facesContext)
facesContext
-
public static java.lang.String getJavascriptCalls(java.util.Map map)
map
-
public static java.lang.String applyEffect(Effect effect, java.lang.String id, javax.faces.context.FacesContext context)
effect
- id
- context
-
public static void fireEffect(Effect effect, java.lang.String id, javax.faces.context.FacesContext context)
effect
- id
- Target element of the effectcontext
- public static void fireEffect(Effect effect, javax.faces.component.UIComponent component)
effect
- component
- public static void fireEffect(Effect effect, javax.faces.component.UIComponent component, javax.faces.context.FacesContext facesContext)
effect
- component
- facesContext
- public static void fireEffect(javax.faces.component.UIComponent uiComponent, javax.faces.context.FacesContext facesContext)
uiComponent
- facesContext
- public static java.lang.String getEffectFunctionForEvent(javax.faces.component.UIComponent uiComponent, java.lang.String event, java.lang.String id, javax.faces.context.FacesContext facesContext)
uiComponent
- event
- id
- facesContext
-
public static void focus(javax.faces.context.FacesContext context, java.lang.String id)
context
- id
- public static void applicationFocus(javax.faces.context.FacesContext facesContext, java.lang.String id)
id
-
|
ICEfaces 1.x Compatibility Library 3.3.0 Java API Documentation |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |