You may still remember Ajax calls with jQuery in Chapter 6, Portlet User Interface. In this section, we make Ajax calls using Alloy UI API. Let us look at some code first:
<% ResourceURL rURL = renderResponse.createResourceURL(); %> // ignore details AUI().ready('aui-io-request', function(A) { // ignore details var io = A.io.request( '<%= rURL.toString() %>', { autoLoad: false, cache: false, on: { start: function(event, id) { log('-'); log(this.get('uri')); log('start'); }, success: function(event, id, xhr) { var data = this.get('responseData'); var out = (dataType.val() == 'json') ? A.JSON.stringify(data) : data; log('success: ' + out); }, complete: function(event, id, xhr) { log('complete'); }, failure: function(event, ...
No credit card required