Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT uiBinder works with inheritence?

I have a base class for a CRUD form to my models. In the template of this class i have a save button.

In the extended class i have many fields relative to the specific model, but not the save button.

Every time i call createAndBindUi in the child model, a error throws that i don't have a save button.

Anyone knows how to do this correctly? Can post the solution.

like image 740
juliano Avatar asked Dec 11 '25 08:12

juliano


1 Answers

If you need to use UiBinder in both the superclass and the subclass, then you have a design issue. Use composition over inheritance and that'll also solve your UiBinder issues.

There are hacks/workarounds though, but the idea is always to not use the same object as the subject for 2 UiBinder templates.

There are plenty of discussions on UiBinder and inheritance on the GWT forum (not that much on SO though): https://groups.google.com/d/searchin/google-web-toolkit/uibinder%20inheritance

like image 116
Thomas Broyer Avatar answered Dec 14 '25 02:12

Thomas Broyer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!