BEA Logo BEA WebLogic Commerce Server Release Beta

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   WebLogic Commerce Server Doc Home   |   Personalization Tour   |   Previous Topic   |   Next Topic   |   Contents   |   Index

Working with Properties

 

This chapter describes how to add a property to a property set. We will create a property and then add a default value.

This topic includes the following sections:

 


Adding Properties Within a Property Set

WebLogic Personalization Server provides Administration Tools that make it easy to personalize your application. We will start by adding a property to a property set using the Property Set Management tool.

Creating a Property Within the exampleportal Property Set

In this section, we will add the AcmePoints property to the existing exampleportal User Property 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 properties set:

  1. Log into the WebLogic Personalization Server administration client. If you installed WebLogic Personalization Server with the default settings, you can use this URL in a browser that is invoked on the same machine as the server: http://localhost:7501/tools. The default username is administrator and the default password is password.

    Note: The default port is 7501. Refer to the configuration section in the installation guide for more information about setting the ListenPort in the weblogic.properties file.

  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, select the exampleportal link. The Property Set view page appears.

    Note: Be sure to click on the exampleportal property set under the "User Property Sets" titlebar, and not under the "Application Initialization Property Sets" titlebar.

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

  5. Enter AcmePoints in the Property Name field.

  6. Enter Number of times user has visited in the Description field.

  7. Select Integer from the Type drop-down list box.

  8. Select Single from the Selection Option drop-down list box.

    Note: The "single" option refers to those properties having only one option (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).

  9. Select Unrestricted from the Creation Category drop-down list box.

    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.

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

  11. Click Back to return to the Property Set view page. The AcmePoints property is displayed under the Properties section.

Adding a Default Value to the AcmePoints Property

Now we will add a default value so the application will always find a value.

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

  2. Click Edit on the Property Values bar.

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

  4. Click Back to return to the Property Set view page.

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

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