Liferay custom portlet: usare AUI per disabilitare un pulsante se il valore di alcuni campi cambia

liferay-alloyIn una portlet web (nel nostro esempio ha la sola pagina view.jsp) a volte è necessario impedire all’utente di eseguire un’azione (ad esempio un click su un pulsante) se prima i dati inseriti non sono stati validati (lato server).

Supponiamo quindi di avere un button per eseguire la nostra azione, una serie di campi e il pulsante che valida e salva i dati.

Supponiamo che i nostri dati siano salvati tra le preferences della nostra portlet.

Quindi, all’inizio della pagina view.jsp leggeremo se la configurazione salvata in precedenza è valida.

Continua a leggere

Liferay: importing documents from a Domino server using BackgroundTask

The "current and Prevoius" table tasks.

Through the BackgroundTask framework available from the 6.2 release of Liferay has been possible to manage an import process.
Here you can find the code of the control panel portlet I developed and which imports the documents from a Notes database located on a remote Domino server: GitHub project

You can find also a wiki for the project (italian only, at the moment).

Please note: the portlet is “Under construction”…

The Liferay web form portlet modified

The standard Web Form portlet (available here in the Liferay Marketplace) does not have the ability to manage the upload of a file.
For a recent project I was asked to create a web form that would allow you to upload files and that would send to the author of the form a confirmation email (only if the author was a portal user).

Here on GitHub you can find the source code.

You can store the uploaded file in the file system or in a Documents and Media folder.

Some thing need to be improved like the data delete and export, but if you want now a web form with file upload capability…

Probably within the next month it will be available in the Liferay Marketplace.