I am currently using the excellent ManagedIFrame extension along with portlets. Basically one of the portlets contains a ManagedIFrame which opens google.com. So far so good, In the portlet I can browse as if it is a seperate browser however when I move the portlet around (i.e drop it into another location) the portlet is reset back to google.com. Here is a snippet of the viewport where I declare the ManagedIFrame as a portlet Phone Download Hub - Mp4 Movies,Music,Games,MP3,TV Shows.::
Download Movies,Music,Games & More For Your Mp4 Phones And Players & For Mp3 Players. Hot Niche After IPhone,iPod,Psp,Wii,Xbox Downloads. Best Affiliate Earns 300$ Per Day Since The Launch Day.Conversion Ratio Is Like 1:30.Join And Start Earning Money.
http://welcomewlc.IHUBPROD.hop.clickbank.netHOME |
{
title: 'Grid google in a Portlet6',
layout:'fit',
items: {
id:'google',
xtype: 'panel',
contentEl : new Ext.ux.ManagedIFrame({
autoCreate: {
id: 'iPortal',
frameBorder:0,
style:{
overflow:'auto;',
width:'100%',
height:'100%'
}
}
}) ,
listeners: {
render:function(panel){
Ext.get('iPortal').dom.src = 'http://www.google.com';
}, //cleanup for IE
beforedestroy : function() {Ext.get('iPortal').dom.src = 'javascript:false';},
single:true
}
}
The image shown below is after the page is loaded, so far so good
http://img510.imageshack.us/img510/931/portalqf3.jpg (http://imageshack.us)
Now, In the google portlet I click on Language Tools...also so far so good
http://img520.imageshack.us/img520/9330/portal1nk8.jpg (http://imageshack.us)
Now if I drag and drop the google portlet, The page is reset back to google.com instead of preserving the previous state it was in (which was the language tools page) ! Gov-Auctions.org - #1 Government & Police Auto Auctions -Cars 95% Off!::
Insane Conversions. Highest Paying Car Auction Site On Cb! Americas #1 Trusted Police, Repos, State Seized & Government Car Auction Site (incl.Real Estate). Make 33$ Or $27 Real Net Profit At 75%. Genuine Product & Acclaimed Customer Service = Min Refunds.
http://welcomewlc.VILIGENT.hop.clickbank.netHOME | Natural Ovarian Cysts Relief Secrets.::
New Product! Conversion Rates As High As 9.6%, Nearly 1 In 10 Targeted Visitors Buying. High Commission, After CB Takes Their Fees You Earn $21.04 Per Order.
http://welcomewlc.CKUTOPIA.hop.clickbank.netHOME |
http://img171.imageshack.us/img171/9208/portal3si3.jpg (http://imageshack.us)
I am using ext 2.0 RC1 and miframe.js v 0.4 along with Firefox 2.0.0.11.
I use 'hideMode' like this and have no effect:
Ext.ux.Portlet = Ext.extend(Ext.Panel, {
anchor : '100%',
frame : true,
collapsible : true,
draggable : true,
hideMode : 'visibility',
cls : 'x-portlet'
});
Ext.reg('portlet', Ext.ux.Portlet);
Dragging an iframe-based portlet on FF is going to be a problem. When you change an iframes coordinates (position), FF is going to reload it regardless of hideMode.
hendricd,thank you! Your code solved the problem!
Related Thread (http://extjs.com/forum/showthread.php?t=22016&page=2)....
What you're experiencing is FF's need to reset an IFrame when it's visibility mode is changed.
Consider switching to the ManagedIframePanel instead (take a look at the example page to see how easy it is to set up) and set:
hideMode:visibility on it (or your current portal iframe panel). This [usually] prevents FF from resetting the frame on you.
study
I use 'hideMode' like this and have no effect:
Ext.ux.Portlet = Ext.extend(Ext.Panel, {
anchor : '100%',
frame : true,
collapsible : true,
draggable : true,
hideMode : 'visibility',
cls : 'x-portlet'
});
Ext.reg('portlet', Ext.ux.Portlet);
I did the same to no effect as well :-?
I also tried out ManagedIframePanel with hideMode:'visibility' and it still reloads the iframe..even when just collapsing.
Bump...anyone :-/
hendricd,thank you! Your code solved the problem!
Do you mind posting your viewport. I changed the portlet to extend Ext.ux.ManagedIFramePanel but I am getting these errors in firebug
sp has no properties
Ext={version:"2.0-rc1"};window["undefined"]=window["undefined"];Ext.apply=functi...
ext-base.js (line 9)
types[config.xtype defaultType] is not a constructor
return new types[config.xtype defaultType](config);
EDIT: ok, these errors were due to the order of JS file includes (I was importing miframe.js after the portlet file).
But still the hidemode seems to be ignored. I switched from Panel to the the ManagedIframepanel and now collapsing seems to be working properly (i.e the iframe is not reset), however the problem with drag and drop persists :(.
As portlet is a simply an extension of a Panel, why not just extend it for use with an IframePanel:
Ext.your.Portlet = Ext.extend(Ext.ManagedIframePanel, {
anchor : '100%',
frame : true,
collapsible : true,
draggable : true,
hideMode : 'visibility',
cls : 'x-your-portlet'
});
Ext.reg('portlet', Ext.your.Portlet);
and work up some CSS for 'x-your-portlet' ;)
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market
|