Developing Portlets
来源:互联网 发布:vb表格怎么设置滚动条 编辑:程序博客网 时间:2024/06/06 02:32
This document explains the way to setup a portlet.
- Entities Involved
- How To Setup
- Screen Setup
Entities Involved
- PortletCategory – Used to define category for portlets.
- PortalPortlet – All the information about a portlet is stored here.
- PortletPortletCategory – This associates the portlets with the logical categories.
- PortalPage – A portal page. Every Portal Page has a owner associated to it (userLoginId). To move a portlet from one Portal Page to another can be done
- If the logged in user is the owner of the portal page or
- If the portal page is a system page. (userLoginId="NA")
- PortalPageColumn – The number of the columns can be defined for a portal page.
- PortalPagePortlet – The portlets that belong to a portal page.
- PortalPageAndUserLogin – (View entity PortalPage + UserLoginSecurityGroup) - The portal pages that are accessible to a user if he belongs to certain security group.
- PortletAttribute – This defines all the attributes of a portlet. For example, to display a portlet, it needs a roleTypeId (attrName) = PLACING_CUSTOMER (attrName).
How To Setup
Here I am taking an example from OOTB implementation to show how do we setup a portlet.
The reference file here is PartyPortletData.xml Data preparation needs to be done as shown bellow this is all done for viewprofile page in partymgr:
Following is the first portlet with its all the associations and details:
<PortletCategory portletCategoryId="PROFILE" description="Profiles"/><PortalPortlet portalPortletId="party" portletName="Party Info" screenName="Party" screenLocation="component://party/widget/partymgr/ProfileScreens.xml" description="General information about a person or party group" screenshot="/images/portlets/party.png"/><PortletPortletCategory portalPortletId="party" portletCategoryId="PROFILE"/><PortalPage portalPageId="PartyProfile" sequenceNum="0" portalPageName="Party Profile Portal Page" description="Party profile page using flexible Portal technology" ownerUserLoginId="_NA_"/><PortalPageColumn portalPageId="PartyProfile" columnSeqId="00001" columnWidthPercentage="50"/><PortalPageColumn portalPageId="PartyProfile" columnSeqId="00002"/><!-- no width in pixels or percent, use the rest of the space available --><PortalPagePortlet portalPageId="PartyProfile" portalPortletId="party" portletSeqId="00001" columnSeqId="00001" sequenceNum="0"/>
Screen Setup
(OFBiz Trunk)
Now following code works in the screen to have portlets in action:
Trace the screen "viewprofile" from /party/widget/partymgr/PartyScreens.xml. We need to set portalPageId in parameters and include generic screen PortalPageScreen from component://common/widget/CommonScreens.xml
Which is as follows(Reference commit in OFBiz trunk rev. 900156):
<screen name="PortalPageScreen"> <section> <actions> <entity-one entity-name="PortalPage" value-field="portalPage"/> <get-related value-field="portalPage" relation-name="PortalPageColumn" list="portalPageColumns"/> <entity-and entity-name="PortalPagePortletView" list="portalPagePortlets"> <field-map field-name="portalPageId" from-field="portalPage.portalPageId"/> </entity-and> </actions> <widgets> <platform-specific> <html><html-template location="component://common/webcommon/portal/showPortalPage.ftl"/></html> </platform-specific> </widgets> </section></screen>
0 0
- Developing Portlets
- Developing Portlets
- Developing portlets using Spring Portlet MVC and Liferay ServiceBuilder
- 轻松进行Java Portlets
- 轻松进行Java Portlets
- Widgets vs Portlets
- Java Portlets 介绍
- Java.net article: Almost Portlets
- Friendly URLs for Liferay Portlets
- about build portlets for Domino
- Friendly URLs for Liferay Portlets
- mobile developing
- Developing Others
- Mobile Developing
- Android developing
- Hive Developing
- Developing Skills
- Developing Skills
- HDU 1695(容斥)
- OFBiz中JOB的运行机制
- java执行字符串中的运算公式
- Win32位程序设计初步之Windows服务开发-.NET教程
- Firewalld
- Developing Portlets
- test9.3
- [Bluetooth Core V4.2] VOL2, PartB, 8 Link Controller Operation
- 【点滴】-jquery.ui.datepicker指定任意位置显示
- 百度地图 获取release版和debug版的签名
- VSftp
- DirectX11 索引缓存
- Ubuntu14.04中安装Scrapy爬虫框架
- UISwich控件的相关属性