Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Creating a Vaadin Project

Redirect
locationhttps://www.jetbrains.com/help/idea/getting-started-with-vaadin.html

IntelliJ IDEA lets you create a project and manage projects using Vaadin Framework that optimizes your Web applicatin development.

1. Create Vaadin Project with Project Wizard

Before you start creating your project make sure that Vaadin SDK is downloaded on your computer and Vaadin plugin is enabled.

Open

Project Wizard
span
classshortcut
Wiki Markup
{span:class=shortcut}Project Wizard{span}
, under Java or Java Enterprise , select Vaadin framework. Image Removed
If you selected Java then after selecting Vaadin you might want to specify the Application Server. Select Application Server check box and specify what server you want use for your application. The default application server is Tomcat.
Image Removed
If you selected Java Enterprise then the default application server is specified without additional steps.
Image Removed

 

Image Added

 

Specify the following settings:

  • Project SDK - specify your project SDK.
  • JavaEE version - specify the version of JavaEE or use the default option.
  • Application Server - specify the application server or use the default server. IntelliJ IDEA creates a run configuration for your Vaadin application.
  • Version - for IntelliJ IDEA 13 and later, you can choose either Vaadin 6 or 7 version.
  • Vaadin distribution - enter the location of Vaadin installation on your machine. If Vaadin is not installed, then the warning message with the appropriate link appears. Click the link, download "All-in-One Archive" ZIP file and unpack it to the disired location.
  • Create sample application - select this check box to either enter the name of the sample application or use the default name.
    Click Next.
    Specify your project information and click Finish.
    Image Modified

Creating Maven Project with Vaadin Archetype

In the Project Wizard, under Maven, select Create from archetype check box and click Add archetype. In the dialog that opens, enter maven GroupId, ArtifactId and Version.

Image Removed
After you click OK, the vaadin archetype is added to the list of available archetypes. Click Next.
Image Removed
On the next page, enter maven information for your project and click Next.
Image Removed
On the next page, enter your project infomation and click Finish.
Image Removed
IntelliJ IDEA creates a maven project with pom.xml. IntelliJ IDEA also recognizes that this is a Web application and creates webapp in your source directory.

Importing an Existing Vaadin Project

Configuring an Application Server

...

  • IntelliJ IDEA creates a project with Web application and all necessary configurations.

2. Run Vaadin Application

Since the application server is specified you can run Image Added your application and view the output in the default browser http://localhost:8080/.

Image Added

3. Debug Vaadin Application

IntelliJ IDEA lets you easily start a debugging session for your project.

Let's choose one of the debugging actions, for example, Toggle Line Brakepoint.

Place the caret on the desired line of the source code. Press

Wiki Markup
{span:class=shortcut}Ctrl{span}
+
Wiki Markup
{span:class=shortcut}F8{span}
or from the main menu select
Wiki Markup
{span:class=shortcut}Run{span}
 →
Wiki Markup
{span:class=shortcut}Toggle Line Breakpoint{span}
.

Image Added


Press

Wiki Markup
{span:class=shortcut}Shift{span}
+
Wiki Markup
{span:class=shortcut}Alt{span}
+
Wiki Markup
{span:class=shortcut}F9{span}
to start a debugging session.
Image Added

View the result in the Debugger console.

Image Added

Note
iconfalse

See also the tutorial Getting Started with Vaadin-Maven Projects to learn how to create and manage Vaadin-Maven projects.