Forums de discussion

instanceable not working

Alan T, modifié il y a 8 années.

instanceable not working

New Member Publications: 10 Date d'inscription: 22/09/15 Publications récentes
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, modifié il y a 8 années.

RE: instanceable not working

Junior Member Publications: 53 Date d'inscription: 28/08/13 Publications récentes
Have you already, rebuilt/recompiled/redeployed the portlet?
Alan T, modifié il y a 8 années.

RE: instanceable not working

New Member Publications: 10 Date d'inscription: 22/09/15 Publications récentes
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, modifié il y a 8 années.

RE: instanceable not working

Liferay Master Publications: 529 Date d'inscription: 21/10/10 Publications récentes
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, modifié il y a 8 années.

RE: instanceable not working

Liferay Master Publications: 529 Date d'inscription: 21/10/10 Publications récentes
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, modifié il y a 8 années.

RE: instanceable not working

New Member Publications: 10 Date d'inscription: 22/09/15 Publications récentes
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, modifié il y a 8 années.

RE: instanceable not working

New Member Publications: 10 Date d'inscription: 22/09/15 Publications récentes
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, modifié il y a 8 années.

RE: instanceable not working

Liferay Master Publications: 529 Date d'inscription: 21/10/10 Publications récentes
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, modifié il y a 8 années.

RE: instanceable not working

Regular Member Publications: 208 Date d'inscription: 12/08/11 Publications récentes
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, modifié il y a 8 années.

RE: instanceable not working

New Member Publications: 10 Date d'inscription: 22/09/15 Publications récentes
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, modifié il y a 8 années.

RE: instanceable not working

Liferay Master Publications: 529 Date d'inscription: 21/10/10 Publications récentes
That's great!