Bug in JSonP

Bug in JSonP

Hi,

There is a major bug in the JsonP class, in the buildUrl method. It does not take into account whatever the settings for the autoAppendParams config option is. The record data is automatically appended, which means, that even if the underlaying writer's encode param is set to true, and also the root property is set, the code will place a records parameter, and it will be duplicated. The problem is, that it takes over instead of the correct Json expected parameter

//if there are any records present, and the autoAppendParams is set to true, append them to the url also
if(me.autoAppendParams == true){
records = request.records;
if (Ext.isArray(records) && records.length > 0) {
url = Ext.urlAppend(url, Ext.String.format("{0}={1}", me.recordParam, me.encodeRecords(records)));
}
}

Unfortunately in the doRequest method, the line commented with //prevent doubling up has no effect, since by that time the records are already encoded to the URL...

Ok. I'll report it correctly. Please note, that I've just tested the suggested bug fix, and it works correctly. So, maybe it's going to be an easy fix for the assigned responsible The bug is present in all, 4.0.7-4.1.1 versions.

Ext.MessageBox.show inconsistent - hard to reuse.

Ext.MessageBox.show inconsistent - hard to reuse.

Hi,

The Ext.MessageBox.show seems to be a bit inconsistent, since it also takes a config parameter, which is mandatory (if it's empty, it fails to display). On the other hand the parent Ext.Cmoponent class has a showAt method. This is inherited, and what it does as follows:

The code highlighted in red will cause error, as the MessageBox will try to reconfigure on a non-existing, undefined configure object.

Also it's a bit of hassle to always pass in the config object, if I want to show the same dialog box again, and certainly the reconfiguration just takes up otherwise unneeded resources.

I would suggest that the MessageBox should handle the case, as no reconfiguration object is passed in. Would be easier to reuse once created components, and would also fix the showAt bug.

I took a look into the code, it would take a bit to store some of the reconfiguration parameters (like the wait config for the progressbar instance, if it's a wait dialog, etc.), but I feel, it would worth the efforts.