Use the Content Spot Wizard to create a content spot
- Define or import the resources (.hrf files) you wish to use in the project.
- Click the Create a Content Spot to Display a Personalization Resourcebutton in the toolbar.
- In the Content Spot window, select a Source Folder and Package. The package must be within the folder you select for a source folder. The package can be a new or existing package.
- Type the Display Name that will appear in the workspace user interface.
- Type the Class Name. The class name is a Java class name for a generated content spot.
- In the Return Type field, click the resource class that will be returned from the content spot. Select no return type for a content spot to contain update or profiler rules.
- Click Finish.
The output of the content spot wizard is <Class Name>.java.
Once generated, the ContentSpot must be registered with the Personalization engine by creating a Content Spot reference. Consult the WebSphere Portal Information Center and Personalization portlet help for information on creating Content Spots with Personalization.
When to use generated Content Spots as compared to the pre-packaged Content Spot class
Advantages of the prepacked ContentSpot class:
- No code generation required to execute a rule
- Content Spot names for the application may be externalized to properties files or any other configuration mechanism.
- Content Spots can be added or removed from the application with no new generated code. This means less overall code changes when add a Content Spot. In some cases, a Content Spot may be added to the application with no code changes required.
- Does not tie the code to invoke the ContentSpot to a specific resource collection or resource type.
Advantages of the generated ContentSpot class
- The generated ContentSpot classes may return content resources already cast to your generated resource classes.
- Since the returned content is already cast to a specific implementation, the JSP programmer can more easily use the other page designer tools in Rational Application Developer to lay out Personalization resources on the page.
Back