Log In
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
> Referencing asset polices using Alternate approach instead if “mobilePortletContent” Tag
New Article
Share
▼
Subscribe
▼
About the Original Author
Sathish Maiya
Contribution Summary:
Articles authored: 3
Articles edited: 0
Comments Posted:
0
Recent articles by this author
Referencing asset polices using an alternate approach instead if “mobilePortletContent” Tag
Instead of using mobilePortletContent you can reference imagesscripts(asset policies) using alternate approaches.
Migrating Mobile Portal Accelerator 6.x/7.x to 8.0 Using an alternative approach
Introduction: This article proposes an alternative way of migrating from lower versions of MPA to MPA8.0. The normal process is outlined in the article 1 mentioned under reference section. The process outlined in the article 1 requires a portal migration. If you have the portal installation ...
Migration From MPA 7.0.x to MPA 8.0
This article provides steps for migrating MPA from 7.0.x to 8.0 . And also mentions portal migration with a typical scenario.
Referencing asset polices using Alternate approach instead if “mobilePortletContent” Tag
Added by
Sathish Maiya
| Edited by
Sathish Maiya
on
January 8, 2014
|
Version 7
Abstract
Abstract
Instead of using mobilePortletContent you can reference images/scripts(asset policies) using alternate approaches.
Tags:
mobilePortletContent assets policy dynamic static
In MPA 8.0
use of tag
to reference the images outside the portlet is deprecated. Instead of using this tag follow the following steps to reference image/assets. There are two approaches to reference the assets.
A) Reference image through a static project .
Step 1:
Create a new definition of the project in mcs-config.xml file. The file is present at two locations
\installedApps\hostname\mcs.ear\mcs.war\WEB-INF\mcs-config.xml
and
\PortalServer\wp.mobile\wp.mobile.mcs\mcs-config.xml
. You should add the details like below in both copies of
mcs-config.xml
file .
Please note the attributes identity (project), directory (xml-policies), base-url(assets) and prefix-url(In child element of assets) in the above example.
Step 2:
Put all the policy files like .
mimg
,
scripts
etc in directory
"xml-policies
" used in project definition .In the following example all polices are placed in below directory.
\installedApps\hostname\mcs.ear\mcs.war\projects\examples\policies
Place different policy files in different sub folders. See the snap below.
Step 3:
Put all the assets in the directory which is accessible via
base-url
provided in
tag. Eg: image "
magnifying-glass.png
” should become available if you hit this url
http://host:port/mcs/projects/examples/assets/images/magnifying-glass.png
.
For this purpose you can create a directory inside
mcs.ear/mcs.war/projects
folder and put assets under that directory.
See in this example the assets are placed in below directory.
Step 4:
Similarly you can create script policy. While creating image/script policy just use simple file name in place of url (if you have followed the exact url pattern described above)
Step 5:
Restart the server.
Step 6:
Follow the following syntax to add image/script policy in custom jsp's.
B) Referencing the assets through dynamic projects
Step 1:
Create a String Buffer having details of project. (or portelt ) from where customer can access policies.
In the following example you can create
Step 2:
Details of variable used In xml-configuration file are given below
a) name = Name of Web Module(portlet) installed . (In my case inside InstalledApps)
b) Policy directory = Absolute directory path to policies
c) assets-base-url = context root of the portlet (Can be found from
/wps/PA_offlineSample
variable in "application.xml" file inside META-INF )
Step 3:
By using below method all policy file of the PA_offllineSample can be used in any portlet eg.
Here
testImage
and
helperFunction
policy can be used in any portlet .
Attachments (0)
Attachments (0)
Versions (9)
Versions (9)
Version Comparison
Compare version
Current 9
7
6
5
4
3
3
2
1
with version
Current 9
7
6
5
4
3
3
2
1
Compare selected versions
Version
Date
Changed by
Summary of changes
9
Jan 8, 2014, 4:34:17 AM
Sathish Maiya
This version (7)
Jan 8, 2014, 1:04:21 AM
Sathish Maiya
6
Jan 7, 2014, 5:13:48 AM
Sathish Maiya
5
Jan 7, 2014, 5:02:34 AM
Sathish Maiya
4
Jan 7, 2014, 3:06:50 AM
Sathish Maiya
3
Jan 6, 2014, 4:14:13 AM
Sathish Maiya
3
Jan 7, 2014, 1:45:27 AM
Sathish Maiya
2
Jan 6, 2014, 2:26:42 AM
Sathish Maiya
1
Jan 5, 2014, 11:03:05 PM
Sathish Maiya
Copy and paste this wiki markup to link to this article from another article in this wiki.
Link:
Close
Go Elsewhere
Stay Connected
Help
About
IBM Collaboration Solutions wikis
IBM developerWorks
IBM Software support
IBMSocialBizUX on Twitter
IBMSocialBizUX on Facebook
Lotus product forums
IBM Social Business UX blog
The Social Lounge
Wiki Help
Forgot user name/password
About the wiki
About IBM
Privacy
Accessibility
IBM Terms of use
Wiki terms of use