At least 2 http requests to populate an extjs form?
At least 2 http requests to populate an extjs form?
Very interesting post.
So in order to build a simple form, the browser must issues at least 2 requests:
a) 1 request for the HTML (and any javascript, let's say is in the page for simplicity).
b) 1 request made by the extjs form loader for xml/json that contains my domain object's values. These are then used to populate the extjs form.
I tried to run your sample project but somehow it is not compiling following java files as described below:when ever I tried to compile, it says serialize signature mismatch at the following lines in the corresponding files. I am using flexjson-2.1.jar. Whereas ExtJsArrayServlet is working fine.
@PersonCRUDServlet
return new JSONSerializer().include("data.phoneNumbers").serialize("person", jsonResponse);at line # 314
return new JSONSerializer().include("data.phoneNumbers").serialize("people", jsonResponse);at line # 506
@ExtJsJsonServlet
out.write(new JSONSerializer().include("phoneNumbers").serialize("people", getPeople()));at line# 38
I tried to modify so in that way I able to see some JSON data when I hit the Servlet URL but it is not getting rendered through ExtJsonStart.html
I am attaching the ext.war file with line modified by me. Modification compiles the file successfully but didnt get render in the html. Here I also like to mention that I have used extjs-2.3 as I didnt find exjs-2.1 to download.