Portlet 2.0/Liferay experts around?

Hi!

Joonas posted an
explanation and solution
to put a final word once and forever for quite nasty “Out of sync” problem. So far, so good and works fine for standalone apps. However, using Portlet container one will hit another wall with: apparently, com.vaadin.terminal.gwt.server.AbstractApplicationPortlet says:
“no URL for Application within a portlet”
on the method when it starts the entire application and sets suppose to set a current URL — it sets
null
instead.

What we can do about that?

Does that mean no multi-window for Liferay/Vaadin for ever or it just needs more implementation? Is there any workaround for that (talk about Vaadin 7 are great indeed, but still how about current or earlier versions, like 6.2.X)? I tried put some kind of URL’s but indeed this does not really works: container wants its own URL and either redirects to nowhere or just does not works at all by simply ignoring Vaadin part. So soes anybody knows what exactly needs to be done and what kind of URL Vaadin app expects, in order data streamed to the proper browser tabs/windows? Currently, if you return your newly created Window without opening it with the technique
as Joonas explained
, then on attempt to open a pop-up window within “second” tab will take no effect, while pop-up will be still opened later, however twice and also inside only “first” tab, since previous URL is preserved.

From what I see, Vaadin like sort of adds “/1_1/”, then “/1_2/”, then “/1_3/” etc sequence. Right now this way won’t really work with Portlet spec so esily, because it will interfere with the container itself and will end up with a very strange results. So does anyone has any idea how it can be applied to the Portlets anyhow?

Thanks!


Update

As to semi-satisfy customers (read: shut them up from complaining), at the moment I just return a dynamically created stub Window, instead of opening new instance with the new URL, with the message
“Application is can not be opened twice”
. Well, it works fine though — once you close all other tabs, this stub goes away and you’re back to the original application, but still
it would be extremely nice
if Vaadin would also support multi-windows within a Portlet…

Any ideas anyone? :slight_smile:

Vaadin Directory is a portlet 2.0 and uses multiple windows. It can be accomplished by leaving out the URL part of Joonas’ explanation. The limitation being however that a new window will be created if you refresh the browser

Artur, thanks!

Hmm, how strange: I did exactly the same way, but it does not works for me properly… The “highlights” part on a particular product in the Vaadin Directory — is it just a regular Window pop-up or something else? Because I have the same situation when a root window has a button for a child popup. However, if I click that button to open an another tab with the same portlet, the popup never shows up on a second tab, but opens on a first one.

May I see that Vaadin Dir portlet source code, where portlet part specifically implemented, please?

Thanks!

It should be a standard Window. Have you checked that you actually add the sub window to the current window and not to the main window?

Hi,
It is pretty old thread, but want to ask next.
As Artur told in portal enviroment on each refresh browser new window will be created, this will couse memory leak, since old windows will not be removed until application is closed.
How it can be handeled? Does Vaadin Directoy has same problem?

Thanks in advance,
Paul