View Poll Results: If you read it, did you find DirectJNgine User's Guide adequate?

Voters
54. You may not vote on this poll
  • Yes

    40 74.07%
  • No

    14 25.93%
  1. #321
    Sencha User
    Join Date
    Nov 2007
    Posts
    294
    Vote Rating
    0
    Sesshomurai is on a distinguished road

      0  

    Default


    Hey,
    I can't say enough how valuable this package is for my app!! Thank you!!

    Quick question. I have to access some local variables in my method callbacks. Is there a way to pass them in or set the scope so that multiple callbacks will get the values passed to them? I couldn't see how this can be done.

    I use a loop and need to pass the loop value at the time of each invocation (so it stays fixed), so I can't just reference the variable directly.

    thanks!!
    Darren

  2. #322
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default DirectJNgine 1.3 final is out

    DirectJNgine 1.3 final is out


    Today I have released DJN 1.3 final, aimed at supporting Google's AppEngine.

    You can download it from http://code.google.com/p/directjngine/

    For details, check this entry in my blog.

    Regards,
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  3. #323
    Ext JS Premium Member
    Join Date
    May 2009
    Location
    Barcelona (Spain)
    Posts
    218
    Vote Rating
    19
    pagullo will become famous soon enough pagullo will become famous soon enough

      0  

    Default


    Quote Originally Posted by Sesshomurai View Post
    Hey,
    I can't say enough how valuable this package is for my app!! Thank you!!
    Thanks, I never get tired of hearing such things...

    Quick question. I have to access some local variables in my method callbacks. Is there a way to pass them in or set the scope so that multiple callbacks will get the values passed to them? I couldn't see how this can be done.

    I use a loop and need to pass the loop value at the time of each invocation (so it stays fixed), so I can't just reference the variable directly.
    Hmmm. I'm not sure I understand what you really mean, so take the following answer/reflection with a bit of salt.

    This seems a lot like the kind of thing you should coordinate on the server side, passing the information you want to share among calls to a stateful object *before* you invoke the methods that need to acccess the shared information.

    Then, subsequent calls to methods, which should belong to that object, will have access to the shared data.
    Or you could use the other mechanisms provided by DJN to access session/application data and store your temporary information there.

    You might want to use a list to store the information per loop (list index=current loop index), so that the invoked methods receive the index and can access the data corresponding to the loop they are handling -needed because of asynchronicity...

    But, of course, you need to make sure the methods are not invoked before the appropriate per-loop data is initialized. Not terribly difficult, though.

    But, frankly, I'm not sure I see the whole context, so I might be misfiring. Could you provide us with more details?

    Regards,
    Pedro Agulló, Barcelona (Spain)
    Agile team building, consulting, training & development
    DirectJNgine: http://code.google.com/p/directjngine - Log4js-ext: http://www.softwarementors.com/projects/p/log4js-ext/

  4. #324
    Sencha User
    Join Date
    Aug 2008
    Posts
    11
    Vote Rating
    0
    lxbzmy is on a distinguished road

      0  

    Exclamation can i user org.json.JSONObject or json-lib or flex-json object to return json object

    can i user org.json.JSONObject or json-lib or flex-json object to return json object


    can i user org.json.JSONObject or json-lib or flex-json object to return json object?
    I want write a directMethod that return a org.json.JSONObject but ,google-gson can not recogniza my JSONObject().

  5. #325
    Sencha User chrizmaster's Avatar
    Join Date
    Feb 2009
    Location
    Australia
    Posts
    441
    Vote Rating
    1
    chrizmaster is on a distinguished road

      0  

    Default


    this framework (the gson framework) transforms the Java Type automatically to a json object.
    For example Hashmap will be a javascript object with key-value pairs.
    a String array in Java will also be returned as a json String array and so on. There's no need to build a json object and then return it. The framework does the work..

    Example:

    PHP Code:
    Java:
    @
    DirectMethod
        
    public HashMap<String,StringgetAnyObject(){
         
    HashMap<String,StringanyObject = new HashMap<String,String>();
         
    anyObject.put("key","value");
         return 
    anyObject;
        }

        

        @
    DirectMethod
        
    public HashMap<String,String[]> getAnotherObject(){
         
    HashMap<String,String[]> anotherObject = new HashMap<String,String[]>();
         
    anotherObject.put("key",new String[]{"value 1","value 2"});
         return 
    anotherObject;
        }

        
        @
    DirectMethod
        
    public HashMap<String,HashMap<String,String[]>> getLastObject(){
          
    HashMap<String,HashMap<String,String[]>> lastObject = new HashMap<String,HashMap<String,String[]>>();
         
         
    HashMap<String,String[]> tmpMap = new HashMap<String,String[]>();
         
    tmpMap.put("key",new String[]{"value1","value2"});

         
    lastObject.put("key",tmpMap);
         return 
    lastObject;
        } 
    ]and at the JavaScript side, there will be this:

    PHP Code:
    result of MethodgetAnyObject()
    {
    "tid":6,"action":"DemoClass","method":"getAnyObject","result":{"key":"value"},"type":"rpc"}

    result of MethodgetAnotherObject()
    {
    "tid":7,"action":"DemoClass","method":"getAnotherObject","result":{"key":["value 1","value 2"]},"type":"rpc"}result of MethodgetLastObject()
    {
    "tid":8,"action":"DemoClass","method":"getLastObject","result":{"key":{"key":["value1","value2"]}},"type":"rpc"
    if you now use something like this:

    PHP Code:
    DemoClass.getLastObject(function(result,e){
    if(
    e.status){
     
    console.log(result);
    }
    }) 
    you'll have a pretty fine javascript object

  6. #326
    Sencha User chrizmaster's Avatar
    Join Date
    Feb 2009
    Location
    Australia
    Posts
    441
    Vote Rating
    1
    chrizmaster is on a distinguished road

      0  

    Default


    ay by the way, I also have a question.

    has the previous beta just be renamed to final or are there any fixes or enhancements which makes it worth updating..?
    Chriz

  7. #327
    Sencha User
    Join Date
    Aug 2008
    Posts
    11
    Vote Rating
    0
    lxbzmy is on a distinguished road

      0  

    Default


    to #325:
    your reslution is a good way !
    I post this becase a old project use many org.json.JSONObject as return type in action layer,i need a quck way to refactor classes.

    and I think this project need more work to have a well designed structure

  8. #328
    Sencha User chrizmaster's Avatar
    Join Date
    Feb 2009
    Location
    Australia
    Posts
    441
    Vote Rating
    1
    chrizmaster is on a distinguished road

      0  

    Default


    do something fast is mostly a reason, why a project failed

  9. #329
    Sencha User
    Join Date
    Nov 2007
    Posts
    294
    Vote Rating
    0
    Sesshomurai is on a distinguished road

      0  

    Default


    Quote Originally Posted by pagullo View Post
    Thanks, I never get tired of hearing such things...



    Hmmm. I'm not sure I understand what you really mean, so take the following answer/reflection with a bit of salt.

    This seems a lot like the kind of thing you should coordinate on the server side, passing the information you want to share among calls to a stateful object *before* you invoke the methods that need to acccess the shared information.

    Then, subsequent calls to methods, which should belong to that object, will have access to the shared data.
    Or you could use the other mechanisms provided by DJN to access session/application data and store your temporary information there.

    You might want to use a list to store the information per loop (list index=current loop index), so that the invoked methods receive the index and can access the data corresponding to the loop they are handling -needed because of asynchronicity...

    But, of course, you need to make sure the methods are not invoked before the appropriate per-loop data is initialized. Not terribly difficult, though.

    But, frankly, I'm not sure I see the whole context, so I might be misfiring. Could you provide us with more details?

    Regards,
    Hey there.

    So let's say I want to kick off a method call on the client. I pass a few parameters and want to update some GUI objects when the callback is received. Since the method call is asynchronous, it goes out of scope from where it was called. If there was a way to add a scope or context with the method call, then my callbacks have direct access to javascript variables that the callback might need without having to store and fetch it another way.

    Does this make sense? The server would not be involved in that data.

  10. #330
    Sencha User
    Join Date
    Nov 2007
    Posts
    294
    Vote Rating
    0
    Sesshomurai is on a distinguished road

      0  

    Default


    Hi again,
    When submitting forms, I am only getting the Name field, not the Value field for a form element (combo).

    Is this something going on in directjngine? I have all the form parameters set for each field and the form has the correct values in the fields, but when received on the server, they are the "name" values of the field, not the "value" value.

    Any help appreciated.

Thread Participants: 86

  1. Animal (5 Posts)
  2. barton (4 Posts)
  3. Condor (1 Post)
  4. mauro_monti (6 Posts)
  5. mbarto (1 Post)
  6. aconran (1 Post)
  7. MoShAn480 (1 Post)
  8. asgillett (2 Posts)
  9. seade (4 Posts)
  10. zaqwsxqwer (3 Posts)
  11. Sesshomurai (16 Posts)
  12. ThierryC (3 Posts)
  13. maxm165 (3 Posts)
  14. techstudios (2 Posts)
  15. sayonara (2 Posts)
  16. kschlaudt (1 Post)
  17. hschaefer123 (2 Posts)
  18. omarc (2 Posts)
  19. lxbzmy (4 Posts)
  20. mct (6 Posts)
  21. mediacept (2 Posts)
  22. dionisexorcius (1 Post)
  23. alper (1 Post)
  24. steverc (2 Posts)
  25. chrizmaster (18 Posts)
  26. J@y (21 Posts)
  27. Georgioa (6 Posts)
  28. wguan (1 Post)
  29. minneyar (16 Posts)
  30. jhoweaa (1 Post)
  31. Ramez (2 Posts)
  32. malus (1 Post)
  33. dweller (8 Posts)
  34. stdunbar (1 Post)
  35. vlagorce (20 Posts)
  36. cwilliso (1 Post)
  37. Whatty (13 Posts)
  38. Ice (1 Post)
  39. clynnh (1 Post)
  40. SreevaniN (1 Post)
  41. Stsalomon90 (1 Post)
  42. GregT (9 Posts)
  43. jcalfee (6 Posts)
  44. set_ti (1 Post)
  45. maho2nd (3 Posts)
  46. dreamtaotao (3 Posts)
  47. Toxa (4 Posts)
  48. tungchau (3 Posts)
  49. wlan0 (2 Posts)
  50. jpr (2 Posts)
  51. gianmarco (5 Posts)
  52. extjslikeit (2 Posts)
  53. harmen_wessels (1 Post)
  54. Olivercomputing2 (4 Posts)
  55. vanessa_ng (2 Posts)
  56. alois.cochard (5 Posts)
  57. kyrillos52 (2 Posts)
  58. Tod (1 Post)
  59. Alinanila (1 Post)
  60. tfannon (2 Posts)
  61. Kynao (1 Post)
  62. feiq (4 Posts)
  63. dalt (1 Post)
  64. xfolch (1 Post)
  65. avijit (1 Post)
  66. marcelsnews (2 Posts)
  67. maddhippy (1 Post)
  68. sritter (1 Post)
  69. july (2 Posts)
  70. jtkeller7983 (1 Post)
  71. lfranchini (2 Posts)
  72. 7/11 (2 Posts)
  73. yAdEs (1 Post)
  74. zazz (1 Post)
  75. waqar (5 Posts)
  76. pjain11 (1 Post)
  77. alexMobimesh (2 Posts)
  78. zachHurt (4 Posts)
  79. n0n3 (5 Posts)
  80. adavis2 (1 Post)
  81. mark.peters (1 Post)
  82. lee el (4 Posts)
  83. frengo19 (3 Posts)
  84. prakashwagle (1 Post)
  85. extejnar (2 Posts)
  86. alin@sonatype.com (1 Post)
Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi