You have conflicting information in your code: a @UiConstructor
and a @UiFactory
(not conflicting actually, there's an order of precedence, but it can be confusing to the developer, i.e. you).
UiBinder will prefer the @UiFactory
over the @UiConstructor
, and your factory has no argument, so the teamNames
attribute from your XML is tentatively mapped to a setTeamNames
setter, which doesn't exist, hence the “Class CricketScores has no appropriate setTeamNames() method” error.
The problem is conceptual in your code: your UserDashboard
is constructed with a list of team names that it passes to the CricketScores
widget, so that widget shouldn't have a teamNames
attribute in the XML.