Vaadin XS with URL parameters

Hello,

I’m using Vaadin 6.8.8 and Vaadin XS 0.9.1 (the lastest version from Maven) and I have to pass some parameters to the application by URL.

I can load my application in a div but I can’t load my app with URI parameters. What is the way to get that?

I get a workarround that did the trick but I think it’s not a good practice.

First, I downloaded the the vaadin-xs source code from SVN and I compiled it. I’m not sure if this step is necessary. Then, in the div tag I call to URL with parameters and then I call to getEmbedJS.

<div style="border: 2px solid green; width: 1000px;">
    <script src="http://localhost:8080/myapp/parameter1/parameter2/parameter3" type="text/javascript"></script>
    <script src="http://localhost:8080/myapp/getEmbedJs" type="text/javascript"></script>
</div>

It is working but… is there a better solution?

Hi,

Yes, you definitely should build it yourself. The published version is very outdated will will not work on e.g. Safari with its default settings and probably also not on next FF versions either. The project has been practically abandoned since I have moved to develop our commercial products. But the SVN version is in quite ok shape and works fine for me in one of my hobby project.

If I remember correctly, parameters should be passed in the getEmbedJs call as in this example:
http://dev.vaadin.com/browser/svn/addons/XS/vaadin-xs/src/test/java/com/vaadin/addons/xs/TestAppWindow.java#L36

It is used by one of our clients so I hope it works :slight_smile:

cheers,
matti

Thanks you for your response. It works perfectly :-D, but I think the method comment is wrong because
initparam
returns
getEmbedJs
word too.

System.out.println(parameters.get("initparam")[0]
);

writes

getEmbedJs/parameter1-parameter2-parameter3

It’s not a big deal, just for notice it.

One more question :-), is it planned to continue with the project?

There are some plans to integrate equivalent functionality to Vaadin 7.x and discontinue the separate add-on, but it is not on the public roadmap at the moment so we cannot promise anything about it.

See
this blog post
.