PDA

View Full Version : textarea with grow and growmax partly ignored by ie



michael melsen
22 Dec 2010, 1:07 AM
Hi everyone,

I have a textarea that will be filled with SOAPmessages for display purposes. On firefox all text is displayed without any scrollbars, however when viewing this on ie I always get a scrollbar. It looks like the growMax is partly ignored by ie. Here is the code I use:



Ext.ns('MessageXMLViewer');


MessageXMLViewer = Ext.extend(Ext.form.TextArea, {

timestamp : undefined, // required key part for the message, must be set by the caller!
identifier : undefined, // required key part for the message, must be set by the caller!
type : undefined, // required type ('message'or 'reponse'), must be set by the caller!
grow : true,
growMax : 10000, // set growmax as grow has a default of 10000
initComponent : function() {

Ext.apply(this, {
readOnly : true, // make the panel read-only
dataUrl : "getLog{kind}AsPrettyPrintedXml"
});

if (this.type === 'message'){
this.dataUrl = this.dataUrl.replace("{kind}", 'Message');
} else {
this.dataUrl = this.dataUrl.replace("{kind}", 'Response');
}

// call parent
MessageXMLViewer.superclass.initComponent.apply(this, arguments);
}, // eo function initComponent

onRender : function() {
dataConnection.request({
url : this.dataUrl,
method : 'POST',

params : {
"timestamp": this.timestamp,
"identifier": this.identifier
},
scope : this, // the scope for the callback function
callback : function(options, success, response){
if (success) {
this.setValue(response.responseText);
} else {
this.setValue(repository.resources.failure_loading_data);
}
}
});
MessageXMLViewer.superclass.onRender.apply(this, arguments);

}

}); // eo extend

// register component
Ext.reg('messagexmlviewer', MessageXMLViewer);


can someone tell me why the textarea on ie refuses to grow after a certain maximum while firefox works as expected and how I could fix this?

kind regards,

Michael