根据Portletid跳转到其他画面
来源:互联网 发布:查看linux安装的字体 编辑:程序博客网 时间:2024/04/30 10:56
Inter Portlet Communication (IPC) for Portlets on Different Page
Use the below code for Inter Portlet Communication (IPC) for Portlets on Different Page:-
String plidName = "Sample_WAR_Sampleportlet";
long plidForward = getPortletId(plidName);
PortletURL url = new PortletURLImpl(request,plidName, plidForward, PortletRequest.ACTION_PHASE);
---------------------------------------------------------------------------------
public static long getPortletId(String portletId) {
PortletPreferences prfs = null;
try {
DetachedCriteria dCriteria = DetachedCriteria
.forClass(PortletPreferences.class);
dCriteria.add(Restrictions.eq("portletId", portletId));
DynamicQuery dynamicQuery = new DynamicQueryImpl(dCriteria);
List list = PortletPreferencesLocalServiceUtil.dynamicQuery(dynamicQuery);
if (!list.isEmpty()) {
prfs = (PortletPreferences) list.get(0);
}
} catch (Exception e) {
e.printStackTrace();
}
return prfs.getPlid();
}
---------------------------------------------------------------------------------------------------
还可以这样写
---------------------------------------------------------------------------------------------------
public static long getPortletId(String portletId) {
PortletPreferences list = null;
try {
List<com.liferay.portal.model.PortletPreferences> temp = PortletPreferencesLocalServiceUtil.getPortletPreferences();
for (int i = 0; i < temp.size(); i++) {
if ((temp.get(i)).getPortletId().equals(portletId)) {
return temp.get(i).getPlid();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return 0;
}
long plid = TestClass.getPortletId("Sample_WAR_Sampleportlet");
LiferayPortletURL url = PortletURLFactoryUtil.create(PortalUtil.getHttpServletRequest(renderRequest), "Sample_WAR_Sampleportlet", plid, PortletRequest.RENDER_PHASE);
- 根据Portletid跳转到其他画面
- 008跳转到其他页面
- RecyclerView跳转到其他位置
- Android跳转到其他APP
- 定时器跳转到其他页面
- VMWare虚拟机拷贝到其他机器 画面很卡
- 使用onclick跳转到其他页面/跳转到指定url
- 使用onclick跳转到其他页面/跳转到指定url
- 使用onclick跳转到其他页面/跳转到指定url
- 使用onclick跳转到其他页面/跳转到指定url
- 使用onclick跳转到其他页面/跳转到指定url
- 使用onclick跳转到其他页面/跳转到指定url
- 使用onclick跳转到其他页面/跳转到指定url
- 使用onclick跳转到其他页面/跳转到指定url
- 使用onclick跳转到其他页面/跳转到指定url
- 使用onclick跳转到其他页面/跳转到指定url
- springmvc 登陆后跳转到登陆前的画面
- 使用onclick跳转到其他页面。
- 进程环境和属性
- 对onreadystatechange属性的理解
- android横竖屏切换的一点感想
- 获取系统滤镜列表
- 【思考】你为什么总是陷入老鼠赛跑的循环圈?
- 根据Portletid跳转到其他画面
- arm内存重映射 转
- 关于textbox中的TextChanged与客户端事件onpropertychange的组合
- 人生成功的生活经典治理名言
- 人生成功的生活经典治理名言
- JavaBean的get、set方法生成器
- 改变鼠标显示样式
- 【C语言小练习】 任意输入N个数,输出其由大到小的数据。
- 画直线(橡皮筋)