I have an InlineLabel subclass that I used in UIBinder. How can I inject a PlaceController into it via GIN, so that the widget can be used in UIBinder? (recall that UIBinder requires a no-args constructor.)
If that's not possible, what's the cleanest way to make a PlaceController available to a widget so that it can be used by the widget during onClick() events?
Edit:
I'm not sure MVP is really the best solution in this case (I'm happy to have you change my mind, however.)
I will have dozens of these InlineLabel instances declared in my UIBinder foo.ui.xml file. If I implement MVP, that means declaring each of these instances as @UiField members in the view. That gets rather unwieldy when I have so many of them. That's why I was hoping to inject the PlaceController into each of the InlineLabels in a semi-automated way, and avoid having to manually wire them into the view.
It would also be acceptable if there were a way to inject the presenter into each of the InlineLabels... then the delegation could be done something like:
public class MyInlineLabelSubclass {
// ...
public void onClick(ClickEvent event)
{
presenter.labelClicked(this);
}
}