Fórum

portletconfig in spring controller with annotations

thumbnail
KK rajput, modificado 12 Anos atrás.

portletconfig in spring controller with annotations

Expert Postagens: 266 Data de Entrada: 10/04/08 Postagens Recentes
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, modificado 12 Anos atrás.

RE: portletconfig in spring controller with annotations

Regular Member Postagens: 177 Data de Entrada: 23/02/10 Postagens Recentes
Hi,
Use,
PortletConfig portletConfig = (PortletConfig) renderRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);


Thanks,
Pranay
a l, modificado 11 Anos atrás.

RE: portletconfig in spring controller with annotations

New Member Postagens: 3 Data de Entrada: 10/01/12 Postagens Recentes
You can also implement PortletConfigAware


private PortletConfig portletConfig;


@Override
public void setPortletConfig(PortletConfig portletConfig) {
this.portletConfig = portletConfig;
}
thumbnail
Chandan Sharma, modificado 10 Anos atrás.

RE: portletconfig in spring controller with annotations

Junior Member Postagens: 63 Data de Entrada: 28/05/12 Postagens Recentes
Thanks Its working
majdi Achouri, modificado 3 Anos atrás.

RE: portletconfig in spring controller with annotations

Junior Member Postagens: 38 Data de Entrada: 21/11/19 Postagens Recentes
Which solution is working (i.e of Pranay  or of a l ) the first or the second One ? Please specify ?