aboutsummaryrefslogtreecommitdiffstats
path: root/documentation/portal/portal-ui.asciidoc
diff options
context:
space:
mode:
authorHenri Sara <henri.sara@gmail.com>2017-05-02 12:43:10 +0300
committerIlia Motornyi <elmot@vaadin.com>2017-05-02 12:43:10 +0300
commit1f070e124d628ea439a3369e99bbc07bdd917e8d (patch)
tree6bbb7557f64b3154a98437995594846b28486050 /documentation/portal/portal-ui.asciidoc
parentd0a64a804920bff30d586e7700af895247a1fad2 (diff)
downloadvaadin-framework-1f070e124d628ea439a3369e99bbc07bdd917e8d.tar.gz
vaadin-framework-1f070e124d628ea439a3369e99bbc07bdd917e8d.zip
Update portlet documentation for OSGi portlets
Diffstat (limited to 'documentation/portal/portal-ui.asciidoc')
-rw-r--r--documentation/portal/portal-ui.asciidoc49
1 files changed, 28 insertions, 21 deletions
diff --git a/documentation/portal/portal-ui.asciidoc b/documentation/portal/portal-ui.asciidoc
index 9983d8004c..4f5335a451 100644
--- a/documentation/portal/portal-ui.asciidoc
+++ b/documentation/portal/portal-ui.asciidoc
@@ -1,6 +1,6 @@
---
title: Portlet UI
-order: 4
+order: 2
layout: page
---
@@ -32,34 +32,19 @@ public class MyportletUI extends UI {
}
----
-If you created the project as a Servlet 3.0 project, the generated UI stub
-includes a static servlet class annotated with [classname]#@WebServlet#, as
-described in
-<<dummy/../../../framework/getting-started/getting-started-first-project#getting-started.first-project.exploring,"Exploring
-the Project">>.
-
-
-----
- @WebServlet(value = "/*", asyncSupported = true)
- @VaadinServletConfiguration(productionMode = false,
- ui = MyportletUI.class)
- public static class Servlet extends VaadinServlet {
- }
-----
-
-This enables running the portlet UI in a servlet container while developing it,
-which may be easier than deploying to a portal. For Servlet 2.4 projects, a
-[filename]#web.xml# is created.
+For OSGi portlets in Liferay 7, use additional annotations as described in
+<<dummy/../../../framework/portal/portal-osgi#portal.osgi,"OSGi Portlets on Liferay 7">>.
The portlet theme is defined with the [classname]#@Theme# annotation as usual.
The theme for the UI must match a theme installed in the portal. You can use any
of the built-in themes in Vaadin. If you use a custom theme, you need to
compile it to CSS with the theme compiler and install it in the portal under the
-[filename]#VAADIN/themes# context to be served statically.
+[filename]#VAADIN/themes# context to be served statically, or use the OSGi
+portlet mechanisms to publish the theme.
In addition to the UI class, you need the portlet descriptor files, Vaadin
libraries, and other files as described later.
-<<figure.portal.helloworld.project>> shows the complete project structure under
+<<figure.portal.helloworld.project>> shows a complete project structure under
Eclipse.
[[figure.portal.helloworld.project]]
@@ -73,5 +58,27 @@ application will show as illustrated in <<figure.portal.helloworld>>.
.Hello World Portlet
image::img/liferay-helloworld.png[]
+[[portal.ui.servlet]]
+== Testing Portlet UIs as Servlets
+
+If a portlet does not use any specific portlet APIs, deploying it as a servlet
+can make testing it easier than deploying it to a portal.
+
+If you created the project as a Servlet 3.0 project, the generated UI stub
+includes a static servlet class annotated with [classname]#@WebServlet#, as
+described in
+<<dummy/../../../framework/getting-started/getting-started-first-project#getting-started.first-project.exploring,"Exploring
+the Project">>.
+
+Otherwise, the following snippet can be used.
+
+----
+ @WebServlet(value = "/*", asyncSupported = true)
+ @VaadinServletConfiguration(productionMode = false,
+ ui = MyportletUI.class)
+ public static class Servlet extends VaadinServlet {
+ }
+----
+