-
24 Mar 2011 9:04 PM #1
Updating Portal to 4.0 with Viewport Override
Updating Portal to 4.0 with Viewport Override
I am working on application that previously utilized the portal aspect of the ExtJS. I found this set of code that worked for ExtJS 3 (Provided in another ExtJS Forum a year or so ago):
And as for the Portal/Viewport Setup:Code:Ext.override(Ext.container.Viewport, { initComponent : function() { Ext.container.Viewport.superclass.initComponent.call(this); this.el = Ext.get(this.el) || Ext.getBody(); if (this.el.dom === document.body) { this.el.dom.parentNode.className += ' x-viewport'; } this.el.setHeight = Ext.emptyFn; this.el.setWidth = Ext.emptyFn; this.el.setSize = Ext.emptyFn; this.el.dom.scroll = 'no'; this.allowDomMove = false; this.autoWidth = true; this.autoHeight = true; Ext.EventManager.onWindowResize(this.fireResize, this); this.renderTo = this.el; } });
Can someone help with the equivalent for ExtJS 4? I would like to use the draw function in the portlets can cant seem to have the two version interact efficiently.Code:Ext.onReady(function(){ Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); var viewport = new Ext.Viewport({ el: "PaulsPortal", layout: 'anchor', items:[{ xtype:'portal', ....................
-
25 Mar 2011 5:25 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
25 Mar 2011 7:17 AM #3
I know it uses Viewport, and so does my old version. I just override the way it renders to the page.
Is there a way to render a Viewport to a DIV specifically with ExtJS4 versus the entire page like it does by default?
-
25 Mar 2011 7:20 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 438
Yeah, use a Container instead.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Mar 2011 6:36 AM #5
I am a noob to ExtJS and with javascript in general. Can you provide an example using the ExtJS 4 source?
Similar Threads
-
portal (Viewport) in ajax tab
By nuno.s in forum Ext 3.x: Help & DiscussionReplies: 0Last Post: 14 Dec 2009, 10:18 AM -
ViewPort, Portal & Single Scrollbar
By LovingIt in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 27 Aug 2008, 7:18 AM -
[Ext 2.1] Portal + viewport : JS error in IE after reload
By milou in forum Ext 2.x: Help & DiscussionReplies: 4Last Post: 15 Jul 2008, 11:41 PM -
portal example in a panel (not viewport)?
By aktxyz in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 2 Jan 2008, 3:59 AM


Reply With Quote