Small bug on MS3 - ejGridAdvanced.mipage
4 posts
• Page 1 of 1
Small bug on MS3 - ejGridAdvanced.mipage
Greetings MS3 development team.
I spotted this little bug while testing the current release of MS3 (MiServer 3.0).
1. Edit the grid
2. Change value in a cell
3. Click SAVE icon (or click away to another cell)
4. SYNTAX ERROR
FYI.
Cheers,
//W
I spotted this little bug while testing the current release of MS3 (MiServer 3.0).
1. Edit the grid
2. Change value in a cell
3. Click SAVE icon (or click away to another cell)
4. SYNTAX ERROR
FYI.
Cheers,
//W
-
woody - Posts: 144
- Joined: Tue Dec 28, 2010 12:54 am
- Location: Atlanta, Georgia USA
Re: Small bug on MS3 - ejGridAdvanced.mipage
Hi Woody!
This was an interesting issue because it looked like the code expected the data to have been already parsed as JSON and converted to APL form, but, instead we were just getting a character vector of the raw JSON. I think this may have been a result of the work we did a while back to rationalize event handling across all types of elements (HTML, jQuery widgets, Syncfusion widgets, and other widget libraries).
The interesting problem is how to distinguish data that should be interpreted as JSON versus something that someone might, for instance, type into a text input field. Is '"Test"' JSON or just a character vector with double quotes? So, I've added some additional intelligence when we know we're generating JSON data in the client that the server can leverage to translate things properly.
I've made the change and pushed it to the master MiServer branch on GitHub.
/Brian
This was an interesting issue because it looked like the code expected the data to have been already parsed as JSON and converted to APL form, but, instead we were just getting a character vector of the raw JSON. I think this may have been a result of the work we did a while back to rationalize event handling across all types of elements (HTML, jQuery widgets, Syncfusion widgets, and other widget libraries).
The interesting problem is how to distinguish data that should be interpreted as JSON versus something that someone might, for instance, type into a text input field. Is '"Test"' JSON or just a character vector with double quotes? So, I've added some additional intelligence when we know we're generating JSON data in the client that the server can leverage to translate things properly.
I've made the change and pushed it to the master MiServer branch on GitHub.
/Brian
-
Brian|Dyalog - Posts: 120
- Joined: Thu Nov 26, 2009 4:02 pm
- Location: West Henrietta, NY
Re: Small bug on MS3 - ejGridAdvanced.mipage
I haven't looked at the innards of MS3, but wouldn't the http header define the content type?
When would you need to guess the type?
When would you need to guess the type?
- gil
- Posts: 72
- Joined: Mon Feb 15, 2010 12:42 am
Re: Small bug on MS3 - ejGridAdvanced.mipage
Hi Woody,
jQuery's ajax() function, which we use for handlers and callbacks, defaults to a MIME type of 'application/x-www-form-urlencoded; charset=UTF-8'. We could potentially set other MIME types (like 'application/json'), but that would require some recoding of the server side of event and callback handling.
/Brian
jQuery's ajax() function, which we use for handlers and callbacks, defaults to a MIME type of 'application/x-www-form-urlencoded; charset=UTF-8'. We could potentially set other MIME types (like 'application/json'), but that would require some recoding of the server side of event and callback handling.
/Brian
-
Brian|Dyalog - Posts: 120
- Joined: Thu Nov 26, 2009 4:02 pm
- Location: West Henrietta, NY
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group