Question 2
Your page contains the following code that is invoked on an action by the current user:
<af:setPropertyListener from="#{applicant:surname}" to="#(...)" type="action"/>
To receive the value from the to property of the af:setPropertyListener, you create a managed bean as follows:
package view;
public class Employee {
String lastName;
public void setLastName(String lastName) { this.lastName = lastName; }
public String getLastName() { return lastName;
}
In the adfc-сonfig.xml file, the managed bean is configured as:>
<managed-bean>
<managed-bean-name>emp</managed-bean-name>
<managed-bean-class>view. Employee</managed-bean-class>
<managed bean-scope>pageFlowScope</managed-bean-scope>
</managed-bean>
What EL expression would you write in the af:setPropertyListener "to" property to write the value to the lastName string of the Employee class?
(Choose the best answer.)
to=”#{pageFlowScope.emp.lastName)”
to=”#{pageFlowScope.Emp.lastName}”
to=”#{pageFlowScope.emp.LastName}”
Correct answer: C
Explanation:
For example, the page might specify #{pageFlowScope.empno} as a page parameter and a bounded task flow might specify #{pageFlowScope.employeeID} as the value of an input parameter definition. The from-value on the view activity input page parameter would be #{pageFlowScope.employeeID} and the to-value would be #{pageFlowScope.empno}. This enables reuse of both the page definition and bounded task flow because you don't have to redefine parameters for every context in which each is used. References: https://docs.oracle.com/cd/E23943_01/web.1111/b31974/taskflows_parameters.htm#ADFFD19858
For example, the page might specify #{pageFlowScope.empno} as a page parameter and a bounded task flow might specify #{pageFlowScope.employeeID} as the value of an input parameter definition.
The from-value on the view activity input page parameter would be #{pageFlowScope.employeeID} and the to-value would be #{pageFlowScope.empno}. This enables reuse of both the page definition and bounded task flow because you don't have to redefine parameters for every context in which each is used.
References: https://docs.oracle.com/cd/E23943_01/web.1111/b31974/taskflows_parameters.htm#ADFFD19858