Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: ExtDirect for Delphi

  1. #11

    Default Using TContentFile

    Hi Federiconi,

    Thanks for yr last response. It worked !

    Now I need to provide some responses in Json format but it's a complex generation so I cannot use the TJsonFast type. I've tried to use as String, but the json is being enclosed on " (double quotes), generating an invalid content.
    I guess I shoud use TContentFile type, could you provide an example using TContentFile ?

    Tks Again.

    Paulo Botelho

  2. #12

    Default

    Quote Originally Posted by pbotelho View Post
    Hi Federiconi,

    Thanks for yr last response. It worked !

    Now I need to provide some responses in Json format but it's a complex generation so I cannot use the TJsonFast type. I've tried to use as String, but the json is being enclosed on " (double quotes), generating an invalid content.
    I guess I shoud use TContentFile type, could you provide an example using TContentFile ?

    Tks Again.

    Paulo Botelho
    Hi Federiconi,

    I'm not sure I was clear enough on last post, I'll try better ...
    I mean that my server side application already generates some jSon (as string output), so I would like to use it as an string, without having to re-generate it as TJsonFast type. I've tried to output the existing jSon with an function returning string, but on the response, my json comes enclosed inside dobule quotes, generating an error at client side


    For example :

    Let's say the jSon returned by method Teste3 is {"airport":"JFK"}

    Here is how it is being returned (checked using firebug) :

    {"type":"rpc","tid":3,"action": "IServerObject1","method":"Teste3","result":"{"airport":"JFK"}"}


    Here is how it should be returned :

    {"type":"rpc","tid":3,"action": "IServerObject1","method":"Teste3","result":{"airport":"JFK"}}

  3. #13
    Sencha Premium Member
    Join Date
    May 2009
    Posts
    10

    Default

    In the last commit source I implemented the TExtDirectObject base class that expose the overrideable method ToString() .. in the demo example now the JsonString new method use the TStringObject..

  4. #14

    Default Ext.Direct Form Integration

    Hi,

    I'd like to know how can I submit a form, using a Direct method, setting the submit handler as a "formHandler" like this link: http://www.extjs.com/deploy/dev/exam...irect-form.php

    By the way, I was trying to test it in unit "ExtDirectDispatcher.pas" and, in line 101 I think that the field "AData[high(AData)].Name" should recieve "ARequest.ContentFields.Names[i];" in order to "Request.QueryFields.Names[i];".

    Thanks,
    Leo

  5. #15

    Default

    Hi,

    Is possible get cookie data in implementation of the server method ?

    Thanks,
    Leo

  6. #16
    Sencha Premium Member
    Join Date
    May 2009
    Posts
    10

    Default

    Hi,
    I committed the version 0.6 with direct-form implementation in the demo.

  7. #17
    Sencha Premium Member
    Join Date
    May 2009
    Posts
    10

    Default

    Yes,
    I added the Request:TWebRequest property in the TExtDirectRemotable object.

  8. #18

    Default

    Hi Federiconi,

    I've already tested the Form Integration and it worked fine. Thank you!

    In demo of Form Integration, I could see that you've created the class TProfile. I'd like to know how can I get cookie fields in method "TProfile.getBasicInfo", for example. Is it possible ?

    Thank you again,
    Leo

  9. #19
    Sencha Premium Member
    Join Date
    May 2009
    Posts
    10

    Default

    In every remote object like TProfile you can access to new property Request (TWebRequest) that contains all http request informations also Request.CookieFields.Values property.

  10. #20

    Default

    Hi Federiconi,

    I could not find the Request property in the class TExtDirectRemotable. The last version, that I've had downloaded (ExtDirectDelphi 0.6), didn't have this property.

    Could you check it please?

    Tks,
    Leo

    Code:
    unit ExtDirectRemotable;
    
    interface
    
    uses InvokeRegistry;
    
    type
      TExtDirectRemotable = class(TInvokableClass)
      end;
    implementation
    end.

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •