| java.lang.Object org.zkoss.zk.ui.util.Configuration
Method Summary | |
public String | addClientErrorReload(int errCode, String uri) Adds the URI to redirect to, when ZK Client Engine receives
an error.
Parameters: errCode - the error code. Parameters: uri - the URI to redirect to. | public void | addDisabledThemeURI(String uri) Enables or disables the default theme of the specified language. | public void | addErrorPage(Class type, String location) | public String | addErrorPage(String deviceType, Class type, String location) Adds an error page.
Parameters: deviceType - the device type: ajax or mil Parameters: type - what type of errors the error page is associated with. Parameters: location - where is the error page. | public void | addListener(Class klass) Adds a listener class. | public Object | addRichlet(String name, Class richletClass, Map params) Adds the definition of a richlet.
If there was a richlet associated with the same name, the
the old richlet will be replaced.
Parameters: name - the richlet name Parameters: params - the initial parameters, or null if no initial parameter at all.Once called, the caller cannot access params any more. | public Object | addRichlet(String name, String richletClassName, Map params) Adds the definition of a richlet.
If there was a richlet associated with the same name, the
the old servlet will be replaced.
Parameters: name - the richlet name Parameters: richletClassName - the class name. | public void | addRichletMapping(String name, String path) Adds a richlet mapping.
Parameters: name - the name of the richlet. Parameters: path - the URL pattern. | public void | addThemeURI(String uri) Adds an CSS resource that will be generated for each ZUML desktop. | public void | afterProcessEvent(Event event) Invokes
EventInterceptor.afterProcessEvent registered by
Configuration.addListener with a class implementing
EventInterceptor . | public Event | beforePostEvent(Event event) Invokes
EventInterceptor.beforePostEvent registered by
Configuration.addListener with a class implementing
EventInterceptor . | public Event | beforeProcessEvent(Event event) Invokes
EventInterceptor.beforeProcessEvent registered by
Configuration.addListener with a class implementing
EventInterceptor . | public Event | beforeSendEvent(Event event) Invokes
EventInterceptor.beforeSendEvent registered by
Configuration.addListener with a class implementing
EventInterceptor . | public void | detroyRichlets() Destroyes all richlets. | public void | enableDisableBehindModal(boolean enable) Sets whether to disable the components that don't belong to
the active modal window. | public void | enableEventThread(boolean enable) Sets whether to use the event processing thread. | public String | getClientErrorReload(int errCode) Returns the URI that is associated with the specified error code,
or null if no URI is associated. | public int[] | getClientErrorReloadCodes() Returns a readonly array of all error codes that are associated
with URI to redirect to. | public Class | getDesktopCacheProviderClass() Returns the class that implements the UI engine, or null if default is used. | public int | getDesktopMaxInactiveInterval() Returns the time, in seconds, between client requests
before ZK will invalidate the desktop. | public Set | getDisabledThemeURIs() Returns a set of the theme URIs that are disabled (never null). | public String | getErrorPage(Throwable error) | public String | getErrorPage(String deviceType, Throwable error) Returns the error page that matches the specified error, or null if not found. | public Class | getExpressionFactoryClass() Returns the implementation of the expression factory that
is used by the whole system, or null if the sytem default is used. | public Class | getFailoverManagerClass() Returns the class that implements the failover manger,
or null if no custom failover mechanism. | public Class | getIdGeneratorClass() Returns the class that implements
IdGenerator ,
or null if default is used. | public int | getMaxDesktops() | public int | getMaxProcessTime() Returns the maximal allowed time to process events, in miliseconds. | public int | getMaxSpareThreads() Returns the maximal allowed number of the spare pool for
queuing event processing threads (per Web application). | public int | getMaxSuspendedThreads() Returns the maximal allowed number of suspended event
processing threads (per Web application). | public int | getMaxUploadSize() Returns the maximal allowed upload size, in kilobytes, or
a negative value if no limit. | public Monitor | getMonitor() Returns the monitor for this application, or null if not set. | public PerformanceMeter | getPerformanceMeter() Returns the performance meter for this application, or null if not set. | public String | getPreference(String name, String defaultValue) Returns the value of the preference defined in zk.xml, or by
Configuration.setPreference .
Preference is application specific. | public Set | getPreferenceNames() Returns a readonly set of all preference names. | public int | getProcessingPromptDelay() Returns the time, in milliseconds, before ZK Client Engine shows
a dialog to prompt users that the request is in processming. | public int | getResendDelay() Returns the time, in milliseconds, before ZK Client Engine re-sends
the request to the server. | public String | getResponseCharset() Returns the charset used to generate the HTTP response
or null to use the container's default. | public Richlet | getRichlet(String name) Returns an instance of richlet of the specified name, or null
if not found. | public Richlet | getRichletByPath(String path) Returns an instance of richlet for the specified path, or
null if not found. | public int | getSessionMaxDesktops() Returns the maximal allowed number of desktop per session. | public int | getSessionMaxInactiveInterval() Returns the time, in seconds, between client requests
before ZK will invalidate the session. | public int | getSessionMaxRequests() Returns the maximal allowed number of concurrent requests
per session. | public ThemeProvider | getThemeProvider() Returns the theme provider for the current execution,
or null if not available.
Default: null.
Note: if specified, the final theme URIs is decided by
the provider. | public String[] | getThemeURIs() Returns a readonly list of the URI of the CSS resources that will be
generated for each ZUML desktop (never null). | public String | getTimeoutURI() | public int | getTooltipDelay() Returns the time, in milliseconds, before ZK Client Engine shows
the tooltip when a user moves the mouse over particual UI components. | public Class | getUiEngineClass() Returns the class that implements
UiEngine , or null if default is used. | public Class | getUiFactoryClass() Returns the class that implements the UI engine, or null if default is used. | public String | getUploadCharset() Returns the charset used to encode the uploaded text file
(never null). | public CharsetFinder | getUploadCharsetFinder() Returns the finder that is used to decide the character set
for the uploaded text filie(s), or null if not available. | public WebApp | getWebApp() Returns the Web application that this configuration belongs to,
or null if it is not associated yet. | public Class | getWebAppClass() Returns the class that implements
WebApp and
WebAppCtrl , or null if default is used. | public void | invokeDesktopCleanups(Desktop desktop) Invokes
DesktopCleanup.cleanup for each relevant
listener registered by
Configuration.addListener . | public void | invokeDesktopInits(Desktop desktop, Object request) Invokes
DesktopInit.init for each relevant
listener registered by
Configuration.addListener .
Used only internally.
An instance of
DesktopInit is constructed first,
and then invoke
DesktopInit.init .
Parameters: desktop - the desktop that is created Parameters: request - the original request. | public void | invokeEventThreadCompletes(List cleanups, Component comp, Event evt, List errs) Invoke
EventThreadCleanup.complete for each instance returned by
Configuration.newEventThreadCleanups . | public boolean | invokeEventThreadInits(List inits, Component comp, Event evt) Invokes
EventThreadInit.init for each instance returned
by
Configuration.newEventThreadInits . | public void | invokeEventThreadResumeAborts(Component comp, Event evt) Invokes
EventThreadResume.abortResume for each relevant
listener registered by
Configuration.addListener . | public void | invokeEventThreadResumes(List resumes, Component comp, Event evt) Invokes
EventThreadResume.afterResume for each instance returned
by
Configuration.newEventThreadResumes . | public void | invokeEventThreadSuspends(List suspends, Component comp, Event evt) Invokes
EventThreadSuspend.afterSuspend for each relevant
listener registered by
Configuration.addListener . | public void | invokeExecutionCleanups(Execution exec, Execution parent, List errs) Invokes
ExecutionCleanup.cleanup for each relevant
listener registered by
Configuration.addListener . | public void | invokeExecutionInits(Execution exec, Execution parent) Invokes
ExecutionInit.init for each relevant
listener registered by
Configuration.addListener . | public void | invokeRequestInterceptors(Session sess, Object request, Object response) Invokes
RequestInterceptor.request for each relevant listner
registered by
Configuration.addListener . | public void | invokeSessionCleanups(Session sess) Invokes
SessionCleanup.cleanup for each relevant
listener registered by
Configuration.addListener . | public void | invokeSessionInits(Session sess, Object request) Invokes
SessionInit.init for each relevant
listener registered by
Configuration.addListener .
Used only internally.
An instance of
SessionInit is constructed first,
and then invoke
SessionInit.init .
Parameters: sess - the session that is created Parameters: request - the original request. | public void | invokeURIInterceptors(String uri) Invokes
URIInterceptor.request for each relevant listner
registered by
Configuration.addListener . | public void | invokeWebAppCleanups() Invokes
WebAppCleanup.cleanup for each relevant
listener registered by
Configuration.addListener . | public void | invokeWebAppInits() Invokes
WebAppInit.init for each relevant
listener registered by
Configuration.addListener . | public boolean | isDisableBehindModalEnabled() Returns whether to disable the components that don't belong to
the active modal window. | public boolean | isEventThreadEnabled() Returns whether to use the event processing thread. | public boolean | isKeepDesktopAcrossVisits() Returns whether to keep the desktops across visits. | public boolean | isTimerKeepAlive() Returns whether to keep the session alive,
when receiving the onTimer event. | public List | newEventThreadCleanups(Component comp, Event evt, List errs) Invokes
EventThreadCleanup.cleanup for each relevant
listener registered by
Configuration.addListener .
Used only internally.
An instance of
EventThreadCleanup is constructed first,
and then invoke
EventThreadCleanup.cleanup .
It never throws an exception but logs and adds it to the errs argument,
if not null.
Parameters: comp - the component which the event is targeting Parameters: evt - the event to process Parameters: errs - a list of exceptions (java.lang.Throwable) if any exceptionoccured before this method is called, or null if no exeption at all.Note: you can manipulate the list directly to add or clean up exceptions.For example, if exceptions are fixed correctly, you can call errs.clear()such that no error message will be displayed at the client. | public List | newEventThreadInits(Component comp, Event evt) Contructs a list of
EventThreadInit instances and invokes
EventThreadInit.prepare for
each relevant listener registered by
Configuration.addListener . | public List | newEventThreadResumes(Component comp, Event evt) Contructs a list of
EventThreadResume instances and invokes
EventThreadResume.beforeResume for each relevant
listener registered by
Configuration.addListener . | public List | newEventThreadSuspends(Component comp, Event evt, Object obj) Constructs a list of
EventThreadSuspend instances and invokes
EventThreadSuspend.beforeSuspend for each relevant
listener registered by
Configuration.addListener . | public String | removeClientErrorReload(int errCode) Removes the URI to redirect to, when ZK Client Engine receives
an error.
Parameters: errCode - the error code. | public void | removeListener(Class klass) Removes a listener class. | public void | setDesktopCacheProviderClass(Class cls) Sets the class that implements
DesktopCacheProvider , or null to
use the default. | public void | setDesktopMaxInactiveInterval(int secs) Specifies the time, in seconds, between client requests
before ZK will invalidate the desktop. | public void | setExpressionFactoryClass(Class expfcls) Sets the implementation of the expression factory that shall
be used by the whole system. | public void | setFailoverManagerClass(Class cls) Sets the class that implements
FailoverManager , or null if
no custom failover mechanism. | public void | setIdGeneratorClass(Class cls) Sets the class that implements
IdGenerator , or null to
use the default. | public void | setKeepDesktopAcrossVisits(boolean keep) Specifies whether to keep the desktops across visits. | public void | setMaxDesktops(int max) | public void | setMaxProcessTime(int time) Specifies the maximal allowed time to process events, in miliseconds. | public void | setMaxSpareThreads(int max) Specifies the maximal allowed number of the spare pool for
queuing the event processing threads (per Web application). | public void | setMaxSuspendedThreads(int max) Specifies the maximal allowed number of suspended event
processing threads (per Web application). | public void | setMaxUploadSize(int sz) Specifies the maximal allowed upload size, in kilobytes. | public Monitor | setMonitor(Monitor monitor) Sets the monitor for this application, or null to disable it.
Default: null.
There is at most one monitor for each Web application.
The previous monitor will be replaced when this method is called.
In addition to call this method, you could specify a monitor
in zk.xml
Parameters: monitor - the performance meter. | public PerformanceMeter | setPerformanceMeter(PerformanceMeter meter) Sets the performance meter for this application, or null to disable it.
Default: null.
There is at most one performance meter for each Web application.
The previous meter will be replaced when this method is called.
In addition to call this method, you could specify
a performance meter in zk.xml
Parameters: meter - the performance meter. | public void | setPreference(String name, String value) Sets the value of the preference. | public void | setProcessingPromptDelay(int minisecs) Specifies the time, in milliseconds, before ZK Client Engine shows
a dialog to prompt users that the request is in processming. | public void | setResendDelay(int minisecs) Specifies the time, in milliseconds, before ZK Client Engine re-sends
the request to the server.
Default: -1 (i.e., disabled).
However, if zkmax.jar was installed (or with ZK 3.0.1 and 3.0.2),
the default is 9000.
There are many reasons an Ajax request is not received by
the server. | public void | setResponseCharset(String charset) Sets the charset used to generate HTTP response.
It is currently used by
org.zkoss.zk.ui.http.DHtmlLayoutServlet ,
Parameters: charset - the charset to use. | public void | setSessionMaxDesktops(int max) Specifies the maximal allowed number of desktop
per session. | public void | setSessionMaxInactiveInterval(int secs) Specifies the time, in seconds, between client requests
before ZK will invalidate the session. | public void | setSessionMaxRequests(int max) Specifies the maximal allowed number of concurrent requests
per session. | public void | setThemeProvider(ThemeProvider provider) Sets the theme provider for the current execution,
or null if not available.
Parameters: provider - the theme provide. | public void | setTimeoutURI(String uri) | public void | setTimerKeepAlive(boolean alive) Specifies whether to keep the session alive,
when receiving the onTimer event. | public void | setTooltipDelay(int minisecs) Specifies the time, in milliseconds, before ZK Client Engine shows
the tooltip when a user moves the mouse over particual UI components. | public void | setUiEngineClass(Class cls) Sets the class that implements
UiEngine , or null to
use the default. | public void | setUiFactoryClass(Class cls) Sets the class that implements
UiFactory , or null to
use the default. | public void | setUploadCharset(String charset) Sets the charset used to encode the upload text file. | public void | setUploadCharsetFinder(CharsetFinder finder) Sets the finder that is used to decide the character set
for the uploaded text filie(s), or null if not available. | public void | setWebApp(WebApp wapp) Associates it with a web application. | public void | setWebAppClass(Class cls) Sets the class that implements
WebApp and
WebAppCtrl , or null to use the default. |
Configuration | public Configuration()(Code) | | Contructor.
|
addClientErrorReload | public String addClientErrorReload(int errCode, String uri)(Code) | | Adds the URI to redirect to, when ZK Client Engine receives
an error.
Parameters: errCode - the error code. Parameters: uri - the URI to redirect to. It cannot be null.If empty, the client will reload the same page again.If null, it is the same as Configuration.removeClientErrorReload the previous URI associated with the specified error code since: 3.0.0 |
addErrorPage | public String addErrorPage(String deviceType, Class type, String location)(Code) | | Adds an error page.
Parameters: deviceType - the device type: ajax or mil Parameters: type - what type of errors the error page is associated with. Parameters: location - where is the error page. the previous location of the same error, or null if notdefined yet. since: 2.4.1 |
addListener | public void addListener(Class klass) throws Exception(Code) | | Adds a listener class.
Parameters: klass - the listener class must implement at least one ofMonitor, PerformanceMeter, EventThreadInit,EventThreadCleanup, EventThreadSuspend,EventThreadResume, WebAppInit, WebAppCleanup,SessionInit, SessionCleanup, DesktopInit,DesktopCleanup, ExecutionInit, ExecutionCleanup,URIInterceptor, RequestInterceptor, EventInterceptorinterfaces. |
addRichlet | public Object addRichlet(String name, Class richletClass, Map params)(Code) | | Adds the definition of a richlet.
If there was a richlet associated with the same name, the
the old richlet will be replaced.
Parameters: name - the richlet name Parameters: params - the initial parameters, or null if no initial parameter at all.Once called, the caller cannot access params any more. the previous richlet class or class-name with the specified name,or null if no previous richlet. |
addRichlet | public Object addRichlet(String name, String richletClassName, Map params)(Code) | | Adds the definition of a richlet.
If there was a richlet associated with the same name, the
the old servlet will be replaced.
Parameters: name - the richlet name Parameters: richletClassName - the class name. The class will be loadedonly when the richlet is loaded. Parameters: params - the initial parameters, or null if no initial parameter at all.Once called, the caller cannot access params any more. the previous richlet class or class-name with the specified name,or null if no previous richlet. |
addRichletMapping | public void addRichletMapping(String name, String path)(Code) | | Adds a richlet mapping.
Parameters: name - the name of the richlet. Parameters: path - the URL pattern. It must start with '/' and may endwith '/*'. exception: UiException - if the richlet is not defined yet.See Configuration.addRichlet. since: 2.4.0 |
detroyRichlets | public void detroyRichlets()(Code) | | Destroyes all richlets.
|
enableDisableBehindModal | public void enableDisableBehindModal(boolean enable)(Code) | | Sets whether to disable the components that don't belong to
the active modal window.
Default: true.
since: 2.4.1 |
enableEventThread | public void enableEventThread(boolean enable)(Code) | | Sets whether to use the event processing thread.
Default: enabled.
exception: IllegalStateException - if there is suspended threadand use is false. |
getClientErrorReload | public String getClientErrorReload(int errCode)(Code) | | Returns the URI that is associated with the specified error code,
or null if no URI is associated.
since: 3.0.0 |
getClientErrorReloadCodes | public int[] getClientErrorReloadCodes()(Code) | | Returns a readonly array of all error codes that are associated
with URI to redirect to.
Default: 302, 401 and 403 are associated with an empty URI.
since: 3.0.0 |
getDesktopCacheProviderClass | public Class getDesktopCacheProviderClass()(Code) | | Returns the class that implements the UI engine, or null if default is used.
|
getDesktopMaxInactiveInterval | public int getDesktopMaxInactiveInterval()(Code) | | Returns the time, in seconds, between client requests
before ZK will invalidate the desktop.
A negative value indicates the desktop should never timeout.
|
getErrorPage | public String getErrorPage(String deviceType, Throwable error)(Code) | | Returns the error page that matches the specified error, or null if not found.
Parameters: deviceType - the device type: ajax or mil Parameters: error - the exception being thrown since: 2.4.1 |
getExpressionFactoryClass | public Class getExpressionFactoryClass()(Code) | | Returns the implementation of the expression factory that
is used by the whole system, or null if the sytem default is used.
See Also: Configuration.setExpressionFactoryClass since: 3.0.0 |
getFailoverManagerClass | public Class getFailoverManagerClass()(Code) | | Returns the class that implements the failover manger,
or null if no custom failover mechanism.
|
getIdGeneratorClass | public Class getIdGeneratorClass()(Code) | | Returns the class that implements
IdGenerator ,
or null if default is used.
since: 2.4.1 |
getMaxProcessTime | public int getMaxProcessTime()(Code) | | Returns the maximal allowed time to process events, in miliseconds.
It is always positive
|
getMaxSpareThreads | public int getMaxSpareThreads()(Code) | | Returns the maximal allowed number of the spare pool for
queuing event processing threads (per Web application).
See Also: Configuration.isEventThreadEnabled |
getMaxUploadSize | public int getMaxUploadSize()(Code) | | Returns the maximal allowed upload size, in kilobytes, or
a negative value if no limit.
|
getMonitor | public Monitor getMonitor()(Code) | | Returns the monitor for this application, or null if not set.
|
getPerformanceMeter | public PerformanceMeter getPerformanceMeter()(Code) | | Returns the performance meter for this application, or null if not set.
since: 3.0.0 |
getPreference | public String getPreference(String name, String defaultValue)(Code) | | Returns the value of the preference defined in zk.xml, or by
Configuration.setPreference .
Preference is application specific. You can specify whatever you want
as you specifying context-param for a Web application.
Parameters: defaultValue - the default value that is used if the specifiedpreference is not found. |
getPreferenceNames | public Set getPreferenceNames()(Code) | | Returns a readonly set of all preference names.
|
getProcessingPromptDelay | public int getProcessingPromptDelay()(Code) | | Returns the time, in milliseconds, before ZK Client Engine shows
a dialog to prompt users that the request is in processming.
|
getResendDelay | public int getResendDelay()(Code) | | Returns the time, in milliseconds, before ZK Client Engine re-sends
the request to the server.
since: 3.0.1 |
getRichlet | public Richlet getRichlet(String name)(Code) | | Returns an instance of richlet of the specified name, or null
if not found.
|
getRichletByPath | public Richlet getRichletByPath(String path)(Code) | | Returns an instance of richlet for the specified path, or
null if not found.
|
getSessionMaxDesktops | public int getSessionMaxDesktops()(Code) | | Returns the maximal allowed number of desktop per session.
A negative value indicates there is no limit.
since: 3.0.1 |
getSessionMaxInactiveInterval | public int getSessionMaxInactiveInterval()(Code) | | Returns the time, in seconds, between client requests
before ZK will invalidate the session.
Default: 0 (means the system default).
A negative value indicates that there is no limit.
Zero means to use the system default (usually defined in web.xml).
See Also: Configuration.isTimerKeepAlive See Also: Session.getMaxInactiveInterval |
getSessionMaxRequests | public int getSessionMaxRequests()(Code) | | Returns the maximal allowed number of concurrent requests
per session.
A negative value indicates there is no limit, but it is
not recommended due to the possibility of the DoS attacks.
since: 3.0.1 |
getThemeURIs | public String[] getThemeURIs()(Code) | | Returns a readonly list of the URI of the CSS resources that will be
generated for each ZUML desktop (never null).
Default: an array with zero length.
|
getTooltipDelay | public int getTooltipDelay()(Code) | | Returns the time, in milliseconds, before ZK Client Engine shows
the tooltip when a user moves the mouse over particual UI components.
|
getUiEngineClass | public Class getUiEngineClass()(Code) | | Returns the class that implements
UiEngine , or null if default is used.
|
getUiFactoryClass | public Class getUiFactoryClass()(Code) | | Returns the class that implements the UI engine, or null if default is used.
|
getUploadCharsetFinder | public CharsetFinder getUploadCharsetFinder()(Code) | | Returns the finder that is used to decide the character set
for the uploaded text filie(s), or null if not available.
Default: null
since: 3.0.0 See Also: Configuration.getUploadCharset |
getWebApp | public WebApp getWebApp()(Code) | | Returns the Web application that this configuration belongs to,
or null if it is not associated yet.
|
getWebAppClass | public Class getWebAppClass()(Code) | | Returns the class that implements
WebApp and
WebAppCtrl , or null if default is used.
|
invokeExecutionCleanups | public void invokeExecutionCleanups(Execution exec, Execution parent, List errs)(Code) | | Invokes
ExecutionCleanup.cleanup for each relevant
listener registered by
Configuration.addListener .
Used only internally.
An instance of
ExecutionCleanup is constructed first,
and then invoke
ExecutionCleanup.cleanup .
It never throws an exception but logs and adds it to the errs argument,
if not null.
Parameters: exec - the execution that is being destroyed Parameters: parent - the previous execution, or null if no previous at all Parameters: errs - a list of exceptions (java.lang.Throwable) if any exceptionoccured before this method is called, or null if no exeption at all.Note: you can manipulate the list directly to add or clean up exceptions.For example, if exceptions are fixed correctly, you can call errs.clear()such that no error message will be displayed at the client. |
isDisableBehindModalEnabled | public boolean isDisableBehindModalEnabled()(Code) | | Returns whether to disable the components that don't belong to
the active modal window.
Default: true.
since: 2.4.1 |
isEventThreadEnabled | public boolean isEventThreadEnabled()(Code) | | Returns whether to use the event processing thread.
|
isKeepDesktopAcrossVisits | public boolean isKeepDesktopAcrossVisits()(Code) | | Returns whether to keep the desktops across visits.
If false, the desktops are removed when an user reloads an URL
or browses to another URL.
|
isTimerKeepAlive | public boolean isTimerKeepAlive()(Code) | | Returns whether to keep the session alive,
when receiving the onTimer event.
In other words, it returns whether to reset the session timeout
counter when receiving onTimer, just like any other events.
since: 3.0.0 |
newEventThreadCleanups | public List newEventThreadCleanups(Component comp, Event evt, List errs)(Code) | | Invokes
EventThreadCleanup.cleanup for each relevant
listener registered by
Configuration.addListener .
Used only internally.
An instance of
EventThreadCleanup is constructed first,
and then invoke
EventThreadCleanup.cleanup .
It never throws an exception but logs and adds it to the errs argument,
if not null.
Parameters: comp - the component which the event is targeting Parameters: evt - the event to process Parameters: errs - a list of exceptions (java.lang.Throwable) if any exceptionoccured before this method is called, or null if no exeption at all.Note: you can manipulate the list directly to add or clean up exceptions.For example, if exceptions are fixed correctly, you can call errs.clear()such that no error message will be displayed at the client. a list of EventThreadCleanup, or null |
removeClientErrorReload | public String removeClientErrorReload(int errCode)(Code) | | Removes the URI to redirect to, when ZK Client Engine receives
an error.
Parameters: errCode - the error code. the previous URI associated with the specified error code since: 3.0.0 |
removeListener | public void removeListener(Class klass)(Code) | | Removes a listener class.
|
setDesktopCacheProviderClass | public void setDesktopCacheProviderClass(Class cls)(Code) | | Sets the class that implements
DesktopCacheProvider , or null to
use the default.
Note: you have to set the class before
WebApp is created.
Otherwise, it won't have any effect.
|
setDesktopMaxInactiveInterval | public void setDesktopMaxInactiveInterval(int secs)(Code) | | Specifies the time, in seconds, between client requests
before ZK will invalidate the desktop.
Default: 3600 (1 hour).
A negative value indicates the desktop should never timeout.
|
setExpressionFactoryClass | public void setExpressionFactoryClass(Class expfcls)(Code) | | Sets the implementation of the expression factory that shall
be used by the whole system.
Default: null -- it means the org.zkoss.xel.el.ELFactory class
(it requires zcommons-el.jar).
Note: you can only specify an implementation that is compatible
with JSP EL here, since ZK's builtin pages depend on it.
However, you can use any factory you like in an individual page,
as long as all expressions in the page follow the syntax of
the evaluator you are using.
Parameters: expfcls - the implemtation class, or null to use the default.Note: expfcls must implement ExpressionFactory. since: 3.0.0 |
setFailoverManagerClass | public void setFailoverManagerClass(Class cls)(Code) | | Sets the class that implements
FailoverManager , or null if
no custom failover mechanism.
Note: you have to set the class before
WebApp is created.
Otherwise, it won't have any effect.
|
setIdGeneratorClass | public void setIdGeneratorClass(Class cls)(Code) | | Sets the class that implements
IdGenerator , or null to
use the default.
Note: you have to set the class before
WebApp is created.
Otherwise, it won't have any effect.
since: 2.4.1 |
setKeepDesktopAcrossVisits | public void setKeepDesktopAcrossVisits(boolean keep)(Code) | | Specifies whether to keep the desktops across visits.
If false, the desktops are removed when an user reloads an URL
or browses to another URL.
Default: false.
|
setMaxProcessTime | public void setMaxProcessTime(int time)(Code) | | Specifies the maximal allowed time to process events, in miliseconds.
ZK will keep processing the requests sent from
the client until all requests are processed, or the maximal allowed
time expires.
Default: 3000.
Note: since 3.0.0, this setting has no effect on Ajax devices.
Ajax devices send the requests synchronously.
Parameters: time - the maximal allowed time to process events.It must be positive. |
setMaxSpareThreads | public void setMaxSpareThreads(int max)(Code) | | Specifies the maximal allowed number of the spare pool for
queuing the event processing threads (per Web application).
Default: 100.
A negative value indicates there is no limit.
ZK uses a thread pool to keep the idle event processing threads.
It speeds up the service of an event by reusing the thread queued
in this pool.
See Also: Configuration.setMaxSuspendedThreads See Also: Configuration.isEventThreadEnabled |
setMaxSuspendedThreads | public void setMaxSuspendedThreads(int max)(Code) | | Specifies the maximal allowed number of suspended event
processing threads (per Web application).
Default: -1 (no limit).
A negative value indicates there is no limit.
It is ignored if the use of the event processing thread
is disable (
Configuration.isEventThreadEnabled .
|
setMaxUploadSize | public void setMaxUploadSize(int sz)(Code) | | Specifies the maximal allowed upload size, in kilobytes.
Default: 5120.
Parameters: sz - the maximal allowed upload size.A negative value indicates therre is no limit. |
setMonitor | public Monitor setMonitor(Monitor monitor)(Code) | | Sets the monitor for this application, or null to disable it.
Default: null.
There is at most one monitor for each Web application.
The previous monitor will be replaced when this method is called.
In addition to call this method, you could specify a monitor
in zk.xml
Parameters: monitor - the performance meter. If null, the meter functionis disabled. the previous monitor, or null if not available. |
setPerformanceMeter | public PerformanceMeter setPerformanceMeter(PerformanceMeter meter)(Code) | | Sets the performance meter for this application, or null to disable it.
Default: null.
There is at most one performance meter for each Web application.
The previous meter will be replaced when this method is called.
In addition to call this method, you could specify
a performance meter in zk.xml
Parameters: meter - the performance meter. If null, the meter functionis disabled. the previous performance meter, or null if not available. since: 3.0.0 |
setPreference | public void setPreference(String name, String value)(Code) | | Sets the value of the preference.
|
setProcessingPromptDelay | public void setProcessingPromptDelay(int minisecs)(Code) | | Specifies the time, in milliseconds, before ZK Client Engine shows
a dialog to prompt users that the request is in processming.
Default: 900
|
setResendDelay | public void setResendDelay(int minisecs)(Code) | | Specifies the time, in milliseconds, before ZK Client Engine re-sends
the request to the server.
Default: -1 (i.e., disabled).
However, if zkmax.jar was installed (or with ZK 3.0.1 and 3.0.2),
the default is 9000.
There are many reasons an Ajax request is not received by
the server. With the resending mechanism, ZK ensures the reliable
connection between the client and the server.
See also Bug 1839246
since: 3.0.1 Parameters: minisecs - the timeout in milliseconds.Since 3.0.3, you can specify a nonpositive number to disable the resend. |
setResponseCharset | public void setResponseCharset(String charset)(Code) | | Sets the charset used to generate HTTP response.
It is currently used by
org.zkoss.zk.ui.http.DHtmlLayoutServlet ,
Parameters: charset - the charset to use. If null or empty, the container's defaultis used. |
setSessionMaxDesktops | public void setSessionMaxDesktops(int max)(Code) | | Specifies the maximal allowed number of desktop
per session.
Defafult: 15.
A negative value indicates there is no limit.
since: 3.0.1 |
setSessionMaxRequests | public void setSessionMaxRequests(int max)(Code) | | Specifies the maximal allowed number of concurrent requests
per session.
Defafult: 5.
A negative value indicates there is no limit, but it is
not recommended due to the possibility of the DoS attacks.
since: 3.0.1 |
setThemeProvider | public void setThemeProvider(ThemeProvider provider)(Code) | | Sets the theme provider for the current execution,
or null if not available.
Parameters: provider - the theme provide. If null, the default theme URIswill be used. See Also: Configuration.getThemeProvider since: 3.0.0 |
setTimerKeepAlive | public void setTimerKeepAlive(boolean alive)(Code) | | Specifies whether to keep the session alive,
when receiving the onTimer event.
Default: false.
A session is expired (and then invalidated), if it didn't receive
any client request in the specified timeout interval
(
Configuration.getSessionMaxInactiveInterval ).
By setting this option to true, the session timeout will be reset
when onTimer is received (just like any other event).
Note: if true and the timer is shorter than
the session timeout (
Configuration.getSessionMaxInactiveInterval ),
the session is never expired.
Parameters: alive - whether to keep the session alive when receivingonTimer since: 3.0.0 |
setTooltipDelay | public void setTooltipDelay(int minisecs)(Code) | | Specifies the time, in milliseconds, before ZK Client Engine shows
the tooltip when a user moves the mouse over particual UI components.
Default: 800
|
setUiEngineClass | public void setUiEngineClass(Class cls)(Code) | | Sets the class that implements
UiEngine , or null to
use the default.
|
setUiFactoryClass | public void setUiFactoryClass(Class cls)(Code) | | Sets the class that implements
UiFactory , or null to
use the default.
Note: you have to set the class before
WebApp is created.
Otherwise, it won't have any effect.
|
setWebApp | public void setWebApp(WebApp wapp)(Code) | | Associates it with a web application.
|
setWebAppClass | public void setWebAppClass(Class cls)(Code) | | Sets the class that implements
WebApp and
WebAppCtrl , or null to use the default.
Note: you have to set the class before
WebApp is created.
Otherwise, it won't have any effect.
|
|
|