Fórum

Issue with display of porltets in the Control Panel

Seeya S Kudtarker, modificado 11 Anos atrás.

Issue with display of porltets in the Control Panel

Regular Member Postagens: 187 Data de Entrada: 16/01/13 Postagens Recentes
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?
thumbnail
jaid shaik, modificado 11 Anos atrás.

RE: Issue with display of porltets in the Control Panel

Regular Member Postagens: 171 Data de Entrada: 08/10/10 Postagens Recentes
HI Seeya S Kudtarker,

can you please try below code:

<portlet>
		<portlet-name>portletname</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>
	</portlet>


or

<portlet>
		<portlet-name>portletname</portlet-name>
		<icon>/icon.png</icon>
		<control-panel-entry-category>my</control-panel-entry-category>
		<layout-cacheable>true</layout-cacheable>
		<add-default-resource>true</add-default-resource>
	</portlet>


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

I think it helps you.
Seeya S Kudtarker, modificado 11 Anos atrás.

RE: Issue with display of porltets in the Control Panel

Regular Member Postagens: 187 Data de Entrada: 16/01/13 Postagens Recentes
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
thumbnail
Rahul Pande, modificado 11 Anos atrás.

RE: Issue with display of porltets in the Control Panel

Expert Postagens: 310 Data de Entrada: 07/07/10 Postagens Recentes
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.

<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>



HTH
Rahul
Seeya S Kudtarker, modificado 11 Anos atrás.

RE: Issue with display of porltets in the Control Panel

Regular Member Postagens: 187 Data de Entrada: 16/01/13 Postagens Recentes
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, modificado 11 Anos atrás.

RE: Issue with display of porltets in the Control Panel

Junior Member Postagens: 28 Data de Entrada: 29/02/12 Postagens Recentes
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
thumbnail
Rahul Pande, modificado 11 Anos atrás.

RE: Issue with display of porltets in the Control Panel

Expert Postagens: 310 Data de Entrada: 07/07/10 Postagens Recentes
Hi Seeya,

Please have a look at attached sample portlet.

Thanks
Rahul
Aalap Desai, modificado 11 Anos atrás.

RE: Issue with display of porltets in the Control Panel

New Member Postagens: 14 Data de Entrada: 16/09/11 Postagens Recentes
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, modificado 11 Anos atrás.

RE: Issue with display of porltets in the Control Panel

Regular Member Postagens: 187 Data de Entrada: 16/01/13 Postagens Recentes
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, modificado 10 Anos atrás.

RE: Issue with display of porltets in the Control Panel

New Member Mensagem: 1 Data de Entrada: 28/05/12 Postagens Recentes
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.