Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Satish Babu Anupoju
How to add custom portlet to control panel prgramatically
July 4, 2012 10:01 PM
Answer

Satish Babu Anupoju

Rank: Junior Member

Posts: 66

Join Date: February 19, 2011

Recent Posts

Hi

I have created one custom portlet. I want to display my custom portlet in control panel. I want to achieve this
programatically (not by providing tags in liferay-portlet.xml).

I have done like this :

Portlet portlet = PortletLocalServiceUtil.getPortletById("myPortletId"); // I got it from database.
portlet.setControlPanelEntryCategory("portal");
portlet.setControlPanelEntryWeight(20.0);

Here I struck up. I want to reload my portlet and it should be available in control panel.

Can any one guide me how to reload my portlet to achieve this functionality.



Regards
Satish Babu
Muzakir Khan
RE: How to add custom portlet to control panel prgramatically
July 4, 2012 11:35 PM
Answer

Muzakir Khan

Rank: Regular Member

Posts: 112

Join Date: March 14, 2012

Recent Posts

Hi..
If tags(elements) are already available at liferay-portlet.xml and your task can be achieved by these elements, why do want to achieve it programatically?.. Do you think, Is there any benefit by calling it programatically?..