Here is a simple piece of code that lets you access a backing bean from another backing bean. i.e. in the java code of a backing bean in JSF 1.1. A backing bean that exists in the session cannot be directly accessed from the map containing the other session objects. So here is a small workaround.
FacesContext context=FacesContext.getCurrentInstance();
Object obj=context.getApplication().createValueBinding("#{"+ "visit" + "}").getValue(context);
Hope it helps.
Happy Programming :)
Signing Off
Ryan
Signing Off
Ryan
No comments:
Post a Comment