# Registering Custom Events

After you create custom events for your portal application you must register those events so that your application recognizes them. After you register your events, you can use them to trigger personalization and campaigns and track user behavior in your portals.

To register the event listener

Events need event listeners to listen for them. Register the event listeners for your custom event in <PORTAL_APP>\META-INF\application-config.xml.

To create an Event Property Set

1. In the WebLogic Workshop Application window, right-click the data\events folder and choose New-->Other File Types.
2. In the New File window, select the Portal folder in the left pane.
3. In the right pane, select Event Property Set.
4. In the File name field, enter a name for the Event property set. Make sure you keep the .evt file extension.
5. Click Create. The Event Property Set designer appears.
6. Use the next procedure to add properties to the property set.

To adding properties to a property set

After you create a property set, you add the properties you want to it.

1. In the Palette window, drag one of the types of properties into the designer window.
   The type defines the number of values that can be entered for the property. Following are descriptions of each type.
   Single Unrestricted - A single unrestricted property can have only one value, but you can enter any value.
   Single Restricted - A single restricted property can have only one value, and you are restricted to selecting that value from a predefined list.
   Multiple Unrestricted - A multiple unrestricted property can have multiple values, and you can enter any values.
   Multiple Restricted - A multiple restricted property can have multiple values, and you are restricted to selecting the values from a predefined list.
2. In the Property designer window:
   - Enter a name and description for the property
   - Select the Data Type for the property value. For example, if you select Boolean, your property value can be only true or false. (Properties with a Boolean data type are automatically set to "single restricted.")
   - In the Selection Mode and Value Range fields, you can change the type of property. For example, you can change a property from "single unrestricted" to "multiple restricted."

   > Note: Any change to Data Type, Selection Mode, or Value Range removes anything previously entered in the Values field.

   - Use the Values field to enter values for "restricted" types or to set the default value(s) for "unrestricted types." Click the ellipsis icon (...) to enter values. (In the Enter Property Value dialog box that appears, click Add after each entry, and click OK when all values are entered.)
3. Save the file after you have added all the properties you want.

To modify properties and their values

To modify properties and their values, double-click the property set file in the the Application window, click the property you want to modify, and change the values in the Property designer window.

To delete properties

You can delete individual properties from a property set, and you can delete property sets.

To delete a property from a property set, open the property set file, select the property, and press the Delete key.

To delete a property set, select the property set file in the Application window and press the Delete key.

Related Topics

Property Set Designer window

Creating Segments

Creating Content Selectors

Creating Campaigns

Creating User Profile Properties

Creating Session Properties

Creating Request Properties

Creating Catalog Structure Properties