Push updates to JViews JSF components

One of the interesting features of ICEfaces is its server-initiated rendering. This technique allows push updates to components rendered by Web browsers. This topic explains how to make push updates to JViews JSF components.
JViews components are Ajax-enabled components and their contents are generally JPG or PNG images generated by JViews server-side servlet supports. There is no way to push images directly to JViews JSF components.
ICEfaces is able to push elements such as HTML fragments and JavaScriptâ„¢ code but not images. However, you can use the ICEfaces push mechanism to notify client-side JViews JSF components that updates are available on the server. Then the JViews JSF components can use the Ajax mechanism to get the updated images. This approach is quite efficient in terms of network traffic.
To notify client-side JViews JSF components, you can use the ICEfaces server-initiated rendering technique to push JavaScript code. The ICEfaces Ajax agent receives and evaluates the code. For example, you can use the following JavaScript code.
<script type="text/javascript">diagrammer.updateImage();</script>
This code tells a JViews diagram component to update its contents.
For tips and tricks on how to push JViews JSF components, look at the push example installed with JViews Diagrammer at <install-dir> /jviews-diagrammer89/codefragments/jsf-diagrammer-ice.