Skip to main content link. Accesskey S
  • Log In
  • Help
  • IBM Logo
  • IBM Digital Experience wiki
  • All Wikis
  • All Forums
  • ANNOUNCEMENT: WIKI CHANGE TO READ-ONLY. LEARN MORE...
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
  • IBM Redbooks
  • API Documentation
Search
Community Articles > IBM Accelerators for WebSphere Portal > IBM Mobile Portal Accelerator > Device (Mobile) Attribute Based Personalization using MPA
  • New Article
  • Share Show Menu▼
  • Subscribe Show Menu▼

About the Original Author

Click to view profileIBM contributorVinod Appajanna
Contribution Summary:
  • Articles authored: 4
  • Articles edited: 1
  • Comments Posted: 0

Recent articles by this author

GPS (HTML5) Sample Mobile Portlet using XDIME

This aritcle describes about how to develop a GPS sample (HTML5) portlet that can be rendered on MPA

XDIME enabled Sample Personalization Demo Portlets

The samples provided with article provides an extension to YourCo User Info, YourCo General News, YourCo General News Details, YourCo Internal News, YourCo Products, YourCo Promotions, YourCo Offer Banner, YourCo Offers and YourCo Services portlets (that are shipped with WebSphere Portal base ...

Device (Mobile) Attribute Based Personalization using MPA

In this tutorial, we extend the capabilities of Websphere Portal attribute based personalization to a mobile device using MPA. A device has numerous propertiesattribute and based on these propertiesattributes values we can apply rules, that is we can decide to show or hide a portlet or page. ...

How-To use a web service with MPA

This article will show how to create a simple webservice and how to call the same from a Mobile portlet code
Community articleDevice (Mobile) Attribute Based Personalization using MPA
Added by IBM contributorVinod Appajanna | Edited by IBM contributorVinod Appajanna on June 14, 2011 | Version 14
  • Edit
  • More Actions Show Menu▼
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars
expanded Abstract
collapsed Abstract
In this tutorial, we extend the capabilities of Websphere Portal attribute based personalization to a mobile device using MPA. A device has numerous properties/attribute and based on these properties/attributes values we can apply rules, that is we can decide to show or hide a portlet or page. This kind of personalization is very useful in places where we need to render a portlet or page based on device capability.
Tags: mobile, mobile portal WEMP UI design, mptk61, Mobile MPA, Mobile portal Toolkit, Mobile Portal, Mobile Portal Accelarator, Mobile Portal Accelerator, MPA, MPA iPhone Mobile, MPA Mobile, MPTK, portal, Portal mobile
ShowTable of Contents
HideTable of Contents
  • 1 Introduction
  • 2 Prerequisites
  • 3 Adding the Application Object
    • 3.1 Download & placing the JAR File
    • 3.2 Download the Nodes File
    • 3.3 Download and placing the XML File
    • 3.4 Import .nodes file
  • 4 Creating a rule
  • 5 Applying a Rule (Portlet)
  • 6 Applying a Rule (Page)
  • 7 Testing
  • 8 References

Introduction


Attribute based personalization is a type of personalization used in ecommerce today where based on the attribute value, the portlet or page will be shown or hidden. This means that from a resource collection the attribute will be read and the corresponding range of value it supports. If the attribute is set to a value within a range then the portlet or page will be shown else it will be hidden. This type of personalization is very useful in Mobile based Portal systems where based on the device attribute the mobile supports we can show or hide a portlet or page from the user. In WebSphere Portal, you can attach a rule to a portlet or page to indicate when a rule or portlet should be visible. A rule defines the behavior or a portlet or page. If the rule conditions are satisfied then accordingly the page or portlet can be set to visible. Rules are nothing without input data; WebSphere Portal includes several out-of-the-box objects for accessing the portal user database, portlet configuration data, request, session, and date information in rules. These are often enough for a self-contained portal solution. Rules can be created from application objects which in turn access the resource collections to run the rule to determine the visibility of a page or portlet. Application Objects enable you to extend personalization with additional current information like weather, date and time, session or request information etc. Application objects are simply Java objects on the session or request. The rules engine finds the object on the session or request at a key you specify. The rules editor will introspect the Java class for the application object to determine what properties display in the editor. When a rule runs, the rules engine must find an instance of the application object. Normally, Personalization will look for an application object at a key specified by you when the application object is defined in the Personalization portlet.

In this tutorial, we extend the capabilities of Websphere Portal attribute based personalization to a mobile device using MPA. A device has numerous properties/attribute and based on these properties/attributes values we can apply rules, that is we can decide to show or hide a portlet or page. This kind of personalization is very useful in places where we need to render a portlet or page based on device capability.

Prerequisites


This article requires the following runtime environment:
Mobile Portal Accelerator 6.1.X/7.0
To test this use mobile simulators or firefox add-on called User-Agent-Switcher to simulate mobile device requests.

Adding the Application Object


Download & placing the JAR File


o Download the PZNAppObjPortal.jar file
o Place this jar file in the required location. If your portal server is local then copy to \pzn\ prereq.pzn\collections\, substituting your portal server installation directory . For example, the portal installation directory for a Windows Machine could be C:\IBM\WebSphere\PortalServer\
o If you are using a remote portal server save the JAR locally and then copy the JAR to the collections directory on your portal server. The collections folder is part of a shared library created during the install and is intended to store custom application object and resource collection classes.
o Restart the portal server for the jar file to be absorbed

Download the Nodes File


o Download the devicePropApplObj.nodes file.
o Store the file locally on the system

Download and placing the XML File


o Download the extendedproperties.xml file
o Place the file in the /PortalServer/wp.mobile/wp.mobile.mwp/shared/app/config
o For example if it is a windows system the path could be :
C:\IBM\Websphere\wp_profile\PortalServer\wp.mobile\wp.mobile.mwp\shared\app\config

Import .nodes file


o Login into the portal server as admin
o Click on the Applications tab as shown below
o Click on the Content tab under Applications as shown below



o Click on the Business Rules under Content -> Personalization



o In the Personalization Navigator Portlet, click on the Import icon



o Browse through the documents to import the devicePropApplObj.nodes file
o After browsing, click on the Import Button

Creating a rule


o Under Personalization tab, click on Business Rules
o In the Personalization Navigator portlet, click on New icon/button



o Under New Icon, select Rule
o Name the rule as devicePropRule
o Select Rule type as Visibility Rule
o In the rule, click on attribute*
o Select devicePropApplObj
o Select any of the attributes from the list as shown



o For example if you select pixelsx
o Enter the value for the attribute selected. For the above example enter value 750
o Click Submit
o Click on the Preview tab in the Personalization Editor portlet below
o You will see the page/portlet result as Show. For all other values of relation “is” it will be hide
o Go back to New Rule tab.
o Click Save
o The relation between attribute and value can be changed also according to requirements

Applying a Rule (Portlet)


o Select a portlet on which a rule has to be applied and the page on which the portlet is rendered
o Goto Manage Pages
o Select the page on which the required portlet is rendered
- For example the page is Test and the page contains portlet About WebSphere Portal on which the rule has to be applied
o Next to Test select the icon Edit page layout
o Click on Show Portlet Rule Mapping



o Select the downward arrow next to No Rule Mapped below the Portlet name
o Select Select Rule from the list of options
o Check on the checkbox devicePropRule
o Click Ok
o Click Done

Applying a Rule (Page)


o Goto Manage Pages
o Now select a page (XDIME page) on which a rule has to be applied
o For example if the page is Test, next to Test Select the icon Edit page Properties
o Expand Advanced option section
o Select the downward arrow next to Show or Hide page rule: No Rule Mapped below
o Select Rule from the list of options



o Check on the checkbox "devicePropRule" (The rule that you created)
o Click Ok
o Click Ok

Testing


o Using a mobile device simulator/ UserAgent we can test this feature
o To test the rule that is applied on a portlet. Goto the page where this portlet is placed and check if the rule works on that portlet
o To test the rule that is applied on a page. Just see if that particular page is visible or hidden base on the rule that you have applied or selected

References


[1] Extending WebSphere Portal V6 personalization capabilities: Part 1. Including external data in personalization applications
Link: http://www.ibm.com/developerworks/websphere/library/techarticles/0702_brunn/0702_brunn.html

[2] Extending WebSphere Portal V6 personalization capabilities: Part 2. Creating a "Hello World" application object
Link: http://www.ibm.com/developerworks/websphere/library/techarticles/0702_brunn/0702_brunn.html

[3] Extending WebSphere Portal V6 personalization capabilities: Part 3. Creating a Web service application object
Link: http://www.ibm.com/developerworks/websphere/tutorials/0702_brunn3/

  • Edit
  • More Actions Show Menu▼


expanded Attachments (4)
collapsed Attachments (4)
Edit the article to add or modify attachments.
File TypeSizeFile NameCreated OnDelete file
video/avi 17,335 KB Attrbased-Pzn-Demo.avi 10/26/10, 3:50 AM
application/octet-stream 7 KB PZNAppObjPortal.jar 8/17/10, 8:01 AM
application/octet-stream 3 KB devicePropApplObj.nodes 8/17/10, 8:01 AM
text/xml 2 KB extendedproperties.xml 8/17/10, 8:01 AM
expanded Versions (14)
collapsed Versions (14)
Version Comparison     
VersionDateChanged by              Summary of changes
This version (14)Jun 14, 2011, 4:44:37 AMVinod Appajanna  IBM contributor
12Oct 26, 2010, 4:15:34 AMVinod Appajanna  IBM contributor
12Jun 14, 2011, 4:36:06 AMVinod Appajanna  IBM contributorMinor Change
11Oct 22, 2010, 5:25:06 PMVinod Appajanna  IBM contributor
9Oct 22, 2010, 5:04:57 PMVinod Appajanna  IBM contributor
8Oct 22, 2010, 4:28:00 PMVinod Appajanna  IBM contributor
7Oct 22, 2010, 3:49:13 PMVinod Appajanna  IBM contributor
6Oct 22, 2010, 10:32:01 AMVinod Appajanna  IBM contributor
5Oct 22, 2010, 9:37:24 AMVinod Appajanna  IBM contributor
4Oct 22, 2010, 9:21:21 AMVinod Appajanna  IBM contributor
3Oct 22, 2010, 8:58:34 AMVinod Appajanna  IBM contributor
3Oct 22, 2010, 9:01:12 AMVinod Appajanna  IBM contributor
2Oct 22, 2010, 8:43:50 AMVinod Appajanna  IBM contributor
1Oct 22, 2010, 8:42:40 AMVinod Appajanna  IBM contributor
expanded Comments (0)
collapsed Comments (0)
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedHelpAbout
  • IBM Collaboration Solutions wikis
  • IBM developerWorks
  • IBM Software support
  • Twitter LinkIBMSocialBizUX on Twitter
  • FacebookIBMSocialBizUX on Facebook
  • ForumsLotus product forums
  • BlogsIBM Social Business UX blog
  • Community LinkThe Social Lounge
  • Wiki Help
  • Forgot user name/password
  • About the wiki
  • About IBM
  • Privacy
  • Accessibility
  • IBM Terms of use
  • Wiki terms of use