Reputation: 2062
I have a manged bean where I use another managed bean:
@ManagedProperty(value="#{tableActions}")
private TableActions table1;
that works fine.
Now I need to use another instance of it:
@ManagedProperty(value="#{tableActions}")
private TableActions table1;
@ManagedProperty(value="#{tableActions}")
private TableActions table2;
However, now table2
is the same as table1
. How can I create a separate instance?
Upvotes: 1
Views: 132
Reputation: 1109635
Make it a @NoneScoped
bean.
You only need to make sure you access it in view via #{yourParentBean.table1}
and not via #{tableActions}
.
Upvotes: 2