In Vaadin 7, pass data/arguments to new UI instance of BrowserWindowOpener?

前端 未结 1 948
悲&欢浪女
悲&欢浪女 2021-01-19 14:33

I am successfully opening new browser windows with BrowserWindowOpener.

Question: How do I pass some information to the newly instantiated UI subclass?

The

相关标签:
1条回答
  • 2021-01-19 15:19

    I have not tried this, but a quick look at the javadoc suggests that by using BrowserWindowOpener#setParameter or BrowserWindowOpener#setUriFragment you can pass parameters into the UI.

    E.g.

    BrowserWindowOpener bookOpener = new BrowserWindowOpener( BookUI.class );
    bookOpener.setParameter("startLetter", "A");
    
    ...
    
    class BookUI {
      protected abstract void init(VaadinRequest request){
        String startLetter = request.getParameter("startLetter");
        // Etc
      }
    } 
    
    0 讨论(0)
提交回复
热议问题