-
9 Nov 2011 12:36 PM #41
Jeet,
Try annotating your controller with @Controller
Jeff
-
15 Dec 2011 4:42 AM #42
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
-
15 Dec 2011 5:32 AM #43
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
-
15 Dec 2011 8:06 AM #44
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
-
15 Dec 2011 10:21 AM #45
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)
-
20 Dec 2011 11:06 PM #46
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
-
20 Dec 2011 11:22 PM #47
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.
-
20 Dec 2011 11:25 PM #48
Thanks a lot~

now we can focus on other parts...
-
31 Jan 2012 5:34 AM #49
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:
However, only the myList is json Encoded and is thus not understood byCode: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) } });
in my Controller.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(); }
-
31 Jan 2012 5:54 AM #50
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") StringmyList) { .... }
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:
and then use a parameter like this:Code:params : { action : "update", myList: myValues }
Not sure if that works.Code:@RequestParam("myList") List<String> myListLast edited by ralscha; 31 Jan 2012 at 6:00 AM. Reason: added code tags
Similar Threads
-
Ext + Java + Spring + DWR
By sfwalter in forum Community DiscussionReplies: 59Last Post: 13 Dec 2010, 3:31 AM -
Ext JS 3.1 And Spring Webflow 2.0.8 Integration
By erosszz in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 2 Feb 2010, 11:33 PM -
Ext.Direct width Spring??
By jonathanlarav in forum Ext.DirectReplies: 0Last Post: 1 Jun 2009, 5:10 PM -
Ext GWT and Spring MVC
By Ivan Polak in forum Community DiscussionReplies: 4Last Post: 12 May 2009, 10:55 PM -
Spring with EXT
By sshah in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 11 May 2008, 12:53 PM


Reply With Quote