如何调用每个刷新页面或当有人进入页面时的“加载”方法?
@Route
public class Gui extends VerticalLayout {
TextField textField;
DataManager dao;
@Autowired
public Gui(DataManager dao) {
this.dao = dao;
textField = new textField();
add(textField);
}
void load()
{
textField.setValue(dao.getNewName());
}
}