pureweb.client. Framework

The Framework is a proxy for an application instance running remotely. It creates a WebClient instance which manages communication to the service application.

Method Summary

canCreateNewWindow
Returns true if this client can open a new window (in other words, if the client passes guards of createNewWindow).
closeChildWindows
Closes all multi monitor child windows of this web client This is a convenience wrapper for the method in WebClient.
createNewWindow
Creates a new window to attach to this PureWeb client.
createViewRenderer
Generates a new ViewRenderer instance based on the factories registered previously, and returns this implementation (unregistered types will return null).
createViewRendererImplementation
Creates a ViewRenderer instance based on an external implementation, and returns this instance.
getClient
Returns the client associated with this Framework instance.
getCollaborationManager
Returns the CollaborationManager instance.
getCommandFilter
Returns the current command filter, or null if no command filter is currently set.
getDefault
Returns the default Framework instance (creates it first, if necessary); this is a static helper function.
getOpenWindows
Returns all child windows know by this parent window.
getProfilerManager
Returns the ProfilerManager instance.
getState
Returns the current application state.
hasViewRenderer
Returns a Boolean value that indicates whether a renderer is registered for the specified mime type.
isStateInitialized
Returns a Boolean value that indicates whether state is initialized.
registerViewRenderer
Registers a ViewRenderer factory function for the specified mime type.
setCommandFilter
Sets the current command filter.
stateChange
Queues a server state update.

Constructor

new Framework(id)

Initializes a new instance of Framework.

NOTE: Only use the constructor if you want a Framework instance with a specific ID. In the common scenario, use the static function getDefault.
Parameters:
Name Type Description
id string The Framework identifier.
Throws:
pureweb.IllegalArgumentException

Extends

  • pureweb.events.EventTarget

Members

<static> EventType → string

An enumeration of the types of events that can be raised by Framework.
Properties:
Name Type Default Description
IS_STATE_INITIALIZED string The event that gets dispatched when the state is initialized or uninitialized.

Method Detail

canCreateNewWindow() → {boolean}

Returns true if this client can open a new window (in other words, if the client passes guards of createNewWindow). Returns false otherwise. This is essentially a pre-test for any conditions in createNewWindow that might throw. This is a convenience wrapper for the method in WebClient.MultiWindow.

closeChildWindows()

Closes all multi monitor child windows of this web client This is a convenience wrapper for the method in WebClient.MultiWindow.

createNewWindow(specs, passFlowControl)

Creates a new window to attach to this PureWeb client. The child window will be treated as an extension of the parent window and will piggy-back on the parent window's communication channel. Terminating the parent window will terminate all child windows. This is a convenience wrapper for the method in Framework.WebClient.MultiWindow.
Parameters:
Name Type Argument Description
specs string <optional>
A comma seperated list of window specifications (see window.openWindow).
passFlowControl boolean <optional>
A boolean indicating whether flow control should be driven by the new window. This is helpful for IE 11, as it reduces frame lag.

createViewRenderer(target, mimeType) → {pureweb.client.ViewRenderer}

Generates a new ViewRenderer instance based on the factories registered previously, and returns this implementation (unregistered types will return null).
Parameters:
Name Type Description
target pureweb.client.View The target view for this renderer.
mimeType string The mime type for which a renderer is desired.

<static> createViewRendererImplementation(impl) → {pureweb.client.ViewRenderer}

Creates a ViewRenderer instance based on an external implementation, and returns this instance. This is a static factory method.
Parameters:
Name Type Description
impl Object The implementation of the renderer.

getClient() → {pureweb.client.WebClient}

Returns the client associated with this Framework instance.

getCollaborationManager() → {pureweb.client.CollaborationManager}

Returns the CollaborationManager instance.

getCommandFilter() → {pureweb.util.CommandFilter}

Returns the current command filter, or null if no command filter is currently set. For more information, see DefaultCommandFilter.

<static> getDefault() → {pureweb.client.Framework}

Returns the default Framework instance (creates it first, if necessary); this is a static helper function.

getOpenWindows() → {Array}

Returns all child windows know by this parent window. If not broadcasting, or not the parent window, will return an empty array. This is a convenience wrapper for the method in WebClient.MultiWindow.

getProfilerManager() → {pureweb.client.diagnostics.ProfilerManager}

Returns the ProfilerManager instance.

getState() → {pureweb.client.ApplicationState}

Returns the current application state.

hasViewRenderer(mimeType) → {boolean}

Returns a Boolean value that indicates whether a renderer is registered for the specified mime type. Will return true if it is, or false otherwise.
Parameters:
Name Type Description
mimeType string The mime type for which the renderer is registered.

isStateInitialized() → {boolean}

Returns a Boolean value that indicates whether state is initialized. Will return true if it is, or false otherwise.

registerViewRenderer(mimeType, factory)

Registers a ViewRenderer factory function for the specified mime type. The function will return the appropriate implementation of a ViewRenderer when createViewRenderer is called.
Parameters:
Name Type Description
mimeType string The viewRenderer mime type.
factory function The function which creates a ViewRenderer implementation.
Throws:
If a parameter is null or of the wrong type:
pureweb.IllegalArgumentException

setCommandFilter(filter)

Sets the current command filter.
Parameters:
Name Type Description
filter pureweb.util.CommandFilter The command filter to use, or null if no client-side command filtering should be performed. For more information, see DefaultCommandFilter.

stateChange()

Queues a server state update.