1. #41
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    32
    Vote Rating
    2
    jmcolyer is on a distinguished road

      0  

    Default


    Jeet,

    Try annotating your controller with @Controller

    Jeff

  2. #42
    Sencha User
    Join Date
    Sep 2010
    Posts
    27
    Vote Rating
    2
    Alinanila is on a distinguished road

      0  

    Default Override / write own Controller?

    Override / write own Controller?


    Hi ralscha,
    first, I think you did a great job!

    Now, I'd like to modify the HttpServletRequest for each of my remoted methods in a central location, eg. within an extended controller or with a handlerAdapter... whatever.
    Is it possible to register an own Controller (which extends RouterController) or something like that?

    Another question (maybe you know something about): Is it possible to work with generics/abstract classes using jackson?

    Best regards,
    Alina

  3. #43
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    94
    Vote Rating
    6
    ralscha is on a distinguished road

      0  

    Default


    Spring has this HandlerInterceptors. http://static.springsource.org/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-handlermapping-interceptor
    I'm wondering if this helps with your problem. Don't know if and how this works because I have no experience with that.

    I use generic collections with jackson (store methods). That works well. I have no experience with abstract classes.

    Ralph

  4. #44
    Sencha User
    Join Date
    Sep 2010
    Posts
    27
    Vote Rating
    2
    Alinanila is on a distinguished road

      0  

    Default


    Hi Ralph,
    thanks for your immediate response!

    Do you know a proper example how to configure Jackson properly? I do not really get the point how to do...
    Besides, does Ext.Direct Spring provide *any* hook to add custom behaviour? Haven't seen any by now!

    Thanks, Alina

  5. #45
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    94
    Vote Rating
    6
    ralscha is on a distinguished road

      0  

    Default


    You don't have to configure Jackson. Just add the jackson jars to the classpath and Spring will pick it up.

    You can configure the ObjectMapper if you want. Create your own MappingJacksonHttpMessageConverter set the property objectMapper with the configured ObjectMapper. Here is the description how to configure the Converter
    http://static.springsource.org/sprin...handlermapping (16.14.2 Customizing the Provided Configuration)

  6. #46
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    10
    Vote Rating
    0
    yinkan.li@oocl.com is on a distinguished road

      0  

    Exclamation


    Hello,
    we are migrating Ext JS 3 to Ext JS 4.
    i am wondering does ExtDirectSpring support Ext JS 4?
    i found that in google code the message:

    Ext.Direct Spring is a library that implements the Ext.Direct specification with Spring 3 and Java. The library supports all the features of Ext.Direct

  7. #47
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    94
    Vote Rating
    6
    ralscha is on a distinguished road

      0  

    Default


    Yes it's working with ExtJs4. There are a couple of demos on this page:
    http://extdirectspring.ralscha.ch/demo/
    Also named parameters (new feature in extjs4) is supported.

  8. #48
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    10
    Vote Rating
    0
    yinkan.li@oocl.com is on a distinguished road

      0  

    Default


    Thanks a lot~
    now we can focus on other parts...

  9. #49
    Sencha Premium Member
    Join Date
    Dec 2011
    Posts
    23
    Vote Rating
    1
    ipavlic is on a distinguished road

      0  

    Default Sending JSON data to extdirectspring

    Sending JSON data to extdirectspring


    How can I send JSON data to extdirectspring? I want to manually create an additional parameter to hold grid values and add it to the submit. Currently, I am doing it like this:

    Code:
    var gridItems = myStore.getRange();
    var myValues = [];
    for (var i in gridItems) {
        myValues.push(gridItems[i].data);
        }
        myForm.getForm().submit({
        params : {
            action : "update",
            myList: Ext.JSON.encode(myValues)
        }
    });
    However, only the myList is json Encoded and is thus not understood by

    Code:
    @Transactional(propagation=Propagation.REQUIRED)
    @ExtDirectMethod(ExtDirectMethodType.FORM_POST)
    @ResponseBody
    @RequestMapping(value = "/updateMyForm", method = RequestMethod.POST)
    public ExtDirectResponse updateBasicInfo(Locale locale, HttpServletRequest request, MyValueObject vo, BindingResult result) {
    
        if (vo.getMyList() != null)
        {
            log.debug("Not null");
        }
        else {
            log.debug("Null");
        }
    
        ExtDirectResponseBuilder builder = new ExtDirectResponseBuilder(request);
        return builder.build();
    }
    in my Controller.

  10. #50
    Sencha Premium Member
    Join Date
    Apr 2010
    Posts
    94
    Vote Rating
    6
    ralscha is on a distinguished road

      0  

    Default


    The problem is that the names of the parameters on the client side have to match the method parameter names on the server side. In your code there is no parameter with the name action or myList


    Code:
    @RequestMapping(value = "/updateMyForm", method = RequestMethod.POST)
    public ExtDirectResponse updateBasicInfo(Locale locale, HttpServletRequest request, @RequestParam("action")String action, @RequestParam("
    myList
    ") String
    myList
    ) { .... }

    This should work and myList should contain the json string.
    The next thing you could try is not encoding the parameter on the client side:
    Code:
     params : {
            action : "update",
            myList: myValues
        }
    and then use a parameter like this:
    Code:
    @RequestParam("
    myList
    ") List<String> myList
    Not sure if that works.
    Last edited by ralscha; 31 Jan 2012 at 6:00 AM. Reason: added code tags

Similar Threads

  1. Ext + Java + Spring + DWR
    By sfwalter in forum Community Discussion
    Replies: 59
    Last Post: 13 Dec 2010, 3:31 AM
  2. Ext JS 3.1 And Spring Webflow 2.0.8 Integration
    By erosszz in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 2 Feb 2010, 11:33 PM
  3. Ext.Direct width Spring??
    By jonathanlarav in forum Ext.Direct
    Replies: 0
    Last Post: 1 Jun 2009, 5:10 PM
  4. Ext GWT and Spring MVC
    By Ivan Polak in forum Community Discussion
    Replies: 4
    Last Post: 12 May 2009, 10:55 PM
  5. Spring with EXT
    By sshah in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 11 May 2008, 12:53 PM

Thread Participants: 13

Tags for this Thread

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