public interface ItsNatServletConfig extends ItsNatUserData
javax.servlet.ServletConfig
object.
The main use is to setup the default behavior of the servlet.
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getArtifact(java.lang.String name)
Returns the artifact with the specified name.
|
int |
getClientErrorMode()
Returns the default client error mode.
|
int |
getCommMode()
Returns the default communication mode, AJAX or SCRIPT, for events.
|
java.text.DateFormat |
getDefaultDateFormat()
Returns the default date format used by components such as
ItsNatHTMLInputTextFormatted . |
java.lang.String |
getDefaultEncoding()
Returns the encoding used.
|
java.text.NumberFormat |
getDefaultNumberFormat()
Returns the default number format used by components such as
ItsNatHTMLInputTextFormatted . |
long |
getEventDispatcherMaxWait()
Returns the default max wait until a server fired event with
ItsNatDocument.dispatchEvent(org.w3c.dom.events.EventTarget,org.w3c.dom.events.Event)
is processed by the client and returns. |
long |
getEventTimeout()
Returns the default timeout in client of asynchronous AJAX/SCRIPT events.
|
ItsNatServletContext |
getItsNatServletContext()
Returns the application context.
|
int |
getMaxOpenClientsByDocument()
Returns the max number of open clients (owner and attached) associated to a document in server.
|
javax.servlet.ServletConfig |
getServletConfig()
Returns the servlet configuration object wrapped.
|
int |
getUseGZip()
Returns whether JavaScript code and/or markup sent to the client is
automatically compressed if the browser accepts this encoding.
|
boolean |
isAutoBuildComponents()
Informs whether components are built automatically using the necessary
markup declarations.
|
boolean |
isAutoCleanEventListeners()
Informs whether the auto clean event listeners mode is enabled.
|
boolean |
isDebugMode()
Informs whether the debug mode is enabled.
|
boolean |
isEventsEnabled()
Informs whether events (AJAX or SCRIPT based) are enabled.
|
boolean |
isFastLoadMode()
Informs whether the fast load mode is enabled.
|
boolean |
isJoystickMode()
Informs whether a joystick is enough to control, for instance, components
(some kind of mouse, pointer or stylus not present or not necessary).
|
boolean |
isLoadScriptInline()
Informs whether the initial JavaScript code is sent inline into the loaded page
or is loaded externally.
|
boolean |
isMarkupDrivenComponents()
Informs whether markup driven mode is used in components.
|
boolean |
isNodeCacheEnabled()
Informs whether the speed oriented node cache is enabled.
|
boolean |
isOnLoadCacheStaticNodes(java.lang.String mime)
Informs whether static nodes are serialized as text and globally cached when
the template is loaded to save memory (it improves the performance too).
|
boolean |
isReferrerEnabled()
Informs whether referrer feature is enabled by default.
|
boolean |
isReferrerPushEnabled()
Informs whether referrer "push" feature is enabled by default.
|
boolean |
isScriptingEnabled()
Informs whether JavaScript is enabled.
|
boolean |
isSelectionOnComponentsUsesKeyboard()
Informs whether the keyboard is necessary for selection on components.
|
boolean |
isUsePatternMarkupToRender()
Informs whether dom utils and components use by default the original
(saved as pattern) markup to render.
|
boolean |
isUseXHRSyncOnUnloadEvent()
Informs whether the internal unload event sent by ItsNat when end user leaves the page,
is synchronously sent when the transport is AJAX (XMLHttpRequest) mode by default.
|
void |
registerArtifact(java.lang.String name,
java.lang.Object value)
Registers an artifact with the specified name.
|
java.lang.Object |
removeArtifact(java.lang.String name)
Removes the artifact with the specified name.
|
void |
setAutoBuildComponents(boolean value)
Sets whether components are built automatically using the necessary
markup declarations.
|
void |
setAutoCleanEventListeners(boolean enabled)
Sets whether the auto clean event listeners mode is enabled.
|
void |
setClientErrorMode(int mode)
Sets the default client error mode.
|
void |
setCommMode(int commMode)
Sets the default communication mode, AJAX or SCRIPT, for events.
|
void |
setDebugMode(boolean debugMode)
Sets the debug mode.
|
void |
setDefaultDateFormat(java.text.DateFormat format)
Sets the default date format used by components such as
ItsNatHTMLInputTextFormatted . |
void |
setDefaultEncoding(java.lang.String encoding)
Sets the encoding used.
|
void |
setDefaultNumberFormat(java.text.NumberFormat format)
Sets the default data format used by components such as
ItsNatHTMLInputTextFormatted . |
void |
setEventDispatcherMaxWait(long wait)
Sets the default max wait until a server fired event with
ItsNatDocument.dispatchEvent(org.w3c.dom.events.EventTarget,org.w3c.dom.events.Event)
is processed by the client and returns. |
void |
setEventsEnabled(boolean enabled)
Sets whether events (AJAX or SCRIPT based) are enabled.
|
void |
setEventTimeout(long timeout)
Sets the default timeout of asynchronous AJAX/SCRIPT events.
|
void |
setFastLoadMode(boolean fastLoadMode)
Sets whether fast load mode is used.
|
void |
setJoystickMode(boolean value)
Informs whether a joystick is enough to control, for instance, components
(mouse, pointer or stylus not present or not necessary).
|
void |
setLoadScriptInline(boolean value)
Sets the initial JavaScript code is sent inline into the loaded page
or is loaded externally.
|
void |
setMarkupDrivenComponents(boolean value)
Sets whether markup driven mode is used in components.
|
void |
setMaxOpenClientsByDocument(int value)
Sets the max number of open clients (owner and attached) associated to a document in server.
|
void |
setNodeCacheEnabled(boolean enable)
Sets whether the speed oriented node cache is enabled.
|
void |
setOnLoadCacheStaticNodes(java.lang.String mime,
boolean cache)
Sets whether static nodes are serialized as text and globally cached when
the template is loaded to save memory (it improves the performance too).
|
void |
setReferrerEnabled(boolean enabled)
Sets whether referrer feature is enabled by default.
|
void |
setReferrerPushEnabled(boolean enabled)
Sets whether referrer "push" feature is enabled by default.
|
void |
setScriptingEnabled(boolean enabled)
Sets whether JavaScript is enabled.
|
void |
setSelectionOnComponentsUsesKeyboard(boolean value)
Informs whether the keyboard is necessary for selection on components
|
void |
setUseGZip(int value)
Sets whether JavaScript code and/or markup sent to the client is
automatically compressed if the browser accepts this encoding.
|
void |
setUsePatternMarkupToRender(boolean value)
Sets whether dom utils and components use by default the original
(saved as pattern) markup to render.
|
void |
setUseXHRSyncOnUnloadEvent(boolean enabled)
Sets whether the internal unload event sent by ItsNat when end user leaves the page,
is synchronously sent when the transport is AJAX (XMLHttpRequest) mode by default.
|
containsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValue
javax.servlet.ServletConfig getServletConfig()
ItsNatServletContext getItsNatServletContext()
This object instance is shared by all ItsNatServlet
s
defined by the application.
void registerArtifact(java.lang.String name, java.lang.Object value)
name
- the artifact namevalue
- the artifact.getArtifact(String)
,
removeArtifact(String)
,
NameValue
java.lang.Object getArtifact(java.lang.String name)
name
- the artifact name to look for.registerArtifact(String,Object)
java.lang.Object removeArtifact(java.lang.String name)
name
- the artifact name to look for.registerArtifact(String,Object)
java.lang.String getDefaultEncoding()
setDefaultEncoding(String)
void setDefaultEncoding(java.lang.String encoding)
encoding
- the new encoding.getDefaultEncoding()
boolean isOnLoadCacheStaticNodes(java.lang.String mime)
This cache flag is configured by MIME type.
mime
- the MIME type.setOnLoadCacheStaticNodes(String,boolean)
void setOnLoadCacheStaticNodes(java.lang.String mime, boolean cache)
mime
- the MIME type.cache
- true to enable the static node cache to the specified MIME.isOnLoadCacheStaticNodes(String)
boolean isDebugMode()
In debug mode the framework makes more checks to ensure is correctly used.
setDebugMode(boolean)
void setDebugMode(boolean debugMode)
debugMode
- true to set debug mode.isDebugMode()
int getClientErrorMode()
This value specifies whether the browser catches JavaScript errors
and if they are shown to the user using a JavaScript alert
call.
This feature only affects to non-XML documents with scripting enabled not to fragments
ClientErrorMode.SHOW_SERVER_AND_CLIENT_ERRORS
setClientErrorMode(int)
,
ClientErrorMode
void setClientErrorMode(int mode)
mode
- the default client error mode.getClientErrorMode()
int getCommMode()
This feature only affects to non-XML documents with events enabled not to fragments
CommMode.XHR_ASYNC_HOLD
by default.setCommMode(int)
void setCommMode(int commMode)
commMode
- the new communication mode.getCommMode()
long getEventTimeout()
This feature only affects to non-XML documents with events enabled (not to fragments) and is ignored in synchronous AJAX events
When an unfinished request takes more time than the specified timeout, the request is aborted.
setEventTimeout(long)
void setEventTimeout(long timeout)
timeout
- the new timeout. If negative no timeout is defined.getEventTimeout()
int getUseGZip()
This feature only affects to documents not to fragments
setUseGZip(int)
void setUseGZip(int value)
A bitwise value must be used using UseGZip
constants, for instance:
setUseGZip(UseGZip.MARKUP | UseGZip.SCRIPT)
.
value
- a bitwise value.getUseGZip()
,
UseGZip
boolean isLoadScriptInline()
This feature only affects to non-XML documents with scripting enabled not to fragments
setLoadScriptInline(boolean)
void setLoadScriptInline(boolean value)
value
- true to sent inline.isLoadScriptInline()
boolean isFastLoadMode()
This feature only affects to non-XML documents with scripting enabled not to fragments
setFastLoadMode(boolean)
void setFastLoadMode(boolean fastLoadMode)
fastLoadMode
- true to enable fast load.isFastLoadMode()
boolean isNodeCacheEnabled()
This feature only affects to non-XML documents with scripting enabled not to fragments
setNodeCacheEnabled(boolean)
void setNodeCacheEnabled(boolean enable)
enable
- true to enable node cache.isNodeCacheEnabled()
boolean isAutoBuildComponents()
If this feature is enabled the initial document tree is automatically traversed, any component declared in markup is automatically built and registered into the component manager associated to a DOM element, including DOM elements added to the tree in any time.
When a node is removed from the tree the associated component if any is removed and disposed automatically.
This feature only affects to documents not to fragments
setAutoBuildComponents(boolean)
void setAutoBuildComponents(boolean value)
value
- true to enable automatic component build.isAutoBuildComponents()
java.text.DateFormat getDefaultDateFormat()
ItsNatHTMLInputTextFormatted
.
This feature only affects to documents not to fragments
DateFormat.getInstance()
.setDefaultDateFormat(DateFormat)
void setDefaultDateFormat(java.text.DateFormat format)
ItsNatHTMLInputTextFormatted
.format
- the default data format.getDefaultDateFormat()
java.text.NumberFormat getDefaultNumberFormat()
ItsNatHTMLInputTextFormatted
.
This feature only affects to documents not to fragments
NumberFormat.getInstance()
.setDefaultNumberFormat(NumberFormat)
void setDefaultNumberFormat(java.text.NumberFormat format)
ItsNatHTMLInputTextFormatted
.format
- the default data format.getDefaultNumberFormat()
long getEventDispatcherMaxWait()
ItsNatDocument.dispatchEvent(org.w3c.dom.events.EventTarget,org.w3c.dom.events.Event)
is processed by the client and returns.
This feature only affects to non-XML documents with events enabled not to fragments
setEventDispatcherMaxWait(long)
void setEventDispatcherMaxWait(long wait)
ItsNatDocument.dispatchEvent(org.w3c.dom.events.EventTarget,org.w3c.dom.events.Event)
is processed by the client and returns.wait
- the default max wait in milliseconds.getEventDispatcherMaxWait()
int getMaxOpenClientsByDocument()
When this number is surpassed, older clients (clients not accesed for a long time ago) are invalidated/removed from the server.
A negative number means no limit.
This feature is useful to limit the number of attached clients and to clean orphan attached clients.
This feature only affects to non-XML documents with events enabled not to fragments
setMaxOpenClientsByDocument(int)
void setMaxOpenClientsByDocument(int value)
value
- the new max number of open clients.getMaxOpenClientsByDocument()
boolean isReferrerEnabled()
This feature only affects to non-XML documents with events enabled not to fragments.
This feature only works if events are enabled.
setReferrerEnabled(boolean)
,
isEventsEnabled()
,
ItsNatServletRequest.getItsNatDocumentReferrer()
void setReferrerEnabled(boolean enabled)
enabled
- if referrer is enabled.isReferrerEnabled()
boolean isReferrerPushEnabled()
This feature only affects to documents not to fragments
setReferrerPushEnabled(boolean)
,
isReferrerEnabled()
,
ItsNatDocument.addReferrerItsNatServletRequestListener(ItsNatServletRequestListener)
void setReferrerPushEnabled(boolean enabled)
enabled
- if referrer "push" is enabled.isReferrerPushEnabled()
boolean isEventsEnabled()
This feature only affects to non-XML documents not to fragments.
setEventsEnabled(boolean)
void setEventsEnabled(boolean enabled)
enabled
- if events are enabled.isEventsEnabled()
boolean isScriptingEnabled()
This feature only affects to non-XML documents not to fragments.
setScriptingEnabled(boolean)
void setScriptingEnabled(boolean enabled)
If JavaScript is disabled then events are disabled too.
enabled
- if JavaScript is enabled.isScriptingEnabled()
,
setEventsEnabled(boolean)
boolean isAutoCleanEventListeners()
This feature only affects to non-XML documents not to fragments.
setAutoCleanEventListeners(boolean)
void setAutoCleanEventListeners(boolean enabled)
enabled
- if auto clean event listeners is enabled.isAutoCleanEventListeners()
boolean isUseXHRSyncOnUnloadEvent()
In some very concrete circumstances and old browsers like MSIE 6-7 synchronously AJAX events can hang the browser. If this method returns false, asynchronous mode is used.
This feature only affects to non-XML documents not to fragments.
setUseXHRSyncOnUnloadEvent(boolean)
void setUseXHRSyncOnUnloadEvent(boolean enabled)
enabled
- if unload event is sent synchronously in AJAX mode.isUseXHRSyncOnUnloadEvent()
boolean isUsePatternMarkupToRender()
This feature only affects to documents not to fragments.
setUsePatternMarkupToRender(boolean)
void setUsePatternMarkupToRender(boolean value)
value
- true to enable the use of original markup to render.isUsePatternMarkupToRender()
boolean isSelectionOnComponentsUsesKeyboard()
Some components with multiple selection like free lists, tables and trees use the CTRL key for selection like the standard HTML select control uses it.
In mobile devices (without or with a "minimal" keyboard) CTRL key is not needed for selection in HTML select controls, because the CTRL key is "ever" pressed.
This flag can be used to simulate this behavior on the free components using the CTRL key.
This feature only affects to non-XML documents with events enabled not to fragments.
setSelectionOnComponentsUsesKeyboard(boolean)
void setSelectionOnComponentsUsesKeyboard(boolean value)
value
- true to specify the keyboard is necessary for selection.isSelectionOnComponentsUsesKeyboard()
boolean isJoystickMode()
Some mobile devices do not have stylus and some kind of joystick is the only way to "navigate" through the "live" elements, usually links, form controls and DOM nodes with event listeners associated.
This flag is useful as a hint for "free" components with selectable items. In joystick mode every selectable item have a mouse listener associated, therefore users can navigate to the desired item using the joystick. If not in joystick mode the component usually only need an event listener associated to the parent element of the component (because the mouse, pointer or stylus marks the selected item).
This feature only affects to non-XML documents with events enabled not to fragments.
setJoystickMode(boolean)
void setJoystickMode(boolean value)
value
- true to enable joystick mode.isJoystickMode()
boolean isMarkupDrivenComponents()
This feature only affects to documents not to fragments and only some HTML form based components are affected.
setMarkupDrivenComponents(boolean)
void setMarkupDrivenComponents(boolean value)
value
- true to enable markup driven.isMarkupDrivenComponents()
Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.