Custom layout Javascript to server side call

My application is built in Vaadin however for a functionality I have used javascript i.e. I have made use of custom layout and data handling for that is done through ajax call using restful webservice. Now I have a context menu build in javascript in that custom layout and on click of that menu I want to navigate to another URL with Id parameter from javascript i.e. I want control on server side.

Please help me with this.
Thanks

So which part are you needing help with? Navigating to another URL from JavaScript can be done with window.location.assign (see https://developer.mozilla.org/en-US/docs/Web/API/Window/location ) and opening a new browser window can be done with window.open() (see https://developer.mozilla.org/en-US/docs/Web/API/Window/open).