Hello, javarunner. There are different ways to accomplish this. But
in general, if you expect the object (calOptions) to serialize into a
valid Java object on the server side, you need to make sure that the
type of class set up to receive the object on the Java side has all
the fields that the client object will be sending. Just to follow
your example, if your server side method was defined with a method
like this:
public void getOptions(MyOptions options)
you would need to define the MyOptions class like this:
public class MyOptions
{
public MyOptions() {}
private MyValues values;
public getValues() {
return values;
}
public setValues(MyValues values) {
this.values = values;
}
}
and the MyValues class like this:
public class MyValues
{
public MyValues() {}
private String location;
private String dept;
private String type;
private String resc;
// include public getters and setters for above 4 fields here
....
}
Now this is just one way to do it. Whether it's the best way or not
depends on what you need to do. You could also just take the easy way
out and instead define your Java side method like this:
public void getOptions(JSONObject options)
In this case, your object would get serialized directly into a
JSONObject on the server side which has methods for getting at the
data in the JSONObject. The advantage of this, is that you can send
any kind of data and not be locked into only the fields that your Java
objects define.
You can also use Maps, Sets and Lists... If you want to use these, you
have to structure your data in the way that Jabsorb is expecting for
those types. See the manual (
http://jabsorb.org/Manual) section 3.1.2
for more information about this.
Good Luck on getting it working.