掲示板

How does Liferay Portal call the render phase of portlets?

thumbnail
6年前 に Jonathan Cruz によって更新されました。

How does Liferay Portal call the render phase of portlets?

New Member 投稿: 19 参加年月日: 16/03/18 最新の投稿
I´m traying to call a portlet render phase, not with another portlet but with a service, so do you know How does Liferay Portal call the render phase of portlets?, maybe I can use that logic in my service...
thumbnail
6年前 に David H Nebinger によって更新されました。

RE: How does Liferay Portal call the render phase of portlets?

Liferay Legend 投稿: 14915 参加年月日: 06/09/02 最新の投稿
You can't and shouldn't do this. There's a lot of prework that goes into the preparation of the environment before render is called.

Besides, the render phase returns an HTML fragment which is likely not what you want or need with "a service".








Come meet me at the 2017 LSNA!
thumbnail
6年前 に Jonathan Cruz によって更新されました。

RE: How does Liferay Portal call the render phase of portlets?

New Member 投稿: 19 参加年月日: 16/03/18 最新の投稿
This is my scenario: I have a remote web service built with Service Builder, this service receives 2 parameters and make some searching logic,
I have a portlet that makes a request to this service and draws a graphic.
Also I have an Amazon Echo Dot and it uses this service, pass it the parameters and the service works.
With this, I'd like to call the render phase without interact with the portlet itself, just with the remote web service, it could be possible?
Or am I crazy?
Thanks for your previous answer!
thumbnail
6年前 に Jack Bakker によって更新されました。

RE: How does Liferay Portal call the render phase of portlets?

Liferay Master 投稿: 978 参加年月日: 10/01/03 最新の投稿
I don't understand your use case as described. Is your remote service not returning what you need ? Have you looked at serve resource ?
thumbnail
6年前 に Jonathan Cruz によって更新されました。

RE: How does Liferay Portal call the render phase of portlets?

New Member 投稿: 19 参加年月日: 16/03/18 最新の投稿
My Alexa Echo Dot makes a request to my Liferay Portal.
Aleka asks for information about car sales by passing parameters like year, country, etc, through a remote web service (Service Builder).
Data is stored in Liferay Portal and I use Service Builer to map them.
Charts should be showed in a Liferay Portlet.
In summary, I need to show the charts when I ask to Alexa

I've been searching and I found that I need to use a worker for map data and use some logic in my portlet so that it maps new changes or requests
(Sorry, I think my English sucks emoticon )
thumbnail
6年前 に Jack Bakker によって更新されました。

RE: How does Liferay Portal call the render phase of portlets?

Liferay Master 投稿: 978 参加年月日: 10/01/03 最新の投稿
so are you saying that you want to talk to Alexa and then miraculously have charts appear on a browser somewhere in the world ?
thumbnail
6年前 に Jonathan Cruz によって更新されました。

RE: How does Liferay Portal call the render phase of portlets?

New Member 投稿: 19 参加年月日: 16/03/18 最新の投稿
No, actually in my Portlet view.jsp, am I crazy? emoticon
thumbnail
6年前 に David H Nebinger によって更新されました。

RE: How does Liferay Portal call the render phase of portlets?

Liferay Legend 投稿: 14915 参加年月日: 06/09/02 最新の投稿
Not crazy, no, but you shouldn't be going through the render phase for this. Render phase is reserved for use in part of the portlet lifecycle.

Jack hinted at your answer, though. You want to implement a resource phase for serving the graphic separately from the render phase that your portlet is using to display in the portal.

That way you can share the logic (for building the graph I guess), you just let the render phase handle the return when called via Alexa.








Come meet me at the 2017 LSNA!