Ajaxable Vaadin portlet in Liferay 6.0

I’m using Vaadin 6.6.7 on Liferay 6.0.5. I want to render the portlets via Ajax on the page and I followed the work around for widgetsets specified in http://dev.vaadin.com/ticket/6977. But it doesnt work until I also compile the portlet using vaadin 7.0.0.alpha1. But our applications are written using vaadin 6.6.7 and migrating them to 7.0.0 looks like needs lot of code change. I’m hitting a lot of compilation error when I try to compile the portlets using 7.0.0 alpha1 version. Is there any other work arounds that I can use with 6.6.7 so that I’ll be able to render those portlets via ajax on the page.

Thank you for your help.

The fundamental issue is still that the standard GWT bootstrap javascript uses document.write, which can only work when the host page is being loaded.

How does it behave if you compile a widgetset for Vaadin 6.x using the xsiframe linker?

You might also be successful overwriting the document.write javascript function with a function that instead appends the written string as innerHTML to some element. This is however a very hacky approach that might cause other complications.

Hi Leif,
When I compile the widgetset using the xsiframe linker, I can see the liferay page loading and then when it tries to render the portlet via ajax, the page refreshes, but with no content. Basically I see a blank IE page. But with a sample portlet compiled with Vaadin 7.0.0 alpha1 version, I could render the portlet via ajax.

Thanks
Ratheesh

It seems the bootstrap javascript that is generated in AbstractApplicationPortlet.writeAjaxPageScriptWidgetset is also using document.write. I guess this would also have to be updated to instead create the DOM elements and inject them into the page to make the xsiframe workaround work.