4.1 Creating a Custom Entry

The following procedures show you how to create a custom entry with a custom form and view. The example used in these procedures show you how to create a Time Off custom entry that can be added to a team workspace so that members can alert their team about the days when they plan to be out.

The following procedures and topics are included in this section:

4.1.1 Creating the Custom Entry

  1. From the Teaming Administration portlet on the initial Liferay portal window, click the plus sign (+) to the left of Form and view designers to expand this section and view the available designers. To add the Teaming Administration portlet to the Liferay portal window, click the Add Content link in the upper right corner. This brings up a panel of portlets along the left margin. Expand the Teaming section to add more Novell Teaming features, such as the Teaming Administration portlet.

    Novell Teaming Administration portlet
  2. Click Entry designer.

    Form and view designers
  3. In the Designers window that appears, click Entry definitions.

    Designers window
  4. On the right side of the window, click Add a new entry definition.

    Entry definitions
  5. In the Caption field, type the name for the entry that you want to see in Novell Teaming.

    Caption field
  6. In the Name field, type the name for this entry type.

    Name field
  7. Select the family for this entry from the Family list box.

    Select the item type that is closest to the function of the item you are creating. People can use the family type when performing filtered searches. This custom entry has an -unspecified- family.

    Family list box
  8. From the Allowed comment types list box, select the comment types you want to allow for this new custom entry (use the Ctrl key to select multiple comment types).

    Allowed comment types list box
  9. Click OK at the bottom of the entry form.

    OK button

    A custom entry named Time Off Entry now exists, which you can view under Entry definitions in the Entry Designer window.

    Entry definitions list

4.1.2 The Entry Designer Editing Window

The following image shows you the Designer window when working with a specific entry.

Figure 4-1 Entry Designer Window

Entry designer editing window

4.1.3 Creating a Custom Form for an Entry

  1. Click the plus sign (+) to the left of Entry form definition to expand this section.

    Entry form definition
  2. Click the plus sign (+) to the left of Form to expand this section and view the current elements in this form.

    Form elements
  3. Delete an element:

    1. Click the element (Description).

      Description element

      For this custom form, a simple text box element is going to be used instead of the Description element.

    2. In the options dialog that appears to the right, click the Delete option.

      Option dialog
    3. Click OK to confirm that you want to delete the Description element.

      Confirmation dialog

      The Description element is deleted and is removed from the Entry tree and the Form preview area.

  4. Hide an element from appearing in the form view:

    1. Click the element you want to hide (such as Attachments).

      Attachments element

      This custom entry is for entering your time off, so there is no need to attach files to these entries.

    2. In the options dialog, click Modify.

      Options dialog
    3. In the Attachments element form that appears, select the Hide this form element option.

      Attachment element form
    4. Click OK.

      OK button

      The Attachment element is removed from the Form preview area.

  5. Add an element:

    1. Click Form.

      Form definition
    2. In the options dialog, click Add.

      Options dialog

      The Standard Form Elements and Layout Options appear to the right.

    3. Click Event to add the Event element for entering the time off as an event with a start and end time.

      Standard form elements
    4. Fill in the Event element form.

      Event element form
      1. Type the Caption name (the name used in Novell Teaming).

      2. Type the Data Name.

        This is an internal-use database name. Names for elements in one definition must be unique. The first character must be an alphabetic character (a-z, A-Z). For the rest, legal characters are alphanumeric characters (a-z, A-Z, 0-9), hyphens (-), and underscores (_).

      3. Select the Has a duration (start and end times)? option.

      4. Select the Required option.

      5. Click OK.

      The Time Off Dates and Time element appears under Form and in the Form preview area at the bottom (below the other elements).

  6. (Optional) Move an element:

    1. Click the Time Off Dates and Time element.

      Form elements
    2. In the options dialog, click Move.

      Options dialog
    3. If you want this element to appear below another element, click the element under Form that you want this element to appear under (Title).

      Form elements
    4. Select the Move to below the selected item option and click OK.

      Move options

      The Time Off Dates and Time element moves to below the Title element.

      Or, if you want the element to appear above a selected element, click the Move to above the selected item option and click OK.

  7. Add a required Text element named Total Hours Off and move it below the Time Off Dates and Time element.

  8. Add a required Text element named Reason for Time Off and move it to below the Title element.

  9. Add a container:

    So far all the elements have been added below Form, which is itself a container. In this step you want to add a Box container below form and move the Time Off Dates and Time element into the box.

    1. Click Form.

      Form definition
    2. In the options dialog, click Add.

      Options dialog

      The Standard Form Elements and Layout Options appear to the right. Every element under Layout Options, except Divider, is a container.

    3. Click Box.

      Layout options
    4. Select Square with border and click OK.

      Add Box options
    5. Click Time Off Dates and Time.

    6. In the options dialog, click Move.

      Options dialog
    7. Click Box.

      Form tree
    8. Select Move into the selected item and click OK.

      Your custom form should now look like this:

      Custom form preview

      You can use the Move function to move the box above the Total Hours Off field.

4.1.4 Creating a Custom View for an Entry

  1. Expand Entry view definition.

    Entry view elements
  2. Select and delete the Description and Attachments elements.

  3. Click Entry view definition, click Add in the option dialog, and click Time Off Dates and Time.

    Any elements you added to the custom form appear in the list when you are adding elements to the custom view.

    Standard form elements
  4. Click OK.

  5. Click Add in the option dialog, click Reason for Time Off, then click OK.

  6. Move the Reason for Time Off element to below the Entry creator and creation date element, and move the Time Off Dates and Time element to below the Reason for Time Off element.

    Your custom view for this custom entry should now contain these elements in the following order:

    Entry view elements

    NOTE:The Summary view is used for Blogs or Guestbooks. You can create a custom Summary view in the same manner as the custom view in this procedure.