留言板

portletconfig in spring controller with annotations

thumbnail
KK rajput,修改在12 年前。

portletconfig in spring controller with annotations

Expert 帖子: 266 加入日期: 08-4-10 最近的帖子
Hi ,
I am trying to build a spring portlet based on annotation controller in liferay 6. In my controller I my writing a code to get portletConfig object like this.
getPortletConfig() but getting compilation error. Can any one tell me what I am doing wrong??

Thanks
thumbnail
Pranay R Patadiya,修改在12 年前。

RE: portletconfig in spring controller with annotations

Regular Member 帖子: 177 加入日期: 10-2-23 最近的帖子
Hi,
Use,
PortletConfig portletConfig = (PortletConfig) renderRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);


Thanks,
Pranay
a l,修改在11 年前。

RE: portletconfig in spring controller with annotations

New Member 帖子: 3 加入日期: 12-1-10 最近的帖子
You can also implement PortletConfigAware


private PortletConfig portletConfig;


@Override
public void setPortletConfig(PortletConfig portletConfig) {
this.portletConfig = portletConfig;
}
thumbnail
Chandan Sharma,修改在10 年前。

RE: portletconfig in spring controller with annotations

Junior Member 帖子: 63 加入日期: 12-5-28 最近的帖子
Thanks Its working
majdi Achouri,修改在3 年前。

RE: portletconfig in spring controller with annotations

Junior Member 帖子: 38 加入日期: 19-11-21 最近的帖子
Which solution is working (i.e of Pranay  or of a l ) the first or the second One ? Please specify ?