【发布时间】:2013-08-08 08:04:29
【问题描述】:
我正在尝试使用 ManagedProperty:
从这里
@ManagedBean(name = "SelectionBean")
@SessionScoped
public class TableSelectionBean implements Serializable {
private String selectionMode = "single";
private Collection<Object> selection;
private List<MonitoringData> monitoringData;
private List<MonitoringData> selectionMonitoringData;
到这里:
@ManagedBean(name="ActionBean")
@SessionScoped
public class MonitoringActionBean implements Serializable {
private ThreadPoolExecutor executor;
@ManagedProperty(value="{SelectionBean.selectionMonitoringData}")
private List<MonitoringData> selectedMonitoring;
我收到以下错误消息:
com.sun.faces.mgbean.ManagedBeanCreationException:无法为托管 bean ActionBean 设置属性 selectedMonitoring ... 原因:java.lang.IllegalArgumentException:无法将类 java.lang.String 类型的 {SelectionBean.selectionMonitoringData} 转换为接口 java.util.List
知道为什么它不起作用吗?
【问题讨论】:
-
TableSelectionBean是否包含selectionMonitoringData的吸气剂? -
是的,也包含getter和setter