Hi,all!
I am testing the Struts Showcase 2.0.11.
With the Java 5 Enum conversion, I think the checkboxlist 's list
property availableOperations just come from OperationsEnumAction's
getAvailableOperations() method. So I change the name availableOperations
to availableOperation .But it show error:The requested list
selectedOperations key %{availableOperations} could not be resolved as a
collection/array/map/enumeration/iterator type.......
Ordinary Code:
public List<OperationEnum> getAvailableOperations() {
return Arrays.asList(OperationEnum.values());
}
<s:checkboxlist label="Operations"
name="selectedOperations"
list="%{availableOperations}"
listKey="name()"
listValue="name()"
/>
Changed:
public List<OperationEnum> getAvailableOperation() {
return Arrays.asList(OperationEnum.values());
}
<s:checkboxlist label="Operations"
name="selectedOperations"
list="%{availableOperation}"
listKey="name()"
listValue="name()"
/>
It seems so stupid to do so.But at the beginning ,I just can't find
where the availableOperations come from.Then I found it into Action
class.So I think this would run correctly.But it doesn't.
Could any body explain it to me,please?
--
Vincent CHen