Jaxer : Object
Return to: Jaxer Framework index

The Jaxer namespace.

Platform Support

Jaxer Server Framework Jaxer Client Framework
1.0 1.0

Classes

Jaxer.App
Jaxer.BinarySocket
Jaxer.Cache
Jaxer.Callback
Jaxer.CallbackManager
Jaxer.ClientError
Jaxer.Config
Jaxer.Container
Jaxer.CoreEvents
Jaxer.DB
Jaxer.DB.MySQL
Jaxer.DB.MySQL.Connection
Jaxer.DB.ResultSet
Jaxer.DB.SQLite
Jaxer.DB.SQLite.Connection
Jaxer.DBPersistor
Jaxer.Dir
Jaxer.DirUtils
Jaxer.Exception
Jaxer.Extensions
Jaxer.File
Jaxer.FileUtils
Jaxer.Filesystem
Jaxer.FunctionInfo
Jaxer.Includer
Jaxer.Log
Jaxer.Log.Appender
Jaxer.Log.CoreAppender
Jaxer.Log.FileAppender
Jaxer.Log.Level
Jaxer.Log.ModuleLogger
Jaxer.NetworkUtils
Jaxer.Overrides
Jaxer.Overrides.JSON
Jaxer.Process
Jaxer.Request
Jaxer.Request.ACTIONS
Jaxer.Request.FileInfo
Jaxer.Response
Jaxer.SMTP
Jaxer.SMTP.MailMessage
Jaxer.Sandbox
Jaxer.Sandbox.OpenOptions
Jaxer.ScriptInfo
Jaxer.ScriptProcessor
Jaxer.SendOptions
Jaxer.Serialization
Jaxer.SessionManager
Jaxer.Socket
Jaxer.System
Jaxer.Thread
Jaxer.Util
Jaxer.Util.CRC32
Jaxer.Util.Certificate
Jaxer.Util.Certificate.CertInfo
Jaxer.Util.Cookie
Jaxer.Util.DOM
Jaxer.Util.DateTime
Jaxer.Util.Math
Jaxer.Util.MultiHash
Jaxer.Util.Stopwatch
Jaxer.Util.String
Jaxer.Util.Url
Jaxer.Util.Url.ParsedUrl
Jaxer.Web
Jaxer.Web.ACTIONS
Jaxer.XHR
Jaxer.XHR.ResponseData
Jaxer.XHR.SendOptions
Jaxer.defaults

Properties

Property Action Jaxer Server Framework Jaxer Client Framework
static lastScriptRunat : String
The value of the runat attribute of the last script block encountered.

(Advanced)
No Details 1.0 no
Visibility
advanced
static pageWindow : ChromeWindow
This is the global execution context for JavaScript code you define in (or load into) a page on the server. It's aliased as window in the page, so it behaves just like the window global object on the client (browser).

(Advanced)
No Details 1.0 no
Visibility
advanced
static buildNumber : String
This property exposes the current build number of the Jaxer engine
No Details 1.0 no
static corePreferences : Object
This gives read-only access to the Jaxer Core's preferences, each of which become a property on this object.
No Details 1.0 no
static embeddedClientFramework : String
If Jaxer.Config.EMBEDDED_CLIENT_FRAMEWORK_SRC has been set, it's assumed to be the path to the embeddable (and usually compressed) version of the Jaxer client-side framework. This file is read once at server startup and kept in memory, to be embedded in pages that may require it. You can change this behavior using Jaxer.Response.prototype.setClientFramework.
No Details 1.0 no
static isOnServer : Boolean
True on the server side, false on the client (browser).
No Details 1.0 1.0
static onloadEnabled : Boolean
This starts out as null at the start of every request. If you set it to true, handlers for the onload event registered via addEventListener or window.onload will be called, regardless of Jaxer.Config.ONLOAD_ENABLED; if you set it to false, they will not be called, regardless of Jaxer.Config.ONLOAD_ENABLED. Thus, it is used to override Jaxer.Config.ONLOAD_ENABLED for the current request.
No Details 1.0 no
static proxies : Function[]
Adding functions (or their names) to this array is equivalent to setting their proxy property to true. To enforce no proxies, overriding any proxy property or runat="server-proxy", set Jaxer.proxies = null.
No Details 1.0 no
static request : Jaxer.Request
Contains information and methods about the current request
No Details 1.0 no
static response : Jaxer.Response
Contains information and methods about how to respond to the current request
No Details 1.0 no
static responseErrorPage : String
If Jaxer.Config.RESPONSE_ERROR_PAGE has been set, it's assumed to be the path to a file containing the error page to return when an error has occurred during the response. This file is read once at server startup and kept in memory, to be returned as required. If Config.RESPONSE_ERROR_PAGE is not set, a default HTML string is used. You can change the behavior of the framework when it encounters errors serving requests using Jaxer.Config.DISPLAY_ERRORS.
No Details 1.0 no

Functions

Method Action Jaxer Server Framework Jaxer Client Framework
static include(String url, [Object global]) : void
Loads and evaluates JavaScript from the given location against the given global execution context. This is a low-level wrapper around "@mozilla.org/moz/jssubscript-loader;1" and mozIJSSubScriptLoader.loadSubScript. It's best to use the higher-level Jaxer.Includer.load(src, global, runat) which is also conveniently available as Jaxer.load(src, global, runat) inside any Jaxer server-side page (where global is defaulted to window).

(Advanced)
Show Details 1.0 no

Parameters
String url The url of the file to include, either as an absolute URL in the form "file:///..." or relative to the current executable's folder (with or without the "resource:///" prefix.
Object global (optional)An optional global context in which to evaluate the script.

static notifyFatal(Object error) : void
Notifies the framework that a fatal error has occurred, one which will require fixing and restarting Jaxer. How this is handled is then determined by the Jaxer.Config settings.

(Advanced)
Show Details 1.0 no

Parameters
Object error The error describing what happened. If the framework has already been notified of an error, this error is not used.

static load(String src, [Object global,] [String runat]) : void
Loads a JavaScript file and evaluates it.
Show Details 1.0 no

Parameters
String src The URL from which the JavaScript file should be retrieved. If the src is an absolute file://... URL then it is retrieved directly from the file system, otherwise it is retrieved via a web request.
Object global (optional)The global (usually a window object) on which to evaluate it. By default, it is the current window object of the page.
String runat (optional)The value of the effective runat "attribute" to use when evaluating this code. By default, it uses the same runat attribute as the last evaluated script block.

static loadAllExtensions() : void
Loads all extensions from the folder defined in Config.EXTENSIONS_DIR.
No Details 1.0 no
static loadExtension(String name, Object namespaceObject) : void
Loads a framework extension (already defined in memory). If the namespaceObject defines an onLoad method, it will be called (without arguments)
Show Details 1.0 no

Parameters
String name The (unique) name to use for this extension
Object namespaceObject The object holding all the members of this extension

static Server() : void
Holds the proxy functions for calling server functions that were designated with runat="both-proxy" (or equivalent), to prevent function name collisions. So e.g. if a function getName() is defined with runat="both-proxy", in the browser you can call getName() to use the client-side function or Jaxer.Server.getName() to use the server-side function. Jaxer.Server holds both the synchronous and asynchronous versions of the proxies (e.g. Jaxer.Server.getName() and Jaxer.Server.getName.async()).
No Details no 1.0
static setEvent(Object domElement, String eventName, Object handler) : void
Used to set events on DOM elements such that they "do the right thing" both client-side and server-side. On the client, this acts as expected, setting a property with the name eventName (e.g. onclick) on the DOM element. On the server, the eventName attribute is set on the DOM element so it can be serialized with the DOM before sending to the client. If the handler is a (server side) function with a name, the attribute's value is handler.name + "()".
Show Details 1.0 1.0

Parameters
Object domElement The element on which to set the event
String eventName The name of the event to set
Object handler The handler function, or the body (as a string)

static setTitle(String title) : void
Sets the title of the document and works on either the server or the client.
Show Details 1.0 1.0

Parameters
String title The text of the title

static unloadExtension(String name, Boolean noWarnings) : void
Unloads a previously-loaded framework extension. If its namespaceObject defines an onUnload method, it will be called (without arguments)
Show Details 1.0 no

Parameters
String name The name used to load this extension
Boolean noWarnings Whether to warn if the extension was not loaded when this was called, or its namespaceObject was not there.

aptana_docs