Feedback objects
A WVCM Feedback object is a structure for requesting additional feedback from the server during a server interaction. A PropertyRequest is one instance of Feedback. DetailedFeedback is another instance that allows the retrieval of specific properties from multiple resources in one server interaction.
Almost all do methods accept a Feedback argument.
As the operation executes, the DetailedFeedback object
is passed resource proxies that contain the property values requested
by the DetailedFeedback object. For example:
final ResourceList<Resource> modified = provider.resourceList();
// Write properties from the current dialog tab
// and fetch the properties for the "newTab"
Feedback request = new DetailedFeedback() {
public PropertyRequest getPropertyRequestForModified()
{
return DISPLAY_PROPERTIES_FOR_SIDE_EFFECTS;
}
public PropertyRequest getPropertyRequestForResult()
{
return computePropertiesNeededForTab(newTab);
}
public boolean isAbortRequested()
{
return false;
}
public void notifyActive(String message)
{
}
public void notifyIsModified(Resource resource)
{
modified.add(record);
}
public void notifyPercentComplete(int percentComplete)
{
}
};
CcView newTab = (CcView)view.doWriteProperties(request);
// Update display to reflect side-effects of the operation
RefreshDisplay(modified);
if (isEmpty(view.updatedPropertyNameList())) {
// All fields were written, so proceed to next tab...
record = newTab;
// setup the new tab...
} else {
// Report failures and stay on the old tab
}