留言板

Problem when embedding a portlet inside a theme

tenaidem g c,修改在14 年前。

Problem when embedding a portlet inside a theme

New Member 帖子: 6 加入日期: 09-4-1 最近的帖子
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,修改在13 年前。

RE: Problem when embedding a portlet inside a theme

New Member 帖子: 15 加入日期: 10-7-26 最近的帖子
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,修改在13 年前。

RE: Problem when embedding a portlet inside a theme

New Member 帖子: 15 加入日期: 10-7-26 最近的帖子
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,修改在12 年前。

RE: Problem when embedding a portlet inside a theme

New Member 帖子: 16 加入日期: 10-2-16 最近的帖子
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,修改在12 年前。

RE: Problem when embedding a portlet inside a theme

New Member 帖子: 20 加入日期: 11-4-29 最近的帖子
(*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,修改在9 年前。

RE: Problem when embedding a portlet inside a theme

Regular Member 帖子: 144 加入日期: 11-2-21 最近的帖子
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,修改在9 年前。

RE: Problem when embedding a portlet inside a theme

New Member 帖子: 15 加入日期: 10-7-26 最近的帖子
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