How to create custom arguments resolver

49 views
Skip to first unread message

Tomas Hudec

unread,
Nov 19, 2013, 9:53:42 AM11/19/13
to extdire...@googlegroups.com
Hi again,

now I need to help with conversion of arguments. I have method:


    @ExtDirectMethod(value = ExtDirectMethodType.FORM_POST, group = "app")
    public ExtDirectFormPostResult test(CustomDataType object, BindingResult result) {


        return null;
    }


CustomDataType is class generated by JAXB so I am 100 % sure that spring mvc dont know how to create this class with json request. Can you help me how should I resolve this problem ?


thx a lot


Ralph Schaer

unread,
Nov 19, 2013, 11:05:07 AM11/19/13
to extdire...@googlegroups.com
Hi

Does the application throw an exception?


--
You received this message because you are subscribed to the Google Groups "extdirectspring" group.
To unsubscribe from this group and stop receiving emails from it, send an email to extdirectspri...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Tomas Hudec

unread,
Nov 20, 2013, 2:09:29 AM11/20/13
to extdire...@googlegroups.com
nope it just create empty class

Dňa utorok, 19. novembra 2013 17:05:07 UTC+1 ralph napísal(-a):

Ralph Schaer

unread,
Nov 20, 2013, 2:17:59 AM11/20/13
to extdire...@googlegroups.com

Interesting. Do the request parameters match the properties of the CustomDataType class.

Tomas Hudec

unread,
Nov 20, 2013, 3:20:03 AM11/20/13
to extdire...@googlegroups.com
they cant match because CustomDataType constains JAXB classes and I dont know how it rewrite to JSON. I want to create my own arguments resolver. I create thread in stackOveflow too because I dont know if it is problem ext direct or spring-mvc:

http://stackoverflow.com/questions/20090634/spring-exception-an-errors-bindingresult-argument-is-expected

Dňa streda, 20. novembra 2013 8:17:59 UTC+1 ralph napísal(-a):

Ralph Schaer

unread,
Nov 20, 2013, 6:06:16 AM11/20/13
to extdire...@googlegroups.com
There is no JSON involved. This is a simple post request.


--

Ralph Schaer

unread,
Nov 20, 2013, 6:15:20 AM11/20/13
to extdire...@googlegroups.com
As a last resort you could map the request parameter inside the method. 


@ExtDirectMethod(value = ExtDirectMethodType.FORM_POST, group = "app")
    public ExtDirectFormPostResult test(HttpServletRequest request) {
        String testParam = request.getParameter("test")

        return null;
    }
Reply all
Reply to author
Forward
0 new messages