Montag, 17. November 2014

Extend Session indefinitely

Here's a little JavaScript that will extend the Liferay session indefinitely:

AUI().use('liferay-session', function(A) {
    A.setInterval(function () {
        Liferay.Session.extend();
    }, 60000);
});

Save this in webapp/resources/scripts/liferaySessionExtender.js and include it in the template.xhml;

<h:outputscript library="scripts" name="liferaySessionExtender.js"/>

Keine Kommentare:

Kommentar veröffentlichen