Monday, May 9, 2011

JRapid Quick Tip 1: Link Lists in Panels

Entites defined in a JRapid project generate default forms and lists to allow end users to perform CRUD operations. These are HTML files that are stored in a folder in the WebContent public directory of your application. Panels are used to tie all these files together and offer the end user a way of accessing the different lists and forms without having to type the URL into their browser’s address bar.

Panels may include a generated menu bar that provides access to every entity’s list that defines a menu attribute value. The menu options are grouped according to the value of this attribute and order alphabetically. Panels can also make use of the menu attribute so that the user may jump from one panel to another.


Take a look at the code for the Sample CRM here to see this attribute in use.

Another very useful feature of Panels is that you may embed listings or forms into them. You can include as many listings as you need and use accordions to visually stack them.


This is done by using the accordeonitem and listing elements.

And last, the main purpose of this quick tip is to show how two listings can be linked. In the CRM sample app the Customers and Opportunities listings in the Index panel are linked together. When a customer is selected in the Customers listing, the Opportunities lists only the records that belong to this customer.





You can also embed forms into your panels and link them with listings. Use the form element for this.

You may also include raw HTML in your panels. If you need a higher level of customization, you can always create your own HTML files and implement your panels as needed.


Visit JRapid, sign up and give it a try!

1 comment:

  1. You have really paid attention to details while writing this article.
    Extreme Java

    ReplyDelete