neutrino36
(neutrino neutrino)
#1
Hello,
Recently I migrated a project from Cuba 6 to Cuba 7.
In Cuba 6 I injected this:
@Named("fieldGroup.type")
private LookupField typeField;
Now for Cuba 7 I have to specify parameter set (Integer)
@Named("fieldGroup.type")
private LookupField<Integer> typeField;
When I compile I have this error:
error: incompatible types: List<InvTypeEnum> cannot be converted to List<Integer>
for
typeField.setOptionsList(types);
What is the solution? I should still use Cuba 6 annotation?
krivopustov
(Konstantin Krivopustov)
#2
Was Integer
type suggested by Studio or it was your choice?
Probably the type should be InvTypeEnum
.
neutrino36
(neutrino neutrino)
#3
Was Integer type suggested by Studio. If I don’t inject Integer, LookupField is underlined :
Unchecked call to 'setOptionList(List<I>) as a member of row type "com.haulmont.cuba.gui"
The solution is to put in this way but I’m not sure if is correct:
@Named("fieldGroup.type")
private LookupField<InvTypeEnum> typeField;
``