Foren

Integreating Pentaho

thumbnail
Apoorva Prakash, geändert vor 13 Jahren.

Integreating Pentaho

Liferay Master Beiträge: 658 Beitrittsdatum: 15.06.10 Neueste Beiträge
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, geändert vor 13 Jahren.

RE: Integreating Pentaho

Liferay Legend Beiträge: 1313 Beitrittsdatum: 03.10.06 Neueste Beiträge
Some working code



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

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



thumbnail
Apoorva Prakash, geändert vor 13 Jahren.

RE: Integreating Pentaho

Liferay Master Beiträge: 658 Beitrittsdatum: 15.06.10 Neueste Beiträge
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, geändert vor 13 Jahren.

RE: Integreating Pentaho

Liferay Legend Beiträge: 1313 Beitrittsdatum: 03.10.06 Neueste Beiträge
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, geändert vor 8 Jahren.

RE: Integreating Pentaho

Regular Member Beiträge: 161 Beitrittsdatum: 08.02.10 Neueste Beiträge
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.