TOC PREV NEXT INDEX

Integrating ICEfaces With Existing Applications


JSP Inclusion

ICEfaces can be easily integrated with existing JSP-based applications through the dynamic JSP inclusion mechanism. Once you have developed a standalone page with the desired ICEfaces dynamic content, simply include that page into your existing JSP page with the following statement:

<jsp:include page="/content.iface" />
 
Note: Navigation (such as hyperlinks) from the embedded ICEfaces content will cause the entire page to be reloaded, but other interaction with the application will be incrementally updated in-place on the page.

Included ICEfaces pages must contain a <body> tag as the current implementation uses this tag as a marker. The contents of the <body> tag is precisely the content that is dynamically inserted into the including page. This restriction will be removed in a future release.

While using dynamic include is a suitable way to embed ICEfaces content into an existing non-ICEfaces JSP page, using dynamic include to embed content within an ICEfaces JSP page is not recommended. To include the content of one ICEfaces JSP in another ICEfaces JSP, the static inclusion syntax should be used:

For JSP:

<%@ include file="relativeURL" %>
 

For JSPX:

<jsp:directive.include file="relativeURL" />
 
JSF Integration

In most cases, the goal of adding ICEfaces to a JSF application will be to transform the entire application into an Ajax application, but there may be reasons for converting only parts over to ICEfaces. To handle some pages with ICEfaces and other pages with the JSF default mechanism, add the ICEfaces Servlet mappings for the ".iface" extension (as described in Configuration Reference of this document) but do not remove the "Faces Servlet" mapping or Servlet initialization. Pages served through the default Faces Servlet are to be handled without ICEfaces. Then, to ensure that Direct-to-DOM renderers are applied to ICEfaces pages only, include "just-ice.jar" rather than "icefaces.jar" in your web application libraries. This .jar file contains a version of ICEfaces configured with a ViewHandler that will process only those pages with a ".iface" extension and a RenderKit that will not override the standard JSF components (such as <h:commandLink />) with Direct-to-DOM renderers. In this configuration, ICEfaces pages must contain only standard core JSF tags ("f:" tags) and ICEfaces tags ("ice:" tags).



Copyright 2005-2009. ICEsoft Technologies, Inc.
TOC PREV NEXT INDEX