Have you seen this example?
http://getahead.ltd.uk/dwr/examples/form
Eugene Prokopiev wrote:
Hi,
Suppose, I have this beans:
public class Person {
private long id;
private String name;
private Status status;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
}
public class Status {
private long id;
private String name;
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
Additionaly I have this bean to manipulate Person and Status instances:
public class PersonManager {
public List<Status> getAviableStatuses() {
...
}
public void createPerson(Person person) {
...
}
}
I need to create web page with text box for person name and selection
list for selecting status. JavaScript code on this page must fill
selection list with Status instances and transfer created Person
instance to server.
Where can I find pattern on sample of this simple use case?
I tried to read http://getahead.ltd.uk/dwr/examples, but I see only
DWRUtil.setValues and DWRUtil.addOptions which can't be used in this
use case. It is possible to implement this with handwritten JavaScript
code, but I hope there is a more simple and right way. Can anybody
help me to find it?
Thanks in advance,
Eugene Prokopiev
---------------------------------------------------------------------
To unsubscribe, e-mail:
users-unsubscribe-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx
For additional commands, e-mail:
users-help-EyPigyGktj4FDOXUYO6UHQ@xxxxxxxxxxxxxxxx
|