Extend GWT widget built using UIBinder
Asked Answered
M

1

14

I'm trying to extend a GWT widget that is built using UIBinder. UIBinder expects the fields in ui.xml to be in the extended widget. The problem that was well described by 'Blessed Geek' on Google Groups. Any tips/tricks?

Manny answered 14/4, 2010 at 18:16 Comment(0)
A
8

'Blessed Geek' found the right solution here: the caption is in a composition relationship with its panel. As such, it should use a different class (which could be a static inner class to keep things together).

In my experience, inheritance works with UiBinder, as long as your subclass' ui.xml file defines all the ui:field of its superclass. If it doesn't, then inheritance might not be the right pattern. (Naturally, you can always add fields in your subclass.)

Archiphoneme answered 14/4, 2010 at 21:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.