Frequent developer requirement is to pass data from one page to the next, which can be done through memory scope attributes.
To pass the value of the selected DepartmentId attribute from one page to the next, you use the SetPropertyListener as shown next:
To pass the value of the selected DepartmentId attribute from one page to the next, you use the SetPropertyListener as shown next:
<af:setPropertyListener
from="#{bindings.DepartmentId.inputValue}"
to="#{requestScope.deptId}" type="action"/>
If the SetPropertyListener component is added to a button, when the button is clicked, the input value of the DepartmentId attribute binding in the pageDefinition.xml file of the current page is read and stored in the deptId attribute of the requestScope. The deptId attribute is automatically created if it doesn’t exist. The attribute can be accessed from the navigated page using Expression Language or Java.
NOTE
Though we referenced the PageDef file in the explanation above,at runtime values are read from the binding container, which is the object instance created from the pageDefinition.xml file.
NOTE
The ADF Business Component business service is a smart layer that remembers the selected row when navigating from one page to another that uses the same view object through the ADF binding layer. In this case, you don’t need to pass data between pages.
No comments:
Post a Comment