[fpc-devel] fcl-web webdata ExtJS "total" field question
Michael Van Canneyt
michael at freepascal.org
Sat Aug 21 12:05:54 CEST 2010
On Sat, 21 Aug 2010, BoBo wrote:
> ...snip...
>>> The only thing I've noticed is that with XML the "text" MySQL fields
>>> are not coming over to ExtJS, they only say "(MEMO)" . Is that because
>>> XML does not allow UTF8 or something?
>>
>> No, this is a bug. I fixed it already in JSON (since I use that), but
>> not yet in XML.
>>
>>> Some non-"text" fields are also displaying strange characters with XML
>>> where with JSON everything is good.
>>
>> That is an encoding issue. The XML components need to know what kind of
>> codepage you use. I think we'll have to introduce a property for this in
>> the dataformatter. It will introduce some overhead :/
>>
>> Michael.
>
> Yes, I will use JSON in my project also, it seems much better and easier, I
> was just testing both. XML is a lot of overhead and bloat in any project both
> development, execution and data-size-wise.
Exactly my thoughts :-)
>
> I did some testing on the exception catching, but if I intentionally do
> something nasty within my Except/End part, FCL-Web replies with a web page
> ("Module error", or something similar), and not a JSON reply so ExtJS cannot
> process the response.
You use simple actions ? Why not RPC-Handlers and a JSONRPCDispatcher ?
That is what catches the error, plus it can create an Ext.Direct API.
The idea is that you have 1 JSONRPCDispatcher, and several RPC-Handlers.
The request must be directed to the JSONRPCDispatcher, it will find the
correct RPC-Handler, let it execute the request, and then returns the
result as JSON to the browser. If an execution error happens in the
RPC-Handler, it will be transformed to an appropriate response.
Michael.
More information about the fpc-devel
mailing list