Foros de discusión

Problem when embedding a portlet inside a theme

tenaidem g c, modificado hace 14 años.

Problem when embedding a portlet inside a theme

New Member Mensajes: 6 Fecha de incorporación: 1/04/09 Mensajes recientes
Hello everybody,

I have a problem when embedding a portlet inside a theme.
I have developed a portlet and a theme using Liferay plugins SDK with no problem.
After deploying they works fine both of them, the theme and the portlet.
The problem starts when I want to embbed the portlet inside the theme.
In order to do this, I have added this lines in portal_normal.vm:

$theme.runtime("31", "", $velocityPortletPreferences.toString())
$theme.runtime("portlet_nuevo_que_he_desarrollado_yo", "", $velocityPortletPreferences.toString())

And what happen is: Portlet 31 (that is image gallery portlet provided by Liferay) is displayed fine but the my one appears disabled and this messages is displayed "this portlet has been undeployed. Please redeploy it or remove it from the page." but what the message said is not true at all because there is another instance of the same portlet (which has been added manually using the "add application" option in the dock menu) at the same time that is displayed perfectly.

Any ideas? Thanks
thumbnail
Jatin Panchal, modificado hace 13 años.

RE: Problem when embedding a portlet inside a theme

New Member Mensajes: 15 Fecha de incorporación: 26/07/10 Mensajes recientes
Hi All,
I want to embed a social networking portlet(summary portlet) in theme in LR 6.0 EE SP1.
I am facing issue with velocity variables which I have set in older theme which was in LR 5.2.3.

In LR 5.2.3 I have used following code in one of our vm file :
$velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
$theme.runtime("1_WAR_wolportlet", "", $velocityPortletPreferences.toString())
$velocityPortletPreferences.reset()
It works fine. portlet-setup-show-borders was set with it's value in PortletPreference table.

In LR 6.0 EE SP1 I have used almost same code in of our vm file :
$velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
$theme.runtime("1_WAR_socialnetworkingportlet", "", $velocityPortletPreferences.toString())
$velocityPortletPreferences.reset()
here portlet-setup-show-borders is not getting stored in PortletPreference table.

can anybody help me why this velocity variable is not getting stored in PortletPreference table?

Thanks,
Jatin Panchal
thumbnail
Jatin Panchal, modificado hace 13 años.

RE: Problem when embedding a portlet inside a theme

New Member Mensajes: 15 Fecha de incorporación: 26/07/10 Mensajes recientes
Jatin Panchal:
Hi All,
I want to embed a social networking portlet(summary portlet) in theme in LR 6.0 EE SP1.
I am facing issue with velocity variables which I have set in older theme which was in LR 5.2.3.

In LR 5.2.3 I have used following code in one of our vm file :
$velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
$theme.runtime("1_WAR_wolportlet", "", $velocityPortletPreferences.toString())
$velocityPortletPreferences.reset()
It works fine. portlet-setup-show-borders was set with it's value in PortletPreference table.

In LR 6.0 EE SP1 I have used almost same code in of our vm file :
$velocityPortletPreferences.setValue("portlet-setup-show-borders", "false")
$theme.runtime("1_WAR_socialnetworkingportlet", "", $velocityPortletPreferences.toString())
$velocityPortletPreferences.reset()
here portlet-setup-show-borders is not getting stored in PortletPreference table.

can anybody help me why this velocity variable is not getting stored in PortletPreference table?

Thanks,
Jatin Panchal



Also this was work on LR 6 EE but not in LR 6 EE SP1.
thumbnail
Pina Springer, modificado hace 13 años.

RE: Problem when embedding a portlet inside a theme

New Member Mensajes: 16 Fecha de incorporación: 16/02/10 Mensajes recientes
I have exactly the same problem!

In 5.2.3 it worked for me to set the portlet preferences in my themes.

But now in EE 5.2 SP5 it does not work any more, the portlet preferences are not saved to the database.

Anybody who knows a solution?
Nick Straguzzi, modificado hace 12 años.

RE: Problem when embedding a portlet inside a theme

New Member Mensajes: 20 Fecha de incorporación: 29/04/11 Mensajes recientes
(*Bump*)

I'm having the same problem as well. Can't find any information online about it. Is this a bug in 6.0.7, or did something change? Thanks.
thumbnail
srikanth a, modificado hace 10 años.

RE: Problem when embedding a portlet inside a theme

Regular Member Mensajes: 144 Fecha de incorporación: 21/02/11 Mensajes recientes
Hi jatin,

Any luck on this issue. I am trying to find the solution for this. If you can share your solution thet would be helpful.

regards
Sri
thumbnail
Jatin Panchal, modificado hace 9 años.

RE: Problem when embedding a portlet inside a theme

New Member Mensajes: 15 Fecha de incorporación: 26/07/10 Mensajes recientes
Hi Srikanth,

Can you try below code as in one of my project I added the same code and it works fine for me for liferay-portal-tomcat-6.0-ee-sp1.

#set ($VOID = $velocityPortletPreferences.setValue('portlet-setup-show-borders', 'false'))
#set ($myPortletId = "test_WAR_MyAppportlet")
$theme.runtime($myPortletId, '', $velocityPortletPreferences.toString())
#set ($VOID = $velocityPortletPreferences.reset())

I am not sure your version but do let me know if this won't work for you.

Thanks,
Jatin Panchal