ice:panelCollapsible - Overview

The collapsible component provides a simple way to implement the common use case of a rendered/unrendered area on the page. Styling of the header can be customized, as can the label and images used.

In the example below:

  • » Click to expand/contract the "ICEfaces Ajax Push" collapsible header.
Collapse ICEfaces Ajax Push
Definition

Ajax Push allows the application to incrementally update any part of the page at any time, for any group of clients. This is a small change in terms of the technical capabilities of Ajax applications, but it is a revolutionary change in terms of what applications can actually provide to users. Ajax Push is the key to building collaborative multi-user applications for the web.

Programming Model

Ajax Push can be added to an application with just two lines of code.

The org.icefaces.application.PushRenderer pushes page updates to groups of pages. To cause all pages in "someGroup" to be updated with the current server state, call:

PushRenderer.render("someGroup");

The easiest way to assemble push groups is to push updates to all pages in a user's session using:

PushRenderer.addCurrentSession("someGroup");

To distinguish between individual pages in a session, use:

PushRenderer.addCurrentView("someGroup");

It really is as simple as that to add real-time collaboration to your JSF application.

Source Code