We generate a CRUD for each class. From the Roma console we type the following commands:
./roma.sh crud com.gesfor.scrooge.domain.User
./roma.sh crud com.gesfor.scrooge.domain.Product
./roma.sh crud com.gesfor.scrooge.domain.Expense
./roma.sh crud com.gesfor.scrooge.domain.Bill
./roma.sh crud com.gesfor.scrooge.domain.Saving
If we refresh the project in Eclipse, we could see that 5 new packages has been created under com.gesfor.scrooge.view.domain. They provide classes to manage and show persistent data using a browser with create, update and delete operations.
Now we edit the package.jdo inside com.gesfor.scrooge.domain to tell Roma which classes will be treated as persistents.
We also need to change the application flow to display the CRUD entry point when the user presses the "Edit User" button. Now we create a UserMain instance replacing the FlowAction line in HomePage.java class with this one: @FlowAction(next=UserMain.class)
0 Ficheros adjuntos