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.
Method in RequestContext interface containing Map as return type
-
29-05-2022 - |
Question
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.
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow