I am using DirectJNgine along with ExtDirect but I am badly stuck in a problem. We have a requirement of calling a serverside method in clientside. Ex.
Serverside direct method is :
ServerMethod.resolver(jsonDaaaata,"abcde", function(result, e)
var t = e.getTransaction();
Now in clientside method, "jsonDaaaata" may be any simple, complex, very complex json object or may be json array at run time and in serverside the method must have first parameter of some special datatype which can accept all types of Json object sent from the clientside.
public void resolver(JsonElement companies, String commandName)
System.out.println("we r in resolver method of client = ");
I have allready used following datatypes as a parameter on serverside method, but got following issues:
JsonObject: Control goes into the serverside method but while watching "companies " in resolver() method in debug mode, it does not have value sent from the client side.
JsonElement: Unable to invoke no-args constructor for class com.google.gson.JsonElement.
JsonArray: Control is not coming in the serverside method i.e. resolver().
So, please is there any datatype that we can use as a parameter in serverside method like resolver() so that it can accept any json data sent from client.