In the jsf page I created, 3 other jsp pages are added through page include, each of these has its own backing bean and pre populates from webservices, values through scriptcollector prerender method. While saving, how to get the submitted values in my save action method? Is it possible to get each of these beans with their current values from Faces Context?
I am using JSF 1.1.
In the jsf page I created, 3 other jsp pages are added through page
Share
You can inject one managed bean in other managed bean as managed property. In JSF 1.x this is to be done with the
<managed-property>declaration infaces-config.xml.Here’s a kickoff example of how 3 web service beans are to be injected in 1 form bean.
This way you can just access them “the usual way” inside the form submit method.
As an alternative, you can use
Application#createValueBinding()to evaluate EL programmatically.Note that above methods are deprecated in JSF 1.2 and newer in favor of unified EL API. See also Get JSF managed bean by name in any Servlet related class.