Design Questions

Hi,

I have a question about website navigation. I want to do a personal website to show some photos I shot. I want to make them in groups, like family, animal, street, city, countryside and as such. I basically have a toolbar at the top of the VerticalLayout, in the toolbar, there are these link style button. I add the click listen. Every time, I will remove all the component from the base VerticalLayout and add new things. I feel this is not very smart. What I want is that it will open a new tab in the browser with a different link.

Say, when I initially start the homepage, it will be something like http//sample.com/home
This will show the home page, the top toolbar and some sample pictures.
Then, when user click the animal button, I want it open a new tab in the browser with http://sample.com/animal and display that photos.

Is this possible? One way I can think of is that create different project and export different .war file and upload to tomcat server. But this seems to be very heavy work. I read some other post, and I tried the subWindow. It is not the tab and I don’t like it. I also saw the native window in the sampler. That is close, but I still prefer a new tab in the browser.

Thanks,

Hi,

You can’t explicitly open a tab in the browser (there is no such concept in javascript), only new windows, but modern browsers will actually open a new window as a new tab instead (the one in sampler does not, because of how it’s configured). So basically, a native window is exactly what you need. Either by adding the windows to the application preemptively, or by overriding Application.getWindow() - I would recommend the latter.

Hope this short summary points you in the right direction!

Best Regards,
Marc