Advanced Features > Using DHTML-Based JSF Components to Build Web Applications > Contexts for Actions on the View

Actions executed in response to interactions on the view can be executed in two different contexts: JavaServer Faces lifecycle or image servlet. The execution context can be configured by setting the invocationContext attribute on the JSF interactor components.

The value change listeners registered in the interactor can determine whether they are called in a JSF context or in an image servlet context with the following code:

IlvObjectSelectInteractor source =
        (IlvObjectSelectInteractor)valueChangeEvent.getSource();
boolean jsfContext = source.getInvocationContext() ==
        IlvDHTMLConstants.JSF_CONTEXT;

Code Sample 6.18 Determining in Which Contexts a Value Change Listener is Called

This section shows the differences between the two invocation contexts through the execution of an action when a node is selected.