留言板

Integreating Pentaho

thumbnail
Apoorva Prakash,修改在13 年前。

Integreating Pentaho

Liferay Master 帖子: 658 加入日期: 10-6-15 最近的帖子
Hello all,
I have created a portlet which is working fine with pentaho, rendering contents fine with doPortletView() method...
But the problem is comming when I am using custom configuration.
as, these both are in different scopes, portletPreference object is not accessable at all.
I have tried through

String portletResource = ParamUtil.getString(request, "portletResource");
PortletPreferences preferences = PortletPreferencesFactoryUtil.getPortletSetup(request, portletResource);

and
PortletPreferencesLocalServiceUtil.getPortletPreferences(ts.getPlid(), PortalUtil.getPortletId(request))

where ts is a ThemeDisplay object
and through page layout too...
but every time,
if(Validator.isNotNull(prefs))

condition got execute.
Plese suggest something positive...
thumbnail
Corné Aussems,修改在13 年前。

RE: Integreating Pentaho

Liferay Legend 帖子: 1313 加入日期: 06-10-3 最近的帖子
Some working code



				PortletPreferences preferences = ActionRequest request.getPreferences();
				preferences.setValue("FOO", ""VALUE");
				preferences.store();

RenderRequest.getPreferences().getValue("FOO","DEFAULT VALUE");



thumbnail
Apoorva Prakash,修改在13 年前。

RE: Integreating Pentaho

Liferay Master 帖子: 658 加入日期: 10-6-15 最近的帖子
Hi Corné,
Thanks for your reply first...
The problem is at the place where I am accessing the value, which is outside the scope of Liferay.
The values are getting stored in PortletPreferences table in form of XML, the problem is in fetching those values in doPortletView() method (renderer).

Of course, I've tried
PortletPreferences preferences = renderRequest.getPreferences();
String  KEY= preferences.getValue("KEY", StringPool.BLANK);

before using all those mentioned code, which is synonymous to
RenderRequest.getPreferences().getValue("FOO","DEFAULT VALUE");

but that doesn't worked at all.
thumbnail
Corné Aussems,修改在13 年前。

RE: Integreating Pentaho

Liferay Legend 帖子: 1313 加入日期: 06-10-3 最近的帖子
According to the JSR168 specs there is a generic way of handling portlet preferences.
That is what my code is about.

The Liferay LocalServiceUtils such as PortletPreferencesLocalServiceUtil can be used in portlets running in the same container.

I guess you could find themedisplay like this
aReq.getAttribute(WebKeys.THEME_DISPLAY);



maybe this could help
thumbnail
Rajesh GR,修改在8 年前。

RE: Integreating Pentaho

Regular Member 帖子: 161 加入日期: 10-2-8 最近的帖子
Apoorva Prakash:
Hello all,
I have created a portlet which is working fine with pentaho, rendering contents fine with doPortletView() method...
But the problem is comming when I am using custom configuration.
as, these both are in different scopes, portletPreference object is not accessable at all.
I have tried through

String portletResource = ParamUtil.getString(request, "portletResource");
PortletPreferences preferences = PortletPreferencesFactoryUtil.getPortletSetup(request, portletResource);

and
PortletPreferencesLocalServiceUtil.getPortletPreferences(ts.getPlid(), PortalUtil.getPortletId(request))

where ts is a ThemeDisplay object
and through page layout too...
but every time,
if(Validator.isNotNull(prefs))

condition got execute.
Plese suggest something positive...


Hi Apoorva Prakash,

Since you have already able to develop pentaho portlets, Can you please guide me in developing them and the required files of pentaho.

I tried https://www.liferay.com/community/wiki/-/wiki/Main/Pentaho+Portlets but getting deployment issues,

It would be great if you help me out with some sample steps/configurations,

Thanks in Advance.

Regards,
Rajesh.