i learned how to implement my own SuggestionOracle("AuSuggestOracle") and own Suggestions("AuMultiWordSuggestion"). In my case the suggestion object is constructed with a DTO. On a selection event i need this dto (or some fields of it) to react appropriate. I implemented a widget containing 3 suggest boxes with this special oracle and some logic between them. Now i want to apply MVP pattern - split this widget in presenter and view. At the moment the presenters display interface look like that:
public interface Display {
HasSelectionHandlers<Suggestion> getFedLand();
HasSelectionHandlers<Suggestion> getCounty();
HasSelectionHandlers<Suggestion> getCommunity();
AuSuggestOracle getFedLandOracle();
AuSuggestOracle getCountyOracle();
AuSuggestOracle getCommunityOracle();
void clearCounty();
void clearCommunity();
void activateForm();
Widget asWidget();
}
the problem is the implicit knowledge about my model in methods returning "AuSuggestOracle". so my question is how to get the view/ interface "humble". in my case the displayed suggestion-strings are ambiguous and i need at least the "id" of a selected item to know what DTObject is selected.