Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
SpringControllers_it




JSPWiki v2.2.33

[RSS]


Hide Menu

ValidationAndListSpring_it


Difference between version 4 and version 3:

At line 116 changed 1 line.
To create a List screen (also called a master screen), we need to create methods that will return all the rows from our ''person'' table. Let's start by adding tests for these methods to our PersonDaoTest and PersonManagerTest classes. I usually name this method ''getEntities'' (i.e. getUsers), but you could also use ''getAll'' or ''search'' - it's really just a matter of personal preference.
Per creare una schermata elenco (chiamata anche schermata master), dobbiamo creare i metodi che restituiranno tutte le righe dalla nostra tabella ''person''. Iniziamo aggiungendo i test oer questi metodi alle nostre classi PersonDaoTest e PersonManagerTest. Di solito io chiamo questi metodi ''getEntities'' (i.e. getUsers), ma potresti usare anche ''getAll'' o ''search'' - si tratta davvero solo di una questione di preferenze personali.
At line 118 changed 1 line.
Open test/dao/**/dao/PersonDaoTest.java and add a ''testGetPeople'' method:
Apri test/dao/**/dao/PersonDaoTest.java ed aggiungi un metodo ''testGetPeople'':
At line 129 changed 1 line.
The reason I'm passing in a person object to the ''getPeople'' method is to allow for filtering (based on values in person) in the future. Adding this parameter in your getPeople() method signature is optional, but the rest of this tutorial assumes you have done this.
Il motivo per cui sto passando un oggetto person al metodo ''getPeople'' è per permettere di filtrare (basandomi sui valori in person) in futuro. Aggiungendo questo parametro alla firma del tuo metodo getPeople() è opzionale, ma il resto di questo tutorial assume che tu lo abbia fatto.
At line 131 changed 1 line.
Now open test/service/**/service/PersonManagerTest.java and add a ''testGetPeople'' method:
Ora apri test/service/**/service/PersonManagerTest.java ed aggiungi un metodo ''testGetPeople'':
At line 140 changed 1 line.
// set expected behavior on dao
// imposta il comportamento atteso sul dao
At line 150 changed 1 line.
In order for these tests to compile, you need to add the ''getPeople()'' method to the PersonDao and PersonManager interfaces, and their implementations.
Affinché questi test possano compilare, devi aggiungere il metodo ''getPeople()'' alle interfacce PersonDao e PersonManager, e la relativa implementazione.
At line 153 changed 1 line.
Open src/dao/**/dao/PersonDao.java and add the getPeople() method signature:
Apri src/dao/**/dao/PersonDao.java ed aggiungi la firma del metodo getPeople():

Back to ValidationAndListSpring_it, or to the Page History.