CommMode
new name of SyncMode
, atribute names and values have changed).
This new mode has been only tested in MSIE 6+ and latest FireFox, Chrome, Opera and Safari browsers,
this new feature may work in any other browser supported by ItsNat (including mobile ones).
CommMode.SCRIPT*
modes) or to leverage with AJAX
old web applications/sites. This feature has only been tested on the prominent desktop browsers
(FireFox, MSIE 6+, Chrome, Safari, Opera), other supported browsers could work (not tested).
TemplateSource
object. This feature opens ItsNat
to build sophisticated front ends/proxies/filters of any web application/site.
An example of Google Search modified on demand is provided.
itsnat_read_only
(set to false) configures this mode.
ItsNatHTMLIFrame
component.
ItsNatServletContext.getMaxOpenDocumentsBySession()
is now 10,
and now it also limits the number of "attached server documents".
ClientErrorMode
is now a classSyncMode
is now the class CommMode
changed attribute names and values and added new modesItsNatDocument.getDefaultSyncMode()
=> ItsNatDocument.getCommMode()
ItsNatDocument.setDefaultSyncMode(int)
=> ItsNatDocument.setCommMode(int)
ItsNatDocumentTemplate.getDefaultSyncMode()
=> ItsNatDocumentTemplate.getCommMode()
ItsNatDocumentTemplate.setDefaultSyncMode(int)
=> ItsNatDocumentTemplate.setCommMode(int)
ItsNatServletConfig.getDefaultSyncMode()
=> ItsNatServletConfig.getCommMode()
ItsNatServletConfig.setDefaultSyncMode(int)
=> ItsNatServletConfig.setCommMode(int)
ItsNatServlet.registerItsNatDocumentTemplate(String,String,String)
=> ItsNatServlet.registerItsNatDocumentTemplate(String,String,Object)
ItsNatServlet.registerItsNatDocFragmentTemplate(String,String,String)
=> ItsNatServlet.registerItsNatDocFragmentTemplate(String,String,Object)
CometNotifier.getAJAXTimeout()
=> CometNotifier.getEventTimeout()
ItsNatAttachedClientEvent.getAJAXTimeout()
=> ItsNatAttachedClientEvent.getEventTimeout()
ItsNatDocument.getAJAXTimeout()
=> ItsNatDocument.getEventTimeout()
ItsNatDocument.setAJAXTimeout(long)
=> ItsNatDocument.setEventTimeout(long)
ItsNatDocumentTemplate.getAJAXTimeout()
=> ItsNatDocumentTemplate.getEventTimeout()
ItsNatDocumentTemplate.setAJAXTimeout(long)
=> ItsNatDocumentTemplate.setEventTimeout(long)
ItsNatServletConfig.getAJAXTimeout()
=> ItsNatServletConfig.getEventTimeout()
ItsNatServletConfig.setAJAXTimeout(long)
=> ItsNatServletConfig.setEventTimeout(long)
ItsNatDocumentTemplate.isAJAXEnabled()
=> ItsNatDocumentTemplate.isEventsEnabled()
ItsNatDocumentTemplate.setAJAXEnabled(boolean)
=> ItsNatDocumentTemplate.setEventsEnabled(boolean)
ItsNatServletConfig.isAJAXEnabled()
=> ItsNatServletConfig.isEventsEnabled()
ItsNatServletConfig.setAJAXEnabled(boolean)
=> ItsNatServletConfig.setEventsEnabled(boolean)
MarkupTemplate
,ItsNatDocumentTemplate
and ItsNatDocFragmentTemplate
moved to
org.itsnat.core.tmpl
package.
itsnat_read_only
with values true or false controls whether the client
is attached in view only mode (true) or full remote control (false).
itsnat_refresh_method
is now optional and has a new mode none
(no refresh events),
this is the default mode.
itsnat_syncmode
parameter is now itsnat_comm_mode
,
and uses the new values of CommMode
(former SyncMode
).
itsnat_ajaxtimeout
parameter is now itsnat_event_timeout
.
ItsNatHttpServletSession.getHttpSession()
returns
the current HttpSession
instance returned by HttpServletRequest.getSession()
of the last request, because, in spite of is very unusual, session instance may change
between requests for instance in Google App Engine. This problem only happens when
"session replication capable" feature is disabled (in GAE).
Event.getTarget()
now return null when the
node in server does not exist because is cached (into a static subtree).
Previously an exception was thrown.
ScriptUtil.getTransportableStringLiteral(String)
generates line breaks as \r\n sequence
if the document was loaded by MSIE. This also fixes problems with line breaks in <textarea> elements
dynamically added with some initial text content.
HttpSession.getMaxInactiveInternal()
returning a negative value (never timeout)
for instance in Jetty.
EventTarget.addEventListener(String,EventListener,boolean)
and EventTarget.removeEventListener(String,EventListener,boolean)
can be used
to register remote event listeners, DocumentEvent.createEvent(String)
can create remote events,
and EventTarget.dispatchEvent(Event)
redirects to ItsNatDocument.dispatchEvent(EventTarget,Event)
if the event is remote. The behavior of these methods is controlled by ItsNatNode.isInternalMode()
.
HTMLIFrameElement.getContentDocument()
, HTMLObjectElement.getContentDocument()
ItsNatHTMLEmbedElement.getContentDocument()
and ItsNatHTMLAppletElement.getContentDocument()
return the document loaded by an iframe/object/embed/applet in server. ItsNatHTMLEmbedElement
and
ItsNatHTMLAppletElement
are new interfaces implemented by <embed> and <applet> DOM nodes.
See "6.35 IFRAME/OBJECT/EMBED/APPLET AUTO-BINDING" in Manual and Feat. Show. examples.
ItsNatNode
,
this interface provides ItsNat extensions to the W3C DOM, for instance ItsNatNode.is/setInternalMode()
methods.
ItsNatDocument
no longer implements DocumentView
, now the DOM Document
object
implements this interface to access the default view object.
ItsNatDocument
no longer implements DocumentEvent
, now the DOM Document
object
implements this interface. The method createEvent(String)
is
now part of ItsNatDocument
interface.
Element
implements ElementCSSInlineStyle
, there is no need
to use a wrapper, in fact ItsNatDocument.getItsNatNode(Node)
has been removed.
ItsNatNode
, methods like ItsNatNode.isInternalMode()
and ItsNatNode.setInternalMode(boolean)
can be used to define:
EventTarget.addEventListener(String,EventListener,boolean)
or
EventTarget.removeEventListener(String,EventListener,boolean)
are called.
EventTarget.createEvent(String)
(internal or remote).
HTMLInputElement.focus()
generate JavaScript to execute this task in the client or do nothing.
Document.getElementById(String)
now works in non-HTML/XHTML documents
like pure SVG or XUL. No longer ItsNatDOMUtil.getElementById(String)
is needed
(this method remains useful for duplicates).
Document.getElementsByTagName()
.
application/xhtml+xml
)
and non-XHTML namespaces in general (SVG, XUL, MathML...).
ItsNatComponentManager
to ItsNatHTMLComponentManager
).
This is specially useful in SVG because SVG has not built-in input controls and some browsers support <foreignObject>.
Two methods have been added for GAE: ItsNatServletContext.isSessionReplicationCapable()
and ItsNatServletContext.setSessionReplicationCapable(boolean)
,
With GAE "session replication capable" feature must be set to true and user code must be serializable.
In this release ItsNat no longer use internally session attributes (HttpSession.setAttribute(String,Object)
is never called)
if "session replication capable" is set to false (the default value), this mode is preferred
in a single node/servlet container environment or multiple nodes and sticky sessions.
GAE needs a modified version of batik-dom.jar (batik-dom-gae.jar), read fw_dist/gae/README_GAE.txt
or in Reference Manual
(chapter "2.4.4 Google Application Engine support") for more info.
The Feature Showcase is partially working in GAE and deployed online here.
ItsNat.jar
archive and
can be automatically loaded by the ItsNat servlet when needed.
The old approach, useful for testing the JavaScript code of the framework, is
still available, the mode used is controlled by ItsNatServletConfig.setAddFrameworkScriptFiles(boolean)
and ItsNatServletConfig.setFrameworkScriptFilesBasePath(String)
and the same methods
in the template and document interfaces. If the first method is called with true
and the second with null
the internal copy is used.
Now ItsNatServletConfig.getFrameworkScriptFilesBasePath()
returns null by default, that is, the internal copy
is used (if ItsNatServletConfig.getAddFrameworkScriptFiles()
returns true).
If you want use the new automatic inclusion model simply remove or avoid any call to setAddFrameworkScriptFiles(boolean)
and setFrameworkScriptFilesBasePath(String)
and all is done because automatic inclusion is the default.
before
and after
of CreateItsNatComponentListener
, of user defined creation listeners, are executed when
specific component factory methods are called (for instance ItsNatComponentManager.createItsNatFreeLabel(Element,NameValue[])
).
This gives an opportunity to the developer to change/configure the standard component.
Because some specific factory methods support a null node as parameter, method before
of user defined creation listener
must be tolerant to this case (for instance add if (node == null) return null;
).
ItsNatModalLayer
): "Clean Below" mode works in SVG (and XUL) too .
ItsNatModalLayer.addUnexpectedEventListener(EventListener)
).
itsnat_wait_doc_timeout
.
itsnat_remctrl=true
for requesting remote view/control is now replaced by itsnat_action=attach_client
ItsNatRemoteCtrlEvent
to ItsNatAttachedClientEvent
ItsNatRemoteCtrlCometEvent
to ItsNatAttachedClientCometEvent
ItsNatRemoteCtrlTimerEvent
to ItsNatAttachedClientTimerEvent
ItsNatRemoteCtrlEventListener
to ItsNatAttachedClientEventListener
ItsNatServlet.addItsNatRemoteCtrlEventListener(...)
to ItsNatServlet.addItsNatAttachedClientEventListener(...)
ItsNatServlet.removeItsNatRemoteCtrlEventListener(...)
to ItsNatServlet.removeItsNatAttachedClientEventListener(...)
ItsNatDocumentTemplate.addItsNatRemoteCtrlEventListener(...)
to ItsNatDocumentTemplate.addItsNatAttachedClientEventListener(...)
ItsNatDocumentTemplate.removeItsNatRemoteCtrlEventListener(...)
to ItsNatDocumentTemplate.removeItsNatAttachedClientEventListener(...)
ItsNatDocument.addItsNatRemoteCtrlEventListener(...)
to ItsNatDocument.addItsNatAttachedClientEventListener(...)
ItsNatDocument.removeItsNatRemoteCtrlEventListener(...)
to ItsNatDocument.removeItsNatAttachedClientEventListener(...)
ItsNatComponent.hasFocus()
to ItsNatFormattedTextField.hasFocus()
MarkupTemplate.isDebugMode()
to ItsNatDocumentTemplate.isDebugMode()
MarkupTemplate.setDebugMode(boolean)
to ItsNatDocumentTemplate.setDebugMode(boolean)
MarkupTemplate.getClientErrorMode()
to ItsNatDocumentTemplate.getClientErrorMode()
MarkupTemplate.setClientErrorMode(int)
to ItsNatDocumentTemplate.setClientErrorMode(int)
ItsNatHTMLEmbedElement
ItsNatHTMLAppletElement
ItsNatServletContext.isSessionReplicationCapable()
ItsNatServletContext.setSessionReplicationCapable(boolean)
ItsNatNode.isInternalMode()
ItsNatNode.setInternalMode(boolean)
ItsNatDocument.createEvent(String)
ItsNatComponentManager.addCreateItsNatComponentListener(CreateItsNatComponentListener)
ItsNatComponentManager.removeCreateItsNatComponentListener(CreateItsNatComponentListener)
ItsNatTreeWalker.getFirstDeepestChildElement(Node)
NameValue.setValue(Object)
ItsNatComponent.addEventListener(String,EventListener,boolean)
.
Now event listeners can be dispatched before the default behavior of the component is executed.
ItsNatComponent.removeEventListener(String,EventListener,boolean)
ItsNatComponent.isDisposed()
ItsNatDOMUtil.createElementNS(String,String,String,Document)
ItsNatTreeWalker.getFirstChildElementWithTagNameNS(Node,String,String)
ItsNatModalLayer.addUnexpectedEventListener(EventListener)
ItsNatModalLayer.removeUnexpectedEventListener(EventListener)
ItsNatEventListenerChain.isStopped()
ItsNatDocument.getContainerNode()
ItsNatAttachedClientEvent.getWaitDocTimeout()
ItsNatDocument.getItsNatNode(Node)
ItsNatNode.getNode()
Event.preventDefault()
and Event.stopPropagation()
called from server are not working (JavaScript error).
<script>
using DOM fails in MSIE desktop in some circumstances.
ItsNatTimerHandle.cancel()
returns a wrong value.PocketIEUtil
and replaced with PocketIEMotoWebKitAdaptor
to adapt the HTML layout to Pocket IE and Motorola Symphony "on the fly"
using mutation and CreateItsNatComponentListener
listeners.
Note: yes really, the Feature Showcase runs now on Pocket IE, PocketIE support is testimonial
and must be seen as a challenge and an opportunity to show the power of ItsNat
in this browser, because the Feat. Show. is too big and complex for PIE, it works but some examples are executed too slowly.
UCWEBAdaptor
adapts the HTML layout to UCWEB 6.x.
Some workarounds applied may be no longer needed because UCWEB is proxy based and UCWEB server
behavior is being improved.
ItsNatFreeComboBox
component.
ItsNatModalLayer
component), this feature works in ALL supported browsers including Opera Mini and Pocket IE.
Pure SVG is supported too. Added "clean below" mode to ensure elements below the modal layer cannot be accessed in no way.
ElementRenderer
,
now replace the first text node containing "some" text, ignoring
spaces, tabs and line feeds. For instance:
<div> <b> Text Pattern </b> </div>The text node inside <b> (" Text Pattern ") is replaced with the new value.
setJoystickMode(true)
is not mandatory (links are necessary but now events traverse
the DOM tree then listeners registered in parent nodes will be executed).
ListSelectionModel
objects used on components (table, list multiple, tree) are not "touched" when the
components are being disposed (before this change elements in the selection model were removed).
This avoids useless de-selection events, selection state can be now queried after disposing the container component.
ItsNatEventListenerChain
.
ItsNatEvent.getItsNatDocument()
returns null.
A lost page is a browser page without an associated server page/document
because the servlet container or web application was reloaded, or session is expired or the document was invalidated in server.
This is an opportunity to control how the web application manages this situation (these "lost" AJAX events), for instance
returning to the client a window.location = window.location;
instruction.
itsnat_doc_name
with global request listeners: if a web page
is going to be loaded providing an itsnat_doc_name
parameter and there is no template
with this name, the global request listeners (servlet level) are dispatched.
ItsNatServletRequest.getItsNatDocument()
returns null but itsnat_doc_name
parameter is defined
(this fact may be used to distinguish this case from a custom request for instance to use pretty URLs).
ItsNatEvent.getItsNatDocument()
returns null.
This is an opportunity to return a user defined web page reporting this error.
ItsNatEvent.getItsNatDocument()
returns null.
This is an opportunity to control how the web application manages this situation, for instance
informing to the end user this situation using a JavaScript alert
.
CometNotifier
: added addEventListener
and removeEventListener
methods
to register user defined event listeners. These event listeners are dispatched when the client
is being to be notified and an opportunity to update the document accordingly.
CometNotifier
now inherits from ItsNatUserData
.
This interface is useful to share data between background threads and
web request threads. ItsNatUserData
methods are synchronized in this case.
ClientDocument
now ever holds a strong reference of the ItsNatDocument
including in remote view/control clients.
ItsNatRemoteCtrlEvent.OBSERVED_INVALID
phase and global property, user code
can ever ask to ItsNatDocument.isInvalid()
because ItsNatDocument
associated to the observer is ever accessible.
dispatchEvent
is no longer used.
Now the Feature Showcase example "Func. Testing Using Browser" works in NetFront.
select
with size
or multiple
attributes is buggy: change event is not ever fired,
ItsNat adds a workaround, change event is ever fired when clicked the control. Another bug: when a new option element is added the scroll is not updated, again
ItsNat adds a workaround (inserts and replaces again the select element).
multiple
attribute a change event
is automatically fired when blur is fired (as in iPhone) to avoid an Android bug. ItsNat
adds a transparent workaround to fix the Android bug
first option ever selected.
Both workarounds make this browser workable.
itsnat_msie_mobile.js
as itsnat_msie_pocket.js
.
getNativeEvent()
and setMustBeSent(boolean)
.
See "6.2.3 Custom pre-send JavaScript code" in Manual for details.
ItsNatDocumentTemplate.isMarkupDrivenComponents()
returns
the joystick mode.
option
is not updated in NetFront.
removeAttribute()
does not remove the style
attribute.
multiple
and/or size
attribute using appendChild/insertBefore
.
EventListener
).
GlobalEventListener
(registered on servlet level), end user is notified and
the page is automatically reloaded.
GlobalItsNatServletRequestListener
of template not found specified in itsnat_doc_name
An exception is thrown.
GlobalRemoteControlSupervision
(registered on servlet level).
Output is redirected to a specific error page.
GlobalRemoteControlSupervision
(registered on servlet level). A JavaScript alert
notifies to the end user about this situation.
PocketIEUtil
)
using AJAX, in spite of this most of examples are painfully slow and some of them do not work (they are not customized for PIE).
Edition in place is enabled in Pocket IE Free List, Table and Tree examples.
Because ItsNat adds bubbling (and capturing) to Pocket IE, setJoystickMode(true)
is not needed anymore, this implies PocketIEFreeListStructure
and PocketIETableStructure
are no longer necessary, PocketIEFreeComboBoxSelectionDecorator
and PocketIETableRowSelectionDecorator
have been updated accordingly.
FuncTestUsingBrowserUtil.dispatchEvent
method.
This example works in ALL supported browsers.
Fixed a serious bug (null pointer exception) related with node caching