Forums de discussion

portletconfig in spring controller with annotations

thumbnail
KK rajput, modifié il y a 12 années.

portletconfig in spring controller with annotations

Expert Publications: 266 Date d'inscription: 10/04/08 Publications récentes
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, modifié il y a 12 années.

RE: portletconfig in spring controller with annotations

Regular Member Publications: 177 Date d'inscription: 23/02/10 Publications récentes
Hi,
Use,
PortletConfig portletConfig = (PortletConfig) renderRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);


Thanks,
Pranay
a l, modifié il y a 11 années.

RE: portletconfig in spring controller with annotations

New Member Publications: 3 Date d'inscription: 10/01/12 Publications récentes
You can also implement PortletConfigAware


private PortletConfig portletConfig;


@Override
public void setPortletConfig(PortletConfig portletConfig) {
this.portletConfig = portletConfig;
}
thumbnail
Chandan Sharma, modifié il y a 10 années.

RE: portletconfig in spring controller with annotations

Junior Member Publications: 63 Date d'inscription: 28/05/12 Publications récentes
Thanks Its working
majdi Achouri, modifié il y a 3 années.

RE: portletconfig in spring controller with annotations

Junior Member Publications: 38 Date d'inscription: 21/11/19 Publications récentes
Which solution is working (i.e of Pranay  or of a l ) the first or the second One ? Please specify ?