Announcement Announcement Module
Collapse
No announcement yet.
Using an enum class in Roo Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 11:55 AM.
Working...
X