Documentation

Designing Object Views

Available Liferay DXP 7.4 U10+ and Portal 7.4 GA14+

Object views define tables for displaying entries in an Object’s application page. By default, Liferay automatically generates a default view for each published Object. This view orders all entry fields alphabetically. You can, however, design custom views to determine which Object fields are included in the table and how they’re ordered.

Design custom views for displaying Object entries.

Note

Custom views can only be added to custom Objects. They cannot be added to system Objects.

Follow these steps to design a custom Object view:

  1. Open the Global Menu (Global Menu), click the Control Panel tab, and go to Objects.

  2. Begin editing the desired Object.

    Note

    You can add views to both draft and published Objects.

  3. Go to the Views tab and click the Add button (Add Button).

  4. Enter a name and click Save to create a new blank view. You can now add fields to it.

    Create a blank view.

  5. Click the view to begin editing it.

  6. In the Basic Info tab, determine whether to use the view as default.

    Note

    This ensures the view is used for the Object’s application page. If no custom layout is selected as default, the Object uses its automatically generated layout.

    Set the view as default.

  7. Go to the View Builder tab and click the Add button (Add Button).

  8. Check all fields you want to include in the view table and click Save. Each selected field is used as a column in the application page table.

    Available options include both custom fields and general metadata fields (i.e., ID, Author, Creation Date, Modified Date, and Workflow Status).

    Note

    Views do not support columns containing multiple entries (e.g., Many to Many relationship fields).

    Arrange the fields in any order you want.

  9. Drag and drop fields to arrange their order.

  10. (Optional) Change or localize the display name for each view column.

  11. Click Save.

Once saved, the custom view is used to display the Object’s entries.

Tip

For 7.4 U21+, you can duplicate a view by clicking its Actions button (Actions Button) and selecting Duplicate. This creates a complete copy of the original view with “(Copy)” appended to it’s name.

Renaming Columns

Available Liferay DXP 7.4 U21+ and Portal 7.4 GA21+

Follow these steps to change or localize the display name of view columns:

  1. Select the desired view and go to the View Builder tab.

  2. Click the Actions button (Actions Button) for the desired column and select Edit.

    Click the Actions button for the desired column and select Edit.

  3. Enter a localizable name into the Column Label field and click Edit.

    Enter a localizable name and click Edit.

  4. Click Save.

Setting a Default Sorting

Available Liferay DXP 7.4 U18+ and Portal 7.4 GA18+

Follow these steps to set the default ordering/sorting for Object View columns:

  1. Select the desired view, go to the Default Sort tab, and click the Add button (Add Button).

    Go to the Default Sort tab and click the Add button.

  2. Select a column and sorting order (i.e., Ascending or Descending).

    Select a column and sorting.

  3. Click Save.

Object entries are now sorted according to your default sorting.

If you create multiple default sorts, you can rearrange them to determine which is applied to the view. The view uses the sort that’s placed first.

Arrange sortings to determine which is used.

Filtering Views

Coming Soon!