BEA Logo BEA WLCS Release 3.5

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   WLCS Documentation   |   Personalization Tour   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Working with Properties

 

Properties are fields for which values are set. For example, in this chapter you will create an AcmePoints property that represents the number of times a user visits the exampleportal site. You can change the AcmePoints value manually, or, as you will do at the end of the tour, add code to a JSP that automatically increments the value for a user every time the user logs into the site. The number of AcmePoints a user accumulates determines whether the user is classified as an infrequent or frequent visitor, which in turn determines the content the user sees.

Individual properties, like AcmePoints, are grouped into property sets. This chapter describes how to create a property in a property set.

This topic includes the following sections:

 


Creating a Property Within the exampleportal Property Set

In this section, you will add the AcmePoints property to the existing exampleportal property set. The AcmePoints property will be used to track the number of times a user visits the site.

Follow these steps to add the AcmePoints property to the exampleportal property set:

  1. Log into the BEA WebLogic Personalization Server administration client. If you installed BEA WebLogic Personalization Server with the default settings, you can use the following URL in a browser that is invoked on the same machine as the server:

    http://localhost:7501/tools

    Enter the following user name and password:

    User Name: administrator

    Password: password

    Note: The default port is 7501. For information on changing port numbers, see "Changing the Listen Ports" in "The Server Configuration" chapter of the Deployment Guide.

  2. From the Administration Tools Home page, click the Property Set Management icon. The Property Set Management Home page appears.

  3. From the User Property Sets list, click the exampleportal link. The Property Set: exampleportal (USER) page appears.

    Note: Be sure to click the exampleportal property set under the User Property Sets title bar, not under the Application Initialization Property Sets title bar.

  4. Click Create on the Properties bar. The Create Properties page appears.

    Figure 2-1 Creating a property


     

  5. Enter the following values in this page:

    Property Name: Enter AcmePoints (Make sure you type this exactly as shown.)

    Description: Enter Number of times user has visited.

    Type: Select Integer.

    Selection Option: Select Single.

    Note: The "single" option refers to those properties having only one choice (for example, Property: FavoriteColor, Attribute: red). The "multiple" option refers to those properties having multiple options (for example, Property: Colors, Attributes: red, green, blue, and so on).

    Creation Category: Select Unrestricted.

    Note: Restricted categories refer to user input via a list, radio buttons, check boxes, and so on. Unrestricted categories refer to instances in which users populate a form field.

  6. Click Create. A message confirms that the operation was successful. You have now created a new property called AcmePoints in the exampleportal property set.

    Figure 2-2 Confirmation that the property was created


     

  7. Click Back to return to the Property Set: exampleportal (USER) page. The AcmePoints property is displayed under the Properties section.

Adding a Default Value to the AcmePoints Property

Now you will add a default value so the application will always find a value. As users are added to the system, they will receive this default AcmePoints value automatically.

  1. Click Edit on the AcmePoints property bar. The Property: AcmePoints page appears.

  2. Click Edit on the Property Values bar.

  3. Enter 0 in the Default Values field, then click Save. The Property: AcmePoints view page appears and displays the default value.

    Figure 2-3 Adding a default property value


     

  4. Click Back to return to the Property Set: exampleportal (USER) page.

  5. Click Finished to save the exampleportal property set with the new AcmePoints property. The Property Set Management page appears.

  6. Click Home on the BEA WebLogic Commerce Server banner to return to the Administration Tools Home page.

 

back to top previous page next page