Notifying the containing page controller

In the earlier recipes, we have seen how components can accept an attribute that is a property from the containing page controller and update the value of the property in response to a user action. If the containing page controller needs to determine if the property has changed, it must capture the previous value of the property and compare that with the current value. The same applies if the attribute passed to the component is a field from an sObject managed by the parent page controller.

In this recipe, we will create a custom component that can notify its containing page controller when an attribute value is changed. In order to avoid tying the component to a particular page controller class, we will ...

Get Visualforce Development Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.