小编Mat*_*sig的帖子

如何在Liferay 6.1中以编程方式设置"链接到页面"布局?

我目前正在使用Liferay Portal Enterprise Edition 6.1 EE GA1(Paton/Build 6110/2012年2月15日),它部署在我的本地计算机(Win 7/x64)上,用于开发和测试目的.它运行在标准的7.0.25 Tomcat中,我们使用Spring MVC来开发我们的portlet.

我正在以编程方式向Liferay添加新布局(页面),我将类型的类型设置为"link_to_layout"(LayoutConstants.TYPE_LINK_TO_LAYOUT).布局已成功创建,但到目前为止,我还没有想出如何为链接设置值,例如"/ login"之类的内容.下面是我用来添加布局的代码:

// Spring specific code for getting the Request
HttpServletRequest request = null;    
ServletRequestAttributes sa = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
if( null != sa ){
    request = sa.getRequest();
}    
if (request == null) { break; }

// all values are usually retrieved via special methods from our code
// for better readability I have added the real values here
long userId = 10102;
int groupId = 13056;
boolean privateLayout = false; …
Run Code Online (Sandbox Code Playgroud)

spring-mvc liferay liferay-6

2
推荐指数
1
解决办法
3346
查看次数

标签 统计

liferay ×1

liferay-6 ×1

spring-mvc ×1