Foros de discusión

instanceable not working

Alan T, modificado hace 8 años.

instanceable not working

New Member Mensajes: 10 Fecha de incorporación: 22/09/15 Mensajes recientes
Hi,
The instanceable flag does not seem to be working.

This concerns the portletbridge protlet, available for download at http://www.portletbridge.org.
In its liferay-portal.xml, I have set the instanceable flag to true, but I can still only add one instance of the portlet on a page.

<liferay-portlet-app>
<portlet>
<portlet-name>portletbridge</portlet-name>
<icon>/icon.png</icon>
<instanceable>true</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>portletbridge-portlet</css-class-wrapper>
</portlet>

What am I missing? Is there another setting that needs to be modified?
I have tried a bunch of different changes and none seem to produce any effect.

Thank you,
Alan
thumbnail
Ho Yin Edward Chow, modificado hace 8 años.

RE: instanceable not working

Junior Member Mensajes: 53 Fecha de incorporación: 28/08/13 Mensajes recientes
Have you already, rebuilt/recompiled/redeployed the portlet?
Alan T, modificado hace 8 años.

RE: instanceable not working

New Member Mensajes: 10 Fecha de incorporación: 22/09/15 Mensajes recientes
Thank you for your reply.

Yes, I have redeployed several times.

I have also tried creating other portlets and changed the instanceable flag and those portlets became instaceable, but not this particular one.

Anything else I should try?

Any idea would be greatly appreciated.
thumbnail
Vilmos Papp, modificado hace 8 años.

RE: instanceable not working

Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
Hi,

Try to use the Web Proxy Portlet, it's instancable and as far as I know it's built on portletbridge.

Regards,
Vilmos
thumbnail
Vilmos Papp, modificado hace 8 años.

RE: instanceable not working

Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
Oh, and it's in the bundle already. At least the EE version, but I think, it's not an EE only plugin.
Alan T, modificado hace 8 años.

RE: instanceable not working

New Member Mensajes: 10 Fecha de incorporación: 22/09/15 Mensajes recientes
Hi,
Thank you for your reply.
Unfortunately, I cannot just use the webproxy portlet. I need the portletbridge because I made a small change (3 lines of code) so an extra parameter is passed to the target website.

So, I need the portletbridge. Other than the two extra lines of code, the portlet is identical to the original portletbridge code.

Is there a hidden setting that would prevent it from being instanceable? I even reverted my changes and went back to the original portletbridge and it still does not work.

Alan
Alan T, modificado hace 8 años.

RE: instanceable not working

New Member Mensajes: 10 Fecha de incorporación: 22/09/15 Mensajes recientes
Also, (it may be irrelevant) I noticed that in the Add drop-down menu some portlets have a green box in front of them and some a blue box: I am able to add the the green portlets multiple times.

Just an observation, in case it may prove to be useful clue to someone out there.
thumbnail
Vilmos Papp, modificado hace 8 años.

RE: instanceable not working

Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
Honestly, I have no idea, why it is not instanceable when you set it to be. Probably, you can try to customize the webproxy portlet, or compare it's settings with the portletbridge portlet.
thumbnail
Gurumurthy Godlaveeti, modificado hace 8 años.

RE: instanceable not working

Regular Member Mensajes: 208 Fecha de incorporación: 12/08/11 Mensajes recientes
Can you share the code over here by zipping if possible.

So we can look into it.

One more question,
Do you see green icon for your portlet bridge portlet or not?

Thanks
Guru
Alan T, modificado hace 8 años.

RE: instanceable not working

New Member Mensajes: 10 Fecha de incorporación: 22/09/15 Mensajes recientes
Guys, thank you very much for your input. I really appreciate it.

The problem (of course) was caused by my mistake:

My portlet.xml <portlet-name>

<portlet>
<description>PortletBridge Portlet Bundle</description>
<portlet-name>PortletBridgePortlet</portlet-name>
<display-name>Portlet Bridge</display-name>

did not match the <portlet-name> in liferay-portlet.xml

<liferay-portlet-app>
<portlet>
<portlet-name>PortletBridgePortlet</portlet-name>
<icon>/icon.png</icon>
<instanceable>true</instanceable>

Once I made them to be the same, everything started working.
Thanks.
thumbnail
Vilmos Papp, modificado hace 8 años.

RE: instanceable not working

Liferay Master Mensajes: 529 Fecha de incorporación: 21/10/10 Mensajes recientes
That's great!