(Redirected from VaadinPlugin1.0.2)


Vaadin Plugin 1.1.0 Functionality


The Vaadin Plug-in version 1.1.0 for NetBeans is available for NetBeans 7.4. You can get it from Plugin Portal.

Improved Vaadin Widget Wizards

Now it's possible to finish wizard either right away or go to the next page and choose component to inherit.

File:Extended-component-wizard.png File:Extended-component-wizard-super.png

In the first case wizard generates the same code as previously (only server side component and its connector). In the second case wizard generates server side component which extends selected class, connector class which extends selected component's connector (or AbstractComponentConnector if there is no attached connector) and widget class which extends widget class used in the selected component's connector (again if there is attached connector and it uses some specific widget class).

Here is an example for the component generated via wizard using Button as a component to inherit:

           import com.vaadin.ui.Button;

           public class NewComponent1 extends Button {
               public NewComponent1() {

           import com.mycompany.mavenproject1.NewComponent1;
           import com.vaadin.client.ui.button.ButtonConnector;
           import com.vaadin.shared.ui.Connect;

           public class NewComponent1Connector extends ButtonConnector {
               public NewComponent1Connector() {
               public NewComponent1Widget getWidget() {
                   return (NewComponent1Widget) super.getWidget();

           import com.vaadin.client.ui.VButton;

           public class NewComponent1Widget extends VButton {
               public static final String CLASSNAME = "newcomponent1";
               public NewComponent1Widget() {

Editor assistance/hints enhancements

There are a number of checks implemented as editor hints along with fixes. Editor assistance could be used to develop custom Vaadin component instead of using wizards and writing a lot of routine code.

  • Assistance for State creation. If server side component or connector doesn't have getState() method defined then there will be an editor hint to create State class and add getState() method into class and connected class.

File:Vaadin-labelex-component-state.png File:Vaadin-labelex-connector-state.png File:Vaadin-labelex-component-state-fixes.png


  • Check for AcceptCriterion class. If you use Vaadin DnD features then you may need to create custom implementation of AcceptCriterion class. This class has to be accompanied by client side class with @AcceptCriterion annotation. There is a check for this situation available.

File:Accept-criterion.png File:Accept-criterion-fix.png

  • Check for client side classes that report an editor error if there is no GWT module file. It's most likely an error to use client side classes without having GWT module file because GWT compiler will not be able to find those classes and compile them.

File:No-gwt-module-hint.png File:No-gwt-module-fix.png

  • Assistance hint to create a connector for server side classes extending Vaadin components. Editor attach a hint to server side component if there is no connector for it.

File:Vaadin-no-connector-hint.png File:Vaadin-no-connector-fixes.png

File:Vaadin-connector-dialog-fix.png File:Vaadin-connector-dialog-widget-fix.png

  • Check for Connector class without @Connect annotation.
File:Connector-without-connect-hint.png File:Connector-without-connect-fix.png

Directory Access

To simplify using Vaadin Add-On Directory we have implemented two features for you: Directory Browser and Directory Based Code Completion. See below for features description.

Directory Based Code Completion

This feature allows to add dependency and download Add-on automatically based on class names.

You can start typing class prefix in the editor and invoke code completion (Ctrl-Space). Resulting code completion items will contain classes from directory add-ons along with regular code completion items (classes from classpath). Those Add-On code completion items are not in the project's classpath. Documentation for such item contains information from Vaadin Directory.

This code completion distinguishes server side classes, client side classes and classes that are intended to be used only for tests. It means that code completion invoked somewhere inside server side class will contain only server side Add-On classes, and so on.


Add-On Code completion item is added as a Maven dependency in the project (into the pom.xml file) and downloaded when you select it. You have to confirm license agreement to use chosen Add-On.


There are also add-ons that released under several licenses. For those add-ons "License selection" dialog is shown.


You can configure this Code Completion feature via Vaadin preferences in common Options dialog: select main menu Tools->Options , Java category and Vaadin subcategory. It is possible to disable this feature at all and configure confirmation dialog behavior. Select an option "Only commercial Add-On requires confirmation" to avoid license confirmation dialog for Add-Ons under free license.


Directory Browser

Previously described code completion works only for indexed Add-Ons (index is internally available). But Directory also contains Add-Ons without Java code. F.e. such Add-Ons provide resources files (themes, etc.). One can use page to search available Add-Ons. But now there is no need to use external web browser to do that. Directory browser is available directly in the IDE. There is an action "Open Add-Ons Browser" under "Vaadin" popup menu item which you can use to open Directory browser.



You can search Add-Ons by criteria, choose Add-On from the list and add it to the project. Add-On will be added as a dependency to the project (to the pom) and downloaded. In the same manner as above you will be asked to choose license in case it's multi-license and approve commercial license.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo