There are three types of interaction:
Client-side:
no roundtrip to the server
JSF
lifecycle: the interaction is processed by the JSF lifecycle,
and another roundtrip is necessary to update the image from the
image servlet
Image
servlet: the interaction is processed by the image servlet and
the image is updated in one single roundtrip.
Basic interactions like panning the view are
processed locally on the client side. They are fast and no requests
are sent to the servlets.
When using advanced interactors like the select interactor (
selectInteractor
), you can choose the invocation context, or how the submitted
request will be processed. There are two options:
When the JSF lifecycle processes a request,
it follows well-defined phases, respecting listeners, triggering
actions and notifying components. The response forces all the pages
to be updated at the end, and the network or equipment component
executes the JavaScript code to request a new image from the image
servlet. At least two roundtrips to the server take place.
When the request goes straight to the image servlet (
IMAGE_SERVLET_CONTEXT
), the processing is faster, as only the
networkView
or
equipmentView
component is updated. The response carries the new image in one
single roundtrip to the server. The drawbacks are that no other JSF
component is updated, and that the results may be inconsistent.
Note
Unlike the other JSF components, the
overview component is always updated to
appropriately display the latest state of the view, regardless of
which option is used by the interactor (JSF_CONTEXT or
IMAGE_SERVLET_CONTEXT).