Upgrading WLP .NET Application Accelerator Portlets (1.0 to
1.1 MP1)
To upgrade existing WLP portlets developed using the AquaLogic
.NET Application Accelerator version 1.0, you must make modifications
to your code.
If your portlet uses the profile provider, you must make
the following changes:
- Change the name and type of the profile provider defined
in the project's Web.config file from EDKProfileProvider to IDKProfileProvider as shown in the code snippet
below.
<profile enabled="true" defaultProvider="IDKProfileProvider" automaticSaveEnabled="true">
<providers>
<clear />
<add name="IDKProfileProvider" type="BEA.ALI.Web.Profile.IDKProfileProvider, PortletAPI" description="IDK based profile provider" />
</providers>
<properties>
<clear />
</properties>
</profile>
- Upgrade property names to the 1.1 MP1 syntax. In version
1.0, the property set name was appended to the property name. In 1.1
MP1, the property name is placed in a group element.
- For each custom property set or user profile grouping,
create a <group> element in the <properties> element within the <profile> element in the
Web.config file for the portlet project. Add each user profile property
to its respective group. Each property must be defined with a name
and a type. If you provide a default value, it will be used if the
property is not available.
Note: The name of the property must match the name sent
by the source application. For more information about sending user
profile properties from WebLogic Portal, see Developing User Profiles in the WLP documentation.
<properties>
<group name="homeInfo">
<group name="online">
<add name="email" type="string"/>
</group>
</group>
<group name="CustomProperties ">
<add name="title" type="string" defaultValue="No Title"/>
</group>
<group name="MyProfile">
<add name="Name" type="String" defaultValue="Guest"/>
<add name="Age" type="Int32"/>
</group>
</properties>
- Reference the property in the portlet page by name using
the Profile object. The correct syntax is shown below.
string title = Profile.CustomProperties.Title
string name = Profile.MyProfile.Name;
int age = Profile.MyProfile.Age;
The other namespace changes implemented in version 1.1 MP1
provide new classes and do not affect existing 1.0 portlets. (You
may need to add namespaces to access new functionality.)