Foros de discusión

How to use IFrame in liferay portlet?

Kush Sahu, modificado hace 11 años.

How to use IFrame in liferay portlet?

Junior Member Mensajes: 25 Fecha de incorporación: 7/08/12 Mensajes recientes
Currently I am working on liferay 6.0

In my project I need to show a page in iframe. I have added iframe in my jsf page. When user request that jsf page whole page works fine but that iframe doesnt show respective page. Except that it shows that page not found and in console side gives message Current URL generates exception:null.

Please somedbody tell me how can I use iframe in portlet.
thumbnail
Muniraj saravanan, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Junior Member Mensajes: 95 Fecha de incorporación: 1/06/11 Mensajes recientes
Have you used Iframe portlet ?

http://www.liferay.com/community/wiki/-/wiki/Main/Iframe%20Portlet
Kush Sahu, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Junior Member Mensajes: 25 Fecha de incorporación: 7/08/12 Mensajes recientes
Muniraj saravanan:
Have you used Iframe portlet ?

http://www.liferay.com/community/wiki/-/wiki/Main/Iframe%20Portlet



I tried that IFrame portle with the help of wiki but it did nt showed me required page. I added that portlet and then in url, just to check, gave http://www.google.com/ . But nothing was displayed in iframe portlet.
thumbnail
Neil Griffin, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
In my project I need to show a page in iframe. I have added iframe in my jsf page. When user request that jsf page whole page works fine but that iframe doesnt show respective page. Except that it shows that page not found and in console side gives message Current URL generates exception:null.


What is the value of the src attribute that you are setting with the iframe? In other words, what is the URL?
Kush Sahu, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Junior Member Mensajes: 25 Fecha de incorporación: 7/08/12 Mensajes recientes
I have set src as:
<iframe src="upload.xhtml" width="100%" height="300">
</iframe>
thumbnail
Neil Griffin, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
When you wrote the word "page":
I need to show a page in iframe


Do you mean a Portal-Page, or a JSF-Page/Facelet-View?
Kush Sahu, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Junior Member Mensajes: 25 Fecha de incorporación: 7/08/12 Mensajes recientes
Thank you for your replies. Its a portal page.
art moore, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

New Member Mensajes: 2 Fecha de incorporación: 11/01/13 Mensajes recientes
Iframe it can use in liferay portlet see in wikipedia.org
Kush Sahu, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Junior Member Mensajes: 25 Fecha de incorporación: 7/08/12 Mensajes recientes
I have seen wiki about iframe-portlet. After adding the iframe portlet to my page , when I added url of google, just to test, it didnt worked.
thumbnail
Neil Griffin, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
I have set src as:
<iframe src="upload.xhtml" width="100%" height="300">
</iframe>

Thank you for your replies. Its a portal page.


The src attribute of the iframe would need to be a URL that the portal recognizes as a portal page.

For example, here is an absolute URL:

<iframe src="http://localhost:8080/web/guest/home"></iframe>&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;But here is a relative URL that should work:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;iframe src="/web/guest/home" /&gt;&lt;/code&gt;&lt;/pre&gt;
Kush Sahu, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Junior Member Mensajes: 25 Fecha de incorporación: 7/08/12 Mensajes recientes
Neil in that case If I am right I have to make that page as portlet. Actually I want to show particular area of that page and I think it would be good if its a xhtm page.
thumbnail
Neil Griffin, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
I think it would be good if its a xhtm page.


When you wrote "xhtm page" are you referring to a JSF view? Or are you referring to some static markup in an xhtml document?
Kush Sahu, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Junior Member Mensajes: 25 Fecha de incorporación: 7/08/12 Mensajes recientes
Sorry for my late reply. Yes I meant xhtml page jsf view.
thumbnail
Neil Griffin, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
What is the software requirement that you are trying to fulfill? Are you simply trying to provide a file-upload control so that they can upload files without a full page submit?
Kush Sahu, modificado hace 11 años.

RE: How to use IFrame in liferay portlet?

Junior Member Mensajes: 25 Fecha de incorporación: 7/08/12 Mensajes recientes
Neil Griffin:
What is the software requirement that you are trying to fulfill? Are you simply trying to provide a file-upload control so that they can upload files without a full page submit?



Yes this is my requirement. I am simply trying to upload file without submission of whole page.
thumbnail
Neil Griffin, modificado hace 11 años.

RE: How to use IFrame in liferay portlet? (Respuesta)

Liferay Legend Mensajes: 2655 Fecha de incorporación: 27/07/05 Mensajes recientes
In that case, you can simply use an ajax-based file upload control. There are three available (at the time of this writing)

ICEfaces ace:fileEntry (example usage is shown in the icefaces3-portlet demo)
PrimeFaces prime:fileUpload (example usage is shown in the primefaces3-portlet demo)
RichFaces rich:fileUpload (example usage is shown in the richfaces4-portlet demo)