One of the issues you may experience with ExtJS, is that it moves html DOM elements around when it renders the page. For example if your using tab panels or the Viewport.
This can result in your form elements ending up outside of the form.
You can solve this by using
allowDomMove:false as discussed in this
Apex Forum thread or solve the problem once and for all by using a customized version of the Ext.Viewport.
I like the second option better, so here is the solution.
1. Replace references to Ext.Viewport with Ext.ux.FormViewport (see below) in your javascript.
2. Add the following style to your css
#wwvFlowForm {width:100%; height:100%;}See also
Building a complete Oracle Apex page template using ExtJSEnjoy
Mark
/*
* Mark Lancaster Wednesday, 16 January 2008 12:00 PM
*
/**
* @class Ext.ux.FormViewport
* @extends Ext.Container
* A specialized container representing the viewable application area (the browser viewport).
* The Viewport renders itself to the wwvFlowForm element, and automatically sizes itself to the size of
* the browser viewport and manages window resizing. There may only be one Viewport created
* in a page. Inner layouts are available by virtue of the fact that all {@link Ext.Panel Panel}s
* added to the Viewport, either through its {@link #items}, or through the items, or the {@link #add}
* method of any of its child Panels may themselves have a layout.
* The Viewport does not provide scrolling, so child Panels within the Viewport should provide
* for scrolling if needed using the {@link #autoScroll} config.
* By default, when applyTo is not specified, the Viewport renders itself to the document body.
*/
Ext.ux.FormViewport = Ext.extend(Ext.Container, {
/**
* @cfg {Mixed} applyTo
* The id of the node, a DOM node or an existing Element that is already present in
* the document that specifies some panel-specific structural markup.By default, when applyTo is not
* specified, the Viewport renders itself to the document body.
*/
initComponent : function() {
Ext.ux.FormViewport.superclass.initComponent.call(this);
document.getElementsByTagName('html')[0].className += ' x-viewport';
// applyTo specified element
this.el = Ext.get('wwvFlowForm');
if (!this.el) {
this.el = Ext.getBody();
} else {
// disable scroll on body
Ext.getBody().dom.scroll = 'no';
}
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;
},
fireResize : function(w, h){
this.fireEvent('resize', this, w, h, w, h);
}
});
Ext.reg('FormViewport', Ext.ux.FormViewport);
2 comments:
Hi Mark,
I don't know if this is exactly the same issue, but I had a similar problem when moving APEX items around. Here's the forum posting on it: http://forums.oracle.com/forums/thread.jspa?messageID=3180532
Martin
G點,按摩棒,
轉珠按摩棒,變頻跳蛋,
跳蛋,無線跳蛋,
飛機杯,男用強精長軟質套,
男用強精短軟質套,充氣娃娃,
男性性感內褲,性感內褲,
自慰套,自慰套,
情趣娃娃,自慰器,
電動自慰器,充氣娃娃器,
角色扮演,角色扮演服,
性感睡衣,情趣睡衣,
性感內衣褲,性感內衣,
內衣,性感內褲,
C字褲,內褲,
性感貓裝,性感睡衣,
貓裝,吊帶襪,
情趣內褲,丁字褲,
SM道具,SM,
震動環,潤滑液,
情趣禮物,情趣玩具,
威而柔,精油,
逼真按摩棒,數位按摩棒,
加盟,免費加盟,
網路賺錢,情趣加盟,
情趣,情趣用品,巴黎,
Post a Comment