Interoperability between JViews JSF components and ICEfaces components

JViews JSF components and ICEfaces components are both JSF components. They can work together both on the client side and on the server side.
On the client side, JViews JSF components are implemented by a high-level Ajax-enabled JavaScriptâ„¢ library. You can direct the behavior of JViews components by invoking their JavaScript methods. For example, when you click an ICEfaces button you can update the contents of a JViews view by calling its JavaScript method: updateImage().
On the server side, both JViews components and ICEfaces components can be bound to managed beans. This allows you to exchange parameters and data between the managed beans of JViews JSF components and ICEfaces components.
Suppose that you have a diagram view showing a number of nodes and links. You want to display a particular node and center it on the screen when you click an ICEfaces button. This use case is shown in the code sample <install-dir> /jviews-diagrammer89/codefragments/jsf-diagrammer-ice in diagrammer.jsp. Run this sample now to understand the situation better.
The action is initiated on the client side by clicking a button. However, the task cannot be performed completely on the client side because there is not enough information on the selected node. Therefore you have to submit the request to the server and ask the server to perform more computation.
Once the managed bean on the server side has computed the offset to be applied to center the selected node on the screen, you need to find a way to tell the client-side JViews components to apply that offset. For this purpose, ICEfaces provides a way for you to send JavaScript code from the server to the client. The code is as follows.
com.icesoft.faces.context.effects.JavascriptContext
   .addJavascriptCall(FacesContext.getCurrentInstance(),
   "diagrammer.moveTo(300, 500);");
The ICEfaces Ajax agent on the client evaluates the received JavaScript code in order to scroll the diagram to the expected position.
For more details, see the DiagrammerBean.java file in the same sample.