How to correctly implement a DAO in a GWT web app?
问题 I have a couple of questions to be answered relating DAOs and GWT. I'm implementing a DAO class in the GWT project and I want to use it when a button is pressed, like this: (inside the .java GWT class) lookUpButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { lookup(); } }); ... ... ... private void lookup() { PersonDao dao = new PersonDao(); Person m = dao.getPerson(3); //hard-coded the pk of the person resultsFlexTable.setText(1, 0, m.toString()); I get two