View Full Version : How to send json object to a restful method whose parameter is a entity class

30 Dec 2009, 5:52 AM

Im working with EXtjs and Resteasy. I am using JAXB annotated entity classes for marshall/unmarshall data between the two layers.

In the extjs page I have a formpanel. When the page is loaded this form calls the GET method and it is populated without any problem.

public List getPersona(@PathParam("id") String id) {
Persona persona = new Persona();// JAXB annotated class
...// I fills this object with data
List listPersonas = new ArrayList();
return listPersonas;

The data is received by a JsonReader without any problem.

The question is if I had a method "putcustomer" that receive "Persona", how must be sent the data by the form?

public void putCustomers(Persona persona)


I know that Ext JS 3.0 comes with a JsonWriter but I dont know how to use it.

Thanks in advance.

8 Mar 2010, 7:52 AM
Dis you find a solution ?

I can't find a way to POST/PUT a Json object with no Ext.data.JsonReader.root property