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. #131
    Ext User
    Join Date
    May 2008
    Posts
    1
    Vote Rating
    0
    kschlaudt is on a distinguished road

      0  

    Default DJN & Spring Recap

    DJN & Spring Recap


    Hi Pedro & Vincent,

    I really appreciate both of your efforts integrating Spring, DJN & ExtJS.

    However, still find myself a little overwhelmed with all of the configurations.

    Do either of you have a complete working example you can share?

    Thanks again!

    Kurt

  2. #132
    Ext User
    Join Date
    Aug 2009
    Posts
    20
    Vote Rating
    0
    vlagorce is on a distinguished road

      0  

    Default


    Quote Originally Posted by kschlaudt View Post
    Hi Pedro & Vincent,

    I really appreciate both of your efforts integrating Spring, DJN & ExtJS.

    However, still find myself a little overwhelmed with all of the configurations.

    Do either of you have a complete working example you can share?

    Thanks again!

    Kurt

    Hi,
    I have almost finished to release the spring-api but I didn't find the time to release and write the documentation.

    I give you the last release candidate and the source of my test project !

    You will find example about how to declare action and js-Api in the spring-definition.xml.

    There is 4 method to do it.

    -The first is className injection. Used to run the base test of Djn without coding.

    -The second is a simple injection. Action is declared as a bean and injected in the ApiConfiguration. (not implemented in this version)

    -The third method is autowired method.
    Action could be declared in context or scanned by spring (@Component). Action must inherit the interface used in the ApiConfiguration.
    Hope to help you.
    I aim to release before the end of the next week..Don't hesitate to give your opinion about this api


    Vincent
    Attached Files

  3. #133
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    7
    Vote Rating
    0
    clynnh is on a distinguished road

      0  

    Default HttpSession / HttpServletRequest

    HttpSession / HttpServletRequest


    Hi Pedro!

    Thanks for this great framework. I downloaded the code today and have run into a roadblock. I run the test application but I can't get access to the HttpSession or HttpServletRequest objects when I am in the class Profile and calling the method updateBasicInfo. Typically i have access to the session through my JSF faces context.

    Any help would be greatly appreciated.

    Thanks again,

    ClynnH

  4. #134
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    112
    Vote Rating
    1
    Whatty is on a distinguished road

      0  

    Default Directjngine integration with Spring framework

    Directjngine integration with Spring framework


    Good afternoon,

    We are integrating ExtJS with the Spring framework (IoC / DI container). The Spring framework manages our beans and the relationships between them and all requests for existing or new beans should go through this framework. This requires the HTTP session which is where the current context is maintained across requests.

    Thus in particular need to put the following code in the Servlet which serves up the DirectJngine requests.

    Code:
    ApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); 
    
    context.getBean("loginBean");
    Once we have the application context we can dispatch the servicing of the ExtJS requests to the bean returned from the application context.

    What is the best way to accomplish this in a nice manner (i.e. not having to change your code base)

    I am assuming in the servlet that you are executing some sort of newInstance() call against that class and then dispatching the method to the newly created object.

    It would be nice to have a context based bean factory that gives us the bean to service the ExtJS request that was configurable through the web.xml, but I have not yet looked at the code for the DirectJngine to see how easily that would be accomplished.

    Any suggestions would be greatly appreciated.

    On a side note we are doing something very similar on the .NET side and are mostly likely going to have a similar type of implementation.

    Thanks in advance.

    Whatty

    PS: I just read the post above mine and realized that this is already in the works. Cool! How far along is this and is any help needed?

    PPS: Is the same thing occurring for the .NET frameworks

  5. #135
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    112
    Vote Rating
    1
    Whatty is on a distinguished road

      0  

    Default Sample app

    Sample app


    There wouldn't happen to be a sample application that works with the Spring integration?

  6. #136
    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 clynnh View Post
    Hi Pedro!

    Thanks for this great framework. I downloaded the code today and have run into a roadblock. I run the test application but I can't get access to the HttpSession or HttpServletRequest objects when I am in the class Profile and calling the method updateBasicInfo. Typically i have access to the session through my JSF faces context.

    Any help would be greatly appreciated.

    Thanks again,

    ClynnH
    Thanks.

    You can implement a servlet filter that stores the http-session or http servlet request in a thread-local variable so that you can get access to them later.

    This issue has been discussed before in this thread, take a look at some of the posts in http://www.extjs.com/forum/showthread.php?p=368005, for example.

    Best 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/

  7. #137
    Ext User
    Join Date
    Mar 2007
    Posts
    8
    Vote Rating
    0
    mbarto is on a distinguished road

      0  

    Default


    I would like to suggest a little fix to the Api code generation. The current version generates a wrong BASE_URL if the web page is on the root folder (ex. http://localhost:8080/index.jsp).

    I would change the current implementation of appendJsExpressionToGetBaseUrl with:
    Code:
    private void appendJsExpressionToGetBaseUrl(StringBuilder result) {
        assert result != null;
        
        result.append( "window.location.protocol + '//' + window.location.host + '/' + (window.location.pathname.split('/').length>2 ? window.location.pathname.split('/')[1]+ '/' : '')  + " );
      }

  8. #138
    Ext JS Premium Member
    Join Date
    Aug 2009
    Posts
    112
    Vote Rating
    1
    Whatty is on a distinguished road

      0  

    Default Directjngine and Session Management

    Directjngine and Session Management


    Quote Originally Posted by techstudios View Post
    Does djn provide any approach to get HttpServletRequest and HttpSession object?
    Given this and the response, then what is Directjngine approach to session management in a multi-user web application.

    As a Java / JSF developer a lot of the session management details are managed by JSF and the developer is not exposed to the details they just have access to the session object if needed.

    It is extremely important that this engine supports multiple simultaneous requests to different user sessions, encapsulating the logical boundaries between the multiple user sessions, otherwise I am having a hard time understanding the applicability of Directjngine

    Excuse me if I am missing something on this but we are trying to integrate this at the very moment and are struggling with how to maintain session state for a particular user session.

    Whatty

  9. #139
    Ext User
    Join Date
    Mar 2009
    Posts
    71
    Vote Rating
    0
    J@y is on a distinguished road

      0  

    Default


    Quote Originally Posted by Whatty View Post
    Given this and the response, then what is Directjngine approach to session management in a multi-user web application.

    As a Java / JSF developer a lot of the session management details are managed by JSF and the developer is not exposed to the details they just have access to the session object if needed.

    It is extremely important that this engine supports multiple simultaneous requests to different user sessions, encapsulating the logical boundaries between the multiple user sessions, otherwise I am having a hard time understanding the applicability of Directjngine

    Excuse me if I am missing something on this but we are trying to integrate this at the very moment and are struggling with how to maintain session state for a particular user session.

    Whatty
    I face the same problem too...

    Even I can pass the session object to the server side by the server filter, it is impossible to handle all the requests and redirect them to different pages.

    DWR supports the httpservlet, this is the main reason y most of the ppl still stick to it.

  10. #140
    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 mbarto View Post
    I would like to suggest a little fix to the Api code generation. The current version generates a wrong BASE_URL if the web page is on the root folder (ex. http://localhost:8080/index.jsp).

    I would change the current implementation of appendJsExpressionToGetBaseUrl with:
    Code:
    private void appendJsExpressionToGetBaseUrl(StringBuilder result) {
        assert result != null;
        
        result.append( "window.location.protocol + '//' + window.location.host + '/' + (window.location.pathname.split('/').length>2 ? window.location.pathname.split('/')[1]+ '/' : '')  + " );
      }

    Good one!

    I will fix it as soon as possible.

    Best 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/

Thread Participants: 88

  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. brainformance (1 Post)
  56. vanessa_ng (2 Posts)
  57. alois.cochard (5 Posts)
  58. kyrillos52 (2 Posts)
  59. Tod (1 Post)
  60. Alinanila (1 Post)
  61. tfannon (2 Posts)
  62. Kynao (1 Post)
  63. feiq (4 Posts)
  64. dalt (1 Post)
  65. xfolch (1 Post)
  66. avijit (1 Post)
  67. marcelsnews (2 Posts)
  68. maddhippy (1 Post)
  69. sritter (1 Post)
  70. july (2 Posts)
  71. jtkeller7983 (1 Post)
  72. lfranchini (2 Posts)
  73. 7/11 (2 Posts)
  74. yAdEs (1 Post)
  75. zazz (1 Post)
  76. waqar (5 Posts)
  77. pjain11 (1 Post)
  78. alexMobimesh (2 Posts)
  79. zachHurt (4 Posts)
  80. n0n3 (5 Posts)
  81. adavis2 (1 Post)
  82. mark.peters (1 Post)
  83. lee el (4 Posts)
  84. frengo19 (3 Posts)
  85. prakashwagle (1 Post)
  86. extejnar (2 Posts)
  87. alin@sonatype.com (1 Post)
  88. ajay_kango (3 Posts)