Flo,
Not sure if you're on the google wave at all, but it seems like one place to save your ongoing efforts. In particular, this wave is available to the public:
RequestFactory Wave
( ) API RequestFactory.
, . hibernate , GWT-RPC, / . . , RPC - .
RequestFactory, , Google, , , . , .roo - ApplicationRequestFactory.java.
package com.springsource.extrack.gwt.request;
import com.google.gwt.requestfactory.shared.RequestFactory;
public interface ApplicationRequestFactory extends RequestFactory {
ReportRequest reportRequest();
ExpenseRequest expenseRequest();
EmployeeRequest employeeRequest();
}
, . . EntryPoint GWT.create(...):
final ApplicationRequestFactory requestFactory =
GWT.create(ApplicationRequestFactory.class);
requestFactory.init(eventBus);
com.springsource.extrack.gwt.request ApplicationEntityTypesProcessor.java, generics . - .
, :
- EmployeeRecord.java - DTO .
- EmployeeRecordChanged.java - RecordChanged, hook onEmployeeChanged.
- EmployeeChangedHandler.java - , , onEmployeeChanged.
- EmployeeRequest.java - , ApplicationRequestFactory .
, . M1 M2 , GWT. , , , M1-M2.
, , . ReportListActivity.java:
public void start(Display display) {
this.registration = eventBus.addHandler(ReportRecordChanged.TYPE, new ReportChangedHandler() {
public void onReportChanged(ReportRecordChanged event) {
update(event.getWriteOperation(), event.getRecord());
}
});
super.start(display);
}
. , cost.roo , "", . GWTing.
.