| java.lang.Object org.directwebremoting.proxy.io.Context jsx3.lang.Object jsx3.app.DOM
DOM | public class DOM extends jsx3.lang.Object (Code) | | Registers all DOM nodes in an instance of jsx3.app.Server and publishes related events.
This class keeps all contained JSX objects indexed on id and name.
author: Joe Walker [joe at getahead dot org] author: DRAPGEN - Dwr Reverse Ajax Proxy GENerator |
Method Summary | |
public void | add(jsx3.app.Model objJSX) Adds a JSX object to this DOM and indexes it by its id and name. | public void | destroy() The instance finalizer. | public jsx3.app.Model | get(String strId) Looks up a DOM object contained in this DOM by id or name.
Parameters: strId - either the id of the object to return or its name. | public T | get(String strId, Class<T> returnType) Looks up a DOM object contained in this DOM by id or name. | public void | getAllByName(String strName, org.directwebremoting.proxy.Callback<Object[]> callback) Returns all the DOM nodes in this DOM with a name of strName. | public jsx3.app.Model | getById(String strId) Looks up a DOM object contained in this DOM by id.
Parameters: strId - the id of the object to return. | public T | getById(String strId, Class<T> returnType) Looks up a DOM object contained in this DOM by id. | public jsx3.app.Model | getByName(String strName) Looks up a DOM object contained in this DOM by name. | public T | getByName(String strName, Class<T> returnType) Looks up a DOM object contained in this DOM by name. | public void | newId(String strNameSpace, org.directwebremoting.proxy.Callback<String> callback) Creates a new unique system id. | public void | onChange(int TYPE, String JSXPARENTID, String JSXID) | public void | onNameChange(jsx3.app.Model objJSX, String oldName) A method that must be called after changing the name of a contained DOM node. | public void | publish(jsx3.lang.Object objEvent, org.directwebremoting.proxy.Callback<Integer> callback) Publishes an event to all subscribed objects. | public void | remove(jsx3.app.Model objJSX) Removes a JSX object from this DOM and removes it from the indices. | public void | subscribe(Object[] strEventId, jsx3.lang.Object objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, jsx3.lang.Object objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, String objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, String objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(Object[] strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | subscribe(String strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction) Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. | public void | unsubscribe(String strEventId, String objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(Object[] strEventId, jsx3.lang.Object objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(String strEventId, jsx3.lang.Object objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(Object[] strEventId, String objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler) Unsubscribe an object or function from an event published by this object. | public void | unsubscribeAll(String strEventId) Unsubscribes all subscribed objects to a type of event published by this object. |
TYPEADD | final public static int TYPEADD(Code) | | 0
|
TYPEREARRANGE | final public static int TYPEREARRANGE(Code) | | 2
|
TYPEREMOVE | final public static int TYPEREMOVE(Code) | | 1
|
DOM | public DOM(Context context, String extension, ScriptProxy scriptProxy)(Code) | | All reverse ajax proxies need context to work from
Parameters: scriptProxy - The place we are writing scripts to Parameters: context - The script that got us to where we are now |
DOM | public DOM()(Code) | | The instance initializer.
|
add | public void add(jsx3.app.Model objJSX)(Code) | | Adds a JSX object to this DOM and indexes it by its id and name.
Parameters: objJSX - |
destroy | public void destroy()(Code) | | The instance finalizer.
|
get | public jsx3.app.Model get(String strId)(Code) | | Looks up a DOM object contained in this DOM by id or name.
Parameters: strId - either the id of the object to return or its name. the matching DOM object or null if none found. |
get | public T get(String strId, Class<T> returnType)(Code) | | Looks up a DOM object contained in this DOM by id or name.
Parameters: strId - either the id of the object to return or its name. Parameters: returnType - The expected return type the matching DOM object or null if none found. |
getAllByName | public void getAllByName(String strName, org.directwebremoting.proxy.Callback<Object[]> callback)(Code) | | Returns all the DOM nodes in this DOM with a name of strName. The name index keeps a bucket of
DOM nodes for each unique name. Therefore, this method performs efficiently.
Parameters: strName - the name of the objects to return. Parameters: callback - an array of the matching DOM nodes. This return value should not be mutated asthat will effect the internal functioning of this DOM. |
getById | public jsx3.app.Model getById(String strId)(Code) | | Looks up a DOM object contained in this DOM by id.
Parameters: strId - the id of the object to return. the matching DOM object or null if none found. |
getById | public T getById(String strId, Class<T> returnType)(Code) | | Looks up a DOM object contained in this DOM by id.
Parameters: strId - the id of the object to return. Parameters: returnType - The expected return type the matching DOM object or null if none found. |
getByName | public jsx3.app.Model getByName(String strName)(Code) | | Looks up a DOM object contained in this DOM by name. It is left to the developer to specify unique names for
all DOM nodes that must be accessed in this manner. If more than one DOM nodes exist with a name of
strName the behavior of this method is undefined.
Parameters: strName - the name of the object to return. the matching DOM object or null if none found. |
getByName | public T getByName(String strName, Class<T> returnType)(Code) | | Looks up a DOM object contained in this DOM by name. It is left to the developer to specify unique names for
all DOM nodes that must be accessed in this manner. If more than one DOM nodes exist with a name of
strName the behavior of this method is undefined.
Parameters: strName - the name of the object to return. Parameters: returnType - The expected return type the matching DOM object or null if none found. |
onChange | public void onChange(int TYPE, String JSXPARENTID, String JSXID)(Code) | | called when a change to the JSX DOM occurs for this server instance (adopt, load, delete, etc); publishes an event object (javascript object) with the following named properties: subject (jsx3.app.DOM.EVENT_CHANGE); type (jsx3.app.DOM.TYPEADD | jsx3.app.DOM.TYPEREMOVE); parentId (id of JSX parent); jsxId (id of element added or removed)
Parameters: TYPE - one of: jsx3.app.DOM.TYPEADD, jsx3.app.DOM.TYPEREMOVE Parameters: JSXPARENTID - id of dom parent Parameters: JSXID - id of dom element either added or removed |
onNameChange | public void onNameChange(jsx3.app.Model objJSX, String oldName)(Code) | | A method that must be called after changing the name of a contained DOM node. This method updates the name
index appropriately.
Parameters: objJSX - Parameters: oldName - the name before it was changed |
publish | public void publish(jsx3.lang.Object objEvent, org.directwebremoting.proxy.Callback<Integer> callback)(Code) | | Publishes an event to all subscribed objects.
Parameters: objEvent - the event, should have at least a field 'subject' that is the event id, another common field is 'target' (target will default to this instance) Parameters: callback - the number of listeners to which the event was broadcast |
remove | public void remove(jsx3.app.Model objJSX)(Code) | | Removes a JSX object from this DOM and removes it from the indices.
Parameters: objJSX - |
subscribe | public void subscribe(Object[] strEventId, jsx3.lang.Object objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, jsx3.lang.Object objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, jsx3.lang.Object objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, String objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, String objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler, String objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(Object[] strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
subscribe | public void subscribe(String strEventId, String objHandler, org.directwebremoting.proxy.CodeBlock objFunction)(Code) | | Subscribes an object or function to a type of event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - if an object, the instance to notify of events (objFunction is required); if a string, the JSX id of the instance to notify of events (objFunction is required), must exist in the same Server; if a function, the function to call to notify of events (objFunction ignored) Parameters: objFunction - if objHandler is a string or object then the function to call on that instance. either a function or a string that is the name of a method of the instance |
unsubscribe | public void unsubscribe(String strEventId, String objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(Object[] strEventId, jsx3.lang.Object objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(String strEventId, jsx3.lang.Object objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(Object[] strEventId, org.directwebremoting.proxy.CodeBlock objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(Object[] strEventId, String objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribe | public void unsubscribe(String strEventId, org.directwebremoting.proxy.CodeBlock objHandler)(Code) | | Unsubscribe an object or function from an event published by this object.
As of version 3.4 a string value for objHandler is deprecated.
Parameters: strEventId - the event type(s). Parameters: objHandler - the value of objHandler passed to subscribe |
unsubscribeAll | public void unsubscribeAll(String strEventId)(Code) | | Unsubscribes all subscribed objects to a type of event published by this object.
Parameters: strEventId - the event type |
Methods inherited from jsx3.lang.Object | public void ignoreReturn()(Code)(Java Doc)
|
|
|