Dynamic Data Lists III

Company Blogs January 18, 2012 By Marcellus Tavares Staff

Hey all, this is the third post about Dynamic Data Lists ant it's focused on how to write the Lists Templates mentioned on the previous post.

As already said, List Templates provides all the flexibility needed to build your own UI. Within the templates context you will have access to all records and fields of these records for the configured list.
 
We're going to demonstrate this by creating a simple user registation list and then we'll diplay it diffrently using a velocity template.
 
First thing to do is to instantiate the Dynamic Data List Display portlet and create a new list. The definition of this list will have two fields: name (text field) and avatar (file upload field)  (Figure 1).
 
Figure 1 - List creation
 
After that we're ready to populate the list. Figure 2 shows the records added.
 
Figure 2 - User Registration records
 
Finally, in order to create templates click on the "Add List Template" icon (red mark in Figure 2). Then a pop-up will show up and you can either upload the template file or write one using the code editor. Here's the template used for this example:

And here's the end result:

Dynamic Data Lists II

Company Blogs July 25, 2011 By Marcellus Tavares Staff

In the second post of the DDL series I would like to present two more porlets related to the Dynamic Data Lists:

The first one is the Dynamic Data List Display. Its purpose is to exhibit a determined list, that is specified through its configuration window (Figure 1). There are two possible ways to display a given list: The default view (grid view) and the Spreadsheet view (Figure 2). If you uncheck the Spreadsheet view option, the default view will be used. The editable option is used to enable/disable the edition of a list. If it is unchked, the list will be presented in a read-only mode and the user will not be able to add or edit the list records.
 
 
Figure 1 - Dynamic Data List Display Configuration
 
Figure 2 - Dynamic Data List Display Spreedsheet view
 
In adition, with this portlet the user is also able to specify templates (aditional views) for the select list. There are two types of templates: the Detail and the List template.
 
The Detail template is used to modify (or restrict) the data definition fields that will appear during the form edition. It is also possible to adorn those fields with other field types, such as paragraph and fieldset.
 
The List template is used to display the list of records, It can be used if the user needs more flexibility to display a given  list. The user is able to speficy those templates on either freemarker or velocity language. I'll give more details of how to do create such templates  in the next post.
 
The second portlet is the Dynamic Data List Form (Figure 3). The DDL Form is a Liferay plugin and it needs to be deployed in order to be available for use. The purpose of the DDL Form is to provide a simpler way for user populate a list. Among its configuration options there's also the possibibility for defining the detail template and to enable/disbale multiple form submissions per user.
 
Figure 3 - Dynamic Data List Form portlet
 
 

Keep tuned for more updates!

Dynamic Data Lists I

Company Blogs July 12, 2011 By Marcellus Tavares Staff

One of the cool features that is coming in the next release of Liferay is the Dynamic Data Lists.

Basically, dynamic lists are a collection of information that you want to share. Lists resemble database tables. It supports various field types (data types) that you can use to create the metadata schema. Each item stored in a particular list shares that same schema.

With Dynamic Data Lists you can:

  • Graphically define the information to gather (schema)
  • Define how to display the information in detailed and list views (templates)
  • Define a workflow for approving captured information

In this first post, we are going to create a simple sign-up sheet for an event.

First, navigate to the Dynamic Data Lists portlet  in control panel (Figure 1).

Figure 1 - Dynamic Data Lists portlet

Then create a new list. In this step you need to either create a new schema or select an existing one (Figure 2). 

Figure 2 - Adding a new list and schema

And you are ready to populate the list. Click on Add Record button, fill the form (Figure 3) and that’s it! 

Figure 3 - Adding the list items

Figure 4 - List Items

 Keep Tuned for more updates! smiley

Showing 3 results.