When I click my "Add Scheduler" button this panel displays as expected. The implementation is:

@Inject

Instance<AddSchedulerPanel> addSchedulerPanelInstance;

public void createAddSchedulerDialog() {

addSchedulerView = addSchedulerPanelInstance.get();

}

But now I'm trying to create a variation on this with:

public class EditSchedulerPanel extends AddSchedulerPanel {

@Inject

public EditSchedulerPanel(DataBinder<AddSchedulerModel> userBinder) {

super(userBinder);

}

}

So the only difference is that I am now extending the AddSchedulerPanel with EditSchedulerPanel. The extension has no additional behavior.

Now, when I click the "AddScheduler" button (not the EditScheduler button!) I get errors (see below). Something is null in the addSchedulerPanelInstance.get() call.

AddScheduler has a @PostConstruct method, but I can see in the debugger that it is not actually being called, so I'm not including it here. In fact, the constructor is not even being called before the error is issued.

It seems that there is something I'm missing in my instance creation. But what?