-
Jun 21st, 2012, 10:46 AM
#1
Using an enum class in Roo
Hello,
I would like to display the values of an enum called ReportEnum using an HTML SELECT
in a Roo-generated menu. The ReportEnum entity was generate using the 'enum' command
on the Roo command-line, and has the following values: report1, report2, and report3.
How do I display the ReportEnum entity's values, in JSTL, in the menu.tagx file?
Furthermore, when users click a report (eg, report1), they should see the contents of an entity
called Customer, sorted according to the report's sort criteria (eg, by last name).
I have started writing the following controller:
@RequestMapping("/reports/**")
@Controller
public class ReportController {
public String index(Model uiModel) {
return "reports/show";
}
where 'show' is a jspx file which I have created in a 'reports' directory in WEB-INF.
Does the above controller look OK?
Last but not least, in show.jspx, how do I retrieve the report number passed by the SELECT,
and, most importantly, how do I retrieve data from the Customer entity?
Many thanks.
Philroc
Last edited by Philroc; Jun 21st, 2012 at 11:55 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules