Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Régis B
Call java method from javascript with vaadin
July 2, 2012 1:20 AM

Régis B

Rank: New Member

Posts: 9

Join Date: May 22, 2012

Recent Posts

Hi all,

I'm using Liferay 6.0 and Vaadin 6.8.

I'd like to have a client-side timer that call a java method. So i tried to do this :

executeJavaScript("window.setInterval(function(){my_java_method()};, 5000);");

But i think ther is something a little bit more complex to do...

If u can give me some ideas to do that...;


David H Nebinger
RE: Call java method from javascript with vaadin
July 2, 2012 5:19 AM

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 13217

Join Date: September 1, 2006

Recent Posts

Actually check out the Liferay IPC component as it's probably your best fit...

From the Vaadin side you'd register an event listener for the IPC message to wait on.

From the javascript side, you just fire the event w/o concern of whether it is being received by Vaadin, another JS routine, etc...

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!