class Server
All Implemented Interfaces:
The controller of the JSX architecture.
| Field Summary |
|---|
| jsx3.app.Cache | Deprecated. Use Server.getCache() |
| jsx3.app.DOM | Deprecated. Use Server.getDOM() |
| Object<String, String> | Deprecated. Use Server.getEnv() |
| static String | The subject of an event that instances of this class publish when a context help hot key is pressed
in the context of a DOM node that has a help ID. |
| static String | The subject of an event that jsx3.app.Server publishes when an instance of this class
is created. |
| jsx3.gui.Block | Deprecated. Use Server.getBodyBlock() |
| jsx3.gui.Block | Deprecated. Use Server.getRootBlock() |
| Constructor Summary |
|---|
| void | Sets environment variables used by this class (the controller for the JSX architecture) |
| Method Summary |
|---|
| jsx3.gui.Window | Creates a new jsx3.gui.Window instance for this server. |
| void | delete a cookie |
| void | call to shut down a server instance and free up resources used by the server (cache,dom,etc)
|
| jsx3.app.Model | To implement jsx3.gui.Alerts interface. |
| jsx3.gui.Window | Retrieves a previously created jsx3.gui.Window instance. |
| jsx3.gui.Block | Returns the body block for this server (JSXBODY) |
| jsx3.app.Cache | Returns the XML/XSL cache for this server |
| String | Returns the value for the Cookie with the given @name |
| jsx3.app.DOM | Returns the DOM for this server |
| jsx3.util.Locale | Returns the default locale of this server. |
| HTMLDocument | Returns the browser document object containing a particular JSX object. |
| String | Returns the value of the dynamic property @strPropName |
| String | Returns the value of an environment setting of this server. |
| jsx3.app.Model | Looks up a DOM node owned by this server by id or by name. |
| jsx3.app.Model | Looks up a DOM node owned by this server by id. |
| jsx3.app.Model | Looks up a DOM node owned by this server by name. |
| jsx3.util.Locale | Returns the current locale of this server. |
| HTMLElement | Returns the browser DOM object where a particulat JSX object renders. |
| jsx3.gui.Block | Returns the root block for this server (JSXROOT) |
| Array<jsx3.app.Model> | Returns the list of objects that are children of the body object. |
| jsx3.app.Server | |
| jsx3.app.Settings | Returns the settings of this server/project per config.xml |
| jsx3.gui.WindowBar | Returns handle to a descendant taskbar belonging to this server instance (this is where JSXDialog instances will try to minimize to if it exists); returns null if none found;
if no taskbar is found, dialogs are not minimized, but are 'window shaded'—like a Mac used to do |
| String | |
| static String | |
| void | Invokes context-sensitive help as though the user had pressed the help hot key in the context of the DOM node
objJSX. |
| jsx3.gui.Window | Loads a new jsx3.gui.Window instance from a component file. |
| jsx3.xml.Document | jsx3.net.Service | null | Loads an external resource into this server instance. |
| jsx3.xml.Document | jsx3.net.Service | null | Loads an application resource. |
| void | Paints this application and its default component into the application view port on the host HTML page. |
| jsx3.net.URI | |
| void | Reloads all resource files that are localized. |
| jsx3.net.URI | Resolves a URI that is referenced from a file in this server. |
| void | Sets a Cookie with the given name and value |
| void | set all four dimensions for a jsx3.Server instance, allowing the developer to adjust the width/height/left/width for the server. |
| void | updates a single dynamic style property; dynamic properties are used by jsx3.gui.Block objects that extend the astract class, jsx3.gui.Block; |
| void | Sets the locale of this server. |
| String | |
| void | Removes a loaded JavaScript or CSS resource from the browser DOM. |
| Methods Inherited From jsx3.lang.Object |
|---|
| clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf |
Deprecated. Use Server.getCache()
Deprecated. Use Server.getDOM()
Deprecated. Use Server.getEnv()
The subject of an event that instances of this class publish when a context help hot key is pressed
in the context of a DOM node that has a help ID. The event has the following fields:
-
target - the server publishing the event.
-
model - the DOM node that received the key event.
-
helpid - the help ID of the nearest ancestor of model that defines a help ID.
The subject of an event that jsx3.app.Server publishes when an instance of this class
is created. The target of the event object is the initialized server.
Deprecated. Use Server.getBodyBlock()
Deprecated. Use Server.getRootBlock()
Sets environment variables used by this class (the controller for the JSX architecture)
Parameters:
strAppPath – URL (either relative or absolute) for the application to load
objGUI – the browser element (body, div, span, td, etc) into which the GI application should load
bPaint – false if null; if true, the application VIEW will immediately be generated.
objEnv –
Creates a new jsx3.gui.Window instance for this server. A branch of the DOM of this application can be placed
in this window in order to distribute the application across multiple browser windows.
Parameters:
strName – the unique name of the window to create
Throws:
Returns:
Since:
3.2
delete a cookie
Parameters:
name – name of the cookie
path – path where the cookie is valid (default: path of calling document)
domain – domain where the cookie is valid (default: domain of calling document)
void destroy()
call to shut down a server instance and free up resources used by the server (cache,dom,etc)
To implement jsx3.gui.Alerts interface.
Returns:
the root block.
Overrides:
Retrieves a previously created jsx3.gui.Window instance.
Parameters:
strName – the unique name of the window to retrieve
Returns:
the window instance or null if no such window exists.
Since:
3.2
Returns the body block for this server (JSXBODY)
Returns:
Returns the XML/XSL cache for this server
Returns:
Returns the value for the Cookie with the given @name
Parameters:
name – name of the cookie
bRaw –
Returns:
Returns the DOM for this server
Returns:
Returns the default locale of this server. This is configured with the default_locale configuration
setting.
Returns:
Since:
3.2
Returns the browser document object containing a particular JSX object. This method inspects whether the
JSX object is a descendent of the root block of this server or one of its jsx3.gui.Window roots.
Parameters:
Returns:
document object
Returns the value of the dynamic property @strPropName
Parameters:
strPropName – id for this dynamic property among all properties
strToken – if present tokens such as {0}, {1}, {n} will be replaced with the nth element of this vararg array
Returns:
value of the property
Returns the value of an environment setting of this server. Valid keys correspond to deployment options and are
(case-insensitive):
- VERSION
- APPPATH
- ABSPATH
- CAPTION
- MODE
- SYSTEM
- NAMESPACE
- CANCELERROR
- CANCELRIGHTCLICK
- BODYHOTKEYS
- WIDTH
- HEIGHT
- LEFT
- TOP
- POSITION
- OVERFLOW
- UNICODE
- EVENTSVERS
Parameters:
strEnvKey – the key of the environment value to return
Returns:
Looks up a DOM node owned by this server by id or by name.
Parameters:
strId – either the id (_jsxid) of the object or its name (jsxname)
Returns:
the JSX object or null if none found
See Also:
Looks up a DOM node owned by this server by id.
Parameters:
strId – the id (_jsxid) of the object
Returns:
the JSX object or null if none found
See Also:
Looks up a DOM node owned by this server by name. If more than one such objects exist, only one is returned.
Parameters:
strId – the name (jsxname) of the object
Returns:
the JSX object or null if none found
See Also:
Returns the current locale of this server. If the locale has been set explicitly with setLocale(),
that locale is returned. Otherwise, getDefaultLocale() is consulted, and finally the system-wide
locale.
Returns:
Since:
3.2
Returns the browser DOM object where a particulat JSX object renders. This method inspects the main root of
this server as well as all of its jsx3.gui.Window roots.
Parameters:
Returns:
DOM object
Returns the root block for this server (JSXROOT)
Returns:
Returns the list of objects that are children of the body object. These are the root objects
in a serialization file and the root nodes in the Component Hierarchy palette.
Returns:
Deprecated.
Conforms to the EventDispatcher contract.
Returns:
this object.
Returns the settings of this server/project per config.xml
Returns:
Returns handle to a descendant taskbar belonging to this server instance (this is where JSXDialog instances will try to minimize to if it exists); returns null if none found;
if no taskbar is found, dialogs are not minimized, but are 'window shaded'—like a Mac used to do
Parameters:
objJSX – if null, this.JSXROOT is assumed; otherwise the object in the DOM from which to start looking for a descendant taskbar (a jsx3.gui.WindowBar instance)
Returns:
Returns:
Overrides:
Since:
3.2
Deprecated.
Returns version of the JSX runtime; separate versions are also available for GUI and Operational classes
Returns:
app version number (major (MM), minor (mm), and dot release (dd)) MM.mm.dd
Invokes context-sensitive help as though the user had pressed the help hot key in the context of the DOM node
objJSX.
Parameters:
Since:
3.5
See Also:
Loads a new jsx3.gui.Window instance from a component file.
Parameters:
strSource – either an XML document containing the window to load or the URL of the
component to load.
Throws:
{jsx3.lang.Exception} –
if the loaded entity is not an instance of jsx3.gui.Window or if the name of window is
not unique with respect to the already loaded windows Returns:
Since:
3.2
Loads an external resource into this server instance. What this method does depends on the
strType
parameter.
-
script - Loads a JavaScript file asynchronously into the memory space of the page hosting this
application; returns null.
-
css - Loads a CSS file asynchronously into the memory space of the page hosting this
application; returns null.
-
xml or xsl - Loads an XML file synchronously into the XML cache of this
application; returns the loaded jsx3.xml.Document instance.
-
jss or ljss - Loads a dynamic properties file or localized properties bundle
synchronously into this application; returns null.
-
services - Loads and parses a mapping rules file synchronously; returns a new instance of
jsx3.net.Service.
Parameters:
strSrc – the path to the resource.
strId – the unique identifier of the resource. A resource loaded by this method may clobber
a previously loaded resource of the same type and id.
strType – the type of include, one of: css, jss, xml,
xsl, script (for JavaScript), services (for mapping rules),
or ljss.
bReload – if true, a JavaScript or CSS file is reloaded from the remote server
without checking the local browser cache. Other types of resources are not affected by this parameter.
Throws:
Returns:
the return type depends on the strType
parameter. See the method description.
Loads an application resource. This method looks up a resource registered with this application by its id.
The resource must be registered in the config.xml file of this application.
Parameters:
strId – unique identifier for the resource (its unique id as an application resource file).
Returns:
the return type depends on the type of resource.
See the documentation for loadInclude() for more information.
See Also:
Paints this application and its default component into the application view port on the host HTML page. The
system class loader calls this method once all the required resources of the application have loaded. The
order of actions taken by this method is:
- Load the default component file
- Execute the onload script for the application
- Paint the default component in the view port
Parameters:
objXML – the pre-loaded default component document.
Parameters:
strURI – the URI to relativize.
bRel –
Returns:
the relativized URI.
Overrides:
Since:
3.2
void reloadLocalizedResources()
Reloads all resource files that are localized. This method should be called after calling
setLocale() for the server to render properly in the new locale.
Since:
3.2
Resolves a URI that is referenced from a file in this server. This method takes into account the changes in
resource addressing between 3.1 and 3.2. For version 3.1, the URI is resolved as any URI in the system, using
jsx3.resolveURI(). In version 3.2, the URI is taken as relative to the application folder. In
particular, a relative URI will be resolved to a base of the application folder, an absolute URI will be
unaffected.
Parameters:
strURI – the URI to resolve.
Returns:
the resolved URI.
Overrides:
Since:
3.2
See Also:
Sets a Cookie with the given name and value
Parameters:
name – name of the cookie
value – value of the cookie
expires – valid jscript date object. for example: new Date("11:59:59 12-31-2004")
path – path where the cookie is valid (default: path of calling document)
domain – domain where the cookie is valid (default: domain of calling document)
secure – valid jscript date object. for example: new Date("11:59:59 12-31-2004")
bRaw –
set all four dimensions for a jsx3.Server instance, allowing the developer to adjust the width/height/left/width for the server. Must be called during/after the onload event for the server instance as it affects the VIEW for the server. Updates the absolutely positioned element that contains JSXROOT.
Parameters:
left – the new left value or a JavaScript array containing all four new values (in pixels)
top href="../../Array.html">Array, top
: int, width
: int, height
: int)
set all four dimensions for a jsx3.Server instance, allowing the developer to adjust the width/height/left/width for the server. Must be called during/after the onload event for the server instance as it affects the VIEW for the server. Updates the absolutely positioned element that contains JSXROOT.
Parameters:
left – the new left value or a JavaScript array containing all four new values (in pixels)
top – the new top value (in pixels)
width – the new width value (in pixels)
height – the new height value (in pixels)
void setDynamicProperty(strPropName
: String, vntValue
: String)
updates a single dynamic style property; dynamic properties are used by jsx3.gui.Block objects that extend the astract class, jsx3.gui.Block;
Parameters:
strPropName – id for this dynamic property among all properties
vntValue – value of the property; if null, the property with the name, @strPropName will be removed
Sets the locale of this server.
Parameters:
Since:
3.2
void unloadInclude(strId
: String)
Removes a loaded JavaScript or CSS resource from the browser DOM.
Parameters:
strId – the id used when loading the resource.
See Also:
Copyright © 2001-2007, TIBCO Software Inc.