eric MC
eric MC

Reputation: 766

Spring Roo Create Controller & View

I'm making a Spring Roo application. I'm using hibernate with a Reverse Engineered MSSQL DB and I want to create a different version of list.jspx (similar but features a WHERE clause) called listtermianted. What steps do I need to take to create a new view that is populated with the same info as list.jspx just narrowed down based on the SQL?

Upvotes: 0

Views: 601

Answers (2)

Anbin Muniandy
Anbin Muniandy

Reputation: 724

It is not a good idea to modify the roo generated aj file. The roo documentation states that roo can in fact delete this file. Sadly, I don't have a solution for you.

Upvotes: 1

eric MC
eric MC

Reputation: 766

I was able to figure this out if anyone ever needs to do this. Create whatever methods with the proper SQL in the repsective jpa active record file. In controller_roo_controller.aj create a method (I just copied list and renamed it and referenced my methods I created in the java file). Then be sure to add the reference in views.xml. Finally create the actual file under views.

Upvotes: 0

Related Questions