Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Add Buttons to Window Header
There have been many questions on this topic but most are quite old and as far as I can see no solution suggested.
Using 7.6.8 is there now any way to add buttons to a windows header?
I want to add some buttons with icons if at all possible.
you'll need to create a custom client-side widget to do that. Some steps to get you started:
* Extend the VWindow class to create a new Widget
* Override the protected constructDOM method. You can pretty much copy how the current close and minimize buttons are implemented in the superclass, you'll just need to decide out where in the DOM you want your new button-div (hint: the header is the root element's first child)
* Override the onBrowserEvent method. Again, you can pretty much copy what happens in VWindow. Check if the target is your new button and then call your custom logic, otherwise call the super class's method with the same event.
* Create a server side component that extends Window for using your new custom widget
* Create a Connector that extends WindowConnector to handle the client-server communication
* Use a server RPC to communicate with your server class
Hope this helps!
Thanks for your reply.
A little bit too involved for me at present.
I will stick with the standard window and use the standard header until/unless Vaadin adds this functionality :-)
not sure if the Vaadin Framework will pick up the feature in the near future, but that sounds like an excellent (and easy) add-on idea for an aspring open source developer.
Good luck with your project!