掲示板

Problem when embedding a portlet inside a theme

14年前 に tenaidem g c によって更新されました。

Problem when embedding a portlet inside a theme

New Member 投稿: 6 参加年月日: 09/04/01 最新の投稿
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
13年前 に Jatin Panchal によって更新されました。

RE: Problem when embedding a portlet inside a theme

New Member 投稿: 15 参加年月日: 10/07/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
13年前 に Jatin Panchal によって更新されました。

RE: Problem when embedding a portlet inside a theme

New Member 投稿: 15 参加年月日: 10/07/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
13年前 に Pina Springer によって更新されました。

RE: Problem when embedding a portlet inside a theme

New Member 投稿: 16 参加年月日: 10/02/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?
12年前 に Nick Straguzzi によって更新されました。

RE: Problem when embedding a portlet inside a theme

New Member 投稿: 20 参加年月日: 11/04/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
10年前 に srikanth a によって更新されました。

RE: Problem when embedding a portlet inside a theme

Regular Member 投稿: 144 参加年月日: 11/02/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
9年前 に Jatin Panchal によって更新されました。

RE: Problem when embedding a portlet inside a theme

New Member 投稿: 15 参加年月日: 10/07/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