我的抽象类BaseListBean
有一个tableType
:
public abstract class BaseListBean {
private String tableType;
}
子豆看起来像这样:
@ManagedBean
@ViewScoped
public class FunctionListBean extends BaseListBean {
...
}
我的问题是:如何从其他托管bean访问tableType
?
@ManagedBean(name="requestBean")
@RequestScoped
public class requestBean {
//this is needed
private String tableType;
}
现在正在使用的是使用子bean作为托管属性,例如functionListBean
:
@ManagedProperty(value = "#{functionListBean}")
private FunctionListBean functionListBean
然后
functionListBean.tableType
但我想要的是现有tableType
的{{1}},那我怎么能这样做呢?