| org.itsnat.core.ItsNatDocument
All known Subclasses: org.itsnat.impl.core.ItsNatDocumentImpl,
ItsNatDocument | public interface ItsNatDocument extends ItsNatUserData,ItsNatNode(Code) | | Is the ItsNat wrapper of a org.w3c.dom.Document object. Usually represents a web page
loaded by a client.
Provides many useful utilities to simulate "The Browser Is The Server" approach of
ItsNat like event listener registries. Is the factory of DOM utility objects and ItsNat components.
ItsNat document objects are created using a
DocumentTemplate as pattern and
usually obtained calling
ItsNatServletRequest.getItsNatDocument or
ItsNatServletResponse.getItsNatDocument when a new document (page) is loading or calling
org.itsnat.core.event.ItsNatEvent.getItsNatDocument
when an AJAX event is received.
Is not thread save and any object depending on this document (DOM utility objects,
components etc) is not thread save too. This is not a problem because any ItsNat request/response
thread synchronizes this object before calling user defined code, user defined code
executed by an ItsNat request/response thread may be unaware of synchronization isues.
author: Jose Maria Arranz Santamaria |
Method Summary | |
public void | addAsynchronousTask(Runnable task, boolean lockDoc, int maxWait, long ajaxTimeout) Executes the specified task in a new thread and ensures that any DOM modification performed by this task
is sent to the client asynchronously when the task ends. | public void | addAsynchronousTask(Runnable task, boolean lockDoc) Executes the specified task in a new thread and ensures that any DOM modification performed by this task
is sent to the client asynchronously when the task ends. | public void | addCodeToSend(Object code) Add JavaScript code to send to any client (owner or viewers) bound to this document (pending code). | public void | addCodeToSendListener(CodeToSendListener listener) Registers a new CodeToSendListener , this listener is called
every time
ItsNatDocument.addCodeToSend(Object) is called. | public void | addContinueEventListener(EventTarget target, EventListener listener, int syncMode, ParamTransport[] extraParams, String preSendCode, long ajaxTimeout) Registers a "continue" EventListener . | public void | addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture) Registers a new DOM org.w3c.dom.events.EventListener with the
document default synchronization mode and AJAX timeout, no extra parameters and no custom JavaScript code. | public void | addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, int syncMode) Registers a new DOM org.w3c.dom.events.EventListener with no extra
parameters and no custom JavaScript code, and document default AJAX timeout. | public void | addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, ParamTransport extraParam) Registers a new DOM org.w3c.dom.events.EventListener with
document default synchronization mode and AJAX timeout, the specified extra
parameter and no custom JavaScript code. | public void | addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, ParamTransport[] extraParams) Registers a new DOM org.w3c.dom.events.EventListener with
document default synchronization mode and AJAX timeout, the specified extra
parameters and no custom JavaScript code. | public void | addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, String preSendCode) Registers a new DOM org.w3c.dom.events.EventListener with
document default synchronization mode and AJAX timeout, no extra
parameters and the specified custom JavaScript code. | public void | addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, int syncMode, ParamTransport[] extraParams, String preSendCode, long ajaxTimeout) Registers a new DOM org.w3c.dom.events.EventListener . | public void | addMutationEventListener(EventTarget target, EventListener listener, boolean useCapture) Registers a new DOM org.w3c.dom.events.EventListener to receive any node mutation
as a mutation event fired by the client, using the default document synchronization mode and AJAX timeout
and no custom JavaScript code. | public void | addMutationEventListener(EventTarget target, EventListener listener, boolean useCapture, int syncMode, String preSendCode, long ajaxTimeout) Registers a new DOM org.w3c.dom.events.EventListener to receive any node mutation
as a mutation event fired by the client. | public void | addReferrerItsNatServletRequestListener(ItsNatServletRequestListener listener) Registers a new ItsNat referrer request listener. | public void | addRemoteControlEventListener(RemoteControlEventListener listener) Adds a remote control listener to this document. | public void | addUserEventListener(EventTarget target, String name, EventListener listener, int syncMode, ParamTransport[] extraParams, String preSendCode, long ajaxTimeout) Registers a "user" EventListener . | public void | addUserEventListener(EventTarget target, String name, EventListener listener) Registers a "user" EventListener . | public ElementLabelRenderer | createDefaultElementLabelRenderer() Creates the default DOM element label renderer. | public ElementListRenderer | createDefaultElementListRenderer() Creates the default DOM element list renderer. | public ElementListStructure | createDefaultElementListStructure() Creates the default DOM element list structure. | public ElementRenderer | createDefaultElementRenderer() Creates the default DOM element renderer. | public ElementTableRenderer | createDefaultElementTableRenderer() Creates the default DOM element table renderer. | public ElementTableStructure | createDefaultElementTableStructure() Creates the default DOM element table structure. | public ElementTreeNodeRenderer | createDefaultElementTreeNodeRenderer() Creates the default DOM element table renderer. | public ElementTreeNodeStructure | createDefaultElementTreeNodeStructure() Creates the default DOM element tree node structure. | public ElementLabel | createElementLabel(Element parentElement, boolean removePattern, ElementLabelRenderer renderer) Creates a pattern based DOM element label. | public ElementList | createElementList(Element parentElement, boolean removePattern, ElementListStructure structure, ElementListRenderer renderer) Creates a pattern based DOM element list. | public ElementList | createElementList(Element parentElement, boolean removePattern) Creates a pattern based DOM element list. | public ElementListFree | createElementListFree(Element parentElement, boolean master) Creates a DOM element list manager. | public ElementTable | createElementTable(Element parentElement, boolean removePattern, ElementTableStructure structure, ElementTableRenderer renderer) Creates a pattern based DOM element table. | public ElementTable | createElementTable(Element parentElement, boolean removePattern) Creates a pattern based DOM element table. | public ElementTableFree | createElementTableFree(Element parentElement, boolean master) Creates a DOM element table manager. | public ElementTree | createElementTree(boolean treeTable, Element parentElement, boolean removePattern, ElementTreeNodeStructure structure, ElementTreeNodeRenderer renderer) Creates a pattern based DOM element tree. | public ElementTree | createElementTree(boolean treeTable, Element parentElement, boolean removePattern) Creates a pattern based DOM element tree. | public ElementTreeNode | createElementTreeNode(Element parentElement, boolean removePattern, ElementTreeNodeStructure structure, ElementTreeNodeRenderer renderer) Creates a pattern based DOM element tree node. | public ElementTreeNode | createElementTreeNode(Element parentElement, boolean removePattern) Creates a pattern based DOM element tree node. | public ElementTreeNodeList | createElementTreeNodeList(boolean treeTable, Element parentElement, boolean removePattern, ElementTreeNodeStructure structure, ElementTreeNodeRenderer renderer) Creates a pattern based rootless DOM element tree. | public ElementTreeNodeList | createElementTreeNodeList(boolean treeTable, Element parentElement, boolean removePattern) Creates a pattern based rootless DOM element tree. | public ItsNatTimer | createItsNatTimer() Creates a timer utility object. | public ItsNatVariableResolver | createItsNatVariableResolver() Creates a variable resolver bound to this document. | public void | disableSendCode() Disables the
ItsNatDocument.addCodeToSend(Object) method, no new code can be added
to send to the client. | public boolean | dispatchEvent(EventTarget target, Event evt) Dispatches the specified event to the specified node target. | public boolean | dispatchEventLocally(EventTarget target, Event evt) Dispatches the specified event to the specified node target directly on the server. | public void | enableSendCode() Enables the
ItsNatDocument.addCodeToSend(Object) method, new code can be added
to send to the client. | public long | getAJAXTimeout() Returns the default timeout of asynchronous AJAX events. | public Object | getArtifact(String name) Returns the artifact with the specified name.
Parameters: name - the artifact name to look for. | public Object | getArtifact(String name, boolean cascade) Returns the artifact with the specified name.
If no artifact is found and cascade is true,
the method
DocumentTemplate.getArtifact(Stringboolean)
is called with cascade set to true to continue searching.
Parameters: name - the artifact name to look for. | public Object | getAttribute(String name) Returns the value associated to the specified attribute name. | public Enumeration | getAttributeNames() Returns an enumeration with the registered attribute names and values. | public ClientDocument | getClientDocumentOwner() Returns the document proxy of the owner of this document. | public Date | getCreationDate() Returns the date when this object was created. | public DateFormat | getDefaultDateFormat() Returns the default data format used by components such as
org.itsnat.comp.html.ItsNatHTMLInputTextFormatted .
The default value is defined by
DocumentTemplate.getDefaultDateFormat
the default date format. | public NumberFormat | getDefaultNumberFormat() Returns the default number format used by components such as
org.itsnat.comp.html.ItsNatHTMLInputTextFormatted .
The default value is defined by
DocumentTemplate.getDefaultNumberFormat
the default data format. | public int | getDefaultSyncMode() Returns the default synchronous mode of AJAX events. | public Document | getDocument() Returns the org.w3c.dom.Document wrapped by this object. | public DocumentTemplate | getDocumentTemplate() Returns the template this document is based on. | public long | getEventDispatcherMaxWait() Returns the default max wait until a server fired event calling
ClientDocument.dispatchEvent(org.w3c.dom.events.EventTargetorg.w3c.dom.events.Eventintlong)
is processed by the client and returns. | public String | getId() Returns the client identity. | public ItsNatComponentManager | getItsNatComponentManager() Returns the component manager utility. | public ItsNatNode | getItsNatNode(Node node) Returns the
ItsNatNode object wrapping the specified object. | public ScriptUtil | getScriptUtil() Returns the scripting utility. | public boolean | isInvalid() Informs whether this document is invalid. | public boolean | isLoading() Informs whether this document is in the load phase. | public boolean | isSendCodeEnabled() | public boolean | isUsePatternMarkupToRender() Informs whether dom utils and components use by default the original
(saved as pattern) markup to render. | public void | registerArtifact(String name, Object value) Registers an artifact with the specified name.
Parameters: name - the artifact name Parameters: value - the artifact. | public Object | removeArtifact(String name) Removes the artifact with the specified name.
Parameters: name - the artifact name to look for. | public void | removeAttribute(String name) Unregisters the specified attribute with the given name. | public void | removeCodeToSendListener(CodeToSendListener listener) Removes a previously registered CodeToSendListener . | public void | removeEventListener(EventTarget target, String type, EventListener listener, boolean useCapture) Removes the listener registration with the specified node target, name, listener and capture.
Parameters: target - the target element. | public void | removeMutationEventListener(EventTarget target, EventListener listener, boolean useCapture) Removes the mutation listener registration with the specified node target, listener and capture.
Parameters: target - the target element. | public void | removeReferrerItsNatServletRequestListener(ItsNatServletRequestListener listener) Unregisters the specified user defined referrer request listener. | public void | removeRemoteControlEventListener(RemoteControlEventListener listener) Removes the specified remote control listener. | public void | removeUserEventListener(EventTarget target, String name, EventListener listener) Removes the listener registration with the specified node target, name and listener.
Parameters: target - the target element. | public void | setAJAXTimeout(long timeout) Sets the default timeout of asynchronous AJAX events. | public void | setAttribute(String name, Object value) Registers the specified attribute name and value. | public void | setDefaultDateFormat(DateFormat format) Sets the default data format used by components such as
org.itsnat.comp.html.ItsNatHTMLInputTextFormatted . | public void | setDefaultNumberFormat(NumberFormat format) Sets the default data format used by components such as
org.itsnat.comp.html.ItsNatHTMLInputTextFormatted . | public void | setDefaultSyncMode(int syncMode) Sets the default synchronous mode of AJAX events. | public void | setEventDispatcherMaxWait(long wait) Sets the default max wait until a server fired event with
ClientDocument.dispatchEvent(org.w3c.dom.events.EventTargetorg.w3c.dom.events.Eventintlong)
is processed by the client and returns. | public void | setInvalid() Sets this document as invalid. | public void | setUsePatternMarkupToRender(boolean value) Sets whether dom utils and components use by default the original
(saved as pattern) markup to render. |
addAsynchronousTask | public void addAsynchronousTask(Runnable task, boolean lockDoc, int maxWait, long ajaxTimeout)(Code) | | Executes the specified task in a new thread and ensures that any DOM modification performed by this task
is sent to the client asynchronously when the task ends. Max wait is specified.
If lockDoc is true this document is synchronized during
the task execution, but if lockDoc is false the task code
must synchronize the document before any access.
In a long running task is highly recommended to set lockDoc
as false to avoid a long document lock.
Parameters: task - the task to execute in a new thread. Parameters: lockDoc - whether the document is synchronized by the framework. Parameters: maxWait - maximum time in milliseconds to wait until the task ends. 0 means unlimited wait. Parameters: ajaxTimeout - the timeout for the AJAX request used to notify the client. If negative no timeout is defined. |
addAsynchronousTask | public void addAsynchronousTask(Runnable task, boolean lockDoc)(Code) | | Executes the specified task in a new thread and ensures that any DOM modification performed by this task
is sent to the client asynchronously when the task ends. Waits indefinitely.
Parameters: task - the task to execute in a new thread. Parameters: lockDoc - whether the document is synchronized by the framework. See Also: ItsNatDocument.addAsynchronousTask(Runnable,boolean,int,long) |
addContinueEventListener | public void addContinueEventListener(EventTarget target, EventListener listener, int syncMode, ParamTransport[] extraParams, String preSendCode, long ajaxTimeout)(Code) | | Registers a "continue" EventListener .
When this listener is registered the server sends custom JavaScript code to fire automatically
a
org.itsnat.core.event.ContinueEvent sent to the listener. This event usually carries
client data necesary to continue a pending server task (and any JavaScript code sent to the client
prior to register the listener was executed, this new client state may be the carried data if any).
There is no "remove listener" method because the listener is automatically
removed when receives and processes the event.
Parameters: target - optional target element usually useful along with org.itsnat.core.event.ParamTransport objects. May be null. Parameters: listener - the listener to receive the event. Parameters: syncMode - synchronization mode. Parameters: extraParams - optional client to server data transport and synchronization rules. May be null. Parameters: preSendCode - custom JavaScript code to execute before an event of this listener type is fired. May be null. Parameters: ajaxTimeout - the timeout of asynchronous AJAX events. If negative no timeout is defined. See Also: SyncMode |
addEventListener | public void addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture)(Code) | | Registers a new DOM org.w3c.dom.events.EventListener with the
document default synchronization mode and AJAX timeout, no extra parameters and no custom JavaScript code.
Parameters: target - target element. Can not be null. Parameters: type - the DOM event type name (click, change etc). Parameters: listener - the listener to receive events. Parameters: useCapture - if event capture is enabled. False is the most portable value (MSIE v6 does not support event capture). See Also: ItsNatDocument.addEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean,int,org.itsnat.core.event.ParamTransport[],String,long) |
addEventListener | public void addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, int syncMode)(Code) | | Registers a new DOM org.w3c.dom.events.EventListener with no extra
parameters and no custom JavaScript code, and document default AJAX timeout.
Parameters: target - target element. Can not be null. Parameters: type - the DOM event type name (click, change etc). Parameters: listener - the listener to receive events. Parameters: useCapture - if event capture is enabled. False is the most portable value (MSIE v6 does not support event capture). Parameters: syncMode - synchronization mode. See Also: ItsNatDocument.addEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean,int,org.itsnat.core.event.ParamTransport[],String,long) |
addEventListener | public void addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, ParamTransport extraParam)(Code) | | Registers a new DOM org.w3c.dom.events.EventListener with
document default synchronization mode and AJAX timeout, the specified extra
parameter and no custom JavaScript code.
Parameters: target - target element. Can not be null. Parameters: type - the DOM event type name (click, change etc). Parameters: listener - the listener to receive events. Parameters: useCapture - if event capture is enabled. False is the most portable value (MSIE v6 does not support event capture). Parameters: extraParam - client to server data transport and synchronization rule. See Also: ItsNatDocument.addEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean,int,org.itsnat.core.event.ParamTransport[],String,long) |
addEventListener | public void addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, ParamTransport[] extraParams)(Code) | | Registers a new DOM org.w3c.dom.events.EventListener with
document default synchronization mode and AJAX timeout, the specified extra
parameters and no custom JavaScript code.
Parameters: target - target element. Can not be null. Parameters: type - the DOM event type name (click, change etc). Parameters: listener - the listener to receive events. Parameters: useCapture - if event capture is enabled. False is the most portable value (MSIE v6 does not support event capture). Parameters: extraParams - client to server data transport and synchronization rules. See Also: ItsNatDocument.addEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean,int,org.itsnat.core.event.ParamTransport[],String,long) |
addEventListener | public void addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, String preSendCode)(Code) | | Registers a new DOM org.w3c.dom.events.EventListener with
document default synchronization mode and AJAX timeout, no extra
parameters and the specified custom JavaScript code.
Parameters: target - target element. Can not be null. Parameters: type - the DOM event type name (click, change etc). Parameters: listener - the listener to receive events. Parameters: useCapture - if event capture is enabled. False is the most portable value (MSIE v6 does not support event capture). Parameters: preSendCode - custom JavaScript code to execute before an event of this listener type is fired. See Also: ItsNatDocument.addEventListener(EventTarget,String,EventListener,boolean,int,ParamTransport[],String,long) |
addEventListener | public void addEventListener(EventTarget target, String type, EventListener listener, boolean useCapture, int syncMode, ParamTransport[] extraParams, String preSendCode, long ajaxTimeout)(Code) | | Registers a new DOM org.w3c.dom.events.EventListener .
When this listener is registered the server sends custom JavaScript code to register
a handler in the client side with the specified node target and DOM event type.
When an event is fired this handler forwards the client event to the server
and the registered listener receives an org.w3c.dom.events.Event with
the same client event data.
If two or more listeners are registered sharing the same node target and event type,
they all will receive the same event.
Parameters: target - target element. Can not be null. Parameters: type - the DOM event type name (click, change etc). Parameters: listener - the listener to receive events. Parameters: useCapture - if event capture is enabled. False is the most portable value (MSIE v6 does not support event capture). Parameters: syncMode - synchronization mode. Parameters: extraParams - optional client to server data transport and synchronization rules. May be null. Parameters: preSendCode - custom JavaScript code to execute before an event of this listener type is fired. May be null. Parameters: ajaxTimeout - the timeout of asynchronous AJAX events. If negative no timeout is defined. See Also: ItsNatDocument.removeEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean) See Also: SyncMode |
addMutationEventListener | public void addMutationEventListener(EventTarget target, EventListener listener, boolean useCapture, int syncMode, String preSendCode, long ajaxTimeout)(Code) | | Registers a new DOM org.w3c.dom.events.EventListener to receive any node mutation
as a mutation event fired by the client.
When a mutation event is received, this event carries the necessary
data to synchronize the server target element with the client. After this
automatic synchronization the listener is called.
Current implementation does the following:
ParamTransport[] params = new ParamTransport[]{ new ClientMutation() };
addEventListener(target,"DOMAttrModified",listener,useCapture,syncMode,params,preSendCode,ajaxTimeout);
addEventListener(target,"DOMNodeInserted",listener,useCapture,syncMode,params,preSendCode,ajaxTimeout);
addEventListener(target,"DOMNodeRemoved",listener,useCapture,syncMode,params,preSendCode,ajaxTimeout);
addEventListener(target,"DOMCharacterDataModified",listener,useCapture,syncMode,params,preSendCode,ajaxTimeout);
If the target is the org.w3c.dom.Document object, every document change in the client
us automatically synchronized in the server.
Mutation events only works with Mozilla/FireFox (MSIE 6 does not support W3C DOM mutation events).
Parameters: target - target element. Can not be null. Parameters: listener - the listener to receive events. Parameters: useCapture - if event capture is enabled. False is the most portable value (MSIE v6 does not support event capture). Parameters: syncMode - synchronization mode. Parameters: preSendCode - custom JavaScript code to execute before an event of this listener type is fired. May be null. Parameters: ajaxTimeout - the timeout of asynchronous AJAX events. If negative no timeout is defined. See Also: ItsNatDocument.removeMutationEventListener(org.w3c.dom.events.EventTarget,org.w3c.dom.events.EventListener,boolean) See Also: ItsNatDocument.addEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean,int,org.itsnat.core.event.ParamTransport[],String,long) |
addUserEventListener | public void addUserEventListener(EventTarget target, String name, EventListener listener, int syncMode, ParamTransport[] extraParams, String preSendCode, long ajaxTimeout)(Code) | | Registers a "user" EventListener .
When this listener is registered the server sends custom JavaScript code to register
a handler in the client side with the specified node target and name.
User events are fired in the client calling the ItsNat JavaScript method
fireUserEvent(targetNode,name,args) . For instance:
document.getItsNatDoc().fireUserEvent(document.body,"myUserAction",[ document.title, document.location ]);
Target node and name must be the same parameters used to register the listener.
org.itsnat.core.event.ParamTransport objects may be used
to transport client data (args parameter).
If two or more listeners are registered sharing the same node target and name,
they all will receive the same event fired by fireUserEvent with this
target/name pair.
Parameters: target - target element. Can not be null. Parameters: name - the user defined event type name. Parameters: listener - the listener to receive events. Parameters: syncMode - synchronization mode. Parameters: extraParams - optional client to server data transport and synchronization rules. May be null. Parameters: preSendCode - custom JavaScript code to execute before an event of this listener type is fired. May be null. Parameters: ajaxTimeout - the timeout of asynchronous AJAX events. If negative no timeout is defined. See Also: ItsNatDocument.removeUserEventListener(org.w3c.dom.events.EventTarget,String,EventListener) See Also: ItsNatDocument.addEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean,int,org.itsnat.core.event.ParamTransport[],String,long) See Also: SyncMode |
createDefaultElementListStructure | public ElementListStructure createDefaultElementListStructure()(Code) | | Creates the default DOM element list structure. This structure
returns as content element the <td> element if the
item parent is a <tr> otherwise the item parent element.
the default structure. |
createDefaultElementRenderer | public ElementRenderer createDefaultElementRenderer()(Code) | | Creates the default DOM element renderer. This renderer writes the specified value
as a string into the first found text node.
the default renderer. |
createDefaultElementTableStructure | public ElementTableStructure createDefaultElementTableStructure()(Code) | | Creates the default DOM element table structure. This structure
returns as row content element the row parent element (itself),
and as cell content element the cell parent element (itself).
the default structure. |
createDefaultElementTreeNodeStructure | public ElementTreeNodeStructure createDefaultElementTreeNodeStructure()(Code) | | Creates the default DOM element tree node structure. This structure
is flexible enough to deal with several scenarios like tree-table,
no handle and icon etc.
The reference manual explains with examples
how this default structure works.
the default structure. |
createElementLabel | public ElementLabel createElementLabel(Element parentElement, boolean removePattern, ElementLabelRenderer renderer)(Code) | | Creates a pattern based DOM element label. The content of the element is used as the pattern to render the first
value.
Parameters: parentElement - the parent element of the label. Parameters: removePattern - if true the current content is removed, otherwise the label shows the current content. Parameters: renderer - the used label renderer. If null the default renderer is used. the element label. |
createElementTree | public ElementTree createElementTree(boolean treeTable, Element parentElement, boolean removePattern, ElementTreeNodeStructure structure, ElementTreeNodeRenderer renderer)(Code) | | Creates a pattern based DOM element tree. The root node is the only one top level node
and is not fixed (removable).
Parameters: treeTable - if true the tree is a tree-table structurally. Parameters: parentElement - the parent element of the tree. Parameters: removePattern - if true the first node (the root node used as pattern) is removed, otherwise this node is the root. Parameters: structure - the used tree node structure. If null the default structure is used. Parameters: renderer - the used tree node renderer. If null the default renderer is used. the element tree. See Also: ItsNatDocument.createElementTree(boolean,Element,boolean) See Also: See Also: ItsNatDocument.createElementTreeNode(org.w3c.dom.Element,boolean,ElementTreeNodeStructure,ElementTreeNodeRenderer) See Also: ItsNatDocument.createElementTreeNodeList(boolean,Element,boolean,ElementTreeNodeStructure,ElementTreeNodeRenderer) |
createElementTreeNode | public ElementTreeNode createElementTreeNode(Element parentElement, boolean removePattern, ElementTreeNodeStructure structure, ElementTreeNodeRenderer renderer)(Code) | | Creates a pattern based DOM element tree node. This node is the fixed root of the tree.
Parameters: parentElement - the parent element of the node and tree. Parameters: removePattern - if true the pattern of child nodes (the first child if any) is removed, otherwise the child node list represents the current child node list. Parameters: structure - the used tree node structure. If null the default structure is used. Parameters: renderer - the used tree node renderer. If null the default renderer is used. the element tree node. See Also: ItsNatDocument.createElementTreeNode(org.w3c.dom.Element,boolean) See Also: ItsNatDocument.createElementTree(boolean,Element,boolean,ElementTreeNodeStructure,ElementTreeNodeRenderer) See Also: ItsNatDocument.createElementTreeNodeList(boolean,Element,boolean,ElementTreeNodeStructure,ElementTreeNodeRenderer) |
createElementTreeNodeList | public ElementTreeNodeList createElementTreeNodeList(boolean treeTable, Element parentElement, boolean removePattern, ElementTreeNodeStructure structure, ElementTreeNodeRenderer renderer)(Code) | | Creates a pattern based rootless DOM element tree.
Parameters: treeTable - if true the tree is a tree-table structurally. Parameters: parentElement - the parent element of the tree. Parameters: removePattern - if true the first child node is removed, otherwise the tree represents the current content (current top child nodes). Parameters: structure - the used tree node structure. If null the default structure is used. Parameters: renderer - the used tree node renderer. If null the default renderer is used. the rootless element tree. See Also: ItsNatDocument.createElementTreeNodeList(boolean,Element,boolean) See Also: See Also: ItsNatDocument.createElementTreeNode(org.w3c.dom.Element,boolean,ElementTreeNodeStructure,ElementTreeNodeRenderer) See Also: ItsNatDocument.createElementTree(boolean,Element,boolean,ElementTreeNodeStructure,ElementTreeNodeRenderer) |
createItsNatTimer | public ItsNatTimer createItsNatTimer()(Code) | | Creates a timer utility object.
a timer object. |
createItsNatVariableResolver | public ItsNatVariableResolver createItsNatVariableResolver()(Code) | | Creates a variable resolver bound to this document.
a variable resolver bound to this document. |
dispatchEventLocally | public boolean dispatchEventLocally(EventTarget target, Event evt) throws EventException(Code) | | Dispatches the specified event to the specified node target directly on the server.
The event is routed across the server DOM tree and dispatched to listeners as specified by the W3C DOM Events
standard including bubbling and capturing.
Parameters: target - the event target DOM object. Parameters: evt - the DOM event to send to target. |
getAJAXTimeout | public long getAJAXTimeout()(Code) | | Returns the default timeout of asynchronous AJAX events.
This feature is ignored in synchronous AJAX events
When an unfinished AJAX request takes more time than the specified timeout,
the request is aborted.
The default value is defined by
DocumentTemplate.getAJAXTimeout
the timeout of asynchronous AJAX events in miliseconds. See Also: ItsNatDocument.setAJAXTimeout(long) |
getAttributeNames | public Enumeration getAttributeNames()(Code) | | Returns an enumeration with the registered attribute names and values.
This method is symmetric to
ServletRequest.getAttributeNames() and
ServletContext.getAttributeNames() .
an enumeration with the registered attributes. See Also: ItsNatDocument.getAttribute(String) |
getClientDocumentOwner | public ClientDocument getClientDocumentOwner()(Code) | | Returns the document proxy of the owner of this document. This object represents
the browser document/page that requested (loaded) this document by first time (the owner).
the document proxy of the owner of this document. |
getCreationDate | public Date getCreationDate()(Code) | | Returns the date when this object was created.
the creation date. |
getDocument | public Document getDocument()(Code) | | Returns the org.w3c.dom.Document wrapped by this object. This is
the original Xerces document.
the wrapped Xerces Document object. |
getDocumentTemplate | public DocumentTemplate getDocumentTemplate()(Code) | | Returns the template this document is based on.
the template of this document. |
getId | public String getId()(Code) | | Returns the client identity. This value is unique per
ItsNatSession and never reused in this context.
The identity value is unique no other session-identified object in the same session
shares the same id.
Although this object is garbage collected, the identity value is never reused
by another session-identified object in the same session.
the identity value. |
getItsNatComponentManager | public ItsNatComponentManager getItsNatComponentManager()(Code) | | Returns the component manager utility.
the component manager. |
getItsNatNode | public ItsNatNode getItsNatNode(Node node)(Code) | | Returns the
ItsNatNode object wrapping the specified object. The
returned object instance is ever the same for every concrete node and can be casted
to org.w3c.dom.Node.
If the specified node is already an
ItsNatNode returns self.
the wrapper node. |
getScriptUtil | public ScriptUtil getScriptUtil()(Code) | | Returns the scripting utility.
the scripting utility. |
isInvalid | public boolean isInvalid()(Code) | | Informs whether this document is invalid.
The document is marked as invalid when is unloaded (no more attached to a browser document/page).
Non-HTML (XML) documents are automatically invalidated after the XML generation.
If invalid the document is not found anymore on session registry (
ItsNatSession.getItsNatDocumentById(String) ).
true if this document is invalid. See Also: ItsNatDocument.setInvalid() |
removeAttribute | public void removeAttribute(String name)(Code) | | Unregisters the specified attribute with the given name.
This method is symmetric to
ServletRequest.removeAttribute(String) and
ServletContext.removeAttribute(String) .
Parameters: name - the attribute name. See Also: ItsNatDocument.getAttribute(String) |
removeEventListener | public void removeEventListener(EventTarget target, String type, EventListener listener, boolean useCapture)(Code) | | Removes the listener registration with the specified node target, name, listener and capture.
Parameters: target - the target element. Can not be null. Parameters: type - the DOM event type name. Parameters: listener - the registered listener. Parameters: useCapture - event capture mode. See Also: ItsNatDocument.addEventListener(org.w3c.dom.events.EventTarget,String,org.w3c.dom.events.EventListener,boolean,int,org.itsnat.core.event.ParamTransport[],String,long) |
setAJAXTimeout | public void setAJAXTimeout(long timeout)(Code) | | Sets the default timeout of asynchronous AJAX events.
Parameters: timeout - the new timeout. If negative no timeout is defined. See Also: ItsNatDocument.getAJAXTimeout() |
setAttribute | public void setAttribute(String name, Object value)(Code) | | Registers the specified attribute name and value.
This method is symmetric to
ServletRequest.setAttribute(String,Object) and
ServletContext.setAttribute(String,Object) .
Parameters: name - the attribute name. Parameters: value - the attribute value. See Also: ItsNatDocument.getAttribute(String) |
setDefaultSyncMode | public void setDefaultSyncMode(int syncMode)(Code) | | Sets the default synchronous mode of AJAX events. Current defined event listeners
are not affected.
Parameters: syncMode - the new synchronous mode. See Also: ItsNatDocument.getDefaultSyncMode() |
setUsePatternMarkupToRender | public void setUsePatternMarkupToRender(boolean value)(Code) | | Sets whether dom utils and components use by default the original
(saved as pattern) markup to render.
Parameters: value - true to enable the use of original markup to render. See Also: ItsNatDocument.isUsePatternMarkupToRender() |
|
|