It's perhaps not the most important point, but this statement: "You have to write some getter methods in your jsp to access the data in the object returned." isn't really accurate.
When DWR marshalls a Java object to Javascript, say an instance of this class:
public class Person {
private
String firstName;
private String lastName;
public String getFirstName() { return firstName; }
public String getLastName() { return lastName; }
}
...what you get in Javascript is this:
{ firstName: "xxx", lastName: "yyy" }
...where xxx and yyy are the values of the fields obviously. So, to access them, you have only to do:
o.firstName
That assumes the variable o represents that object shown there. There's no methods present, and there's no need to write any methods to get the data, you simply access it directly like this.
I suspect that's what you meant ot say Ghulam, just wanted to clarify for anyone else reading this.
-- <br />Frank W. Zammetti<br />Founder and Chief Software Architect<br />Omnytex Technologies<br /><a href="http://www.omnytex.com" target="_blank" rel="nofollow">http://www.omnytex.com</a><br />AIM/Yahoo: fzammetti<br />MSN: fzammetti@hotmail.com<br />Author of "Practical Ajax Projects With Java Technology"<br /> (2006, Apress, ISBN 1-59059-695-1)<br />and "JavaScript, DOM Scripting and Ajax Projects"<br /> (2007, Apress, ISBN 1-59059-816-4)<br />Java Web Parts - <a href="http://javawebparts.sourceforge.net" target="_blank" rel="nofollow">http://javawebparts.sourceforge.net</a><br /> Supplying the wheel, so you don't have to reinvent it!