Source Code of vaadin demo

I am trying to find the source code of
I am not looking for the code for the individual components and layouts which is presented with each example.
I am looking for the outer shell (application class implementation) which launches the whole application.

I invoke the web application with this url: http://localhost:8080/V1/#test
In the sample code below the output is:
fragment test1:null
fragment test2:test

I would like to be able to extract the fragment at launch so that I can decide what to display in the webpage.
In other words I would like to see fragment test1:test in the output

This is the problem I am trying to solve and it looks like it has been solved in the vaadin demo.

package com.example.v1;

import java.util.Timer;
import java.util.TimerTask;

import com.vaadin.Application;
import com.vaadin.ui.Label;
import com.vaadin.ui.UriFragmentUtility;
import com.vaadin.ui.Window;

public class V1Application extends Application
public void init()
Window mainWindow = new Window(“V1 Application”);
Label label = new Label(“Hello Vaadin user”);

    // Create the URI fragment utility
    final UriFragmentUtility urifu = new UriFragmentUtility();
    System.out.println("fragment test1:" + urifu.getFragment());
    Timer t = new Timer();
    t.schedule(new TimerTask(){

        public void run()
            System.out.println("fragment test2:" + urifu.getFragment());
        }}, 60000);


Which demo at the, exactly?

The main page at
is the demo application, which is included in the Vaadin installation package. See the book for instructions for running it. The main demo is the Sampler, for which you can find the sources on-line

Then there’s the separate
Book Examples
, for which the sources are

But if you’re looking for info about URI fragments, see the appropriate
and the
book section

Your code looks very odd. You can’t use getFragment() elsewhere but in a FragmentChangedListener.

I see this is a very old post, but it comes up each time I look to find the source code for the sampler.
Do you have an update version of the source code to download.
i’m looking at Vaadin for the first time and it would appear that instuctions I’ve found are to do with version 6 and not 7.

I’ve downloaded the full zip ( and it doesn’t contain any source code for the demo which can be seen here -

The sources for Sampler given above that work and can be seen here - don’t make it easy to download as I do not wish to go through them file at a time and it appears to be for version 6.5.

For demo purposes when building an app does Vaadin have an option to let the user right click to the show source files.

The full sources of the current Sampler are not publicly available; I think the reason is that it’s intended to be an interactive marketing presentation, with the animations and such, and not to serve as a code example as a whole. The source code of the individual examples can be viewed in the sample views (right panel), although there’s sometimes some relevant code missing.

The sources for the
are nowadays in Github at
, which you can also use to clone the project (building is not possible without at least Pro Tools subscription, because the project depends on the commercial add-ons).

You can find source code also for some other demos at the Vaadin Github at

Yes, thats exaclty what I found - the relevant code was not included…

I’m checking out the GIT repos now. Thanks.

Could you make the Sampler source code available? As Marko stated, there’s sometimes relevant code missing and the documentation is also lacking many times. It would be nice to see how the Vaadin guys solved certain issues.

So, Sampler source code would be available???