123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- ---
- title: Creating a Generic Portlet in Eclipse
- order: 2
- layout: page
- ---
-
- [[portal.eclipse]]
- = Creating a Generic Portlet in Eclipse
-
- *_This section has not yet been updated for Vaadin Framework 8._*
-
- 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#.
-
-
-
-
|