Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin portlet - Switch in Edit mode and save Prefereces
I'm trying to write a Vaadin 7.5 portlet to deploy on Liferay Portal 6.2
I'm looking for a simple Java example to understand how to switch from View to Edit mode and manage portlet preferences using Liferay API.
Please, any help ?
I don't know of example, but I do know it is possible. The problem with the "edit mode" in portlets is that you'd have to reload the portlet/page to get there. This is why quite many portlets just implement everything in the "view mode". E.g. with Vaadin it is easier and smoother for end users to build the edit mode just using a separate Vaadin class that you toggle with the "view mode".
Thank you Matti !
So before to toggle to the Vaadin class to edit the portlet preferences, how I can know that the user clicked the portal link to enetr in Edit mode ?
Thank you for your support !
Add PortletListener to VaadinPortletSession. Via it you'll get access to all low level porlet requests to detect the mode change. The class is currently deprecated, but don't care of that, depracation is will be removed in next release ;-)
Thank you Matti !!
Ooopsss... this depracation will be removed in next release ?
Maibe you are going to remove the Portlet support from Vaadin ??
I'm exploring Vaadin on Liferay platform for a long life project :-/
And no one using Liferay can stop to using it :-)
Thank you for any info on this !
No, portlet support is not going anyway. The VaadinPortletSession has just been deprecated for the whole time in 7 branch because the original developer thought he'd make some larger changes to it - so it has been depracted to warn people that things might change a bit in that part. Finally we have just become happy with the current implementation.
Vaadin is a really popular choise among Liferay developers, especially on larger projects.
Thank you for the good news ! :-)
I hope to embrace Vaadin soon to accelerate our development times actually bsed on Liferay's MVCPortlet.
Keep up your great work !