Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Seeya S Kudtarker
Issue with display of porltets in the Control Panel
April 9, 2013 8:54 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

Sometimes I face this issue and do not understand what to do.
Even though I include the following statements in my xml file (liferay-portlet.xml)
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>1.5</control-panel-entry-weight>
the portlet is not shown in my control panel. It has been happening with the new projects that i create and sometimes with few healthy portlets which were getting displayed before.

Is there a solution if this problem persists? And any idea why does this happen?
jaid shaik
RE: Issue with display of porltets in the Control Panel
April 9, 2013 10:37 PM
Answer

jaid shaik

Rank: Regular Member

Posts: 170

Join Date: October 7, 2010

Recent Posts

HI Seeya S Kudtarker,

can you please try below code:

1<portlet>
2        <portlet-name>portletname</portlet-name>
3        <icon>/icon.png</icon>
4        <control-panel-entry-category>content</control-panel-entry-category>
5          <control-panel-entry-weight>1.5</control-panel-entry-weight>
6        <layout-cacheable>true</layout-cacheable>
7        <add-default-resource>true</add-default-resource>
8    </portlet>


or

1<portlet>
2        <portlet-name>portletname</portlet-name>
3        <icon>/icon.png</icon>
4        <control-panel-entry-category>my</control-panel-entry-category>
5        <layout-cacheable>true</layout-cacheable>
6        <add-default-resource>true</add-default-resource>
7    </portlet>


Both are working for me.....am using liferay 6.1.1 C.E GA2

I think it helps you.
Seeya S Kudtarker
RE: Issue with display of porltets in the Control Panel
April 9, 2013 10:43 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

jaid shaikh

When I try the following:

<portlet>
<portlet-name>receiver</portlet-name>
<icon>/icon.png</icon>
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>1.5</control-panel-entry-weight>
<layout-cacheable>true</layout-cacheable>
<add-default-resource>true</add-default-resource>
<instanceable>false</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>receiver-portlet</css-class-wrapper>
</portlet>


I get error since the format is not proper.

So i removed <add-default-resource> but still it doesn't get displayed in the control panel
Rahul Pande
RE: Issue with display of porltets in the Control Panel
April 9, 2013 11:27 PM
Answer

Rahul Pande

Rank: Regular Member

Posts: 229

Join Date: July 6, 2010

Recent Posts

Hi Seeya,

Every tag in liferay-portlet.xml has fixed position, so you must put tags in specific manner.

The problem with your xml is you are not putting <add-default-resource></add-default-resource> at proper location, so you are getting format is not proper error.

Please update your file with following code.

 1<portlet>
 2        <portlet-name>receiver</portlet-name>
 3        <icon>/icon.png</icon>
 4        <control-panel-entry-category>content</control-panel-entry-category>
 5        <control-panel-entry-weight>1.5</control-panel-entry-weight>
 6        <layout-cacheable>true</layout-cacheable>
 7        <instanceable>false</instanceable>
 8        <header-portlet-css>/css/main.css</header-portlet-css>
 9        <footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
10        <css-class-wrapper>receiver-portlet</css-class-wrapper>
11        <add-default-resource>true</add-default-resource>
12    </portlet>



HTH
Rahul
Seeya S Kudtarker
RE: Issue with display of porltets in the Control Panel
April 9, 2013 11:40 PM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

Hi Rahul,

No it doesn't work with the order you gave. It doesn't display my portlet at all.

It had happened with my other portlets which were getting displayed but suddenly are not present in the panel

Now I create new projects and try to display in the control panel but they are not shown.
Abhi M
RE: Issue with display of porltets in the Control Panel
April 10, 2013 12:22 AM
Answer

Abhi M

Rank: Junior Member

Posts: 29

Join Date: February 28, 2012

Recent Posts

Hi Seeya,

Please use following sample(change as per your need) in liferay-portlet.xml

<portlet>
<portlet-name>myCustomPortlet</portlet-name>
<icon>/icon.png</icon>
<portlet-data-handler-class>

</portlet-data-handler-class>
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>1</control-panel-entry-weight>
<control-panel-entry-class>
The name of a class that implements the ControlPanelEntry interface.
It’s not necessary to specify the class but depends on our requirement.
</control-panel-entry-class>
<instanceable>false</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>myCustomPortlet-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>


Also, if you don't want your portlet to appear in the Add Menu so that it is not put on other pages, then in your liferay-display.xml you can include:
<display>
<category name="category.hidden">
<!--
Adding your portlet to the hidden category would not display
the portlet in the ADD Menu on the top-left-hand corner
-->
<portlet id="myCustomPortlet"></portlet>
</category>
</display>


Thanks
Rahul Pande
RE: Issue with display of porltets in the Control Panel
April 10, 2013 12:30 AM
Answer

Rahul Pande

Rank: Regular Member

Posts: 229

Join Date: July 6, 2010

Recent Posts

Hi Seeya,

Please have a look at attached sample portlet.

Thanks
Rahul
Attachments: test-portlet.rar (27.8k)
Aalap Desai
RE: Issue with display of porltets in the Control Panel
April 10, 2013 12:37 AM
Answer

Aalap Desai

Rank: New Member

Posts: 14

Join Date: September 15, 2011

Recent Posts

Hi Seeya,

If the problem is with the order the best way to check the sequence from liferay-portlet-app_6_1_0.dtd.

In this file getting the detail information of every node we are using in the liferay-portlet.xml
I hope this will help you.

Thanks,
Aalap Desai.
Seeya S Kudtarker
RE: Issue with display of porltets in the Control Panel
April 10, 2013 3:56 AM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

Hi Aaalap,

Thanks for the reply.
No it isn't with the order.
Here is the snippet of the portlet--

<portlet>
<portlet-name>receiver</portlet-name>
<icon>/icon.png</icon>
<control-panel-entry-category>content</control-panel-entry-category>
<control-panel-entry-weight>1.5</control-panel-entry-weight>
<layout-cacheable>true</layout-cacheable>
<instanceable>false</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>receiver-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>
CHARLES RILEY
RE: Issue with display of porltets in the Control Panel
April 8, 2014 10:57 PM
Answer

CHARLES RILEY

Rank: New Member

Posts: 1

Join Date: May 28, 2012

Recent Posts

I was just reviewing this myself. I noticed that there was previously a bug which hid portlets having the same "control-panel-entry-weight". You might try changing portlets which are currently hidden to new weights - instead of 1.5, change to 1.7 or 7.9. Good luck.