|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.component.UIComponent javax.faces.component.UIComponentBase com.ibm.xsp.component.UIScriptCollector
public class UIScriptCollector
UIScriptCollector is a
UIComponent
that wraps other
components on a JSF page. It is automatically inserted into the XPage by the
root control. In Internet Explorer if you partial refresh an area where
script tag appears before an input control, then the script is not inserted
into the page during the refresh. The Script Collector control is used to
avoid that issue by aggregating all JavaScript snippets that are output by
different controls into one large script tag at the bottom of the page.
During a partial refresh, the script tag will only contain scripts from
controls that were in the updated area.
Not intended to be subclassed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.faces.component.UIComponentBase |
---|
javax.faces.component.UIComponentBase.AggregatedIterator, javax.faces.component.UIComponentBase.UnmodifiableIterator |
Nested classes/interfaces inherited from class javax.faces.component.UIComponent |
---|
javax.faces.component.UIComponent.StateMap, javax.faces.component.UIComponent.StateMapEntry |
Field Summary | |
---|---|
static java.lang.String |
COMPONENT_FAMILY
The standard component family for this component. |
static java.lang.String |
COMPONENT_TYPE
The standard component type for this component. |
Fields inherited from class javax.faces.component.UIComponentBase |
---|
EMPTY_ITERATOR |
Fields inherited from class javax.faces.component.UIComponent |
---|
_xspStateId |
Constructor Summary | |
---|---|
UIScriptCollector()
Constructor. |
Method Summary | |
---|---|
void |
addScript(java.lang.String newScript)
Adds a new script for the bottom of the script block. |
void |
addScriptOnce(java.lang.String newScript)
Adds a new script for the bottom of the script block, making sure the exact same script wasn't already added. |
void |
addScriptOnLoad(java.lang.String newScript)
Adds a new script that should be executed on load |
static UIScriptCollector |
find()
Find the UIScriptCollector associated with the current page. |
java.lang.String |
getFamily()
|
java.util.List<java.lang.String> |
getScripts()
Returns all collected scripts for the top of the script block. |
java.util.List<java.lang.String> |
getScriptsOnLoad()
Returns all collected scripts the should be executed "onload". |
boolean |
isInRenderedChain(FacesContextEx context)
The component should always be rendered by Ajax requests |
boolean |
isRendering()
This method checks to see if the current request is an Ajax request and whether or not the AjaxFacesContext is set to render. |
void |
reset()
Discards all collected scripts, script contributors and libraries. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object valueArray)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
Methods inherited from class javax.faces.component.UIComponentBase |
---|
_xspCleanTransientData, _xspGetReadOnlyObj, _xspGetRendererData, _xspRemoveReadOnlyObj, _xspRemoveRendererData, _xspSetIdUnchecked, _xspSetReadOnlyObj, _xspSetRendererData, addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class javax.faces.component.UIComponent |
---|
_xspGetStateId, _xspGetStateMap, _xspRestoreAttribute, _xspRestoreState, _xspSaveState, invokeOnComponent, isVisitable, markInitialState, setControlState, visitTree |
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 COMPONENT_TYPE
The standard component type for this component.
public static final java.lang.String COMPONENT_FAMILY
The standard component family for this component.
Constructor Detail |
---|
public UIScriptCollector()
Method Detail |
---|
public boolean isInRenderedChain(FacesContextEx context)
isInRenderedChain
in interface com.ibm.xsp.ajax.AjaxPartialRefresh
public void addScriptOnce(java.lang.String newScript)
newScript
- new script to addpublic void addScript(java.lang.String newScript)
newScript
- new script to addpublic void addScriptOnLoad(java.lang.String newScript)
newScript
- new script to addpublic java.lang.String getFamily()
getFamily
in class javax.faces.component.UIComponent
public java.util.List<java.lang.String> getScripts()
null
.
public java.util.List<java.lang.String> getScriptsOnLoad()
null
.
public void reset()
public static UIScriptCollector find()
FacesContext.getCurrentInstance()
.
UIScriptCollector
that was found.public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIComponentBase
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object valueArray)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIComponentBase
public boolean isRendering()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |