Reputation: 2883
Am getting error while trying to do this. Am using gwt2.5 and requestfactory.
My server class looks like this:
public class RuleConfiguration {
public static Map<Long, List<Operator>> getDataTypeOperatorMappings() {
return DataTypeOperatorMappingHelper.getInstance().getValidDataTypeToOperatorMappings();
}
}
And corresponding RequestContextClass looks like this
import java.util.List;
import java.util.Map;
@Service( value = RuleConfiguration.class )
public interface RuleRequestContext extends RequestContext {
Request<Map<Long, List<OperatorProxy>>> getDataTypeOperatorMappings();
}
But here am getting an error saying The type java.util.Map<"map signature"> cannot be used here
What is my mistake here? Kindly help. Thanks.
Upvotes: 0
Views: 835
Reputation: 696
If you look here https://developers.google.com/web-toolkit/doc/latest/DevGuideRequestFactory It doesn't list Map as a transportable type - only List and Set. I had this problem once and solved it by breaking the map into two ArrayList where the index of one was the data for the other.
Upvotes: 1