You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

portal-eclipse.asciidoc 3.8KB

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