You only need to specify ParentClass.this.something to fix the error. If your form does not have an invokeMe method, you can simply use the name without qualification, and the compiler should find it:
private Form<CriteriaBean> helpCreateCriteriaForm() { return new Form<CriteriaBean>(LocationPage.CRITERIA_FORM_ID) { @Override protected void onSubmit() { invokeMe(); } }; }
If a function exists in an inner inner class, there is no trick in Java to do this. Rather, rename or wrap your ViewBodyPanel.invokeMe method into something that is explicit.
public void vbpInvokeMe(){ invokeMe(); } private Form<CriteriaBean> helpCreateCriteriaForm() { return new Form<CriteriaBean>(LocationPage.CRITERIA_FORM_ID) { @Override protected void onSubmit() { vbpInvokeMe(); } }; }
source share