1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
---
title: Creating a Generic Portlet in Eclipse
order: 2
layout: page
---
[[portal.eclipse]]
= Creating a Generic Portlet in Eclipse
Here we describe the creation of a generic portlet project in Eclipse. You can
use the Maven archetypes also in other IDEs or without an IDE.
For Liferay portlet development, you may instead want to use the Maven archetype
or Liferay IDE to create the project, as described in
<<dummy/../../../framework/portal/portal-liferay#portal.liferay,"Developing
Vaadin Portlets for Liferay">>.
[[portal.eclipse.vaadin]]
== Creating a Project with Vaadin Plugin
The Vaadin Plugin for Eclipse has a wizard for easy creation of generic portlet
projects. It creates a UI class and all the necessary descriptor files.
Creating a portlet project is almost identical to the creation of a regular
Vaadin servlet application project. For a full treatment of the New Project
Wizard and the possible options, please see
<<dummy/../../../framework/getting-started/getting-started-first-project#getting-started.first-project.creation,"Creating
the Project">>.
. Start creating a new project by selecting from the menu "File > New > Project..."+
//TODO Use ellipsis
//<?dbfo-need height="8cm" ?>
. In the [guilabel]#New Project# window that opens, select "Web > Vaadin 7 Project" and click [guibutton]#Next#.
//<?dbfo-need height="10cm" ?>
. In the [guilabel]#Vaadin Project# step, you need to set the basic web project
settings. You need to give at least the project name, the runtime, select
[guilabel]#Generic Portlet# for the [guilabel]#Deployment configuration#; the
default values should be good for the other settings.
ifdef::web[]
+
image::img/project-new-portlet-1.png[]
endif::web[]
+
You can click [guibutton]#Finish# here to use the defaults for the rest of the
settings, or click [guibutton]#Next#.
. The settings in the [guilabel]#Web Module# step define the basic servlet-related
settings and the structure of the web application project. All the settings are
pre-filled, and you should normally accept them as they are and click
[guibutton]#Next#.
. The [guilabel]#Vaadin project# step page has various Vaadin-specific application
settings. These are largely the same as for regular applications. Setting them
here is easiest - later some of the changes require changes in several different
files. The [guilabel]#Create portlet template# option should be automatically
selected. You can give another portlet title of you want. You can change most of
the settings afterward.
+
image::img/project-new-portlet-3.png[]
[guilabel]#Create project template#:: Creates a UI class and all the needed portlet deployment descriptors.
[guilabel]#Application name#:: The application name is used in the title of the browser window, which is
usually invisible in portlets, and as an identifier, either as is or with a
suffix, in various deployment descriptors.
[guilabel]#Base package name#:: Java package for the UI class.
[guilabel]#Application class name#:: Name of the UI class. The default is derived from the project name.
[guilabel]#Theme name#:: Name of the custom portlet theme to use.
[guilabel]#Portlet version#:: Same as in the project settings.
[guilabel]#Portlet title#:: The portlet title, defined in [filename]#portlet.xml#, can be used as the
display name of the portlet (at least in Liferay). The default value is the
project name. The title is also used as a short description in
[filename]#liferay-plugin-package.properties#.
[guilabel]#Vaadin version#:: Same as in the project settings.
+
Finally, click [guibutton]#Finish# to create the project.
. Eclipse may ask you to switch to J2EE perspective. A Dynamic Web Project uses an
external web server and the J2EE perspective provides tools to control the
server and manage application deployment. Click [guibutton]#Yes#.
|