ItsNat provides two default implementations of this interface, these implementations are got calling {@link org.itsnat.core.ItsNatDocument#getScriptUtil()} or{@link org.itsnat.core.ClientDocument#getScriptUtil()}
If this utility object was got calling the method {@link org.itsnat.core.ItsNatDocument#getScriptUtil()}the generated JavaScript code must be sent to the client calling {@link org.itsnat.core.ItsNatDocument#addCodeToSend(Object)}, this JavaScript code will be received by all clients (owner and attached) of this document.
If this utility object was got calling the method {@link org.itsnat.core.ClientDocument#getScriptUtil()}the generated JavaScript code must be sent to the client calling {@link org.itsnat.core.ClientDocument#addCodeToSend(Object)}this JavaScript code will be received by the specified client (use ever the same client for generating and sending code).
When a DOM node is used a parameter this node must be part of the document tree (server and client) otherwise an exception is thrown, and the generated code must be sent as soon as possible to the client/s calling the appropriated method as explained before.
ItsNat generates JavaScript code referencing the specified node in client, when this utility object was got calling {@link org.itsnat.core.ItsNatDocument#getScriptUtil()}this reference is valid for all clients of the document (in spite of internal node caching ItsNat ensures the same internal caching id is used for all clients or no caching is used).
@author Jose Maria Arranz Santamaria
|
|
|
|
|
|
|
|