« Torna a About Portlets

Iframe Portlet

(Stai visualizzando una versione archiviata di questa pagina. (1.0), Vai all'ultima versione.)

New

1 Allegato
188714 Visualizzazioni
Media (4 Voti)
La media del punteggio è 4.0 stelle su 5.
Commenti
Commenti Autore Data
i tried iframe portlet to include some php... sky tb 22 dicembre 2008 2.49
This works like a champ! Note that if you... Kevin Haas 16 marzo 2009 16.23
Hi I have tried your solution , But when I add... Ahmed JEMAI 30 settembre 2009 8.16
[quote] Change the URL dynamically The Page the... Daniel D. Barciela 16 aprile 2009 4.23
I tried also to change the url dynamically... Luca Casavola 20 aprile 2009 2.38
Through experiments, I found that the anchor... Tim McGuire 5 marzo 2010 12.39
Note: sending credentials over GET is somewhat... Jason E Shao 25 giugno 2009 19.21
You may want to include a picture as I did... Ryan T 11 agosto 2009 23.15
I realized I can edit this wiki and have... Ryan T 11 agosto 2009 23.24
This is a very good Wiki article. Thank you,... Jonas Yuan 12 agosto 2009 10.07
In liferay 5.2.3 the iframe resizes itself to... Gunnar Velle 3 settembre 2009 4.03
How to open web content maximized in web... Rajeev K 20 maggio 2010 2.44
Is it true that in Liferay 6 the default... Jeroen Braan 30 luglio 2010 11.58
Yes, as a matter of fact we couldn't... Pablo Fortunatti 21 ottobre 2010 15.01
Is it possible to add more tokens for example... RJ Aquino 11 marzo 2011 7.16
This would fix my issues Active Directory ID... Scott Steven 4 aprile 2011 0.47
Has anyone figured out yet how to add more... Marc Piparo 11 agosto 2011 3.50
Is it possible to embed iframes inside an... A J 27 novembre 2011 22.24
I am trying for the life of me to get the... Chris Chiappone 29 dicembre 2010 10.29
Is there a way to handle the logout of a user... Chad Allen 19 gennaio 2011 10.59
¿I can include a portlets within an iframe and... Pablo Antonio Zamora Ortiz 16 febbraio 2012 1.18
Is it possible to modify look and feel of... Umer Hayat 26 giugno 2012 22.47
In liferay 6.1 I added the iFrame that is under... sanat behera 6 novembre 2012 4.37
I think 6.1.1 iframe has a firefox bug. Try... Achmed Tyrannus Albab 23 agosto 2013 0.07
Hi, I am trying to add an iFrame to a portlet,... Ilove Liferay 25 dicembre 2013 19.57
Changing the URL dynamically using the... c s 4 aprile 2014 14.27
How to do Form based authentication in iframe... Prasanth Kumar Raghupatruni 6 giugno 2014 12.55

i tried iframe portlet to include some php applications. after search the forum and wiki. i got the final result:

1. iframe use user-id number for authentication by default. in most case we want screen name for user login name. modify liferay-portlet.xml, find iframe section, and add "<user-principal-strategy>screenName</user-principal-strategy>" to it.

2. use 1 column template to get the max width, and use "heightNormal " and "heightMaximized " html attribute to get the desired portlet height.

3. iframe auto authentication only works in basic type, not in form type, which is not useful. i modify proxy.jsp, so auto authentication can work with form type. set up the desired form type like below:

User Name: FormUserName=
Password: FromUserPassword=

the empty field will be completed by patch below:
(i know little about java, so please correct it if it is not good):

@@ -65,6 +65,10 @@
if (pos != -1) {
userNameKey = userName.substring(0, pos);
userNameValue = userName.substring(pos + 1, userName.length());
+ if (userNameValue.length() == 0){
+ userNameValue = renderRequest.getRemoteUser();
+ }
+
}
%>

@@ -78,6 +82,9 @@
if (pos != -1) {
passwordKey = password.substring(0, pos);
passwordValue = password.substring(pos + 1, password.length());
+ if (passwordValue.length() == 0){
+ passwordValue = PortalUtil.getUserPassword(renderRequest);
+ }
}
%>
Inviato il 22/12/08 2.49.
This works like a champ! Note that if you wanted to user the screen name as the login, for the user name section, an alternative to the code would read like this:

if (userNameValue.length() == 0){
userNameValue = PortalUtil.getUser(renderRequest).getScreenName();
}

Then you don't have to change the user-principal-strategy if you don't want to.
Inviato il 16/03/09 16.23 in risposta a sky tb.

Change the URL dynamically
The Page the iframe is displaying can be also changed from the URL using the anchor element. For example, if we have an iframe in the home page, this URL would use the iframe to display Google: [http://localhost:8585/web/guest/home#http://www.google.com]

Note: This url will be displayed in all the iframes we have in a page.


Is this about the Sample>IFrame Portlet from Liferay 5.2.2? I can't change the url dynamically. When I add #http://www.google.pt to the url nothing happens
Inviato il 16/04/09 4.23.
I tried also to change the url dynamically with the anchor with no success. Please can you give a working example?
Inviato il 20/04/09 2.38 in risposta a Daniel D. Barciela.
Note: sending credentials over GET is somewhat problematical as they'll often end up in server logs, browser history (less of a problem over HTTPS as far as disk caching, but often not history logs), etc. POST is strongly preferred
Inviato il 25/06/09 19.21.
You may want to include a picture as I did explaining. I have one I attached here:

http://www.liferay.com/web/guest/community/forums/-/message_boards/message/­3775613

=)

Happy Authenticating!!

Ryan
Inviato il 11/08/09 23.15.
I realized I can edit this wiki and have attached it in the article above.
Inviato il 11/08/09 23.24 in risposta a Ryan Terwedo.
This is a very good Wiki article. Thank you, Corné.
Inviato il 12/08/09 10.07.
In liferay 5.2.3 the iframe resizes itself to fit within the window. Even if I set both height and width. I would like it to stay the size I specified.

Have anyone got any tips?
Inviato il 03/09/09 4.03.
Hi I have tried your solution , But when I add this to Liferay 5.2.3 "<user-principal-strategy>screenName</user-principal-strategy>"
I got a problem on Liferay portlet permission , it is so strange , I also got this error in the Log
13:52:09,646 WARN [PortletRequestProcessor:471] The struts path calendar does not belong to portlet 8. Check the definition in liferay-portlet.xml
13:52:09,650 WARN [PortletRequestProcessor:507]
13:52:09,754 WARN [PortletRequestProcessor:471] The struts path announcements does not belong to portlet 84. Check the definition in liferay-portlet.xml
13:52:09,763 WARN [PortletRequestProcessor:507]
13:52:09,859 WARN [PortletRequestProcessor:471] The struts path site_map does not belong to portlet 85_INSTANCE_hWA5. Check the definition in liferay-portlet.xml
13:52:09,862 WARN [PortletRequestProcessor:507]
13:52:10,119 INFO [PluginPackageUtil:1347] Checking for available updates
13:52:11,603 INFO [PluginPackageUtil:1391] Finished checking for available updates in 1478 ms
13:52:14,526 WARN [PortletRequestProcessor:471] The struts path iframe does not belong to portlet 48_INSTANCE_O8b4. Check the definition in liferay-portlet.xml
Inviato il 30/09/09 8.16 in risposta a sky tb.
Through experiments, I found that the anchor syntax works after the page is reloaded. Add #http://www.google.com to the url and then refresh the page.
Doing this from a link on the same page as the iframe portlet won't work unless something in the URL itself changes. I first tried a links with
/web/guest/dataset-queries#http://www.google.com
and
/web/guest/dataset-querie­s?#http://www.yahoo.com

and these did not work because it didn't force a page refresh. however,
/web/guest/dataset-queries?b=12345#http://www.google.com
and
/web/guest/da­taset-queries?b=999988#http://www.yahoo.com

worked because the bogus parameters represent a URL change.

I have not yet tried cache settings and actionURLs.
Inviato il 05/03/10 12.39 in risposta a Luca Casavola.
How to open web content maximized in web content display?

I am doing something like --
Portal portal = PortalUtil.getPortal();
viewURL = portal.getLayoutURL(themeDisplay) + "/-/journal_content/56/" + articleResource.getGroupId() + "/" + articleResource.getArticleId();

This works fine but not in an Iframe. How to make it working in an IFrame?
Inviato il 20/05/10 2.44.
Is it true that in Liferay 6 the default behaviour is not to share the user password between the portal and portlets and that this is also a problem for the iframe portlet?

These settings seem to be new in portal.properties:
session.shared.attributes.excludes=USER_PASSWORD
session.store.­password=false
Inviato il 30/07/10 11.58.
Yes, as a matter of fact we couldn't access/login to our iframe application until we changed session.store.password to true.
We are using @screen_name@ and @password@ in version 6.
Inviato il 21/10/10 15.01 in risposta a Jeroen Braan.
I am trying for the life of me to get the dynamic parameters to work in my portal. I have a portlet with a link that looks like this:

<a href="http://localhost:8080/web/guest/home?p_p_id=48<portlet:namespace />_projectId=<%= proj.getProjectKey() %>"><%= proj.getName() %></a>

And I also have an iFrame portlet that should just print the projectId parameter that is passed in. I cannot seem to get this to work. What am I doing wrong?

thanks.
Inviato il 29/12/10 10.29.
Is there a way to handle the logout of a user from the portal, such that the user's session running in the IFrame application can also be logged out. I have a logout URL for the app that is in the IFrame but I don't really have a good way to call it. Any thoughts on this?
Inviato il 19/01/11 10.59.
Is it possible to add more tokens for example from a custom field?
Inviato il 11/03/11 7.16 in risposta a Pablo Fortunatti.
This would fix my issues Active Directory ID numbers. I am currently looking through the iFrame files to see how it gathers these tokens.
Inviato il 04/04/11 0.47 in risposta a RJ Aquino.
Has anyone figured out yet how to add more tokens (i.e. from user custom fields)?
Inviato il 11/08/11 3.50 in risposta a Scott Steven.
Is it possible to embed iframes inside an iframe in liferay?
Inviato il 27/11/11 22.24 in risposta a Marc Piparo.
¿I can include a portlets within an iframe and not a page?
Inviato il 16/02/12 1.18.
Is it possible to modify look and feel of content of third party application displayed using Iframe portlet, using javascript or anything else?
Inviato il 26/06/12 22.47.
In liferay 6.1 I added the iFrame that is under the sample category to the page. In configuration added www.google.com

But google page is not loading. Am I missing anything? Please help
Inviato il 06/11/12 4.37.
I think 6.1.1 iframe has a firefox bug.

Try sourcing the iframe to a file as follows: /sample.jsp?name=sam&lastname=wise
or fill in accordingly. It loads fine the first time around.
Try refreshing, the iframe content no longer loads.
Liferay tends to repeat and add the last parameter to the url...which in some cases the jsp will fail to display.

If it is a bug, i am not sure how to report it.
Wish someone could update me if this is not a bug or it has been fixed.

Peace YAW.
Inviato il 23/08/13 0.07.
Hi,

I am trying to add an iFrame to a portlet, but I need to pass the user roles that the Liferay user has to the page that I am embedding with the iFrame. Is there a way to do this?

Thank you!
Inviato il 25/12/13 19.57.
Changing the URL dynamically using the following example is not working for me either. I am using Liferay 6.2. Any thoughts on how to get that accomplished?

http://localhost:8585/web/guest/home#http://www.google.com

I have even added unique characters at the end of the URL to have it reload, but it is not working. Any thoughts?

Thanks in advance.
Inviato il 04/04/14 14.27.
How to do Form based authentication in iframe in view.jsp. I have a form which is submitted while page loading but how can i link this to iframe tag..?

<body onLoad="setTimeout('document.fm.submit()', 100);">
<form action="<%= HtmlUtil.escapeAttribute("") %>" method="post" name="fm">
<input name="<%= HtmlUtil.escapeAttribute("") %>" type="hidden" value="<%= HtmlUtil.escapeAttribute(userName) %>" />
<input name="<%= HtmlUtil.escapeAttribute("") %>" type="hidden" value="<%= HtmlUtil.escapeAttribute(password) %>" />
</form>
</body>
Inviato il 06/06/14 12.55.