I have a MyBean class, where I am initiazing the bean with some hardcoded values of some products.
In my webpage, I display these products and I have a "details" command button for each displayed product/
When I click on this,
I want to navigate to some details page.
For this, I want to catch the instance on which the button was clicked using "setPropertyActionListerner"
And in MyBean class, I just return the navigation.
In my webpage2, I can see the correct instance(which ever I clicked on)
The bean is session scoped.
When I am in webpage2…and I click 'back' and click on details button of some other product
Again I get the same instance.
Is there a way I can re-initialize my bean now??
i) I used this approach, but it doesn’t work
MyBean myBeanObject = new MyBean();
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("myNewBean", myBeanObject )