JSF multiple @ViewScoped and @ManagedBeans on same page results in null injection
I have two classes as follows:
@ManagedBean( name = "randomBar")
@ViewScoped
public class Soap
{
private List<Cat> cats;
//getter/setter pair
}
@ManagedBean ( name = "marioPaint")
@ViewScoped
public class House
{
@ManagedProperty(value= "#{randomBar}")
private Soap开发者_如何学Go soap
//getter/setter pair
...
public void printCatInformation()
{
System.out.println(soap.getCats()); //null
}
These are both on the same page. The Soap
object is able to print to console it's size while House
is unable to get anything beyond a null pointer. My question is how do I send that information back to the instance of Soap
that is present inside of House
?
Update: This is running on Oracle 10.3.4 with Icefaces 2.0 (Mojarra).
精彩评论