Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Padmanabha V N
How to programatically add liferay portlet Instance dynamically and install
24 de abril de 2013 7:01
Respuesta

Padmanabha V N

Ranking: New Member

Mensajes: 11

Fecha de incorporación: 15 de febrero de 2011

Mensajes recientes

Hi

I have a liferay portlet instance created dynamically and added to the layout programatically as follows

String portletId = objUtil.addPortlet("/prj/reports", "XYZPortlet_WAR_ecpmportlet", "column-2",groupId, "type: " + getSelectedType());

So it adds a portlet to the /reports page. I want to add a button below the portlet called "send to dashboard" on clicking the button I want to Install this portlet to the user dashboard permanently.

Note: There can any number of portlet instances added to the /reports page.

As you see XYZPortlet is the id of the portlet defined in liferay-portlet.xml, liferay-display.xml which remains same for all the portlets I add to the reports page.

I want to dynamically assign a new Id to the portlet instance and install it permanently to the dashboard layout.

Can anyone please suggest a way to do this?

Thanks

Padmanabha V N
Mohammad Azharuddin
RE: How to programatically add liferay portlet Instance dynamically and ins
24 de abril de 2013 7:34
Respuesta

Mohammad Azharuddin

Ranking: Expert

Mensajes: 471

Fecha de incorporación: 17 de septiembre de 2012

Mensajes recientes

Hi

This topic is been discussed previously in the forum
you could try this
link1
link2
Padmanabha V N
RE: How to programatically add liferay portlet Instance dynamically and ins
25 de abril de 2013 2:14
Respuesta

Padmanabha V N

Ranking: New Member

Mensajes: 11

Fecha de incorporación: 15 de febrero de 2011

Mensajes recientes

Hi mohamed

Thanks for the reply

I actally want to assign a new portlet id to the new portlet i am adding and i want it to be appear on the more portlets drop down individually.