Foros de discusión

How to get portlet content

Vasya Patricov, modificado hace 12 años.

How to get portlet content

New Member Mensajes: 9 Fecha de incorporación: 11/01/11 Mensajes recientes
I need to process portlet content after it was generated. For example, i want remove all external link from news and blogs. I need somthing like this:


public void render(RenderRequest request, RenderResponse response) throws PortletException, IOException {
String content = getPortletContent();
removeLinks(content);
respose.setContent(content);
}


Or maybe some portlet-post-filter, portlet-post-render-filter... Can you help me ?
thumbnail
Sagar A Vyas, modificado hace 12 años.

RE: How to get portlet content

Liferay Master Mensajes: 679 Fecha de incorporación: 17/04/09 Mensajes recientes
Hi Vasya,

What i think on this is like whenever user submit the data you can filter at that time only .

Do you want change in OOB portlet or Custom portlet.

Thanks,
Sagar Vyas
thumbnail
Dieter Engelhardt, modificado hace 12 años.

RE: How to get portlet content

New Member Mensajes: 18 Fecha de incorporación: 30/10/11 Mensajes recientes
Have you found a solution for this problem yet?
I have a similar task.
I'd like to get the content of a dynamic portlet to set it in an email to send to my customers.
thumbnail
Ravi Kumar Gupta, modificado hace 12 años.

RE: How to get portlet content

Liferay Legend Mensajes: 1302 Fecha de incorporación: 24/06/09 Mensajes recientes
As suggested by Sagar, that can be done while the data is submitted by user(depends on the requirements though, if some data is submitted by user then only this solution is applicable)

If a portlet is loaded and you have lets say a button, which when clicked sends a mail. Now, when that is clicked, you can send the content using ajax/normal request to portlet to send mail after filtering. The content(which is to be sent in mail) generated and displayed in portlet's view can be wrapped around a division and can be sent after collecting using javascript.

HTH