Message Boards
portletconfig in spring controller with annotations
KK rajput, modified 12 Years ago.
portletconfig in spring controller with annotations
Expert Posts: 266 Join Date: 4/10/08 Recent Posts
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
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
Pranay R Patadiya, modified 12 Years ago.
RE: portletconfig in spring controller with annotations
Regular Member Posts: 177 Join Date: 2/23/10 Recent Posts
Hi,
Use,
Thanks,
Pranay
Use,
PortletConfig portletConfig = (PortletConfig) renderRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
Thanks,
Pranay
a l, modified 11 Years ago.
RE: portletconfig in spring controller with annotations
New Member Posts: 3 Join Date: 1/10/12 Recent Posts
You can also implement PortletConfigAware
private PortletConfig portletConfig;
@Override
public void setPortletConfig(PortletConfig portletConfig) {
this.portletConfig = portletConfig;
}
private PortletConfig portletConfig;
@Override
public void setPortletConfig(PortletConfig portletConfig) {
this.portletConfig = portletConfig;
}
Chandan Sharma, modified 10 Years ago.
RE: portletconfig in spring controller with annotations
Junior Member Posts: 63 Join Date: 5/28/12 Recent Posts
Thanks Its working
majdi Achouri, modified 3 Years ago.
RE: portletconfig in spring controller with annotations
Junior Member Posts: 38 Join Date: 11/21/19 Recent Posts
Which solution is working (i.e of Pranay or of a l ) the first or the second One ? Please specify ?