它应该很简单,但我无法弄清楚..我有这个代码:
Form<?> form2 = new Form<Void>("form2") {
@Override
protected void onSubmit() {
...
dataView = new DataView("listview", new ListDataProvider(list));
...
}
}
add(dataView);
如何定义dataView以及在哪里?如果我尝试final DataView dataView = null;
发生错误:The final local variable dataView cannot be assigned, since it is defined in an enclosing type