# Using Portal Controls

WebLogic Portal provides three types of built-in Java controls that you can add to Page Flows:

- Portal (Personalization) Controls
- Portal Event Controls
- Portal EJB Controls

For detailed instructions on using Portal Controls, consult the following: Tutorial: Creating a Login Portlet Using Portal Controls.

## When to Use a Portal Control

Use portal controls to expose tracking and personalization functions in multi-page portlets. For instance, to enable users to register, login and edit their properties, you would use the Portlet Wizard to create a Page Flow portlet, use the design view to insert a combination of the User Management controls with a form control, set a few properties and view the portlet immediately.

WebLogic Portal Extensions ships with the following Portal (Personalization) Controls:

- Create User - Exposes user creation, returns an instance of profileWrapper if successful, throws exception if user exists or creation fails for some other reason.
- User Login - This control supports authentication by simply associating this control with one of the User Interface controls. It allows a visitor to log in to a portal, indicates success and surfaces profile information.
- User Profile - This control exposes the user profile information to an action raised by a Page Flow. It is useful if you need to get all properties for a user, or only a subset of properties.
- User Information [Query] - This utility control returns the list of roles for a particular user, as well as the list of immediate parent groups.

## When to Use an Event Control

Portal Event Controls enable personalization and tracking functionality to be inserted into a Pageflow with minimal coding. The following Portal Event Controls are available:

- Click Content Event - Use this control to dispatch events invoked by clicking on portlet content.
- Display Content Event - Use this control to dispatch events involving content display.
- Generic Tracking - This control can expose the ability to configure, generate and dispatch a tracking event, (events that are generally persisted,) to the event service. Once an event object is created, you can set its attributes such as EventType and XML persistence, and then configure the event service to listen for your generic tracking event.
- Rule Event - This control dispatches a RuleEvent to the Portal Behavior Tracking System.
- Session Login Event - This control is used to dispatch a login event from within a Page Flow.
- Generic Event - This control is simiilar in appearance to the standard event control, except that it is configurable by the user.
- User Registration Event - This control dispatches a 'UserRegistrationEvent' to the Portal Behavior Tracking System.

## When to Use an Portal EJB Control

Portal EJB controls allow you to create quick, accurate and reusable access points to EJBs. Automatically create JSPs and databound forms speed the process of development dramatically.

These portal controls are simply control representations of Personalization EJBs with Portal. Using an EJB Control instread of an EJB is a much easier way to implement Pageflows. WebLogic Portal Extensions ships with the following Portal EJB Controls:

- Entity Property Manager - The remote interface for a session bean that manages persistence of ConfigurableEntity EJB's and their properties.
- Event Service - This control is placed in a Page Flow so that events can be passed to it. These events will be handled by registered listeners.
- Group Manager - This control is a remote interface for the GroupManager session bean, and requires special security considerations. Use this control to expose the ability to add a User to a Group, for example.
- Group Profile Manager - This control is a remote interface for the ProfileManager, a stateless session bean used to access profile values.
- Property Set Manager - PropertySetManager Control exposes a stateless session bean that provides access to property sets, through PropertySetRepositories.
- Realm Configuration - This public interface is for keeping personalization profile records in sync with the WLS realm.
- User Manager - A Remote Interface for the UserManager session bean.
- User Profile Manager - This control provides the business logic to retrieve and update user profile information.

Related Topics

Portal Controls and Page Flows

Using Portal Controls