I am trying to find the source code of demo.vaadin.com.
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.
public class V1Application extends Application
{ @Override
public void init()
{
Window mainWindow = new Window(“V1 Application”);
Label label = new Label(“Hello Vaadin user”);
mainWindow.addComponent(label);
setMainWindow(mainWindow);
// Create the URI fragment utility
final UriFragmentUtility urifu = new UriFragmentUtility();
mainWindow.addComponent(urifu);
System.out.println("fragment test1:" + urifu.getFragment());
Timer t = new Timer();
t.schedule(new TimerTask(){
@Override
public void run()
{
System.out.println("fragment test2:" + urifu.getFragment());
}}, 60000);
}
The main page at
http://demo.vaadin.com 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
here .
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 (vaadin-all-7.4.4.zip) and it doesn’t contain any source code for the demo which can be seen here - http://demo.vaadin.com/ReindeerTheme/
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
book-examples are nowadays in Github at
https://github.com/vaadin/book-examples , 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).
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.