Using preChange and postChange

Now it's time to cover preChange and postChange. These two functions will only be available in components whose main purpose is to be used as filters. Examples of this are select, input, date range, radio button, button, multi button, and so on.

Every component where we can set a parameter to store the selections and the lifecycle of the component will trigger fireChange to that parameter. We have the option to specify the function that will be executed both before this happens and after applying the changes to the parameter, preChange and postChange. Take a look at following image:

Using preChange and postChange

As you can figure out, that the first ...

Get Learning Pentaho CTools 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.