diff options
Diffstat (limited to 'documentation/portal/portal-liferay.asciidoc')
-rw-r--r-- | documentation/portal/portal-liferay.asciidoc | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/documentation/portal/portal-liferay.asciidoc b/documentation/portal/portal-liferay.asciidoc index dd4ea7d14d..f3a32372c6 100644 --- a/documentation/portal/portal-liferay.asciidoc +++ b/documentation/portal/portal-liferay.asciidoc @@ -1,34 +1,35 @@ --- title: Developing Vaadin Portlets for Liferay -order: 3 +order: 4 layout: page --- [[portal.liferay]] = Developing Vaadin Portlets for Liferay -*_This section has not yet been updated for Vaadin Framework 8._* - A Vaadin portlet requires resources such as the server-side Vaadin libraries, a -theme, and a widget set. You have two basic ways to deploy these: either -globally in Liferay, so that the resources are shared between all Vaadin -portlets, or as self-contained WARs, where each portlet carries their own -resources. - -The self-contained way is easier and more flexible to start with, as the -different portlets may have different versions of the resources. Currently, the -latest Maven archetypes support the self-contained portlets, while with portlets -created with the Vaadin Plugin for Eclipse only support globally deployed -resources. - -Using shared resources is more efficient when you have multiple Vaadin portlets -on the same page, as they can share the common resources. However, they must use -exactly same Vaadin version. This is recommended for production environments, -where you can even serve the theme and widget set from a front-end server. You -can install the shared resources as described in <<portal.liferay.install>>. +theme, and a widget set. You have three basic ways to deploy these: either +globally in Liferay so that the resources are shared between all Vaadin +portlets, as self-contained WARs where each portlet carries their own +resources or as OSGi bundles in Liferay 7. + +For Liferay 7 and OSGi portlets, see <<dummy/../../../framework/portal/portal-osgi#portal.osgi,"OSGi Portlets on Liferay 7">>. This is the recommended approach when using Vaadin 8.1 or later and Liferay 7. +Currently, the latest Maven archetype supports the OSGi approach. + +The material below applies mostly to non-OSGi portlets. + +== Developing Vaadin Portlets for Liferay 6.2 + +In non-OSGi environments, the self-contained approach to static resources is +easier and more flexible, as the different portlets may have different +versions of the resources. + +Using shared resources is not recommended as it forces all portlets on a page +to use the same Vaadin version and resources. If using this approach, you can +install the shared resources as described in <<portal.liferay.install>>. At the time of writing, the latest Liferay release 6.2 is bundled with a version -of Vaadin release 6. If you want to use Vaadin 7 portlets with shared resources, +of Vaadin release 6. If you want to use Vaadin 8 portlets with shared resources, you first need to remove the old ones as described in <<portal.liferay.remove>>. [[portal.liferay.profile]] @@ -118,6 +119,10 @@ Creation of Vaadin a Maven project is described in Vaadin with Maven">>. For a Liferay project, you should use the [literal]#++vaadin-archetype-liferay-portlet++#. +Note: For creating Liferay 6.2 projects for Vaadin Framework 8.1, use the 8.0 +version of the archetype and then update the dependency versions for Vaadin +Framework. + [[portal.liferay.project.archetype-parameters]] === Archetype Parameters @@ -164,9 +169,8 @@ long as you have a single portlet, but causes a problem if you have multiple portlets. To solve this, Vaadin portlets need to use a globally installed widget set, theme, and Vaadin libraries. -__Liferay 6.2, which is the latest Liferay version at the time of publication of -this book, comes bundled with an older Vaadin 6 version. If you want to use -Vaadin 7, you need to remove the bundled version and install the newer one +__Liferay 6.2 comes bundled with an older Vaadin 6 version. If you want to use +Vaadin 8, you need to remove the bundled version and install the newer one manually as described in this chapter.__ In these instructions, we assume that you use Liferay bundled with Apache @@ -218,19 +222,19 @@ copy their contents to [filename]#tomcat-x.x.x/webapps/ROOT/html/VAADIN#. + [subs="normal"] ---- -[prompt]#$# [command]#unzip# path-to/vaadin-server-7.1.0.jar 'VAADIN/*' +[prompt]#$# [command]#unzip# path-to/vaadin-server-8.1.0.jar 'VAADIN/*' ---- + [subs="normal"] ---- -[prompt]#$# [command]#unzip# path-to/vaadin-themes-7.1.0.jar 'VAADIN/*' +[prompt]#$# [command]#unzip# path-to/vaadin-themes-8.1.0.jar 'VAADIN/*' ---- + [subs="normal"] ---- -[prompt]#$# [command]#unzip# path-to/vaadin-client-compiled-7.1.0.jar 'VAADIN/*' +[prompt]#$# [command]#unzip# path-to/vaadin-client-compiled-8.1.0.jar 'VAADIN/*' ---- @@ -252,7 +256,7 @@ vaadin.widgetset=com.vaadin.server.DefaultWidgetSet # Theme to use # This is the default theme if nothing is specified -vaadin.theme=reindeer +vaadin.theme=valo ---- The allowed parameters are: @@ -266,7 +270,7 @@ application server; in Liferay with Tomcat it would be located at notation. If the parameter is not given, the default widget set is used. [parameter]#vaadin.theme#:: Name of the theme to use. If the parameter is not given, the default theme is -used, which is [literal]#++reindeer++#. +used, which is [literal]#++valo++#. |