Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Kush Sahu
How to use IFrame in liferay portlet?
January 8, 2013 11:02 PM
Answer

Kush Sahu

Rank: Junior Member

Posts: 25

Join Date: August 7, 2012

Recent Posts

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.
Muniraj saravanan
RE: How to use IFrame in liferay portlet?
January 8, 2013 11:35 PM
Answer

Muniraj saravanan

Rank: Junior Member

Posts: 75

Join Date: June 1, 2011

Recent Posts

Have you used Iframe portlet ?

http://www.liferay.com/community/wiki/-/wiki/Main/Iframe%20Portlet
Kush Sahu
RE: How to use IFrame in liferay portlet?
January 9, 2013 12:59 AM
Answer

Kush Sahu

Rank: Junior Member

Posts: 25

Join Date: August 7, 2012

Recent Posts

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.
Neil Griffin
RE: How to use IFrame in liferay portlet?
January 9, 2013 9:56 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2179

Join Date: July 26, 2005

Recent Posts

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
RE: How to use IFrame in liferay portlet?
January 9, 2013 9:49 PM
Answer

Kush Sahu

Rank: Junior Member

Posts: 25

Join Date: August 7, 2012

Recent Posts

I have set src as:
<iframe src="upload.xhtml" width="100%" height="300">
</iframe>
Neil Griffin
RE: How to use IFrame in liferay portlet?
January 10, 2013 2:58 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2179

Join Date: July 26, 2005

Recent Posts

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
RE: How to use IFrame in liferay portlet?
January 10, 2013 11:31 PM
Answer

Kush Sahu

Rank: Junior Member

Posts: 25

Join Date: August 7, 2012

Recent Posts

Thank you for your replies. Its a portal page.
art moore
RE: How to use IFrame in liferay portlet?
January 11, 2013 2:03 AM
Answer

art moore

Rank: New Member

Posts: 2

Join Date: January 11, 2013

Recent Posts

Iframe it can use in liferay portlet see in wikipedia.org
Kush Sahu
RE: How to use IFrame in liferay portlet?
January 11, 2013 3:37 AM
Answer

Kush Sahu

Rank: Junior Member

Posts: 25

Join Date: August 7, 2012

Recent Posts

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.
Neil Griffin
RE: How to use IFrame in liferay portlet?
January 11, 2013 7:37 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2179

Join Date: July 26, 2005

Recent Posts

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:

1<iframe src="http://localhost:8080/web/guest/home" />


But here is a relative URL that should work:

1<iframe src="/web/guest/home" />
Kush Sahu
RE: How to use IFrame in liferay portlet?
January 14, 2013 9:19 PM
Answer

Kush Sahu

Rank: Junior Member

Posts: 25

Join Date: August 7, 2012

Recent Posts

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.
Neil Griffin
RE: How to use IFrame in liferay portlet?
January 15, 2013 3:37 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2179

Join Date: July 26, 2005

Recent Posts

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
RE: How to use IFrame in liferay portlet?
January 17, 2013 10:24 PM
Answer

Kush Sahu

Rank: Junior Member

Posts: 25

Join Date: August 7, 2012

Recent Posts

Sorry for my late reply. Yes I meant xhtml page jsf view.
Neil Griffin
RE: How to use IFrame in liferay portlet?
January 18, 2013 7:24 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2179

Join Date: July 26, 2005

Recent Posts

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
RE: How to use IFrame in liferay portlet?
February 7, 2013 3:01 AM
Answer

Kush Sahu

Rank: Junior Member

Posts: 25

Join Date: August 7, 2012

Recent Posts

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.
Neil Griffin
RE: How to use IFrame in liferay portlet?
February 25, 2013 9:44 AM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2179

Join Date: July 26, 2005

Recent Posts

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)