|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.gui.components.Component
org.olat.core.gui.components.htmlheader.jscss.JSAndCSSComponent
public class JSAndCSSComponent
Description:
a fake component which only serves to request additional .js or .css files for a controller/component. In order to activate it, this component here
must be inserted into the rendertree, e.g. myVelocityContainer.put("jsAndCss", myJsAndCssComponent);
Initial Date: 03.05.2006
| Constructor Summary | |
|---|---|
JSAndCSSComponent(java.lang.String componentName,
java.lang.Class baseClass,
java.lang.String[] jsFileNames,
java.lang.String cssFileName,
boolean forceCssRemove)
|
|
JSAndCSSComponent(java.lang.String componentName,
java.lang.Class baseClass,
java.lang.String[] jsFileNames,
java.lang.String cssFileName,
boolean forceCssRemove,
java.lang.String rawHeader)
|
|
JSAndCSSComponent(java.lang.String componentName,
java.lang.Class baseClass,
java.lang.String[] jsFileNames,
java.lang.String cssFileName,
boolean forceCssRemove,
java.lang.String rawHeader,
int refreshIntervall)
|
|
| Method Summary | |
|---|---|
void |
addAutoRemovedCssPathName(java.lang.String cssPathName,
int cssLoadIndex)
used rather rarely, e.g. |
ComponentRenderer |
getHTMLRendererSingleton()
|
void |
requireFullPageRefresh()
requires that a full page reload takes places. |
void |
setRefreshIntervall(int refreshIntervall)
|
void |
validate(UserRequest ureq,
ValidationResult vr)
called just before the rendering of the -whole tree- takes place, so e.g. |
| Methods inherited from class org.olat.core.gui.components.Component |
|---|
addListener, debuginfoGetListeners, dispatchRequest, getAndClearLatestFiredEvent, getComponentName, getDispatchID, getExtendedDebugInfo, getLatestDispatchedController, getListenerInfo, getParent, getSpanAsDomReplaceable, getTimestamp, getTranslator, isDirty, isDirtyForUser, isDomReplaceable, isEnabled, isVisible, setDirty, setDomReplaceable, setEnabled, setSpanAsDomReplaceable, setVisible, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JSAndCSSComponent(java.lang.String componentName,
java.lang.Class baseClass,
java.lang.String[] jsFileNames,
java.lang.String cssFileName,
boolean forceCssRemove,
java.lang.String rawHeader,
int refreshIntervall)
componentName - the name of the componentbaseClass - the class of the controller (or from the package's Manager) from where the resources will be fetched: e.g. org/olat/demo/_static/js or /css respectively.jsFileNames - maybe null An array of the jsFilenames, one entry is e.g. "script.js", which will then be resolved to baseClass/_static/js/script.jscssFileName - maybe null the name of the cssFile to include: e.g. "style.css" will be resolved to loc of baseClass/_static/css/style.cssforceCssRemove - if true, the given css will be removed if no longer necessary (e.g. for a custom css as in the course), otherwise it will stay in the html-header for the whole usersessionrawHeader - -only use if neither jsFileNames nor cssFileName can be used (only for dynamically created jslibs for example)-a string (e.g. "refreshIntervall - the time in miliseconds after which (in ajax mode) a refresh of the screen is needed. -1 means infinity/no refresh. use small times with caution, since it generates server load. after the given time, a poll (comet, push, hanging get for future release) is issued to the server to collect the dirty components and rerender them. when more than one interval is requested, then the minimum is taken.
public JSAndCSSComponent(java.lang.String componentName,
java.lang.Class baseClass,
java.lang.String[] jsFileNames,
java.lang.String cssFileName,
boolean forceCssRemove,
java.lang.String rawHeader)
componentName - the name of the componentbaseClass - the class of the controller (or from the package's Manager) from where the resources will be fetched: e.g. org/olat/demo/_static/js or /css respectively.jsFileNames - maybe null An array of the jsFilenames, one entry is e.g. "script.js", which will then be resolved to baseClass/_static/js/script.jscssFileName - maybe null the name of the cssFile to include: e.g. "style.css" will be resolved to loc of baseClass/_static/css/style.cssforceCssRemove - if true, the given css will be removed if no longer necessary (e.g. for a custom css as in the course), otherwise it will stay in the html-header for the whole usersessionrawHeader - -only use if neither jsFileNames nor cssFileName can be used (only for dynamically created jslibs for example)-a string (e.g. "
public JSAndCSSComponent(java.lang.String componentName,
java.lang.Class baseClass,
java.lang.String[] jsFileNames,
java.lang.String cssFileName,
boolean forceCssRemove)
componentName - the name of the componentbaseClass - the class of the controller (or from the package's Manager) from where the resources will be fetched: e.g. org/olat/demo/_static/js or /css respectively.jsFileNames - maybe null An array of the jsFilenames, one entry is e.g. "script.js", which will then be resolved to baseClass/_static/js/script.jscssFileName - maybe null the name of the cssFile to include: e.g. "style.css" will be resolved to loc of baseClass/_static/css/style.cssforceCssRemove - if true, the given css will be removed if no longer necessary (e.g. for a custom css as in the course), otherwise it will stay in the html-header for the whole usersession| Method Detail |
|---|
public void validate(UserRequest ureq,
ValidationResult vr)
Component
validate in class Componentpublic ComponentRenderer getHTMLRendererSingleton()
getHTMLRendererSingleton in class Component
public void addAutoRemovedCssPathName(java.lang.String cssPathName,
int cssLoadIndex)
cssPathName - the path to the css, e.g. /olat/m/1001/mycss.csscssLoadIndex - flag to indicate load order of this CSS. See JSAndCSSAdder.CSS_INDEX_*JsAndCssAdder.addRequiredCSSPath(String cssPath, boolean forceRemove);public void setRefreshIntervall(int refreshIntervall)
refreshIntervall - - refresh intervall in ms, -1 no more polling i.e. <=1000 no more polling
according to /olatcore/org/olat/core/gui/control/winmgr/_content/serverpart.htmlpublic void requireFullPageRefresh()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||