Advice for popup windows needed

I’m currently migrating a Vaadin 6.8 application to Vaadin 7.3, I’m using two UI classes: MyAppUI.java and MyDocUI.java. MyAppUI is for the main window and MyDocUI is for the separate document windows. The main window has the url
…/myapp
and the document windows have the urls
…/myapp/mydoc_123
where 123 is the document id and therefor changes. I can open my document windows from inside the main window via a BrowserWindowOpener without problems.

Now my problem: I need to open the document windows also from outside of my Vaadin app i.e. via a link that is maybe coming from an email. How can I achieve this with Vaadin 7.3? I have a working solution for Vaadin 6.8 but that obviously doesn’t work anymore.

Any help is much appreciated.

I have an idea to resolve this issue, but is up to you if you wish to adopt it or not :stuck_out_tongue:


Sol 1:

Have a rest service that would service requests for various documents. So you have have a common class that returns a Resource/file either to Vaadin based web layer or Jax-RS’s Web layer.

From Vaadin you can display the resource just like the way you are doing now and in Rest services return the Resource as an attachment.


Sol 2:

Use the Vaadin’s Navigator framework to service these requests to Resources!

Also please let us know if you find a better solution, so that it helps us as well.

Thanks,
Krishna.

Hi Krishna,

thanks for your ideas. I will have a look at the Navigator, but I’m not sure if this is the right way because I don’t have resources to show. I need to open up a UI (MyDocUI in my case) with a given parameter (database id).

I think that Vaadin 7.3 must have a way to accomplish this, but I haven’t found it yet.

Maybe someone else has an idea?

Hi Andreas,

lemme summarize what are you trying to achieve, based on an ID, which can be either DB id or some other id, you have to display certain amount of data related to it.

I would suggest, Navigator would be a good option -for ex - Please check the current thread url - https://vaadin.com/forum#!/thread/9240421
Disecting it - thread takes you to a list of thread views and when you pass id which is 9240421 it takes you to the current thread.

Similarly, you can define a view/UI to display the required content and pass the id as part of url as a fragment while rendering the view read this fragment and display the associated records from the DB.


Important
: I hope you have proper authentication & Authorization mechanism in place if this is protected data.

Please let me know if this doesn’t help.

Thanks,
Krishna.