|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.gui.control.JSAndCSSAdder
public abstract class JSAndCSSAdder
Description:
Initial Date: 04.05.2006
| Field Summary | |
|---|---|
static int |
CSS_INDEX_AFTER_THEME
|
static int |
CSS_INDEX_BEFORE_THEME
|
static int |
CSS_INDEX_THEME
|
| Constructor Summary | |
|---|---|
JSAndCSSAdder()
|
|
| Method Summary | |
|---|---|
abstract void |
addRequiredCSSFile(java.lang.Class baseClass,
java.lang.String cssFileName,
boolean forceRemove)
This method will add the CSS file before the theme. |
abstract void |
addRequiredCSSFile(java.lang.Class baseClass,
java.lang.String cssFileName,
boolean forceRemove,
int cssLoadIndex)
|
abstract void |
addRequiredCSSPath(java.lang.String cssPath,
boolean forceRemove,
int cssLoadIndex)
used rather rarely, e.g. |
abstract void |
addRequiredJsFile(java.lang.Class baseClass,
java.lang.String jsFileName)
adds a js file to be served in the html header to the list of required js-files. |
abstract void |
addRequiredJsFile(java.lang.Class baseClass,
java.lang.String jsFileName,
java.lang.String fileEncoding)
adds a js file to be served in the html header to the list of required js-files. |
abstract void |
addRequiredJsFile(java.lang.Class baseClass,
java.lang.String jsFileName,
java.lang.String fileEncoding,
java.lang.String preAJAXAddJsCode)
adds a js file to be served in the html header to the list of required js-files. |
abstract void |
addRequiredRawHeader(java.lang.Class baseClass,
java.lang.String rawHeader)
|
abstract boolean |
finishAndCheckChange()
|
abstract java.lang.String |
getMappedPathFor(java.lang.Class baseClass,
java.lang.String fileName)
Get the mapper path for this class and file name, e.g. |
abstract void |
requireFullPageRefresh()
requires that a full page reload takes places. |
abstract void |
setRequiredRefreshInterval(java.lang.Class baseClass,
int refreshIntervall)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CSS_INDEX_BEFORE_THEME
public static final int CSS_INDEX_THEME
public static final int CSS_INDEX_AFTER_THEME
| Constructor Detail |
|---|
public JSAndCSSAdder()
| Method Detail |
|---|
public abstract void addRequiredJsFile(java.lang.Class baseClass,
java.lang.String jsFileName)
In full page refresh mode, the library will be included to the page header using the standard script tags.
In AJAX mode, the library is will read the file from disk, transfer the content via the AJAX channel and then eval() the content in the window.
In case that your script needs some values to be initialized before the eval() happens, use the other addRequiredJsFile() for this purpose
baseClass - jsFileName -
public abstract void addRequiredJsFile(java.lang.Class baseClass,
java.lang.String jsFileName,
java.lang.String fileEncoding)
In full page refresh mode, the library will be included to the page header using the standard script tags.
In AJAX mode, the library is will read the file from disk, transfer the content via the AJAX channel and then eval() the content in the window. The fileEncoding is used to read the file from disk.
In case that your script needs some values to be initialized before the eval() happens, use the other addRequiredJsFile() for this purpose
baseClass - jsFileName - fileEncoding - the encoding of the js file or NULL to use the default
encoding (utf-8)
public abstract void addRequiredJsFile(java.lang.Class baseClass,
java.lang.String jsFileName,
java.lang.String fileEncoding,
java.lang.String preAJAXAddJsCode)
In full page refresh mode, the library will be included to the page header using the standard script tags.
In AJAX mode, the library is will first eval() the content of the supplied string evalBeforeDomReplacementJsCode, then read the file from disk, transfere the content via the AJAX channel and then eval() the content in the window.The fileEncoding is used to read the file from disk.
baseClass - The class where the script is localtedjsFileName - The script path, e.g. js/myscript.jsfileEncoding - the encoding of the js file or NULL to use the default
encoding (utf-8)preAJAXAddJsCode - A string containing some values to be eval()-ed
right before the script itself is eval()-ed
public abstract void addRequiredCSSFile(java.lang.Class baseClass,
java.lang.String cssFileName,
boolean forceRemove,
int cssLoadIndex)
baseClass - cssFileName - forceRemove - normally, once added css files will not be removed
anymore. However, if your css overrides default settings (e.g.
when you have a preview css), this css must be removed as soon as
the validate method does not require it anymore. (e.g. when you
leave the course edit mode)cssIndex - position of the css in relation of the position of the
theme. Use JSAndCSSAdder.CSS_INDEX_* variables to set this
public abstract void addRequiredCSSFile(java.lang.Class baseClass,
java.lang.String cssFileName,
boolean forceRemove)
baseClass - cssFileName - forceRemove - normally, once added css files will not be removed
anymore. However, if your css overrides default settings (e.g.
when you have a preview css), this css must be removed as soon as
the validate method does not require it anymore. (e.g. when you
leave the course edit mode)
public abstract void addRequiredCSSPath(java.lang.String cssPath,
boolean forceRemove,
int cssLoadIndex)
cssPath - the path to the css, e.g. /olat/m/1001/mycss.cssforceRemove - normally, once added css files will not be removed
anymore. However, if your css overrides default settings (e.g.
when you have a preview css), this css must be removed as soon as
the validate method does not require it anymore. (e.g. when you
leave the course edit mode)cssIndex - position of the css in relation of the position of the
theme. Use JSAndCSSAdder.CSS_INDEX_* variables to set thisaddRequiredCSSFile(Class baseClass, String cssFileName, boolean
forceRemove);public abstract boolean finishAndCheckChange()
public abstract void addRequiredRawHeader(java.lang.Class baseClass,
java.lang.String rawHeader)
baseClass - rawHeader -
public abstract void setRequiredRefreshInterval(java.lang.Class baseClass,
int refreshIntervall)
refreshIntervall - the time
in miliseconds after which (in ajax mode) a refresh of the screen is needed. 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 in one validation phase (=on one browser window), then the minimum is taken.public abstract void requireFullPageRefresh()
public abstract java.lang.String getMappedPathFor(java.lang.Class baseClass,
java.lang.String fileName)
baseClass - fileName - the name of the file or NULL to get the base path.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||