Fórum

How does Liferay Portal call the render phase of portlets?

thumbnail
Jonathan Cruz, modificado 6 Anos atrás.

How does Liferay Portal call the render phase of portlets?

New Member Postagens: 19 Data de Entrada: 18/03/16 Postagens Recentes
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
David H Nebinger, modificado 6 Anos atrás.

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

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
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
Jonathan Cruz, modificado 6 Anos atrás.

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

New Member Postagens: 19 Data de Entrada: 18/03/16 Postagens Recentes
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
Jack Bakker, modificado 6 Anos atrás.

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

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
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
Jonathan Cruz, modificado 6 Anos atrás.

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

New Member Postagens: 19 Data de Entrada: 18/03/16 Postagens Recentes
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
Jack Bakker, modificado 6 Anos atrás.

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

Liferay Master Postagens: 978 Data de Entrada: 03/01/10 Postagens Recentes
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
Jonathan Cruz, modificado 6 Anos atrás.

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

New Member Postagens: 19 Data de Entrada: 18/03/16 Postagens Recentes
No, actually in my Portlet view.jsp, am I crazy? emoticon
thumbnail
David H Nebinger, modificado 6 Anos atrás.

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

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
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!