O'Reilly logo

Liferay User Interface Development by Frank Yu, Xinsheng Chen, Jonas X. Yuan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Plugin

A plugin is used to add atomic functionality or features to a host object, which can be a node, a nodelist, or a widget.

In one use case, we need to load fresh content into a<div> block. While the HTTP request is going to the AS fetching data, we present a waiting sign over the<div> block. When the content comes to the browser, we replace the waiting sign with the latest content. Here is the code for us to do this in Alloy UI:

<div id="content1"></div> // ignore details AUI().ready('aui-io-plugin', 'aui-dialog', function(A) { var content1 = A.one('#content1'); content1.plug(A.Plugin.IO, { uri: '/snippet-portlet/jsp/snippet/views/assets/content.html', method: 'GET', data: { pluginusingkey1: 'value1', key2: 'value2' }, on: { success: function(event) ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required