Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Ajax
Asynchronous Javascript And XML Acronym coined by Jesse James Garret, Adaptive Path Widespread use triggered by Googles online applications: gmail, maps.. Widespread use also triggered by more powerful browsers and client computers Zero-footprint rich user interface, still a web page
asyncMode=[enabled|disabled|compat_9_2]
These technologies are mutually exclusive
enabled turns on for desktop off for portlets
Desktop asyncMode=enabled
First Request
Browser
Http
Portal Servlet
text/html
DOM
subsequent
ajax.js
XHR
Portal Servlet
JSON
Portlet asyncContent=[ajax|iframe]
Browser
http
Portal Servlet
html
DOM
N+1
async.js
XHR/iframe
Portal Servlet
html
DOM
async.js
XHR/iframe
Portal Servlet
html
Desktop AsyncMode
Inter portlet communication Need context information (eg. PageBackingContext)
Http Request
text/html
First request, links wrapped in tag, Browser Refresh, Redirects, Page change links
XHR Request
What works/doesnt
While the goal is to just enable this feature and have everything work as before, only quicker. Reality Do Work
WSRP Threading
Cache
IPC All Portlet Types Nested Books
Tree Optimization
Customizations Themes Portlet States/Modes
XHTML
Limitations and
May never Work
Portlets that expect to be refreshed without any interaction Developer can call new method PortletBackingContext.setRenderOnAjaxRequest(boolean); Some javascript page events: onload(), onunload(), onbeforeunload() Next release mimic these events Delete button with old style look and feels
Disable
<render:context asyncContentDisabled="true">
Adds request param _portlet.async=false DesktopBackingContext.setAsyncMode(String mode);
Recommendation
near-term, we suggest using a framework like Dojo, as this has been used by many developers to create portlet content using AJAX. Use WLPs additional AJAX features like drag and drop tags
Demo