UI to controller question

Hi, I’m new to vaadin and have some questions. Well, actually I’m new to web programming, and find that this framework works almost like desktop. That’s why I got interested in this vaadin. Let’s get to the questions:

  1. Normally in web apps architecture, in the web file (.xml), you arrange that reques with certain string pattern must go to this controller(servlet) or that controller. How do we do this with vaadin? any sample code?
  2. Does anyone have an example that has multiple forms (in one form, if you click something, you’ll be taken to other page)? I cant find any in the book of vaadin. An example that’s not too basic would really help.

Thanks a lot.

With Vaadin, you have a single application running, not separate controllers for each page. Once the application is loaded, it typically communicates between the browser and the server with short messages just telling what has changed (see
the archetecture chapter in the book
). Therefore, you need to map the path behind which the application should run as well as /VAADIN for static resources. Often it is easiest just to map /* (all paths). See
the book
for more details.

As for switching views, with Vaadin this typically happens by just changing a layout in a Vaadin window or a part of it. There are also various navigation frameworks in the
Directory
(AppFoundation, Navigator7, …) that can help you work with larger “views” and handle bookmarkability etc.