Foren
Vaadin REFRESH
mehmet tasar, geändert vor 11 Jahren.
Vaadin REFRESH
Junior Member Beiträge: 49 Beitrittsdatum: 06.03.11 Neueste Beiträge
Hi All,
I started to switch from alloy to vaadin.
But i have got a trouble with Vaadin Form. I will tell an easy way.
I have two portlet. In first portlet, I populate a select component from database. it is working properly.
In second portlet, I get new data from user for first portlet's select component. But cannot repopulate the first portlet in current user session.
How can I refresh the first portlet's window?
I started to switch from alloy to vaadin.
But i have got a trouble with Vaadin Form. I will tell an easy way.
I have two portlet. In first portlet, I populate a select component from database. it is working properly.
In second portlet, I get new data from user for first portlet's select component. But cannot repopulate the first portlet in current user session.
How can I refresh the first portlet's window?
David H Nebinger, geändert vor 11 Jahren.
RE: Vaadin REFRESH
Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträge
Use the Liferay IPC plugin to send messages between your portlets.
You could send the data collected in portlet 2 to the listener on portlet 1, or you could send a simple message indicating that portlet 1 should refresh itself...
Alternatively you could use the Refresher plugin in portlet 1. It will invoke a method on portlet 1 to allow you to refresh automatically on a timed basis.
You could send the data collected in portlet 2 to the listener on portlet 1, or you could send a simple message indicating that portlet 1 should refresh itself...
Alternatively you could use the Refresher plugin in portlet 1. It will invoke a method on portlet 1 to allow you to refresh automatically on a timed basis.
mehmet tasar, geändert vor 11 Jahren.
RE: Vaadin REFRESH
Junior Member Beiträge: 49 Beitrittsdatum: 06.03.11 Neueste BeiträgeDavid H Nebinger:
Use the Liferay IPC plugin to send messages between your portlets.
You could send the data collected in portlet 2 to the listener on portlet 1, or you could send a simple message indicating that portlet 1 should refresh itself...
Alternatively you could use the Refresher plugin in portlet 1. It will invoke a method on portlet 1 to allow you to refresh automatically on a timed basis.
Thanks David,
I used the Liferay IPC. It is working if portlets are on the same page.
When i put separate pages, first portlet is not refreshing.
Jack Bakker, geändert vor 11 Jahren.
RE: Vaadin REFRESH
Liferay Master Beiträge: 978 Beitrittsdatum: 03.01.10 Neueste Beiträge
I think instead of 'Liferay IPC plugin' that David meant to write 'Vaadin IPC' plugin ? (https://vaadin.com/directory#addon/vaadin-ipc-for-liferay)
Vaadin IPC plugin uses Javascript so, yeah same page only
In contrast, and more generically Liferay IPC can do send/receive between portlets when placed on different pages ; Rick Sezov's "Liferay in Action" gives some detail on this I think
Vaadin IPC plugin uses Javascript so, yeah same page only
In contrast, and more generically Liferay IPC can do send/receive between portlets when placed on different pages ; Rick Sezov's "Liferay in Action" gives some detail on this I think
mehmet tasar, geändert vor 11 Jahren.
RE: Vaadin REFRESH
Junior Member Beiträge: 49 Beitrittsdatum: 06.03.11 Neueste Beiträge
can you show me any example for Liferay IPC. is it working with vaadin?
Also I am searching a method like onload instead of init method.
so, if a user refresh the page, the window should be refresh too. because it is possible that another user can change this portlet's data.
Is there any a simple way for this issue?
Also I am searching a method like onload instead of init method.
so, if a user refresh the page, the window should be refresh too. because it is possible that another user can change this portlet's data.
Is there any a simple way for this issue?
Jack Bakker, geändert vor 11 Jahren.
RE: Vaadin REFRESH
Liferay Master Beiträge: 978 Beitrittsdatum: 03.01.10 Neueste Beiträgemehmet tasar:
can you show me any example for Liferay IPC
I like Rich Sezov's Liferay in Action book example for Liferay IPC (inter-portlet communication). I think there is at least one wiki on this too somewhere here at www.liferay.com.
mehmet tasar:
is it working with vaadin?
I've used Vaadin IPC Plugin and I've used Liferay IPC with MVCPortlet but haven't tried Liferay IPC with Vaadin.
mehmet tasar:
Also I am searching a method like onload instead of init method.
so, if a user refresh the page, the window should be refresh too. because it is possible that another user can change this portlet's data.
Is there any a simple way for this issue?
I can't tell if you are asking about refreshing only the Vaadin portlet or the entire browser window. There are ways for each.
David H Nebinger, geändert vor 11 Jahren.
RE: Vaadin REFRESH
Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträgemehmet tasar:
can you show me any example for Liferay IPC. is it working with vaadin?
Yes portlet events work with Vaadin. Here's a link for a basic implementation: http://demo.vaadin.com/6.2.0.pre1/docs/example-source/com/vaadin/demo/portlet/
Even though it says 6.2.0.pre1, the concepts are basically the same for all of Vaadin 6. May change under Vaadin 7, but since it's not out yet who knows?
mehmet tasar, geändert vor 11 Jahren.
RE: Vaadin REFRESH
Junior Member Beiträge: 49 Beitrittsdatum: 06.03.11 Neueste Beiträge
Thank you David,
As i mention above, is there any other simple method to refresh the page?
Because A lot of function can impact the current page's data, so it does not make sense to use IPC for every transaction.
As i mention above, is there any other simple method to refresh the page?
Because A lot of function can impact the current page's data, so it does not make sense to use IPC for every transaction.
David H Nebinger, geändert vor 11 Jahren.
RE: Vaadin REFRESH
Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste Beiträge
For that I'd use the refresher plugin.
It calls a method in your registered listener to refresh content.
It calls a method in your registered listener to refresh content.
David H Nebinger, geändert vor 11 Jahren.
RE: Vaadin REFRESH
Liferay Legend Beiträge: 14914 Beitrittsdatum: 02.09.06 Neueste BeiträgeJack Bakker:
I think instead of 'Liferay IPC plugin' that David meant to write 'Vaadin IPC' plugin ? (https://vaadin.com/directory#addon/vaadin-ipc-for-liferay)
Yeah, that's the right plugin but the Vaadin class that you end up using is LiferayIPC