Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

another problem or maybe only a question!?

Alexander Decker
6 years ago May 15, 2015 7:02am
Marc Englund
6 years ago May 15, 2015 2:20pm

Hi,

I'm not entirely sure what your problem is, but I think it might be that the new Vaadin Designer works differently than the old Visual Designer. In short, it will create a html file with the layout and a Java class that exposes the components to Java. Usually you want to extend the Java class, and add your logic - so in your case:

public class MessageThingsImpl extends MessageThings {
  // Your logic goes in this class
  public MessageThingsImpl() {
     find.addClickListener(...);
  }
}

I do recommend naming the design (the layout you make with the Designer) SomethingDesign or SomethingLayout. This way you'll end up with structures like:

  •  LoginDesign.html
  •  LoginDesign.java
  •  LoginView.java extends LoginDesign (<- your code)

or

  •  MainLayout.html
  •  MainLayout.java
  •  MainView.java extends MainLayout (<- your code)

(In some cases you might also use the design class (e.g LoginDesign) directly in compositions or such.)

Please review to chapter 10 in the Book of Vaadin for some more details: https://vaadin.com/book/-/page/designer.html

Did this answer your question?

Best Regards,
Marc

Alexander Decker
6 years ago May 15, 2015 10:35pm