Spring roo and the user interface

1.1k Views Asked by At

Imagine I have an Item entity and a Basket entity. The Basket may contain any number of items. The typical Spring Roo interface for the basket might look something like this: enter image description here

Lets say I want to add another button to the basket list, perhaps a checkout button. What would be the best way of going about that? Also assuming I haven't yet finished with my entities and Roo might re-generate alot of stuff.

I thought about modifying the tags, but I'm quite new to MVC, spring and jsp so battling through at the moment.

2

There are 2 best solutions below

1
On

I tend to treat the Roo Scaffold application as just that: a scaffold that I can build my own user interface around. I'm more familiar with the GWT-generated interfaces, but I assume the Spring MVC world is about the same.

Roo does a great job of creating all the junk necessary for maintaining the data model of an application, but a good user interface is still going to take some custom code. In the GWT world, Roo does a good job of illustrating the best practices for implementing a UI. I would suggest studying how the Scaffold application works, and then duplicating the pieces you need while adding all the custom bits as well.

Might seem daunting at first, but if it were easy everyone would do it!

0
On

Create a custom Roo controller. It would also put an entry to the menu.jspx file as well.

You can use the following Roo command for this.

controller class --class ~.web.MyCustomController