My question is how can i access to a @ViewScoped from another @ViewScoped Bean, i have a ViewScoped which is the controller and in the controller bean i need to get the instance of another bean, a ViewScoped bean which is a Model Bean.
Im trying this but its not working:
FacesContext context = FacesContext.getCurrentInstance();
Modelo.cambiosOperacionBean cambios =(Modelo.cambiosOperacionBean)context.getApplication().evaluateExpressionGet(context, "#{cambiosOperacion}", Modelo.cambiosOperacionBean.class);
it just creates a new instance of the ViewScoped Class, but i need to get the same object and not a new one.