Getting Started Guide. Version 1.8
|
|
|
- Hugo Griffith
- 10 years ago
- Views:
Transcription
1 Getting Started Guide Version 1.8
2 Copyright Copyright ICEsoft Technologies, Inc. All rights reserved. The content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license agreement. The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by ICEsoft Technologies, Inc. ICEsoft Technologies, Inc. assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide. ICEfaces is a registered trademark of ICEsoft Technologies, Inc. Sun, Sun Microsystems, the Sun logo, Solaris and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and in other countries. All other trademarks mentioned herein are the property of their respective owners. ICEsoft Technologies, Inc. Suite 200, th Street NW Calgary, Alberta, Canada T2M 4S2 Toll Free: (USA and Canada) Telephone: Fax: For additional information, please visit the ICEfaces web site: ICEfaces v1.8 March 2009
3 About this Guide The ICEfaces Getting Started Guide will help you quickly get started building ICEfaces applications. By reading through this guide, you will: Gain a basic understanding of what ICEfaces is and what it can do for you. Install ICEfaces and run the sample applications on your local application server. Work through a basic ICEfaces tutorial that transforms a standard JSF application into a rich web application powered by ICEfaces. Understand how to integrate ICEfaces with various JEE application servers and development environments. For more information about ICEfaces, visit the ICEfaces Community web site at: In this guide... We have organized this guide into these chapters to help you get started using ICEfaces quickly: Chapter 1: Introduction to ICEfaces Provides an overview of ICEfaces and its key features and capabilities. Chapter 2: Configuring Your Environment for ICEfaces Describes how to set up the ICEfaces environment on your local Tomcat server to run the sample applications and tutorial included with the installation. Chapter 3: Running the ICEfaces Sample Applications Highlights the features and capabilities that ICEfaces technology provides through several sample applications. Chapter 4: ICEfaces Tutorial: The TimeZone Application Demonstrates how to transform a standard JSF application into a rich interactive ICEfaces application through a series of tutorial exercises. Each exercise in the tutorial illustrates a key capability of ICEfaces. Chapter 5: ICEfaces SessionRenderer Tutorial: Easy Ajax Push Demonstrates how to easily add Ajax Push collaborative features to your rich web application Chapter 6: ICEfaces Design Decisions Using ICEfaces in Your Project Provides details for setting up other development environments to use ICEfaces. ICEfaces Getting Started Guide v1.8 iii
4 Prerequisites ICEfaces applications are JavaServer Faces (JSF) applications, and as such, the only prerequisite to working with ICEfaces is that you must be familiar with JSF application development. For more information on Java Platform, Enterprise Edition (JEE), which JSF is a sub-component of, refer to Additional JSF resources can be found on the icefaces.org website. ICEfaces Documentation You can find the following additional ICEfaces documentation at the ICEfaces Community web site ( ICEfaces Release Notes Contains information about the new features and bug fixes included in this ICEfaces release. In addition, important time-saving Known Issues and detailed information about supported browsers, application servers, portal containers, and IDEs can also be found in this document. ICEfaces Developer s Guide Includes materials targeted for ICEfaces application developers and includes an in-depth discussion of the ICEfaces architecture and key concepts, as well as reference material related to markup, APIs, components, and configuration. ICEfaces Technical Support For more information about ICEfaces, visit the ICEfaces Technical Support page at: ICEfaces Getting Started Guide v1.8 iv
5 Contents Copyright ii About this Guide iii Chapter 1 Introduction to ICEfaces Chapter 2 Configuring Your Environment for ICEfaces Prerequisites Java 2 Platform, Standard Edition Ant Tomcat Web Browser ICEfaces Chapter 3 Running the ICEfaces Sample Applications AuctionMonitor AddressForm Component Showcase Chapter 4 ICEfaces Tutorial: The TimeZone Application Overview of the TimeZone Application Step 1 Basic JSF TimeZone Application Creating a JSP Page with Standard JSF and HTML Tags. 15 Creating the Backing JavaBean (TimeZoneBean.java).. 17 Binding the Bean to the JSP Page Configuring the Web Application Building and Deploying timezone Step 2 Integrating ICEfaces Turning JSP into JSP Document Registering ICEfaces Servlets Building and Deploying timezone Step 3 Dynamic Updating Make the Clocks Tick Enhancing the TimeZoneBean Configuring ICEfaces for Concurrent Views Building and Deploying timezone Step 4 Dynamic Table Rendering ICEfaces Getting Started Guide v1.8 v
6 Contents (continued) Modifying timezone.jspx Modifying TimeZoneBean.java Modifying TimeZoneWrapper.java Building and Deploying timezone Step 5 Applying Styles Adding a Style Sheet to the Application Adding Images to the Application Implementing Styles Building and Deploying timezone Step 6 Integrating Facelets Facelets Dependencies Configuring for Facelets Change Web Files from JSP Document to Facelets Building and Deploying timezone Step 7 Capitalize on Facelets Putting the TimeZoneBean in Charge Adding New Properties Updating TimeZoneBean.java Building and Deploying timezone Chapter 5 ICEfaces SessionRenderer Tutorial: Easy Ajax Push. 51 Overview Tools and Environment Creating the Beans Counter.java ApplicationCounter.java Define Managed Beans Creating the Pages Configure Facelets Support Create the Page Create the Descriptor (web.xml) Running without Ajax Push Adding Ajax Push with SessionRenderer SessionCounter.java Adjust the Managed Bean Description ICEfaces Getting Started Guide v1.8 vi
7 Contents (continued) SessionRender for Ajax Push Running with Ajax Push Chapter 6 ICEfaces Design Decisions Using ICEfaces in Your Project Choosing your Markup: JSPs or Facelets Asynchronous vs. Synchronous Update Mode JSF 1.1 vs. JSF Integration with 3rd Party Frameworks Integration with 3rd Party JSF Components Special Considerations for Portlet Development Application Server Support Client Browser Support Desktop Browsers Mobile Browsers Using ICEfaces with IDEs Index ICEfaces Getting Started Guide v1.8 vii
8 Chapter 1 Introduction to ICEfaces ICEfaces is the industry s leading open-source, standards-compliant Ajax-based solution for rapidly creating enterprise grade, pure-java rich web applications. ICEfaces provides a rich web presentation environment for JavaServer Faces (JSF) applications that enhances the standard JSF framework and lifecycle with Ajax-based interactive features. ICEfaces replaces the standard HTML-based JSF renderers with Direct-to-DOM (D2D) renderers, and introduces a lightweight Ajax bridge to deliver presentation changes to the client browser and to communicate user interaction events back to the server-resident JSF application. Additionally, ICEfaces provides an extensive Ajax-enabled component suite that facilitates rapid development of rich interactive webbased applications. The basic architecture of an ICEfaces-enabled application is shown in Figure 1 below. Figure 1 ICEfaces-enabled JSF Application The rich web presentation environment enabled with ICEfaces provides the following features: Smooth, incremental page updates that do not require a full page refresh to achieve presentation changes in the application. Only elements of the presentation that have changed are updated during the render phase. User context preservation during page update, including scroll position and input focus. Presentation updates do not interfere with the user s ongoing interaction with the application. ICEfaces Getting Started Guide v1.8 1
9 Introduction to ICEfaces These enhanced presentation features of ICEfaces are completely transparent from the application development perspective. Any JSF application that is ICEfaces-enabled will benefit. Beyond these transparent presentation features, ICEfaces introduces additional rich presentation features that the JSF developer can leverage to further enhance the user experience. Specifically, the developer can incorporate these features: Intelligent form processing through a technique called Partial Submit. Partial Submit automatically submits a form for processing based on some user-initiated event, such as tabbing between fields in a form. The automatic submission limits form processing to the single control that has been altered, but allows the application lifecycle to execute in response to that change. This means that the application developer can introduce intelligent form processing logic that reacts instantaneously to user interactions with the form. Server-initiated asynchronous presentation update (Ajax Push). Standard JSF applications can only deliver presentation changes in response to a user-initiated event, typically some type of form submit. ICEfaces introduces a server-initiated rendering that enables the server-resident application logic to push presentation changes to the client browser in response to changes in the application state. This enables application developers to design systems that deliver data to the user in a near-real-time asynchronous fashion. ICEfaces Getting Started Guide v1.8 2
10 Chapter 2 Configuring Your Environment for ICEfaces This chapter contains instructions to help you get up and running quickly with ICEfaces technology. We start by outlining the prerequisites for a standard configuration using a Java Platform, Standard Edition (J2SE), Tomcat, and Ant to help build and deploy the ICEfaces sample applications and tutorials. If you would like to run the sample applications or the tutorial in your chosen development environment, or with a different application server, refer to Chapter 6, ICEfaces Design Decisions Using ICEfaces in Your Project, on page 62. Prerequisites ICEfaces applications are JavaServer Faces (JSF) applications, and as such, the only prerequisite to working with ICEfaces is that you must be familiar with JSF application development. For more information on Java Platform, Enterprise Edition (JEE), which JSF is a sub-component of, refer to Additional JSF resources can be found on the icefaces.org website. To run the sample ICEfaces applications, you will need to download and install the following: Java 2 Platform, Standard Edition Ant Tomcat ICEfaces Web browser The following sections provide detailed instructions for downloading the software to set up an environment where you can run the ICEfaces sample applications and tutorial. Java 2 Platform, Standard Edition To run the ICEfaces sample applications with Tomcat, you will need to install a version of the Java Platform, Enterprise Edition (JEE) Platform, version or higher. If you already have Java installed on your system, verify your version by typing the following on the command line: java -version To upgrade or install the latest release of the J2SE, visit the Sun web site: ICEfaces Getting Started Guide v1.8 3
11 Configuring Your Environment for ICEfaces Installers and instructions are provided for the various systems that Sun supports. The demo applications can be run on any version of Windows, Linux, and Mac OS X capable of running J2SE version or higher. Ant The ICEfaces tutorial relies on Ant to build and deploy the various stages of the tutorial application. You will need Ant version or higher for the build files provided in this ICEfaces release. If you already have a version of Ant installed, you can verify that you have a recommended version by typing the following on a command line: ant -version To upgrade your current version or install a new version of Ant, visit the following location: If you are not familiar with Ant, detailed instructions for downloading and installing Ant for your environment are available in the online manual at: Tomcat Java web applications require an appropriate JEE runtime environment. ICEfaces applications require support for servlets and JavaServer Pages (JSP). Tomcat is a popular choice for this type of development because the ICEfaces code has been extensively tested on Tomcat. Tomcat is available from the Apache Jakarta Project at: Download and install Tomcat 6 according to the instructions provided with the software. Although it is possible to run ICEfaces applications in any standard JEE container, all the instructions provided in this guide refer to Tomcat. In addition, the default ant build for the sample applications targets Tomcat 6. Once Tomcat is successfully installed, follow the instructions to start the server. This will differ depending on what platform you are using. ICEfaces Getting Started Guide v1.8 4
12 Configuring Your Environment for ICEfaces Web Browser Web applications use a web browser as the client. This ICEfaces distribution has been verified with the following browsers: Vendor Product Version Apple Safari 1.3, 2.x, 3.x, 4.x Google Chrome 1.0 Microsoft Internet Explorer 6.x+, 7.0, 8.0 Mozilla Firefox 1.x+, 2.0, 3.0 Opera Opera 9.x+ ICEfaces Getting Started Guide v1.8 5
13 Configuring Your Environment for ICEfaces ICEfaces If you are reading this document, you may have already downloaded and installed ICEfaces. If you haven't, you can get the latest version of ICEfaces from: ICEfaces is available in both a binary and source-code distribution. With either distribution, begin by unzipping ICEfaces to your preferred location. If you downloaded the binary distribution, the resulting directory structure should look similar to the structure shown in Figure 2. Figure 2 ICEfaces Directory Structure ICEfaces Getting Started Guide v1.8 6
14 Configuring Your Environment for ICEfaces If you downloaded the source distribution these additional source-code directories will also be present; bridge, component, and core (shown in Figure 3). Figure 3 ICEfaces Source Distribution Directory Structure ICEfaces Getting Started Guide v1.8 7
15 Chapter 3 Running the ICEfaces Sample Applications ICEfaces is bundled with three sample applications: Auction Monitor, Address Form, and Component Showcase. If you have downloaded the binary distribution of ICEfaces, these applications are available in prebuilt.war files suitable for deployment to Tomcat 6 in the following location: [install_dir]/icefaces/samples/ If you downloaded the source code distribution of ICEfaces, it is necessary to build the samples which can be accomplished by running ant from the [install_dir]/icefaces/ directory. This will build all of the sample bundles and create distributable.war files suitable for deployment to Tomcat 6 in the distribution directory at: [install_dir]/icefaces/dist/samples/ If you would like to deploy the sample applications to an application server other than Tomcat 6, you will need to build the.war file appropriate for the target application server. The ant build script provides additional build targets for many popular JEE application servers. Navigate to the directory for a particular sample application and type ant help to see a list of available build targets. Then build the sample application for the application server target of your choice. For example, ant glassfishv2 creates a.war file deployable to a Glassfish v2 application server. Note: Individual application servers may require a different set of libraries in the application.war file, depending on which libraries they provide themselves; thus, it is not feasible to deploy the same.war file to all application servers. For details on which libraries are required by various application servers, see the Library Dependencies section in Chapter 4, ICEfaces Reference Information of the ICEfaces Developer's Guide. If you would like to build a sample for an application server for a specific build target that is not provided, you can use custom build options to create a build that will deploy correctly on your application server. The ant help command provides more information on the available options. If you are working with Tomcat, the quickest and easiest way to deploy a.war file is to copy the file into the webapps directory of the Tomcat installation. By default, Tomcat periodically checks this directory for updates and, if it finds a new.war file, it automatically deploys the application. Once you ve copied the.war file into webapps and Tomcat has deployed the application, you can view and interact ICEfaces Getting Started Guide v1.8 8
16 Running the ICEfaces Sample Applications with it by opening a web browser and typing in the appropriate URL for the application that you want to browse. Application Archive URL AuctionMonitor auctionmonitor.war AddressForm address.war Component Showcase componentshowcase.war The sample applications highlight the various features and capabilities that ICEfaces technology provides. AuctionMonitor ICEfaces AuctionMonitor (auctionmonitor.war) simulates the tracking of live auctions with ticking countdown timers and interactive bidding. It also includes a simple integrated chat and some demo notes on how to interact with the AuctionMonitor. Figure 4 AuctionMonitor Sample Application ICEfaces Getting Started Guide v1.8 9
17 Running the ICEfaces Sample Applications The application uses a number of standard JSF components: datatable, commandbutton, and panelgrid. ICEfaces and Direct-to-DOM rendering provides for asynchronous and dynamic updates of these components without a full page refresh. This is illustrated by the ticking clocks, real-time bid updates, the dynamically rendered buttons, the ability to hide and show table rows on demand, and the integrated chat session. For more information on these ICEfaces features, refer to the ICEfaces Developer s Guide. Open the AuctionMonitor in two browser windows to fully appreciate the interactive features of this application. AddressForm ICEfaces AddressForm (address.war) shows how a prototypical address form can be validated and updated on the fly using partial submits and without fully refreshing the page. Figure 5 AddressForm Sample Application Typically, this type of form would require a user to fill in all the fields and submit it for server-side validation. That, or a raft of JavaScript code to do client-side validation. However, using JavaServer Faces components and ICEfaces, you can do a partial submit with each field entry and only offer the submit button when the form is completely validated. As each field is entered, a partial form submission is sent to the server and only those components that require updates are changed. It's rich, interactive, efficient, and lightweight. Most importantly, it doesn't require any JavaScript programming. ICEfaces Getting Started Guide v1.8 10
18 Running the ICEfaces Sample Applications Component Showcase The Component Showcase sample application (component-showcase.war) demonstrates key features and capabilities of the ICEfaces Component Suite. It consists of a collection of small examples intended to aid users in the evaluation of ICEfaces features and to provide developers with simple, straight-forward examples of component usage. Use the Component Showcase to quickly see an overview of the capabilities of the ICEfaces Component Suite and as a reference to each component s properties, documentation, tutorials, and other resources. Figure 6 Component Showcase The Component Showcase application is available in three distinct varieties: a JSP, Facelets, and Portlets implementation. Each variety illustrates how the ICEfaces Component Suite can be used within that environment. ICEfaces Getting Started Guide v1.8 11
19 Running the ICEfaces Sample Applications Facelets Uses dynamic includes and Facelets templating for the navigation and structure of the application. This is the default implementation used in the prebuilt component-showcase.war file included with the binary distribution. Also includes comprehensive resource navigation and source code viewing capabilities. JSP Simple JSP navigation system which has a link for every component example. The main layout construct is a panel stack which is manipulated by the navigation system. Portlets Provides a portlet implementation of the component samples with each sample being a single portlet. Build targets are available for many supported portlet containers. The source-code for each variety of the application is located under [install_dir]/icefaces/samples/component-showcase2/facelets, [install_dir]/icefaces/samples/component-showcase2/jsp, and [install_dir]/icefaces/samples/component-showcase2/portlets. To build each variety use ant clean tomcat6.0 from within one of the Facelet, JSP, or Portlet subdirectories. Use ant help to see a list of all available build targets (glassfishv2, jboss4.2, etc.). ICEfaces Getting Started Guide v1.8 12
20 Chapter 4 ICEfaces Tutorial: The TimeZone Application This tutorial guides you through a series of exercises that takes a basic JavaServer Faces application and transforms it, using ICEfaces, into a much more dynamic application with an enriched user experience. The tutorial begins with a simple web application called TimeZone and demonstrates how to build the ICEfaces-enriched application shown in Figure 7. Figure 7 ICEfaces TimeZone Application This tutorial consists of seven steps with increasing levels of richness, each designed to demonstrate ICEfaces capabilities: ICEfaces Getting Started Guide v1.8 13
21 ICEfaces Tutorial: The TimeZone Application Step 1 Basic JSF TimeZone Application shows a basic JSF application built entirely from basic JSF HTML components in JSP. Step 2 Integrating ICEfaces uses the same basic JSF application, converted to JSP Document, running with ICEfaces. Step 3 Dynamic Updating Make the Clocks Tick modifies the application to add ticking clocks and to support separate but concurrent instances of the TimeZone application from multiple web browser windows or tabs. Step 4 Dynamic Table Rendering adds a dynamic data table, which can be manipulated by checkboxes, to make the TimeZone application more interactive. Step 5 Applying Styles demonstrates how to add CSS formatting and styles to enhance the appearance of the TimeZone application. Step 6 Integrating Facelets uses the same JSF application, converted to XHTML, running with ICEfaces and Facelets together. Step 7 Capitalize on Facelets uses Facelets functionality to do header inclusion and dynamically generate content from the Java bean. The seven exercises are organized in the directory structure shown in Figure 8. Prior to starting this tutorial, we recommend that you read Chapter 2, Configuring Your Environment for ICEfaces, on page 3 to ensure that your environment is configured properly to deploy and execute ICEfaces applications on your JEE application server. Figure 8 TimeZone Tutorial Directory Structure ICEfaces Getting Started Guide v1.8 14
22 ICEfaces Tutorial: The TimeZone Application Overview of the TimeZone Application By following all the steps in this tutorial, you will build an ICEfaces application called TimeZone (shown in Figure 7 on page 13) from source code and deploy it to your local Tomcat server. The application is not entirely an accurate representation of all time zones represented on the map, but serves as an effective example of how to enrich a web application with ICEfaces. The application was deliberately simplified to demonstrate the features that ICEfaces provides to improve the richness and interactivity of a web application. The completed ICEfaces TimeZone application has the following features: The current time, using the time zone of the application server, is displayed in the top left of the table. To the right of the server's current time is a second time display for an alternate time zone, which can be chosen by clicking on any section of the map. Below the map are checkboxes that, when selected, add time zone details to the table at the bottom. Deselecting a checkbox removes the details from the table. Step 1 Basic JSF TimeZone Application The first step is to create a regular JavaServer Faces (JSF) version of the TimeZone web application using stock JSF components. All the files for this part of the tutorial are in the timezone1 directory. Creating a JSP Page with Standard JSF and HTML Tags Our first iteration of the TimeZone application (see Figure 9 below) has a panelgrid component at the top to hold the two separate time displays: the application's host server time, and the time for the zone selected from the map. A commandbutton is used to display a map which contains seven timezone regions. When a region of the map is clicked, the display at the top right updates to show the selected region's time and timezone. Note: Throughout this tutorial, we use boldface text to highlight code we want to bring to your attention. ICEfaces does not require any code to be typed in bold. ICEfaces Getting Started Guide v1.8 15
23 ICEfaces Tutorial: The TimeZone Application Figure 9 TimeZone Application as Stock JSF Application The code for the timezone.jsp page is as follows: <%@ taglib uri=" prefix="f" %> <%@ taglib uri=" prefix="h" %> <f:view> <html> <head><title>icefaces: TimeZone Sample Application</title></head> <body> <h3>icefaces: TimeZone Sample Application</h3> <h:form> <h:panelgrid columns="2"> <h:outputtext style="font-weight:600" value="server Time Zone"/> <h:outputtext style="font-weight:600" value="time Zone Selected from Map"/> <h:outputtext value="#{timezonebean.servertimezonename"/> <h:outputtext value="#{timezonebean.selectedtimezonename"/> <h:outputtext style="font-weight:800" value="#{timezonebean.servertime"/> <h:outputtext style="font-weight:800" value="#{timezonebean.selectedtime"/> </h:panelgrid> <h:commandbutton id="map" image="images/map.jpg" actionlistener="#{timezonebean.listen" /> </h:form> </body> </html> </f:view> Most of the components are dynamically bound to backing JavaBeans through JSF expression language bindings as shown below: <h:outputtext value="#{timezonebean.servertimezonename"/> ICEfaces Getting Started Guide v1.8 16
24 ICEfaces Tutorial: The TimeZone Application Creating the Backing JavaBean (TimeZoneBean.java) The com.icesoft.faces.tutorial.timezonebean class is the backing bean for the timezone.jsp page. The bean stores the current state of the selections and all the time zone information. The code for the TimeZoneBean.java class is as follows: /* * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * "The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations under * the License. * * The Original Code is ICEfaces 1.5 open source software code, released * November 5, The Initial Developer of the Original Code is ICEsoft * Technologies Canada, Corp. Portions created by ICEsoft are Copyright (C) * ICEsoft Technologies Canada, Corp. All Rights Reserved. * * Contributor(s):. * * Alternatively, the contents of this file may be used under the terms of * the GNU Lesser General Public License Version 2.1 or later (the "LGPL" * License), in which case the provisions of the LGPL License are * applicable instead of those above. If you wish to allow use of your * version of this file only under the terms of the LGPL License and not to * allow others to use your version of this file under the MPL, indicate * your decision by deleting the provisions above and replace them with * the notice and other provisions required by the LGPL License. If you do * not delete the provisions above, a recipient may use your version of * this file under either the MPL or the LGPL License." * */ package com.icesoft.tutorial; import javax.faces.context.facescontext; import javax.faces.event.actionevent; import java.text.dateformat; import java.text.simpledateformat; import java.util.arraylist; import java.util.calendar; import java.util.map; import java.util.timezone; /** * Bean backing the Time Zone application. Also controls time zone information * during the session. */ public class TimeZoneBean { ICEfaces Getting Started Guide v1.8 17
25 ICEfaces Tutorial: The TimeZone Application /** * The default {@link TimeZone for this host server. */ private TimeZone servertimezone; /** * {@link DateFormat used to display the server time. */ private DateFormat serverformat; /** * Active {@link TimeZone displayed at top of UI. Changes when a time zone * is selected by pressing one of six commandbuttons in UI map. */ private TimeZone selectedtimezone; /** * {@link DateFormat used to display the selected time. */ private DateFormat selectedformat; /** * List of all possible {@link TimeZoneWrapper objects, which must mirror * the map UI. */ private ArrayList alltimezonelist; /** * Constructor initializes time zones. */ public TimeZoneBean() { init(); /** * Initializes this TimeZoneBean's properties. */ private void init() { servertimezone = TimeZone.getDefault(); serverformat = builddateformatfortimezone(servertimezone); // selected time zone set to UTC as default selectedtimezone = TimeZone.getTimeZone("Etc/GMT+0"); selectedformat = builddateformatfortimezone(selectedtimezone); // Entries in this list are hardcoded to match entries in // the timezone web file, so no parameters can be changed. alltimezonelist = new ArrayList(7); alltimezonelist.add(new TimeZoneWrapper("Pacific/Honolulu", "GMTminus10", hawaiixcoords, hawaiiycoords, hawaiixcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Anchorage", "GMTminus9", alaskaxcoords, alaskaycoords, alaskaxcoords.length)); alltimezonelist ICEfaces Getting Started Guide v1.8 18
26 ICEfaces Tutorial: The TimeZone Application.add(new TimeZoneWrapper("America/Los_Angeles", "GMTminus8", pacificxcoords, pacificycoords, pacificxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Denver", "GMTminus7", mountainxcoords, mountainycoords, mountainxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Chicago", "GMTminus6", centralxcoords, centralycoords, centralxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/New_York", "GMTminus5", easternxcoords, easternycoords, easternxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("Canada/Newfoundland", "GMTminus4", nfldxcoords, nfldycoords, nfldxcoords.length)); /** * Gets server time. * Server time. */ public String getservertime() { return formatcurrenttime(serverformat); /** * Gets server time zone display name. * Server time zone display name. */ public String getservertimezonename() { return displaynametokenizer(servertimezone.getdisplayname()); /** * Gets selected time zone time. This is the time zone selected by one of * six commandbuttons from the map in the UI. * selectedtimezone time. */ public String getselectedtime() { return formatcurrenttime(selectedformat); /** * Gets selected time zone display name. * selectedtimezone display name. */ public String getselectedtimezonename() { return displaynametokenizer(selectedtimezone.getdisplayname()); ICEfaces Getting Started Guide v1.8 19
27 ICEfaces Tutorial: The TimeZone Application /** * Extracts the first word from a TimeZone displayname. * displayname A TimeZone displayname. String The first word from the TimeZone displayname. */ public static String displaynametokenizer(string displayname) { if (displayname == null) { displayname = ""; else { int firstspace = displayname.indexof(' '); if (firstspace!= -1) { displayname = displayname.substring(0, firstspace); return displayname; public static DateFormat builddateformatfortimezone(timezone timezone) { SimpleDateFormat currentformat = new SimpleDateFormat("EEE, HH:mm:ss"); Calendar currentzonecal = Calendar.getInstance(timeZone); currentformat.setcalendar(currentzonecal); currentformat.settimezone(timezone); return currentformat; public static String formatcurrenttime(dateformat dateformat) { Calendar cal = dateformat.getcalendar(); cal.settimeinmillis(system.currenttimemillis()); return dateformat.format(cal.gettime()); /** * Each TimeZoneWrapper has an id of a component in the UI that corresponds * to its time zone. By this, if an event comes from a component in the web * page, then this will return the relevant TimeZoneWrapper. * componentid Id of component in UI TimeZoneWrapper */ private TimeZoneWrapper gettimezonewrapperbycomponentid( String componentid) { TimeZoneWrapper tzw; for (int i = 0; i < alltimezonelist.size(); i++) { tzw = (TimeZoneWrapper) alltimezonelist.get(i); if (tzw.isrelevantcomponentid(componentid)) { return tzw; return null; // // Implicit interfaces as defined by the callbacks in the web files // ICEfaces Getting Started Guide v1.8 20
28 ICEfaces Tutorial: The TimeZone Application /** * Listens to client input from the commandbutton in the UI map and sets the * selected time zone. * event ActionEvent. */ public void listen(actionevent event) { FacesContext context = FacesContext.getCurrentInstance(); String clientid = event.getcomponent().getclientid(context); Map requestparams = context.getexternalcontext().getrequestparametermap(); // get mouse coordinate of user click int x = Integer.parseInt((String) requestparams.get(clientid + ".x")); int y = Integer.parseInt((String) requestparams.get(clientid + ".y")); for (int i = 0; i < alltimezonelist.size(); i++) { if (((TimeZoneWrapper) alltimezonelist.get(i)).getmappolygon().contains(x, y)) { TimeZoneWrapper tzw = (TimeZoneWrapper) alltimezonelist.get(i); selectedtimezone = TimeZone.getTimeZone(tzw.getId()); selectedformat = builddateformatfortimezone(selectedtimezone); // Create primary polygon objects for continental country outlines private static int[] hawaiixcoords = {0, 29, 54, 58, 58, 61, 61, 0; private static int[] hawaiiycoords = {186, 194, 208, 215, 223, 243, 254, 254; private static int[] alaskaxcoords = {117, 118, 125, 132, 135, 138, 141, 146, 147, 157, 164, 165, 162, 156, 144, 120, 75, 72, 60, 45, 1, 0, 0, 14; private static int[] alaskaycoords = {0, 4, 5, 12, 12, 8, 7, 14, 14, 28, 31, 37, 38, 41, 41, 16, 16, 25, 35, 38, 55, 55, 1, 0; private static int[] pacificxcoords = {176, 176, 187, 187, 181, 185, 191, 192, 207, 207, 214, 214, 218, 222, 222, 221, 221, 222, 224, 230, 229, 225, 222, 219, 220, 218, 214, 214, 219, 107, 219, 232, 231, 230, 228, 228, 229, 228, 226, 226, 229, 231, 238, 233, 226, 217, 205, 198, 195, 197, 194, 187, 188, 189, 190, 186, 169, 152, 145, 158, 164, 164, 155, 141, 136, 134, 132, 125, 118, 118; private static int[] pacificycoords = {0, 3, 3, 7, 7, 20, 19, 25, 32, 43, 47, 50, 54, 59, 64, 68, 67, 71, 71, 80, 86, 90, 92, 89, 90, 93, 95, 97, 106, 107, 112, 112, 137, 139, 140, 148, 149, 157, 158, 162, 163, 171, 179, 179, 171, 154, 148, 138, 133, 130, 130, 118, 114, 103, 88, 77, 61, 54, 41, 41, 37, 32, 25, 7, 9, 11, 11, 4, 4, 0; private static int[] mountainxcoords = {177, 287, 287, 268, 268, 258, 259, 249, 249, 254, 254, ICEfaces Getting Started Guide v1.8 21
29 ICEfaces Tutorial: The TimeZone Application 250, 253, 250, 253, 254, 250, 250, 277, 277, 284, 289, 288, 290, 290, 285, 286, 281, 281, 272, 270, 265, 258, 256, 256, 264, 263, 268, 269, 275, 276, 272, 244, 216, 217, 231, 218, 226, 232, 239, 230, 228, 230, 230, 228, 229, 231, 233, 220, 220, 215, 215, 221, 220, 223, 225, 231, 231, 225, 222, 222, 215, 215, 208, 208, 193, 192, 185, 182, 182, 189, 189; private static int[] mountainycoords = {0, 0, 8, 8, 45, 45, 41, 40, 48, 48, 52, 52, 63, 63, 63, 69, 69, 75, 75, 80, 81, 86, 98, 101, 110, 116, 137, 138, 160, 160, 164, 161, 161, 165, 181, 190, 194, 198, 201, 204, 210, 214, 233, 231, 216, 208, 176, 174, 179, 179, 163, 158, 153, 147, 144, 140, 139, 109, 110, 106, 104, 98, 93, 89, 91, 93, 88, 84, 77, 70, 61, 53, 48, 44, 41, 30, 24, 16, 17, 8, 7, 2; private static int[] centralxcoords = {288, 317, 314, 314, 321, 325, 330, 340, 336, 336, 338, 346, 348, 349, 350, 351, 347, 347, 357, 356, 358, 357, 352, 378, 380, 381, 291, 291, 269, 277, 276, 269, 264, 264, 257, 257, 260, 267, 270, 273, 283, 282, 287, 286, 292, 291, 289, 290, 284, 277, 277, 252, 252, 255, 255, 252, 255, 255, 251, 251, 256, 256, 270, 270, 289; private static final int[] centralycoords = {0, 0, 9, 15, 15, 26, 25, 30, 35, 74, 86, 89, 94, 111, 113, 115, 118, 129, 137, 145, 155, 170, 210, 242, 243, 252, 252, 241, 217, 210, 203, 198, 193, 189, 179, 164, 162, 163, 165, 163, 162, 139, 138, 116, 109, 98, 97, 85, 78, 78, 72, 73, 69, 69, 62, 54, 52, 47, 46, 41, 43, 47, 47, 9, 9; private static int[] easternxcoords = {388, 417, 446, 446, 449, 447, 448, 447, 450, 449, 442, 438, 431, 437, 437, 446, 447, 449, 449, 450, 451, 441, 429, 430, 433, 433, 435, 424, 419, 415, 415, 463, 464, 382, 381, 353, 360, 357, 359, 348, 348, 353, 349, 348, 340, 337, 337, 341, 373; private static int[] easternycoords = {0, 0, 5, 10, 16, 19, 21, 28, 36, 41, 40, 38, 44, 52, 57, 57, 51, 50, 54, 66, 74, 78, 81, 83, 84, 91, 96, 209, 215, 216, 226, 242, 255, 253, 241, 208, 154, 144, 136, 127, 118, 114, 110, 92, 84, 78, 35, 29, 9; private static int[] nfldxcoords = {448, 465, 465, 415, 416, 418, 434, 434, 434, 432, 433, 436, 452, 452, 450, 453, 450, 447, 447, 444, 440, 440, 434, 440, 443, 450, 453, 450, 451, 448, 450, 450, 448; private static int[] nfldycoords = {0, 0, 242, 242, 226, 217, 209, 95, 85, 83, 80, 82, 75, 56, 54, 51, 50, 52, 56, 54, 55, 50, 45, 40, 42, 42, 37, 29, 23, 20, 17, 14, 14; ICEfaces Getting Started Guide v1.8 22
30 ICEfaces Tutorial: The TimeZone Application TimeZoneBean stores the current state and time zone information, and also handles the actions generated by clicking the commandbuttons. The listen(actionevent event) method in the bean takes the ID of the commandbutton clicked, and uses the helper TimeZoneWrapper objects to determine which TimeZone ID should be used to instantiate the selectedtimezone object. For clarity, the commandbutton IDs represent the offset from Greenwich Mean Time (GMT) of their respective TimeZone objects. The IDs can be arbitrary, as long as they are all unique in the web application, and match between the web file and the Java event handler. Binding the Bean to the JSP Page JSF uses an XML file called faces-config.xml to manage the configuration of beans so that the beans' methods are available to components in the page. The code for the faces-config.xml file is as follows: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" " <faces-config xmlns=" <managed-bean> <managed-bean-name>timezonebean</managed-bean-name> <managed-bean-class>com.icesoft.tutorial.timezonebean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> </faces-config> The entry bean is given a name by which it can be referred to in the JSP page and the name is also associated with a Java class so that it can be instantiated as required. The bean is also given a scope to indicate how the bean can be accessed. ICEfaces Getting Started Guide v1.8 23
31 ICEfaces Tutorial: The TimeZone Application Configuring the Web Application At the heart of it, the TimeZone application is a standard JEE web application that requires a deployment descriptor. This means we need to create a web.xml file. The code for the web.xml file is as follows: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" " <web-app> <display-name>icefaces Tutorial: Timezone Part 1</display-name> <description> ICEfaces Tutorial: Timezone Part 1 Create TimeZone as a stock JavaServer Faces application. </description> <session-config> <session-timeout>30</session-timeout> </session-config> <context-param> <param-name>javax.faces.state_saving_method</param-name> <param-value>server</param-value> </context-param> <!-- Faces Servlet --> <servlet> <servlet-name>faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.facesservlet</servlet-class> <load-on-startup> 1 </load-on-startup> </servlet> <!-- Faces Servlet Mapping --> <servlet-mapping> <servlet-name>faces Servlet</servlet-name> <url-pattern>*.faces</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> This is a fairly typical descriptor for a JSF application. The Faces Servlet is declared and configured to load on startup. The.faces extension is mapped to the Faces Servlet. In TimeZone 1, the deployment descriptor file for running under MyFaces, web_myfaces.xml, is exactly the same as web.xml. It has been included for consistency with the later TimeZone steps, where the deployment descriptor files differ. ICEfaces Getting Started Guide v1.8 24
32 ICEfaces Tutorial: The TimeZone Application Building and Deploying timezone1 For the tutorial applications, we rely on Ant as a build tool and Tomcat 6 as the container to run the application. To build a.war file successfully, complete the following steps: 1. Ensure that Tomcat 6 is running. 2. Use ant clean to clean up the source directory of the application. 3. To compile the source code and generate a.war file with all the required resources, in the console, type: ant By default, the.war file created is for Tomcat 6. The.war file will be created in the dist directory at the root level of the application. 4. To deploy the.war file to Tomcat 6, copy the timezone1.war file into the Tomcat6 webapps directory. 5. To interact with the application, point your web browser at the following URL, making adjustments for your environment as required. For example, port 8080 is the default port that Tomcat uses, but if you have changed this in your installation, change the URL accordingly. If all goes well, you should see the first incarnation of the TimeZone application running in your browser. Click a different time zone on the map to update the time and time zone information in the top right of the table. Note: If you would like to deploy the.war file to an application server other than Tomcat 6 (JBoss4.2, for example), you need to explicitly refer to a different ant target when building the.war file. Use ant help to list the available targets for this tutorial. ICEfaces Getting Started Guide v1.8 25
33 Step 2 Integrating ICEfaces ICEfaces Tutorial: The TimeZone Application In this step of the tutorial, we integrate ICEfaces technology into our existing JSF application. All the files and resources for this part of the tutorial are contained in the timezone2 directory. Turning JSP into JSP Document JSP pages (unlike the more recent JSP Document specification) are not required to be well-formed XML documents. ICEfaces requires well-formed XML documents, so we need to make some modifications to our JSP page to align it with the JSP Document specification. 1. Change the file extension of the timezone.jsp file from.jsp to.jspx. This is the first step in converting the web page to a JSP Document (XML-compatible JSP). The.jspx extension identifies the file as an XML-compliant JSP page and allows us a bit of flexibility with our servlet mappings. 2. Remove the JSP taglib directives and declare them using xml namespaces in the JSF <f:view> element: <%@ taglib uri=" prefix="f" %> <%@ taglib uri=" prefix="h" %> becomes: <f:view xmlns:f=" xmlns:h=" If the page consists of well-formed JSF and XHTML tags, this is the only change necessary to convert the page to JSP Document. Registering ICEfaces Servlets As an extension to JSF, ICEfaces provides its own version of the FacesServlet (PersistentFacesServlet) as well as an additional Servlet (BlockingServlet) for handling asynchronous updates. We register these Servlets in the deployment descriptor file (web.xml) by adding the following entries: <servlet> <servlet-name>persistent Faces Servlet</servlet-name> <servlet-class> com.icesoft.faces.webapp.xmlhttp.persistentfacesservlet </servlet-class> <load-on-startup> 1 </load-on-startup> </servlet> <servlet> <servlet-name>blocking Servlet</servlet-name> <servlet-class>com.icesoft.faces.webapp.xmlhttp.blockingservlet</servlet-class> <load-on-startup> 1 </load-on-startup> </servlet> We also need to add a new Servlet mapping of PersistentFacesServlet to.iface. <servlet-mapping> <servlet-name>persistent Faces Servlet</servlet-name> <url-pattern>*.iface</url-pattern> ICEfaces Getting Started Guide v1.8 26
34 ICEfaces Tutorial: The TimeZone Application </servlet-mapping> We also need to add a couple of mappings for ICEfaces internal use. <servlet-mapping> <servlet-name>persistent Faces Servlet</servlet-name> <url-pattern>/xmlhttp/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>blocking Servlet</servlet-name> <url-pattern>/block/*</url-pattern> </servlet-mapping> When using ICEfaces with JSP pages, we need to change the DEFAULT_SUFFIX entry to specify.jspx pages instead of the JSF default.jsp pages. This tells JSF to use.jspx as the default suffix so that requests are properly directed to ICEfaces PersistentFacesServlet. <context-param> <param-name>javax.faces.default_suffix</param-name> <param-value>.jspx</param-value> </context-param> By default, ICEfaces uses asynchronous update mode that fully supports server-initiated updates (Ajax Push). For this tutorial step, we will not be leveraging asynchronous update mode, so we can optionally configure ICEfaces to use synchronous update mode instead: <context-param> <param-name>com.icesoft.faces.synchronousupdate</param-name> <param-value>true</param-value> </context-param> When using some versions of Tomcat, users have reported seeing the following error occasionally SEVERE: ICEfaces could not initialize JavaServer Faces. Please check that the JSF.jar files are installed correctly. If you experience this error, specifying the ConfigureListener will resolve this issue with Tomcat, even though it is not generally required for ICEfaces: <listener> <listener-class>com.sun.faces.config.configurelistener</listener-class> </listener> Building and Deploying timezone2 For the tutorial applications, we rely on Ant as a build tool and Tomcat 6 as the container to run the application. To build a.war file successfully, complete the following steps: 1. Ensure that Tomcat 6 is running. 2. Use ant clean to clean up the source directory of the application. 3. To compile the source code and generate a.war file with all the required resources, in the console, type: ant By default, the.war file created is for Tomcat 6. The.war file will be created in the dist directory at the root level of the application. ICEfaces Getting Started Guide v1.8 27
35 ICEfaces Tutorial: The TimeZone Application 4. To deploy the.war file to Tomcat 6, copy the timezone2.war file into the Tomcat 6 webapps directory. 5. To interact with the application, point your web browser at the following URL, making adjustments for your environment as required. For example, port 8080 is the default port that Tomcat uses, but if you have changed this in your installation, change the URL accordingly. Note: If you would like to deploy the.war file to an application server other than Tomcat 6 (JBoss4.2, for example), you need to explicitly refer to a different ant target when building the.war file. Use ant help to list the available targets for this tutorial. This version of TimeZone looks identical to timezone1 and has no functional difference. However, with little effort, we've integrated ICEfaces into our JSF application. The components are now being rendered by the ICEfaces Direct-to-DOM (D2D) RenderKit and we are now ready to enrich this application with some dynamic, asynchronous updates. Step 3 Dynamic Updating Make the Clocks Tick In this section, we are going to make the clocks tick by pushing updates from the server to the web browser, changing the content dynamically, but without a full page refresh, thanks to ICEfaces and Direct-to-DOM rendering. We will also make some minor changes to the web.xml and faces-config.xml files, to support concurrent instances of the application, viewed from multiple windows or tabs of the same web browser. All the files for this part of the tutorial are in the timezone3 directory. Enhancing the TimeZoneBean Now that we have integrated ICEfaces, the work to show the clocks tick is done in the bean. No actual work is done to make the clocks tick because the system time updates automatically for us. Rather, at some interval, the components that display the clock times must be rendered, and those updates must be sent to the web browser. For this, we will use the ICEfaces specific RenderManager facilities to manage a JSF render pass. For timezone3, the following changes are made to the TimeZoneBean.java file. 1. First we add some imports to support the new ICEfaces features: import com.icesoft.faces.async.render.intervalrenderer; import com.icesoft.faces.async.render.rendermanager; import com.icesoft.faces.async.render.renderable; import com.icesoft.faces.webapp.xmlhttp.persistentfacesstate; import com.icesoft.faces.webapp.xmlhttp.renderingexception; ICEfaces Getting Started Guide v1.8 28
36 ICEfaces Tutorial: The TimeZone Application import com.icesoft.faces.webapp.xmlhttp.fatalrenderingexception; import com.icesoft.faces.context.disposablebean; import org.apache.commons.logging.log; import org.apache.commons.logging.logfactory; 2. Then we make the bean implement com.icesoft.faces.async.render.renderable, so we can use it with the RenderManager facilities: public class TimeZoneBean implements Renderable { 3. A rendering interval is added as a bean property: private final int renderinterval = 1000; 4. Add helper objects for maintaining the rendering state and managing the threading issues: private PersistentFacesState state; private IntervalRenderer clock; 5. Initialize the rendering state: private void init() {... state = PersistentFacesState.getInstance(); 6. Provide a callback method to use the RenderManager to set up the interval rendering: public void setrendermanager(rendermanager rendermanager) { clock = rendermanager.getintervalrenderer("clock"); clock.setinterval(renderinterval); clock.add(this); clock.requestrender(); 7. Allow the RenderManager facilities to access the rendering state: public PersistentFacesState getstate() { return state; 8. Provide a callback method to allow notification of rendering problems. An example of an expected invocation would be when the user has closed the web browser, and there is no target to render to: public void renderingexception(renderingexception renderingexception) { if (log.isdebugenabled()) { log.debug("rendering exception: " + renderingexception); if (renderingexception instanceof FatalRenderingException) { performcleanup(); protected boolean performcleanup() { try { if (clock!= null) { clock.remove(this); if (clock.isempty() ) { clock.dispose(); ICEfaces Getting Started Guide v1.8 29
37 ICEfaces Tutorial: The TimeZone Application clock = null; return true; catch (Exception failedcleanup) { if (log.iserrorenabled()) { log.error("failed to cleanup a clock bean", failedcleanup); return false; 9. To enable use of the RenderManager requires adding it as a managed application scoped bean, and having the application server tie it to our timezonebean's rendermanager property. This is accommodated by making the following changes to the faces-config.xml file. <managed-bean> <managed-bean-name>rendermanager</managed-bean-name> <managed-bean-class> com.icesoft.faces.async.render.rendermanager </managed-bean-class> <managed-bean-scope>application</managed-bean-scope> </managed-bean> <managed-bean> <managed-bean-name>timezonebean</managed-bean-name> <managed-bean-class>com.icesoft.tutorial.timezonebean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> <managed-property> <property-name>rendermanager</property-name> <value>#{rendermanager</value> </managed-property> </managed-bean> 10. The RenderManager needs to know about the context and session lifecycles. To provide the appropriate information, the ICEfaces application needs to publish its Context events. This is achieved by adding the following code snippet to the web.xml file: <listener> <listener-class> com.icesoft.faces.util.event.servlet.contexteventrepeater </listener-class> </listener> 11. Implement the DisposableBean method by adding the following code snippet to the TimeZoneBean file: public void dispose() throws Exception { if (log.isinfoenabled()) { log.info("dispose TimeZoneBean for a user - cleaning up"); performcleanup(); ICEfaces Getting Started Guide v1.8 30
38 ICEfaces Tutorial: The TimeZone Application Configuring ICEfaces for Concurrent Views ICEfaces supports the concept of concurrent DOM viewing, which allows multiple windows or tabs of the same browser to view distinct instances of the same application. Without concurrent DOM viewing, pointing two different browser windows at the same application leads to unpredictable behavior since the server-side DOM would be shared between the two views. You can see what happens by opening two browser windows (of the same browser) and direct both windows to the timezone2 demo. Clicking on various time zones will update one view or the other but not both reliably. Concurrent DOM viewing ensures each view has its own separate DOM and that backing beans are appropriately scoped for their responsibilities. To configure TimeZone to support concurrent DOM viewing, we need to modify both the deployment descriptor (web.xml or web_myfaces.xml) and the JavaServer Faces configuration file (faces-config.xml). 1. Add a context parameter to the deployment descriptor file (web.xml or web_myfaces.xml) so that ICEfaces is properly configured to support concurrent DOM views: <context-param> <param-name>com.icesoft.faces.concurrentdomviews</param-name> <param-value>true</param-value> </context-param> 2. Now that we are leveraging ICEfaces server-initiated update feature to push the clock-ticks to the browser, we need to enable asynchronous update mode in the web.xml (or web_myfaces.xml): <context-param> <param-name>com.icesoft.faces.synchronousupdate</param-name> <param-value>false</param-value> </context-param> 3. In faces-config.xml, change the scope of the TimeZoneBean from session to request: <managed-bean> <managed-bean-name>timezonebean</managed-bean-name> <managed-bean-class>com.icesoft.tutorial.timezonebean</managed-bean-class> <managed-bean-scope>request</managed-bean-scope>... </managed-bean> This version of TimeZone looks identical to timezone1 and timezone2, but now, you should see the clocks ticking as the page is dynamically updated with each render pass initiated by the bean. With concurrent DOM viewing configured, we can now open timezone3 in two separate browser windows and operate them as if they were two distinct clients with updates and changes being accurately rendered. Building and Deploying timezone3 For the tutorial applications, we rely on Ant as a build tool and Tomcat 6 as the container to run the application. To build a.war file successfully, complete the following steps: 1. Ensure that Tomcat 6 is running. 2. Use ant clean to clean up the source directory of the application. ICEfaces Getting Started Guide v1.8 31
39 ICEfaces Tutorial: The TimeZone Application 3. To compile the source code and generate a.war file with all the required resources, in the console, type: ant By default, the.war file created is for Tomcat 6. The.war file will be created in the dist directory at the root level of the application. 4. To deploy the.war file to Tomcat 6, copy the timezone3.war file into the Tomcat 6 webapps directory. 5. To interact with the application, point your web browser at the following URL, making adjustments for your environment as required. For example, port 8080 is the default port that Tomcat uses, but if you have changed this in your installation, change the URL accordingly. Note: If you would like to deploy the.war file to an application server other than Tomcat 6 (JBoss4.2, for example), you need to explicitly refer to a different ant target when building the.war file. Use ant help to list the available targets for this tutorial. This version of TimeZone looks identical to timezone1 and timezone2 but now you should see the clocks ticking as the page is dynamically updated with each render pass initiated by the bean. Step 4 Dynamic Table Rendering Now that we have the page updating dynamically, let's make it more interactive. We are going to add the ability to select time zones for which we want to see more detailed information. To do this we will add some selectbooleancheckbox components and a datatable component. As the checkboxes are selected and de-selected, the rows of the table will show or hide themselves without requiring a full page refresh. This is accomplished using a feature called partial submit, where each form component, such as a selectbooleancheckbox, can trigger a partial form submission to the server when their state is changed. This is in contrast to regular form submission where only a Submit button would send updates to the server. The finished product will look similar to Figure 10: ICEfaces Getting Started Guide v1.8 32
40 ICEfaces Tutorial: The TimeZone Application Figure 10 TimeZone Application with Dynamic Table Rendering Modifying timezone.jspx In the timezone.jspx page, make the following changes: 1. To support partial submission, we need to use an ICEfaces specific component, which requires adding a namespace declaration: xmlns:ice=" 2. The standard JSF form component is replaced with the ICEfaces form component, enabling partial submission: <ice:form partialsubmit="true">... </ice:form> 3. In the panelgrid holding the map, add a row of seven selectbooleancheckbox components, under the seven commandbutton components. <ice:panelgrid columns="7" cellspacing="0" cellpadding="0"> <ice:panelgroup style="background:#f16e28; border:1px solid #999999;"> <ice:selectbooleancheckbox id="gmtminus10" required="false" ICEfaces Getting Started Guide v1.8 33
41 ICEfaces Tutorial: The TimeZone Application immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus10']" autocomplete="off"/> <ice:outputlabel value="hadt" style="margin-right:7px;"/> </ice:panelgroup> <ice:panelgroup style="background: #9566b6; border:1px solid #999999;"> <ice:selectbooleancheckbox id="gmtminus9" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus9']" autocomplete="off"/> <ice:outputlabel value="akst" style="margin-right:7px;"/> </ice:panelgroup> <ice:panelgroup style="background: #fefc5a; border:1px solid #999999;"> <ice:selectbooleancheckbox id="gmtminus8" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus8']" autocomplete="off"/> <ice:outputlabel value="pst" style="margin-right:7px;"/> </ice:panelgroup> <ice:panelgroup style="background: #96b710; border:1px solid #999999;"> <ice:selectbooleancheckbox id="gmtminus7" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus7']" autocomplete="off"/> <ice:outputlabel value="mdt" style="margin-right:7px;"/> </ice:panelgroup> <ice:panelgroup style="background: #f16e28; border:1px solid #999999;"> <ice:selectbooleancheckbox id="gmtminus6" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus6']" autocomplete="off"/> <ice:outputlabel value="cdt" style="margin-right:7px;"/> </ice:panelgroup> <ice:panelgroup style="background: #9566b6; border:1px solid #999999;"> <ice:selectbooleancheckbox id="gmtminus5" required="false" immediate="true" ICEfaces Getting Started Guide v1.8 34
42 ICEfaces Tutorial: The TimeZone Application valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus5']" autocomplete="off"/> <ice:outputlabel value="est" style="margin-right:8px;"/> </ice:panelgroup> <ice:panelgroup style="background: #fefc5a; border:1px solid #999999;"> <ice:selectbooleancheckbox id="gmtminus4" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus4']" autocomplete="off"/> <ice:outputlabel value="nst" style="margin-right:8px;"/> </ice:panelgroup> </ice:panelgrid> 4. A datatable is added below the panelgrid component in the UI. This datatable will display information on all the selected time zones, getting its data from timezonebean's checkedtimezonelist property, which is a list of TimeZoneWrapper objects. The properties of each object in the list are then displayed through JSF expression language bindings in outputtext components in each row of the datatable. <h:datatable frame="box" value="#{timezonebean.checkedtimezonelist" var="checkedtimezone"> <f:facet name="header"> <h:outputtext value="checked Time Zones"/></f:facet> <h:column> <f:facet name="header"><h:outputtext value="time Zone"/></f:facet> <h:outputtext value="#{checkedtimezone.displayname"/> </h:column> <h:column> <f:facet name="header"><h:outputtext value="location"/></f:facet> <h:outputtext value="#{checkedtimezone.location"/> </h:column> <h:column> <f:facet name="header"><h:outputtext value="uses DST"/></f:facet> <h:outputtext value="#{checkedtimezone.usedaylighttime"/> </h:column> <h:column> <f:facet name="header"><h:outputtext value="in DST"/></f:facet> <h:outputtext value="#{checkedtimezone.indaylighttime"/> </h:column> <h:column> <f:facet name="header"><h:outputtext value="time"/></f:facet> <h:outputtext value=" #{checkedtimezone.time "/> </h:column> </h:datatable> ICEfaces Getting Started Guide v1.8 35
43 ICEfaces Tutorial: The TimeZone Application Modifying TimeZoneBean.java Make the following additions to TimeZoneBean.java. 1. Import these classes to allow our use of JSF ValueChangeEvents. import javax.faces.event.valuechangeevent; import javax.faces.component.uicomponent; import java.util.hashtable; 2. Declare a list to hold the user's checked time zone selections. private ArrayList checkedtimezonelist; 3. Give the IDs of the selectbooleancheckbox components, from timezone.jspx, for their respective time zones. These are Cminus5 through Cminus10. This way, when we receive a ValueChangeEvent, we'll know to which time zone it applies. alltimezonelist.add(new TimeZoneWrapper("Pacific/Honolulu", "GMTminus10", hawaiixcoords, hawaiiycoords, hawaiixcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Anchorage", "GMTminus9", alaskaxcoords, alaskaycoords, alaskaxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Los_Angeles", "GMTminus8", pacificxcoords, pacificycoords, pacificxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Denver", "GMTminus7", mountainxcoords, mountainycoords, mountainxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Chicago", "GMTminus6", centralxcoords, centralycoords, centralxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/New_York", "GMTminus5", easternxcoords, easternycoords, easternxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("Canada/Newfoundland", "GMTminus4", nfldxcoords, nfldycoords, nfldxcoords.length)); 4. Initialize the list for storing the time zones that the user has checked, and wishes to display in the datatable. checkedtimezonelist = new ArrayList(); 5. Provide a getter accessor method for the checkedtimezonelist bean property. public ArrayList getcheckedtimezonelist(){ return checkedtimezonelist; 6. Add a timezonechanged(valuechangeevent event) method to be called when a selectbooleancheckbox is checked or unchecked. This uses our TimeZoneWrapper helper objects to map from the selectbooleancheckbox component ID to the appropriate time zone, and its related information. Simply adding or removing the TimeZoneWrapper to or from checkedtimezonelist is sufficient to add or remove a row in the web page's datatable. ICEfaces Getting Started Guide v1.8 36
44 ICEfaces Tutorial: The TimeZone Application public void timezonechanged(valuechangeevent event){ UIComponent comp = event.getcomponent(); FacesContext context = FacesContext.getCurrentInstance(); String componentid = comp.getclientid(context); TimeZoneWrapper tzw = gettimezonewrapperbycomponentid( componentid ); if( tzw!= null ) { boolean checked = ((Boolean)event.getNewValue()).booleanValue(); // If checkbox is checked, then add tzw to checkedtimezonelist if( checked ) { if(!checkedtimezonelist.contains(tzw) ){ checkedtimezonelist.add( tzw ); // Otherwise, if checkbox is unchecked, then remove tzw from // checkedtimezonelist else { checkedtimezonelist.remove( tzw ); checkboxstates.put(tzw.getmapcommandbuttonid(), checked? "true" : "false"); Modifying TimeZoneWrapper.java Each row in the datatable is populated by a TimeZoneWrapper bean. Each cell in the datatable is then populated by properties of the TimeZoneWrapper beans. So, we have to modify TimeZoneWrapper to add the requisite properties and accessor methods. 1. Add imports for the utility classes we use for calculating times with. import java.util.timezone; import java.util.calendar; import java.text.dateformat; 2. Declare a helper DateFormat instance for the time bean property. private DateFormat dateformat; 3. Alter the constructor to initialize the new fields; checkboxid and dateformat. /** id id used to identify the time zone. mapid map button component id in web page xcoords array of X-coordinates for the image map object. ycoords array of Y-coordinates for the image map object. coords number of coordinates in the image map object. */ public TimeZoneWrapper(String id, String mapid, int[] xcoords, int[] ycoords, int coords) { this.id = id; this.mapcommandbuttonid = mapid; this.dateformat = TimeZoneBean.buildDateFormatForTimeZone( TimeZone.getTimeZone(id)); mappolygon = new Polygon(xCoords, ycoords, coords); ICEfaces Getting Started Guide v1.8 37
45 ICEfaces Tutorial: The TimeZone Application 4. Add getter accessor methods for the displayname, time, usedaylighttime, indaylighttime, location properties. public String getdisplayname() { TimeZone timezone = TimeZone.getTimeZone(id); return TimeZoneBean.displayNameTokenizer( timezone.getdisplayname() );... public String gettime() { return TimeZoneBean.formatCurrentTime( dateformat );... public String getusedaylighttime() { TimeZone timezone = TimeZone.getTimeZone(id); if( timezone.usedaylighttime() ) return "Yes"; return "No";... public String getindaylighttime() { TimeZone timezone = TimeZone.getTimeZone(id); Calendar cal = Calendar.getInstance(timeZone); if( timezone.indaylighttime(cal.gettime()) ) return "Yes"; return "No";... public String getlocation() { return id; Building and Deploying timezone4 For the tutorial applications, we rely on Ant as a build tool and Tomcat 6 as the container to run the application. To build a.war file successfully, complete the following steps: 1. Ensure that Tomcat 6 is running. 2. Use ant clean to clean up the source directory of the application. 3. To compile the source code and generate a.war file with all the required resources, in the console, type: ant By default, the.war file created is for Tomcat 6. The.war file will be created in the dist directory at the root level of the application. 4. To deploy the.war file to Tomcat 6, copy the timezone4.war file into the Tomcat 6 webapps directory. ICEfaces Getting Started Guide v1.8 38
46 ICEfaces Tutorial: The TimeZone Application 5. To interact with the application, point your web browser at the following URL, making adjustments for your environment as required. For example, port 8080 is the default port that Tomcat uses, but if you have changed this in your installation, change the URL accordingly. Note: If you would like to deploy the.war file to an application server other than Tomcat 6 (JBoss4.2, for example), you need to explicitly refer to a different ant target when building the.war file. Use ant help to list the available targets for this tutorial. This version of TimeZone should now have checkboxes. As you click the checkboxes, the rows in the table should show and hide themselves accordingly. The interface is now richer and more dynamic thanks to ICEfaces and Direct-to-DOM rendering. Step 5 Applying Styles This step of the tutorial describes how to apply styles throughout the TimeZone application to make it more visually appealing. This is an important aspect of web application development, and shows how the dual roles of application developer and page developer come together to put the final polish on an application. Adding a Style Sheet to the Application A Cascading Style Sheet is added to the web folder of timezone.jspx. This file is accessed by the application through the following line, added to timezone.jspx under the <head> tag: <link rel="stylesheet" type="text/css" href="./timezone_style.css"/> Adding Images to the Application Any images used by the style sheet should be dropped into the images subfolder of the application web folder. Implementing Styles In tutorial examples timezone1 through 4, inline styles were used: <h:outputtext style="font-weight:600" value="server Time Zone"/> <ice:panelgroup style="background: #fefc5a; border:1px solid #999999;"> Tutorial example timezone5 uses only styles from the style sheet, as shown in timezone.jspx, below: ICEfaces Getting Started Guide v1.8 39
47 ICEfaces Tutorial: The TimeZone Application <f:view xmlns:f=" xmlns:h=" xmlns:ice=" <html> <head><title>icefaces: TimeZone Sample Application</title></head> <link rel="stylesheet" type="text/css" href="./timezone_style.css"/> <body bgcolor="white"> <div id="headerdiv"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td valign="top"> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td background="images/demo-page-bkgnd.gif"><img src="images/demo-page-left.gif"/></td> </tr> <tr> <td height="45" valign="bottom"><img src="images/timezone_logo.gif"/></td> </tr> </table> </td> <td valign="top" align="right" width="119"><img src="images/demo-page-right.gif"/></td> </tr> </table> </div> <div id="timezonepanel"> <ice:form partialsubmit="true"> <ice:panelgrid columns="2" rowclasses="floatingdialogheader,, " width="100%"> <ice:outputtext value="server Time Zone"/> <ice:outputtext value="time Zone Selected from Map"/> <ice:outputtext styleclass="formlabel" value="#{timezonebean.servertimezonename"/> <ice:outputtext styleclass="formlabel" value="#{timezonebean.selectedtimezonename"/> <ice:outputtext value="#{timezonebean.servertime"/> <ice:outputtext value="#{timezonebean.selectedtime"/> </ice:panelgrid> <ice:commandbutton id="map" image="images/map.jpg" actionlistener="#{timezonebean.listen"/> <ice:panelgrid columns="7" width="100%" cellpadding="0" cellspacing="0" columnclasses="orange, purple, yellow, green"> <ice:panelgroup> <ice:selectbooleancheckbox id="gmtminus10" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus10']" autocomplete="off"/> <ice:outputlabel value="hadt" /> </ice:panelgroup> <ice:panelgroup> ICEfaces Getting Started Guide v1.8 40
48 ICEfaces Tutorial: The TimeZone Application <ice:selectbooleancheckbox id="gmtminus9" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus9']" autocomplete="off"/> <ice:outputlabel value="akst" /> </ice:panelgroup> <ice:panelgroup> <ice:selectbooleancheckbox id="gmtminus8" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus8']" autocomplete="off"/> <ice:outputlabel value="pst" /> </ice:panelgroup> <ice:panelgroup> <ice:selectbooleancheckbox id="gmtminus7" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus7']" autocomplete="off"/> <ice:outputlabel value="mdt" /> </ice:panelgroup> <ice:panelgroup> <ice:selectbooleancheckbox id="gmtminus6" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus6']" autocomplete="off"/> <ice:outputlabel value="cdt" /> </ice:panelgroup> <ice:panelgroup> <ice:selectbooleancheckbox id="gmtminus5" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus5']" autocomplete="off"/> <ice:outputlabel value="est" /> </ice:panelgroup> <ice:panelgroup> <ice:selectbooleancheckbox id="gmtminus4" required="false" immediate="true" valuechangelistener="#{timezonebean.timezonechanged" value="#{timezonebean.checkboxstates['gmtminus4']" autocomplete="off"/> ICEfaces Getting Started Guide v1.8 41
49 ICEfaces Tutorial: The TimeZone Application <ice:outputlabel value="nst" /> </ice:panelgroup> </ice:panelgrid> <ice:datatable id="timezonedatatable" value="#{timezonebean.checkedtimezonelist" var="checkedtimezone" headerclass="tableheader" width="100%" columnclasses="checkeddisplayname,checkedlocation,checkedusedaylighttime, checkedindaylighttime,checkedtime"> <f:facet name="header"> <ice:outputtext styleclass="tableheadertitle" value="checked Time Zones"/> </f:facet> <ice:column> <f:facet name="header"> <ice:outputtext value="time Zone"/> </f:facet> <ice:outputtext value="#{checkedtimezone.displayname"/> </ice:column> <ice:column> <f:facet name="header"> <ice:outputtext value="location"/> </f:facet> <ice:outputtext value="#{checkedtimezone.location"/> </ice:column> <ice:column> <f:facet name="header"> <ice:outputtext value="uses DST"/> </f:facet> <ice:outputtext value="#{checkedtimezone.usedaylighttime"/> </ice:column> <ice:column> <f:facet name="header"> <h:outputtext value="in DST"/> </f:facet> <h:outputtext value="#{checkedtimezone.indaylighttime"/> </ice:column> <ice:column> <f:facet name="header"> <ice:outputtext value="time"/> </f:facet> <ice:outputtext styleclass="formlabel" value=" #{checkedtimezone.time "/> </ice:column> </ice:datatable> </ice:form> </div> </body> </html> </f:view> There are two <div> elements applied to the page. The first helps create a page heading: <div id="headerdiv"> ICEfaces Getting Started Guide v1.8 42
50 ICEfaces Tutorial: The TimeZone Application The second creates a container for the rest of the application: <div id="timezonepanel"> The styleclass attribute is used to apply styles from the style sheet to JSF elements: <ice:outputtext styleclass="formlabel" value="#{timezonebean.servertimezonename"/> The JSF panelgrid component has a rowclasses attribute that applies styles from the style sheet to the rows of the table it creates. In this example, the floatingdialogheader class is applied to the first row and the second and third rows are left blank, meaning no style is applied. <ice:panelgrid columns="2" rowclasses="floatingdialogheader,, " width="100%"> The JSF datatable component has a headerclass attribute that applies styles to all the headers in the table. It also has a columnclasses attribute that applies styles to all of the columns in the table: <ice:datatable id="timezonedatatable" var="checkedtimezone" value="#{timezonebean.checkedtimezonelist" headerclass="tableheader" width="100%" columnclasses="checkeddisplayname, checkedlocation,checkedusedaylighttime, checkedindaylighttime,checkedtime"> Building and Deploying timezone5 For the tutorial applications, we rely on Ant as a build tool and Tomcat 6 as the container to run the application. To build a.war file successfully, complete the following steps: 1. Ensure that Tomcat 6 is running. 2. Use ant clean to clean up the source directory of the application. 3. To compile the source code and generate a.war file with all the required resources, in the console, type: ant By default, the.war file created is for Tomcat 6. The.war file will be created in the dist directory at the root level of the application. 4. To deploy the.war file to Tomcat 6, copy the timezone5.war file into the Tomcat 6 webapps directory. 5. To interact with the application, point your web browser at the following URL, making adjustments for your environment as required. For example, port 8080 is the default port that Tomcat uses, but if you have changed this in your installation, change the URL accordingly. ICEfaces Getting Started Guide v1.8 43
51 ICEfaces Tutorial: The TimeZone Application Note: If you would like to deploy the.war file to an application server other than Tomcat 6 (JBoss4.2, for example), you need to explicitly refer to a different ant target when building the.war file. Use ant help to list the available targets for this tutorial. This version of TimeZone has the same functionality as timezone4, but should look completely different. Styles have been applied to the application through the stylesheet, which uses images located in the web/images folder. With the finishing touches applied, the application is now ready to be presented to the world. Step 6 Integrating Facelets Each of the steps, until now, have added new functionality to the users of the TimeZone web application, showing more data or being more interactive. This time though, our application should be functionally equivalent to the previous, but instead of being based on JSP, will instead use Facelets (see The intent of this step is to show the minimal effort required to port an ICEfaces JSF JSP Document application to ICEfaces JSF Facelets. Note: This step is related to Facelets and will be of interest only if you intend to use Facelets. Facelets Dependencies There are three new JAR files, distributed with ICEfaces, which must be included with any ICEfaces Facelets application: icefaces-facelets.jar el-api.jar (not required for Tomcat 6, Jetty 6.1, JBoss 4.2, or Glassfish v2) el-ri.jar Configuring for Facelets To configure TimeZone to support Facelets, we need to modify both the deployment descriptor (web.xml or web_myfaces.xml) and the JavaServer Faces configuration file (faces-config.xml). 1. Add a context parameter to the deployment descriptor file (web.xml or web_myfaces.xml), to inform the application server that the default file extension for Facelets is.xhtml, since some application servers assume.jsp or.jspx extensions. <context-param> <param-name>javax.faces.default_suffix</param-name> ICEfaces Getting Started Guide v1.8 44
52 ICEfaces Tutorial: The TimeZone Application <param-value>.xhtml</param-value> </context-param> 2. For development purposes, add a context parameter to the deployment descriptor file, to enable Facelets debug logging. <context-param> <param-name>facelets.development</param-name> <param-value>true</param-value> </context-param> 3. Enable some strict verifications in JSF, by adding these context parameters to the deployment descriptor file. <context-param> <param-name>com.sun.faces.validatexml</param-name> <param-value>true</param-value> <description> Set this flag to true, if you want the JavaServer Faces Reference Implementation to validate the XML in your faces-config.xml resources against the DTD. Default value is false. </description> </context-param> <context-param> <param-name>com.sun.faces.verifyobjects</param-name> <param-value>true</param-value> <description> Set this flag to true, if you want the JavaServer Faces Reference Implementation to verify that all of the application objects you have configured (components, converters, renderers, and validators) can be successfully created. Default value is false. </description> </context-param> 4. Set the application view handler in the JavaServer Faces configuration file (faces-config.xml). <application> <view-handler> com.icesoft.faces.facelets.d2dfaceletviewhandler </view-handler> </application> Change Web Files from JSP Document to Facelets Rename timezone.jspx to timezone.xhtml. No JSP Document specific features were used in previous steps that are not already supported by Facelets, so no change to the contents of timezone.xhtml is necessary. Building and Deploying timezone6 For the tutorial applications, we rely on Ant as a build tool and Tomcat 6 as the container to run the application. To build a.war file successfully, complete the following steps: ICEfaces Getting Started Guide v1.8 45
53 ICEfaces Tutorial: The TimeZone Application 1. Ensure that Tomcat 6 is running. 2. Use ant clean to clean up the source directory of the application. 3. To compile the source code and generate a.war file with all the required resources, in the console, type: ant By default, the.war file created is for Tomcat 6. The.war file will be created in the dist directory at the root level of the application. 4. To deploy the.war file to Tomcat 6, copy the timezone6.war file into the Tomcat 6 webapps directory. 5. To interact with the application, point your web browser at the following URL, making adjustments for your environment as required. For example, port 8080 is the default port that Tomcat uses, but if you have changed this in your installation, change the URL accordingly. Note: If you would like to deploy the.war file to an application server other than Tomcat 6 (JBoss4.2, for example), you need to explicitly refer to a different ant target when building the.war file. Use ant help to list the available targets for this tutorial. Step 7 Capitalize on Facelets The main focus of this step is to use Facelets to make our application more dynamic. Note: This step is related to Facelets and will be of interest only if you intend to use Facelets. In previous steps of the tutorial, TimeZoneBean.java and timezone.xhtml (or timezone.jspx) were codependent. Components in the UI would generate events from user interactions, requiring hardcoded constants in the bean to interpret the source and relevancy of the events. Changes to component IDs, or addition or removal of components would necessitate lock-step changes in both the bean and the web file. This step of the tutorial puts the bean in charge of generating content for the web file. With a few changes to one section of code in TimeZoneBean.java, any number of arbitrary time zones could be displayed with timezone.xhtml. ICEfaces Getting Started Guide v1.8 46
54 ICEfaces Tutorial: The TimeZone Application Putting the TimeZoneBean in Charge First we change timezone.xhtml, to use Facelets mechanisms, to be more dynamic. 1. Add namespace declarations for Facelets components, and Facelet s implementation of JSTL components and functions: <f:view xmlns:f=" xmlns:h=" xmlns:ice=" xmlns:ui=" xmlns:c=" xmlns:fn=" 2. Pull out the headerdiv section, and put it into header.xhtml to demonstrate parameterized inclusion: <ui:include src="/header.xhtml"> <ui:param name="sectionname" value="header"/> </ui:include> 3. Replace the seven selectbooleancheckboxes and outputlabels with JSTL foreach sections, that are populated by bean properties using JSF expression language bindings. <ice:panelgrid columns="#{fn:length(timezonebean.alltimezonelist)" width="100%" cellpadding="0" cellspacing="0" columnclasses="orange, purple, yellow, green"> <c:foreach var="alltimezone" items="#{timezonebean.alltimezonelist"> <ice:panelgroup> <ice:selectbooleancheckbox id="#{alltimezone.mapcommandbuttonid" required="false" immediate="true" value="#{alltimezone.currentlyshowing" valuechangelistener="#{timezonebean.timezonechanged" autocomplete="off"/> <ice:outputlabel value="#{alltimezone.abbreviation" /> </ice:panelgroup> </c:foreach> </ice:panelgrid> Adding New Properties Each section in the map, and each check box, and each row in the bottom table, are populated by properties from a TimeZoneWrapper object. We will change TimeZoneWrapper.java to add the new properties that timezone.xhtml uses JSF expression language bindings to access: 1. Add a new property to hold the time zone abbreviated name for the time zone being represented by this TimeZoneWrapper: private String abbreviation; 2. Add another property for managing both the current state of the check box for this time zone, and the visibility of the corresponding row in the bottom table: private boolean currentlyshowing; 3. Initialize the new properties: ICEfaces Getting Started Guide v1.8 47
55 ICEfaces Tutorial: The TimeZone Application /** id id used to identify the time zone. mapid map button component id in web page abbreviation timezone abbreviated label xcoords array of X-coordinates for the image map object. ycoords array of Y-coordinates for the image map object. coords number of coordinates in the image map object. */ public TimeZoneWrapper(String id, String mapid, String abbreviation, int[] xcoords, int[] ycoords, int coords) { this.id = id; this.mapcommandbuttonid = mapid; this.abbreviation = abbreviation; this.currentlyshowing = false; this.dateformat = TimeZoneBean.buildDateFormatForTimeZone( TimeZone.getTimeZone(id)); mappolygon = new Polygon(xCoords, ycoords, coords); 4. Add accessor methods for the new properties: public String getabbreviation(){ return abbreviation;... public boolean getcurrentlyshowing() { return currentlyshowing;... public void setcurrentlyshowing(boolean showing) { currentlyshowing = showing; Updating TimeZoneBean.java Finally, update TimeZoneBean.java to initialize and access the newer more dynamic data structures. 1. Create the master list of all time zones in the application, along with their images, and the component IDs: alltimezonelist.add(new TimeZoneWrapper("Pacific/Honolulu", "GMTminus10", "HADT", hawaiixcoords, hawaiiycoords, hawaiixcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Anchorage", "GMTminus9", "AKST", alaskaxcoords, alaskaycoords, alaskaxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Los_Angeles", "GMTminus8", "PST", pacificxcoords, pacificycoords, pacificxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Denver", "GMTminus7", "MDT", mountainxcoords, mountainycoords, mountainxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/Chicago", "GMTminus6", "CDT", centralxcoords, centralycoords, centralxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("America/New_York", ICEfaces Getting Started Guide v1.8 48
56 ICEfaces Tutorial: The TimeZone Application "GMTminus5", "EST", easternxcoords, easternycoords, easternxcoords.length)); alltimezonelist.add(new TimeZoneWrapper("Canada/Newfoundland", "GMTminus4", "NST", nfldxcoords, nfldycoords, nfldxcoords.length)); 2. Provide a getter accessor method for the master time zone list property: public ArrayList getalltimezonelist(){ return alltimezonelist; 3. Modify the checkbox event handler to properly maintain the new bean properties: public void timezonechanged(valuechangeevent event){ UIComponent comp = event.getcomponent(); FacesContext context = FacesContext.getCurrentInstance(); String componentid = comp.getclientid(context); TimeZoneWrapper tzw = gettimezonewrapperbycomponentid( componentid ); if( tzw!= null ) { boolean checked = ((Boolean)event.getNewValue()).booleanValue(); // If checkbox is checked, then add tzw to checkedtimezonelist if( checked ) { tzw.setcurrentlyshowing( true ); if(!checkedtimezonelist.contains(tzw) ) checkedtimezonelist.add( tzw ); // Otherwise, if checkbox is unchecked, then remove tzw from // checkedtimezonelist else { tzw.setcurrentlyshowing( false ); checkedtimezonelist.remove( tzw ); Building and Deploying timezone7 For the tutorial applications, we rely on Ant as a build tool and Tomcat 6 as the container to run the application. To build a.war file successfully, complete the following steps: 1. Ensure that Tomcat 6 is running. 2. Use ant clean to clean up the source directory of the application. 3. To compile the source code and generate a.war file with all the required resources, in the console, type: ant By default, the.war file created is for Tomcat 6. The.war file will be created in the dist directory at the root level of the application. 4. To deploy the.war file to Tomcat 6, copy the timezone7.war file into the Tomcat 6 webapps directory. ICEfaces Getting Started Guide v1.8 49
57 ICEfaces Tutorial: The TimeZone Application 5. To interact with the application, point your web browser at the following URL, making adjustments for your environment as required. For example, port 8080 is the default port that Tomcat uses, but if you have changed this in your installation, change the URL accordingly. Note: If you would like to deploy the.war file to an application server other than Tomcat 6 (JBoss4.2, for example), you need to explicitly refer to a different ant target when building the.war file. Use ant help to list the available targets for this tutorial. For more ICEfaces tutorials, visit the ICEfaces Community web site: ICEfaces Getting Started Guide v1.8 50
58 Chapter 5 ICEfaces SessionRenderer Tutorial: Easy Ajax Push Overview The essence of Ajax Push is the ability to trigger updates to the client from events or changes that occur on the server. This makes Ajax Push highly suitable for collaborative applications where one user does something that changes the current state of the application and other users are interested in seeing that change. There are many different ways to take advantage of Ajax Push to add collaborative features to your rich web application. From the developer s perspective, Ajax Push is exposed through the SessionRenderer API. This tutorial is designed to provide a simple and clear illustration of how to get started with the SessionRenderer API to add Ajax Push to your application. The project we are going to build in this tutorial is a page that contains simple, adjustable counters. The counter values are displayed on the page and buttons are provided that can be used to increment or decrement the counter values. The finished project looks like this: Figure 11 Easy Ajax Push Counter Project The application consists of two counters. One is an application-scoped counter that can be adjusted and seen by all users. The second counter is session-scoped so changes to the value of this counter are restricted to the individual user. The goal is to use the SessionRenderer API so that any modifications to the application-scoped counter result in Ajax Push updates being sent to all application users. All the source code for this tutorial is available in the ICEfaces bundle: [install_dir]/samples/tutorial/easyajaxpush ICEfaces Getting Started Guide v1.8 51
59 Tools and Environment ICEfaces SessionRenderer Tutorial: Easy Ajax Push You can develop ICEfaces applications using the tools of your choice. This tutorial doesn t make any assumptions about which editor or IDE you are using. The code in this tutorial is designed to run compatibly on JDK 1.4. so there is no use of annotations, concurrency utilities, etc. We'll be creating the files for this tutorial based on the same directory structure as it exists in the product. As we reference the creation of various files, we'll be referring to how they are distributed in the ICEfaces bundle: Figure 12 SessionRenderer Tutorial Directory Structure Creating the Beans Counter.java Our first task is to create the backing beans that will be used to hold the state of the counters. First we ll start with a generic counter that we can use as the base class for our more specialized counter implementations. Create a new class called Counter by typing or copying the following into your editor: package org.icefaces.tutorial.easyajaxpush; import javax.faces.event.actionevent; public class Counter { private int count; public Counter() { public int getcount() { return count; public void setcount(int count) { ICEfaces Getting Started Guide v1.8 52
60 ICEfaces SessionRenderer Tutorial: Easy Ajax Push this.count = count; public void increment(actionevent event) { count++; public void decrement(actionevent event) { count--; ApplicationCounter.java Since multiple users can potentially access and modify the value of our application-scoped counter, we need to create a version that guards against concurrent access. So we ll create an ApplicationCounter that extends our basic Counter and synchronizes methods that allow modification of our counter value. Create a new class called ApplicationCounter by typing or copying the following into your editor: package org.icefaces.tutorial.easyajaxpush; import javax.faces.event.actionevent; public class ApplicationCounter extends Counter { public ApplicationCounter() { public synchronized void setcount(int count){ super.setcount(count); public synchronized void increment(actionevent event) { super.increment(event); public synchronized void decrement(actionevent event) { super.decrement(event); Define Managed Beans To make use of our classes as JSF managed beans, we need to declare them in our faces-config.xml file. We plan to have two counters: an application-scoped counter based on the ApplicationCounter class and a session-scoped counter based on our basic Counter class. So we need to define two JSF managed beans. ICEfaces Getting Started Guide v1.8 53
61 ICEfaces SessionRenderer Tutorial: Easy Ajax Push Create a file called faces-config.xml by typing or copying the following into your editor: <?xml version='1.0' encoding='utf-8'?> <faces-config> <managed-bean> <description>an application-scoped counter.</description> <managed-bean-name>applicationcounter</managed-bean-name> <managed-bean-class> org.icefaces.tutorial.easyajaxpush.applicationcounter </managed-bean-class> <managed-bean-scope>application</managed-bean-scope> </managed-bean> <managed-bean> <description>a session-scoped counter.</description> <managed-bean-name>sessioncounter</managed-bean-name> <managed-bean-class> org.icefaces.tutorial.easyajaxpush.counter </managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> </faces-config> Creating the Pages Now we need to create our user interface that includes components that we can bind to using the property accessors and methods of our managed beans. For this tutorial, we ll be using Facelets because it is the recommended templating language for JSF. Configure Facelets Support There are two things you need to do in an ICEfaces application that are specifically related to Facelets. icefaces-facelets.jar ICEfaces includes its own version of Facelets. You need to ensure that this library is included with your deployment. The build file included with the easyajaxpush project already does this for you. D2DFaceletViewHandler ICEfaces needs to be configured to use a specific ViewHandler implementation when running with Facelets. This is done by specifying the D2DFaceletViewHandler in your faces-config.xml file. Copy or type the bolded section of code into the faces-config.xml file: <?xml version='1.0' encoding='utf-8'?> ICEfaces Getting Started Guide v1.8 54
62 ICEfaces SessionRenderer Tutorial: Easy Ajax Push <faces-config> <application> <view-handler> com.icesoft.faces.facelets.d2dfaceletviewhandler </view-handler> </application> <managed-bean> <description>an application-scoped counter.</description> <managed-bean-name>applicationcounter</managed-bean-name> <managed-bean-class> org.icefaces.tutorial.easyajaxpush.applicationcounter </managed-bean-class> <managed-bean-scope>application</managed-bean-scope> </managed-bean> <managed-bean> <description>a session-scoped counter.</description> <managed-bean-name>sessioncounter</managed-bean-name> <managed-bean-class> org.icefaces.tutorial.easyajaxpush.counter </managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> </faces-config> Create the Page Next we need to create a page for displaying our counters and the buttons that allow us to increment or decrement the values. Create a file called counter.xhtml by typing or copying the following into your editor: <f:view xmlns=" xmlns:ui=" xmlns:h=" xmlns:ice=" xmlns:f=" <html> <head> <title>easy Ajax Push Counter</title> </head> <body> <h2>easy Ajax Push Counter</h2> <ice:form> <ice:panelgrid columns="3"> <ice:outputtext value="application counter:"/> <ice:outputtext value="#{applicationcounter.count"/> ICEfaces Getting Started Guide v1.8 55
63 ICEfaces SessionRenderer Tutorial: Easy Ajax Push <ice:panelgroup> <ice:commandbutton value="-" actionlistener="#{applicationcounter.decrement"/> <ice:commandbutton value="+" actionlistener="#{applicationcounter.increment"/> </ice:panelgroup> <ice:outputtext value="session counter:"/> <ice:outputtext value="#{sessioncounter.count"/> <ice:panelgroup> <ice:commandbutton value="-" actionlistener="#{sessioncounter.decrement"/> <ice:commandbutton value="+" actionlistener="#{sessioncounter.increment"/> </ice:panelgroup> </ice:panelgrid> </ice:form> </body> </html> </f:view> Create the Descriptor (web.xml) And of course all good web applications need a web.xml. There is nothing specific related to Ajax Push that is required in the web.xml file. Create a file called web.xml by typing or copying the following into your editor: <?xml version="1.0" encoding="utf-8"?> <web-app version="2.5" xmlns=" xmlns:xsi=" xsi:schemalocation=" <display-name>icefaces SessionRenderer Tutorial: Easy Ajax Push</display-name> <description> A simple shared counter application that shows how to use the SessionRenderer API to add a collaborative element to your ICEfaces applications. </description> <context-param> <param-name>com.icesoft.faces.concurrentdomviews</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>javax.faces.default_suffix</param-name> ICEfaces Getting Started Guide v1.8 56
64 ICEfaces SessionRenderer Tutorial: Easy Ajax Push <param-value>.xhtml</param-value> </context-param> <context-param> <param-name>facelets.development</param-name> <param-value>true</param-value> </context-param> <servlet> <servlet-name>faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.facesservlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>persistent Faces Servlet</servlet-name> <servlet-class> com.icesoft.faces.webapp.xmlhttp.persistentfacesservlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>blocking Servlet</servlet-name> <servlet-class> com.icesoft.faces.webapp.xmlhttp.blockingservlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>faces Servlet</servlet-name> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>persistent Faces Servlet</servlet-name> <url-pattern>/xmlhttp/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>persistent Faces Servlet</servlet-name> <url-pattern>*.iface</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>persistent Faces Servlet</servlet-name> <url-pattern>*.jspx</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>blocking Servlet</servlet-name> <url-pattern>/block/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>counter.iface</welcome-file> ICEfaces Getting Started Guide v1.8 57
65 ICEfaces SessionRenderer Tutorial: Easy Ajax Push <welcome-file>index.jsp</welcome-file> </welcome-file-list> </web-app> Running without Ajax Push So we now have an application that is ready to run, but without Ajax Push functionality. We ll add that right after we give our counters a test. For the tutorial applications, we rely on Ant as a build tool and Tomcat 6 as the default container to run the application. To build a.war file successfully, complete the following steps: 1. Ensure that Tomcat 6 is running. 2. Use ant clean to clean up the source directory of the application. 3. To compile the source code and generate a.war file with all the required resources, in the console, type: ant By default, the.war file created is for Tomcat 6. The.war file will be created in the dist directory at the root level of the application. 4. To deploy the.war file to Tomcat 6, copy the easyajaxpush.war file into the Tomcat6 webapps directory. 5. To interact with the application, point your web browser at the following URL, making adjustments for your environment as required. For example, port 8080 is the default port that Tomcat uses, but if you have changed this in your installation, change the URL accordingly. If all goes well, you should see the first incarnation of the Easy Ajax Push Counter application running in your browser. ICEfaces Getting Started Guide v1.8 58
66 ICEfaces SessionRenderer Tutorial: Easy Ajax Push Figure 13 Easy Ajax Push Counter Completed Project Clicking the increment and decrement buttons for each counter should change the values. To fully investigate how the counters work, open up another browser window. Some interesting things to look for: If you open another window using the same browser (i.e., two Firefox windows) you should notice that the session counter is shared between the two tabs/windows. That s because the session cookie is the same. What you have is two views into the same application from the same session. If you open up another window from a different browser (i.e., one from Firefox and one from IE), the session counters are not shared. The counters are only updated in the browser that you interact with. That s because we haven t yet added Ajax Push so the other browser windows don t get the latest values until you interact with them as well. Note: If you would like to deploy the.war file to an application server other than Tomcat6 (JBoss4.2, for example), you need to explicitly refer to a different ant target when building the.war file. Use ant help to list the available targets for this tutorial. Adding Ajax Push with SessionRenderer There are basically two parts to using the SessionRenderer API. adding sessions to the group or groups we wish to render calling a render when something of interest changes for that group The entire SessionRenderer API supports this in a straight-forward manner. public static void addcurrentsession(final String groupname) ICEfaces Getting Started Guide v1.8 59
67 ICEfaces SessionRenderer Tutorial: Easy Ajax Push public static void removecurrentsession(final String groupname) public static void render(final String groupname) SessionCounter.java Since we want everyone to be able to access the application-scoped counter, we re going to keep it simple and just add everyone to a single, global group. The easiest way to do this is to have the group membership logic in the constructor of the session-scoped bean. That way, when our session-scoped bean is created, it s added to a group. Since we only want to do this for our session-scoped counter (and not our application-scoped counter) we ll create another subclass of Counter that does this for us. Create a new class called SessionCounter by typing or copying the following into your editor: package org.icefaces.tutorial.easyajaxpush; import com.icesoft.faces.async.render.sessionrenderer; public class SessionCounter extends Counter { public SessionCounter() { SessionRenderer.addCurrentSession("all"); Note: For ICEfaces v1.7.1 and v1.7.2, the SessionRenderer API was considered experimental so the package for it reflects this (org.icefaces.x.core.push.sessionrenderer). As of ICEfaces v1.8, the API is no longer considered experimental and resides with the rest of the Ajax Push APIs under com.icesoft.faces.async.render. Adjust the Managed Bean Description Now that we have a new bean implementation for our session-scoped counter, we need to update the JSF descriptor to make use of it. Change the class of the managed bean to use our new implementation: <managed-bean> <description>a session-scoped counter.</description> <managed-bean-name>sessioncounter</managed-bean-name> <managed-bean-class> org.icefaces.tutorial.easyajaxpush.sessioncounter </managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> ICEfaces Getting Started Guide v1.8 60
68 ICEfaces SessionRenderer Tutorial: Easy Ajax Push SessionRender for Ajax Push Our final step in adding Ajax Push features to our application counter requires modifications to the ApplicationCounter. What we want is for updates to be pushed out whenever there is a change. To do this, you simply need to call the render method of the SessionRenderer when a notable change occurs. public static void render(final String groupname) Copy or type the bolded section of code into the ApplicationCounter.java file: package org.icefaces.tutorial; import javax.faces.event.actionevent; import com.icesoft.faces.async.render.sessionrenderer; public class ApplicationCounter extends Counter { public ApplicationCounter() { public synchronized void setcount(int count){ super.setcount(count); SessionRenderer.render("all"); public synchronized void increment(actionevent event) { super.increment(event); SessionRenderer.render("all"); public synchronized void decrement(actionevent event) { super.decrement(event); SessionRenderer.render("all"); So whenever we note a change to the application-scoped counter, we issue a request for a render to the group all which, in our case, means every active session. Running with Ajax Push You can follow the same procedure as noted before to build and deploy the modified version of the application. Now if you point two browsers at the application: Clicking the buttons for the application-scoped counter should provide a richer experience. Updates from interaction in one browser that result in a change to the application counter are now pushed out to other active users. In other words, all browsers should notice when the application counter is modified. It s left as an exercise for the reader to enhance the application so that the session counter is updated when using two tabs/windows from the same browser. And there you have it. Using the SessionRenderer API is an easy and straightforward way to add collaborative features to your ICEfaces applications. ICEfaces Getting Started Guide v1.8 61
69 Chapter 6 ICEfaces Design Decisions Using ICEfaces in Your Project Before you begin to use ICEfaces for a new project there are several important considerations and design decisions to be made regarding how ICEfaces will be configured, used, and deployed. Choosing your Markup: JSPs or Facelets ICEfaces supports JSF development using both JSPs and Facelets. However, each markup-type has its own strengths and weaknesses that must be considered: JSPs Facelets Leverage existing JSP knowledge Improved performance and scalability Excellent IDE vendor support Fast templating/decorators for comp., page re-use Precise error reporting Full EL support Generally speaking, unless your project has compelling reasons to use JSPs, Facelets should be seriously considered for its many advantages over JSP-based development for JSF. Asynchronous vs. Synchronous Update Mode By default ICEfaces uses asynchronous update mode. This provides powerful capabilities for fully leveraging ICEfaces server-initiated update facilities in your application (Ajax Push). Using these Ajax Push capabilities it is simple to create a compelling, rich application interface unlike anything possible with traditional web development technologies. However, not all applications require the unique capabilities provided by asynchronous update mode, and there are a few special considerations when using it. See Asynchronous vs. Synchronous Updates, Optimizing Asynchronous Communications for Scalability, and Using ICEfaces in Clustered Environments in the ICEfaces Developer s Guide for details. ICEfaces Getting Started Guide v1.8 62
70 JSF 1.1 vs. JSF 1.2 ICEfaces Design Decisions Using ICEfaces in Your Project ICEfaces is runtime compatible with the following JSF runtime libraries: Sun JSF 1.1 MyFaces JSF 1.1 Sun JSF 1.2 Integration with 3rd Party Frameworks Many projects use a combination of frameworks to achieve the goals of the project. ICEfaces supports several of the most popular Java frameworks that work with JavaServer Faces (JSF): Spring Web Flow JBoss Seam If your project requires integration with either of these frameworks, it is important to review the ICEfaces documentation for detailed information that will help you to avoid potential pitfalls and common mistakes. See Spring Web Flow Integration and JBoss Seam Integration sections in the ICEfaces Developer s Guide for more information. Integration with 3rd Party JSF Components ICEfaces supports integration with third party JSF components. By default, using the icefaces.jar in your application classpath will provide full support for using ICEfaces components ( ice: ) together with standard JSF components on the same page ( h: ). In addition, it is generally possible to combine other third party components in your ICEfaces pages successfully simply by declaring their namespace and adding them to the page. However, JSF components that utilize a custom JSF ViewHandler or leverage Ajax and/or JavaScript in their component renderers may conflict with the ICEfaces framework and bridge preventing their use together with ICEfaces components on the same page. In these cases, you can still use ICEfaces in the same application as another component set by segregating the application pages into ICEfaces/non-ICEfaces categories. By using the just-ice.jar library in place of the icefaces.jar in your classpath, it is possible to configure ICEfaces to limit its processing to.iface pages exclusively. Thus, pages with other extensions can be processed by another view handler, avoiding the conflicts that may occur when combining certain third party components on the same page as ICEfaces components. ICEfaces Getting Started Guide v1.8 63
71 ICEfaces Design Decisions Using ICEfaces in Your Project Special Considerations for Portlet Development ICEfaces supports developing and deploying JSR 168 compliant portlets. Standard portal and portlet development have their own set of design considerations that need to be kept in mind by the developer. Adding ICEfaces can significantly enhance the richness of your portlet interface and, through Ajax Push, can provide a means for seamlessly updating multiple portlets on a single page. However, in addition to the general design decisions discussed previously, there are some specific things to consider to ensure that your portlet development experience is successful. More details on these topics can be found in the Developing Portlets with ICEfaces section in the ICEfaces Developer s Guide. While ICEfaces tests against and supports a number of the most popular portal containers, differences between implementations can still present incompatibilities. Check to see that the portal container you are using is supported or has been successfully used by somebody in the ICEfaces community. Because ICEfaces is a JSF-based framework, there are some aspects of the Portlet API that are accessed differently than they would be in a plain portlet application. This is important if you are porting legacy portlets or applications to run with ICEfaces. While it's possible to run ICEfaces portlets along with portlets that use other technologies or frameworks, the chances of incompatibilities can increase significantly. For best results, it is recommended to confine your portal application to a small, consistent set of technologies. The typical problem faced here is JavaScript conflicts because different frameworks use different libraries or different versions of the same library. The benefits provided by ICEfaces for enriching the user interface can be reduced through certain design decisions. For example, while it is possible to navigate between different views in a portlet, it is often a better choice to provide a different user interface abstraction, like tab panels, to provide different views into the same application in a single page. Application Server Support While the discussion in this Getting Started Guide focuses on the Apache Tomcat 6 application server, ICEfaces has been tested against most popular application servers. Refer to the ICEfaces Release Notes for a detailed list of application servers supported in this release. If you are familiar with the application server on which you intend to deploy, it should be straightforward to deploy the ICEfaces sample application.war files to your environment and verify that ICEfaces is compatible with your specific installation. If an ICEfaces application fails to run in your environment, the problem is most often related to classpath conflicts. Resolve these conflicts to ensure that the JARs packaged in the sample application.war file are being used. The exact combination of JARs required in your application classpath varies, depending on the application server you intend to deploy your ICEfaces application into, and the specific configuration you choose to use for your application (i.e., Facelets, JSP, icefaces.jar vs. just-ice.jar, etc.). Detailed library dependency information is available in the following sections of the ICEfaces Developer s Guide: ICEfaces Getting Started Guide v1.8 64
72 ICEfaces Design Decisions Using ICEfaces in Your Project ICEfaces Library Dependencies in Chapter 4 Appendix A ICEfaces Library/App. Server Dependencies Client Browser Support ICEfaces applications can be deployed to the most popular desktop and mobile web browsers. The following browser families are supported: Desktop Browsers Apple Safari Google Chrome Internet Explorer Mozilla Firefox Opera Mobile Browsers Apple Safari (iphone + ipod Touch) Blackberry Bold Opera Mobile Refer to the ICEfaces Release Notes for a complete list of browser versions supported in this release. Using ICEfaces with IDEs ICEfaces supports integration plugins for many of the most popular Java IDE tools for web-application development, such as Eclipse, NetBeans, Genuitec MyEclipse, and Rational RAD. Refer to the ICEfaces Release Notes for a complete list of Java IDEs supported in this release. Note: ICEfaces tool integration plugins are available as separate downloads from ICEfaces can also be used with IDEs that do not have specific ICEfaces integration plugins available, such as IntelliJ, by manually configuring the ICEfaces libraries in your IDE as required by the application server you are deploying to at development time. ICEfaces Getting Started Guide v1.8 65
73 Index A AddressForm demo 10 Ajax solution 1 Ajax bridge 1 Ajax Push 2, 27, 51, 58, 59, 61 adding 59 example 59 running with 61 running without 58 Ant, installing 4 applying styles 39 architecture 1 asynchronous updates 2, 10 AuctionMonitor demo 9 B backing JavaBean 17 binding the Bean 23 browsers supported 5 C configuring your environment 3 creating a JSP page 15 D D2D. See Direct-to-DOM. demo AddressForm 10 AuctionMonitor 9 dependencies facelets 44 directory structure ICEfaces 6 TimeZone 14 Direct-to-DOM 1, 10, 28, 39 dynamic table rendering 32 dynamic updating 28 F Facelets 44, 46 features 2 form processing 2, 10 H HTML tags 15 I integrating ICEfaces 26 J JavaServer Faces. See JSF. JSF 1, 15 JSP 26 P partial submit 2 prerequisites 3 ICEfaces Getting Started Guide v1.8 66
74 Index R registering servlets 26 rich web application 1 S sample applications 8 style sheets 39 T TimeZone tutorial TimeZoneBean.java 48 Tomcat, installing 4 ICEfaces Getting Started Guide v1.8 67
Developer s Guide. Version 1.8
Developer s Guide Version 1.8 Copyright Copyright 2005-2009. ICEsoft Technologies, Inc. All rights reserved. The content in this guide is protected under copyright law even if it is not distributed with
Web Application Architecture (based J2EE 1.4 Tutorial)
Web Application Architecture (based J2EE 1.4 Tutorial) 1 Disclaimer & Acknowledgments Even though Sang Shin is a full-time employee of Sun Microsystems, the contents here are created as his own personal
In this chapter, we lay the foundation for all our further discussions. We start
01 Struts.qxd 7/30/02 10:23 PM Page 1 CHAPTER 1 Introducing the Jakarta Struts Project and Its Supporting Components In this chapter, we lay the foundation for all our further discussions. We start by
An introduction to creating JSF applications in Rational Application Developer Version 8.0
An introduction to creating JSF applications in Rational Application Developer Version 8.0 September 2010 Copyright IBM Corporation 2010. 1 Overview Although you can use several Web technologies to create
Enterprise Ajax Security with ICEfaces
Enterprise Ajax Security with ICEfaces June 2007 Stephen Maryka CTO ICEsoft Technologies Inc. Abstract The question is simple: Can enterprise application developers deliver Rich Internet Applications using
Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1
1 of 11 16.10.2002 11:41 Hello World Portlet Rendered with JSP for WebSphere Portal Version 4.1 Table of Contents Creating the directory structure Creating the Java code Compiling the code Creating the
JBoss Portlet Container. User Guide. Release 2.0
JBoss Portlet Container User Guide Release 2.0 1. Introduction.. 1 1.1. Motivation.. 1 1.2. Audience 1 1.3. Simple Portal: showcasing JBoss Portlet Container.. 1 1.4. Resources. 1 2. Installation. 3 2.1.
Controlling Web Application Behavior
2006 Marty Hall Controlling Web Application Behavior The Deployment Descriptor: web.xml JSP, Servlet, Struts, JSF, AJAX, & Java 5 Training: http://courses.coreservlets.com J2EE Books from Sun Press: http://www.coreservlets.com
CrownPeak Java Web Hosting. Version 0.20
CrownPeak Java Web Hosting Version 0.20 2014 CrownPeak Technology, Inc. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical,
Building and Using Web Services With JDeveloper 11g
Building and Using Web Services With JDeveloper 11g Purpose In this tutorial, you create a series of simple web service scenarios in JDeveloper. This is intended as a light introduction to some of the
White Paper. JavaServer Faces, Graphical Components from Theory to Practice
White Paper JavaServer Faces, Graphical Components from Theory to Practice JavaServer Faces, Graphical Components from Theory to Practice White Paper ILOG, April 2005 Do not duplicate without permission.
Glassfish, JAVA EE, Servlets, JSP, EJB
Glassfish, JAVA EE, Servlets, JSP, EJB Java platform A Java platform comprises the JVM together with supporting class libraries. Java 2 Standard Edition (J2SE) (1999) provides core libraries for data structures,
<Insert Picture Here> Betting Big on JavaServer Faces: Components, Tools, and Tricks
Betting Big on JavaServer Faces: Components, Tools, and Tricks Steve Muench Consulting Product Manager, JDeveloper/ADF Development Team Oracle Corporation Oracle's Betting Big on
Development. with NetBeans 5.0. A Quick Start in Basic Web and Struts Applications. Geertjan Wielenga
Web Development with NetBeans 5.0 Quick Start in Basic Web and Struts pplications Geertjan Wielenga Web Development with NetBeans 5 This tutorial takes you through the basics of using NetBeans IDE 5.0
PowerTier Web Development Tools 4
4 PowerTier Web Development Tools 4 This chapter describes the process of developing J2EE applications with Web components, and introduces the PowerTier tools you use at each stage of the development process.
NetBeans IDE Field Guide
NetBeans IDE Field Guide Copyright 2005 Sun Microsystems, Inc. All rights reserved. Table of Contents Introduction to J2EE Development in NetBeans IDE...1 Configuring the IDE for J2EE Development...2 Getting
What s New in IBM Web Experience Factory 8.5. 2014 IBM Corporation
What s New in IBM Web Experience Factory 8.5 2014 IBM Corporation Recent history and roadmap Web Experience Factory 8.0 2012 Multi-channel Client-side mobile Aligned with Portal 8 Developer productivity
Building Web Services with Apache Axis2
2009 Marty Hall Building Web Services with Apache Axis2 Part I: Java-First (Bottom-Up) Services Customized Java EE Training: http://courses.coreservlets.com/ Servlets, JSP, Struts, JSF/MyFaces/Facelets,
Web Service Development Using CXF. - Praveen Kumar Jayaram
Web Service Development Using CXF - Praveen Kumar Jayaram Introduction to WS Web Service define a standard way of integrating systems using XML, SOAP, WSDL and UDDI open standards over an internet protocol
IBM Rational Web Developer for WebSphere Software Version 6.0
Rapidly build, test and deploy Web, Web services and Java applications with an IDE that is easy to learn and use IBM Rational Web Developer for WebSphere Software Version 6.0 Highlights Accelerate Web,
Web Applications. For live Java training, please see training courses at
2009 Marty Hall Using and Deploying Web Applications Originals of Slides and Source Code for Examples: http://courses.coreservlets.com/course-materials/msajsp.html Customized Java EE Training: http://courses.coreservlets.com/
Oracle Application Development Framework Overview
An Oracle White Paper June 2011 Oracle Application Development Framework Overview Introduction... 1 Oracle ADF Making Java EE Development Simpler... 2 THE ORACLE ADF ARCHITECTURE... 3 The Business Services
CatDV Pro Workgroup Serve r
Architectural Overview CatDV Pro Workgroup Server Square Box Systems Ltd May 2003 The CatDV Pro client application is a standalone desktop application, providing video logging and media cataloging capability
ICE Trade Vault. Public User & Technology Guide June 6, 2014
ICE Trade Vault Public User & Technology Guide June 6, 2014 This material may not be reproduced or redistributed in whole or in part without the express, prior written consent of IntercontinentalExchange,
Install guide for Websphere 7.0
DOCUMENTATION Install guide for Websphere 7.0 Jahia EE v6.6.1.0 Jahia s next-generation, open source CMS stems from a widely acknowledged vision of enterprise application convergence web, document, search,
An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0
An introduction to creating Web 2.0 applications in Rational Application Developer Version 8.0 September 2010 Copyright IBM Corporation 2010. 1 Overview Rational Application Developer, Version 8.0, contains
JBoss Portal 2.4. Quickstart User Guide
Portal 2.4 Quickstart User Guide Table of Contents Portal - Overview... iii 1. Tutorial Forward...1 2. Installation...2 2.1. Downloading and Installing...2 2.2. Starting Portal...3 3. Portal Terminology...5
An Overview of Servlet & JSP Technology
2007 Marty Hall An Overview of Servlet & JSP Technology 2 Customized J2EE Training: http://courses.coreservlets.com/ Servlets, JSP, Struts, JSF, EJB3, Ajax, Java 5, Java 6, etc. Ruby/Rails coming soon.
SIEMENS. Teamcenter 11.2. Windows Server Installation PLM00013 11.2
SIEMENS Teamcenter 11.2 Windows Server Installation PLM00013 11.2 Contents Part I: Getting started with Teamcenter server installation Requirements and overview.............................................
Application Servers - BEA WebLogic. Installing the Application Server
Proven Practice Application Servers - BEA WebLogic. Installing the Application Server Product(s): IBM Cognos 8.4, BEA WebLogic Server Area of Interest: Infrastructure DOC ID: AS01 Version 8.4.0.0 Application
Getting Started with Web Applications
3 Getting Started with Web Applications A web application is a dynamic extension of a web or application server. There are two types of web applications: Presentation-oriented: A presentation-oriented
Pulse Secure Client. Customization Developer Guide. Product Release 5.1. Document Revision 1.0. Published: 2015-02-10
Pulse Secure Client Customization Developer Guide Product Release 5.1 Document Revision 1.0 Published: 2015-02-10 Pulse Secure, LLC 2700 Zanker Road, Suite 200 San Jose, CA 95134 http://www.pulsesecure.net
Web Container Components Servlet JSP Tag Libraries
Web Application Development, Best Practices by Jeff Zhuk, JavaSchool.com ITS, Inc. [email protected] Web Container Components Servlet JSP Tag Libraries Servlet Standard Java class to handle an HTTP request
Web Dashboard User Guide
Web Dashboard User Guide Version 10.2 The software supplied with this document is the property of RadView Software and is furnished under a licensing agreement. Neither the software nor this document may
Building Web Applications, Servlets, JSP and JDBC
Building Web Applications, Servlets, JSP and JDBC Overview Java 2 Enterprise Edition (JEE) is a powerful platform for building web applications. The JEE platform offers all the advantages of developing
Web-JISIS Reference Manual
23 March 2015 Author: Jean-Claude Dauphin [email protected] I. Web J-ISIS Architecture Web-JISIS Reference Manual Web-JISIS is a Rich Internet Application (RIA) whose goal is to develop a web top application
Introducing Apache Pivot. Greg Brown, Todd Volkert 6/10/2010
Introducing Apache Pivot Greg Brown, Todd Volkert 6/10/2010 Speaker Bios Greg Brown Senior Software Architect 15 years experience developing client and server applications in both services and R&D Apache
Adding Panoramas to Google Maps Using Ajax
Adding Panoramas to Google Maps Using Ajax Derek Bradley Department of Computer Science University of British Columbia Abstract This project is an implementation of an Ajax web application. AJAX is a new
SW5706 Application deployment problems
SW5706 This presentation will focus on application deployment problem determination on WebSphere Application Server V6. SW5706G11_AppDeployProblems.ppt Page 1 of 20 Unit objectives After completing this
Esigate Module Documentation
PORTAL FACTORY 1.0 Esigate Module Documentation Rooted in Open Source CMS, Jahia s Digital Industrialization paradigm is about streamlining Enterprise digital projects across channels to truly control
Volume 1: Core Technologies Marty Hall Larry Brown. An Overview of Servlet & JSP Technology
Core Servlets and JavaServer Pages / 2e Volume 1: Core Technologies Marty Hall Larry Brown An Overview of Servlet & JSP Technology 1 Agenda Understanding the role of servlets Building Web pages dynamically
Oracle Hyperion Financial Management Custom Pages Development Guide
Oracle Hyperion Financial Management Custom Pages Development Guide CONTENTS Overview... 2 Custom pages... 2 Prerequisites... 2 Sample application structure... 2 Framework for custom pages... 3 Links...
Course Number: IAC-SOFT-WDAD Web Design and Application Development
Course Number: IAC-SOFT-WDAD Web Design and Application Development Session 1 (10 Hours) Client Side Scripting Session 2 (10 Hours) Server Side Scripting - I Session 3 (10 hours) Database Session 4 (10
Application Notes for Packaging and Deploying Avaya Communications Process Manager Sample SDK Web Application on a JBoss Application Server Issue 1.
Avaya Solution & Interoperability Test Lab Application Notes for Packaging and Deploying Avaya Communications Process Manager Sample SDK Web Application on a JBoss Application Server Issue 1.0 Abstract
Oracle WebLogic Server
Oracle WebLogic Server Developing Web Applications, Servlets, and JSPs for Oracle WebLogic Server 10g Release 3 (10.3) July 2008 Oracle WebLogic Server Developing Web Applications, Servlets, and JSPs for
Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL
Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL Spring 2015 Copyright and Disclaimer This document, as well as the software described in it, is furnished under license
CA Spectrum and CA Service Desk
CA Spectrum and CA Service Desk Integration Guide CA Spectrum 9.4 / CA Service Desk r12 and later This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter
EMC Documentum Content Services for SAP Repository Manager
EMC Documentum Content Services for SAP Repository Manager Version 6.0 Installation Guide P/N 300 005 500 Rev A01 EMC Corporation Corporate Headquarters: Hopkinton, MA 01748 9103 1 508 435 1000 www.emc.com
2X Cloud Portal v10.5
2X Cloud Portal v10.5 URL: www.2x.com E-mail: [email protected] Information in this document is subject to change without notice. Companies, names, and data used in examples herein are fictitious unless otherwise
XenClient Enterprise Synchronizer Installation Guide
XenClient Enterprise Synchronizer Installation Guide Version 5.1.0 March 26, 2014 Table of Contents About this Guide...3 Hardware, Software and Browser Requirements...3 BIOS Settings...4 Adding Hyper-V
What Is the Java TM 2 Platform, Enterprise Edition?
Page 1 de 9 What Is the Java TM 2 Platform, Enterprise Edition? This document provides an introduction to the features and benefits of the Java 2 platform, Enterprise Edition. Overview Enterprises today
Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc www.toyork.com http://ca.linkedin.
Oracle WebLogic Foundation of Oracle Fusion Middleware Lawrence Manickam Toyork Systems Inc www.toyork.com http://ca.linkedin.com/in/lawrence143 History of WebLogic WebLogic Inc started in 1995 was a company
Developing XML Solutions with JavaServer Pages Technology
Developing XML Solutions with JavaServer Pages Technology XML (extensible Markup Language) is a set of syntax rules and guidelines for defining text-based markup languages. XML languages have a number
ADF. Joe Huang Joe Huang Senior Principal Product Manager, Mobile Development Platform, Oracle Application Development Tools
Developing for Mobile Devices with Oracle ADF Joe Huang Joe Huang Senior Principal Product Manager, Mobile Development Platform, Oracle Application Development Tools Agenda Overview ADF Mobile Browser
Server Setup and Configuration
Server Setup and Configuration 1 Agenda Configuring the server Configuring your development environment Testing the setup Basic server HTML/JSP Servlets 2 1 Server Setup and Configuration 1. Download and
JavaFX Session Agenda
JavaFX Session Agenda 1 Introduction RIA, JavaFX and why JavaFX 2 JavaFX Architecture and Framework 3 Getting Started with JavaFX 4 Examples for Layout, Control, FXML etc Current day users expect web user
Oracle Service Bus Examples and Tutorials
March 2011 Contents 1 Oracle Service Bus Examples... 2 2 Introduction to the Oracle Service Bus Tutorials... 5 3 Getting Started with the Oracle Service Bus Tutorials... 12 4 Tutorial 1. Routing a Loan
How To Write An Ria Application
Document Reference TSL-SES-WP-0001 Date 4 January 2008 Issue 1 Revision 0 Status Final Document Change Log Version Pages Date Reason of Change 1.0 Draft 17 04/01/08 Initial version The Server Labs S.L
Reporting and JSF. Possibilities, solutions, challenges. Slide 1. Copyright 2009, Andy Bosch, www.jsf-portlets.net
Reporting and JSF Possibilities, solutions, challenges Slide 1 Agenda What is reporting? Why do we need it? The JSF example application Introduction to reporting engines Overview Eclipse BIRT JasperReports
Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat
Programming on the Web(CSC309F) Tutorial: Servlets && Tomcat TA:Wael Aboelsaadat Acknowledgments : This tutorial is based on a series of articles written by James Goodwill about Tomcat && Servlets. 1 Tomcat
TIBCO ActiveMatrix BusinessWorks Plug-in for TIBCO Managed File Transfer Software Installation
TIBCO ActiveMatrix BusinessWorks Plug-in for TIBCO Managed File Transfer Software Installation Software Release 6.0 November 2015 Two-Second Advantage 2 Important Information SOME TIBCO SOFTWARE EMBEDS
Dashboard Builder TM for Microsoft Access
Dashboard Builder TM for Microsoft Access Web Edition Application Guide Version 5.3 5.12.2014 This document is copyright 2007-2014 OpenGate Software. The information contained in this document is subject
Operational Decision Manager Worklight Integration
Copyright IBM Corporation 2013 All rights reserved IBM Operational Decision Manager V8.5 Lab exercise Operational Decision Manager Worklight Integration Integrate dynamic business rules into a Worklight
Palo Alto Networks User-ID Services. Unified Visitor Management
Palo Alto Networks User-ID Services Unified Visitor Management Copyright 2011 Aruba Networks, Inc. Aruba Networks trademarks include Airwave, Aruba Networks, Aruba Wireless Networks, the registered Aruba
PingFederate. Identity Menu Builder. User Guide. Version 1.0
Identity Menu Builder Version 1.0 User Guide 2011 Ping Identity Corporation. All rights reserved. Identity Menu Builder User Guide Version 1.0 April, 2011 Ping Identity Corporation 1099 18th Street, Suite
Tutorial: Building a Web Application with Struts
Tutorial: Building a Web Application with Struts Tutorial: Building a Web Application with Struts This tutorial describes how OTN developers built a Web application for shop owners and customers of the
2012 LABVANTAGE Solutions, Inc. All Rights Reserved.
LABVANTAGE Architecture 2012 LABVANTAGE Solutions, Inc. All Rights Reserved. DOCUMENT PURPOSE AND SCOPE This document provides an overview of the LABVANTAGE hardware and software architecture. It is written
Course Name: Course in JSP Course Code: P5
Course Name: Course in JSP Course Code: P5 Address: Sh No BSH 1,2,3 Almedia residency, Xetia Waddo Duler Mapusa Goa E-mail Id: [email protected] Tel: (0832) 2465556 (0832) 6454066 Course Code: P5 3i
Quick Start Guide Mobile Entrée 4
Table of Contents Table of Contents... 1 Installation... 2 Obtaining the Installer... 2 Installation Using the Installer... 2 Site Configuration... 2 Feature Activation... 2 Definition of a Mobile Application
Web Development with the Eclipse Platform
Web Development with the Eclipse Platform Open Source & Commercial tools for J2EE development Jochen Krause 2004-02-04 Innoopract Agenda Currently available Tools for web development Enhancements in Eclipse
Oracle Hyperion Financial Management Developer and Customization Guide
Oracle Hyperion Financial Management Developer and Customization Guide CONTENTS Overview... 1 Financial Management SDK... 1 Prerequisites... 2 SDK Reference... 2 Steps for running the demo application...
Integration Service Database. Installation Guide - Oracle. On-Premises
Kony MobileFabric Integration Service Database Installation Guide - Oracle On-Premises Release 6.5 Document Relevance and Accuracy This document is considered relevant to the Release stated on this title
Sizmek Formats. HTML5 Page Skin. Build Guide
Formats HTML5 Page Skin Build Guide Table of Contents Overview... 2 Supported Platforms... 7 Demos/Downloads... 7 Known Issues:... 7 Implementing a HTML5 Page Skin Format... 7 Included Template Files...
RemoteTM Web Server User Guide. Copyright 2008-2014 Maxprograms
RemoteTM Web Server User Guide Copyright 2008-2014 Maxprograms Contents 3 Contents Introduction...5 Requirements...5 Installation...7 Email Server Configuration...7 Users Management...8 Create User...8
Migrating Applications From IBM WebSphere to Apache Tomcat
Migrating Applications From IBM WebSphere to Apache Tomcat MuleSource and the MuleSource logo are trademarks of MuleSource Inc. in the United States and/or other countries. All other product and company
Performance Testing for Ajax Applications
Radview Software How to Performance Testing for Ajax Applications Rich internet applications are growing rapidly and AJAX technologies serve as the building blocks for such applications. These new technologies
A Guide to Understanding Web Application Development Corey Benson, SAS Institute, Inc., Cary, NC Robert Girardin, SAS Institute, Inc.
Paper 024-29 A Guide to Understanding Web Application Development Corey Benson, SAS Institute, Inc., Cary, NC Robert Girardin, SAS Institute, Inc., Cary, NC ABSTRACT You have been asked by your manager
24x7 Scheduler Multi-platform Edition 5.2
24x7 Scheduler Multi-platform Edition 5.2 Installing and Using 24x7 Web-Based Management Console with Apache Tomcat web server Copyright SoftTree Technologies, Inc. 2004-2014 All rights reserved Table
Java Servlet 3.0. Rajiv Mordani Spec Lead
Java Servlet 3.0 Rajiv Mordani Spec Lead 1 Overview JCP Java Servlet 3.0 API JSR 315 20 members > Good mix of representation from major Java EE vendors, web container developers and web framework authors
ServletExec TM 6.0 Installation Guide. for Microsoft Internet Information Server SunONE Web Server Sun Java System Web Server and Apache HTTP Server
ServletExec TM 6.0 Installation Guide for Microsoft Internet Information Server SunONE Web Server Sun Java System Web Server and Apache HTTP Server ServletExec TM NEW ATLANTA COMMUNICATIONS, LLC 6.0 Installation
System Administration Training Guide. S100 Installation and Site Management
System Administration Training Guide S100 Installation and Site Management Table of contents System Requirements for Acumatica ERP 4.2... 5 Learning Objects:... 5 Web Browser... 5 Server Software... 5
BlackShield ID Agent for Remote Web Workplace
Agent for Remote Web Workplace 2010 CRYPTOCard Corp. All rights reserved. http:// www.cryptocard.com Copyright Copyright 2010, CRYPTOCard All Rights Reserved. No part of this publication may be reproduced,
Accessing Data with ADOBE FLEX 4.6
Accessing Data with ADOBE FLEX 4.6 Legal notices Legal notices For legal notices, see http://help.adobe.com/en_us/legalnotices/index.html. iii Contents Chapter 1: Accessing data services overview Data
Copyright 2014 Jaspersoft Corporation. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft
5.6 Copyright 2014 Jaspersoft Corporation. All rights reserved. Printed in the U.S.A. Jaspersoft, the Jaspersoft logo, Jaspersoft ireport Designer, JasperReports Library, JasperReports Server, Jaspersoft
Geac Expense Management: An Architectural Overview
Performance Management Geac Expense Management: An Architectural Overview white paper Now more than at any other time in recent history, companies are faced with the need to deploy solutions that enable
J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX
Oracle Application Express 3 The Essentials and More Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX Arie Geller Matthew Lyon J j enterpririse PUBLISHING BIRMINGHAM
Apache Server Implementation Guide
Apache Server Implementation Guide 340 March Road Suite 600 Kanata, Ontario, Canada K2K 2E4 Tel: +1-613-599-2441 Fax: +1-613-599-2442 International Voice: +1-613-599-2441 North America Toll Free: 1-800-307-7042
Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf
1 The Web, revisited WEB 2.0 [email protected] Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf 2 The old web: 1994 HTML pages (hyperlinks)
How To Develop A Mobile Application On An Android Device
Disclaimer: The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver
Ajax Development with ASP.NET 2.0
Ajax Development with ASP.NET 2.0 Course No. ISI-1071 3 Days Instructor-led, Hands-on Introduction This three-day intensive course introduces a fast-track path to understanding the ASP.NET implementation
DocuShare Installation Guide
DocuShare Installation Guide Publication date: May 2009 This document supports DocuShare Release 6.5/DocuShare CPX Release 6.5 Prepared by: Xerox Corporation DocuShare Business Unit 3400 Hillview Avenue
Installation, Configuration and Administration Guide
Installation, Configuration and Administration Guide ehd10.0.1 everything HelpDesk Installation, Configuration and Administration Guide GroupLink Corporation 2013 GroupLink Corporation. All rights reserved
HP Enterprise Integration module for SAP applications
HP Enterprise Integration module for SAP applications Software Version: 2.50 User Guide Document Release Date: May 2009 Software Release Date: May 2009 Legal Notices Warranty The only warranties for HP
DocuShare Installation Guide
DocuShare Installation Guide Publication date: February 2011 This document supports DocuShare Release 6.6.1 Prepared by: Xerox Corporation DocuShare Business Unit 3400 Hillview Avenue Palo Alto, California
Crystal Reports for Borland JBuilder
Embedding reports within JBuilder web applications projects Overview Contents With the recent addition of embedded reporting to the JBuilderX feature-set, it is now possible to process and render industry-standard
Installation & User Guide
SharePoint List Filter Plus Web Part Installation & User Guide Copyright 2005-2011 KWizCom Corporation. All rights reserved. Company Headquarters KWizCom 50 McIntosh Drive, Unit 109 Markham, Ontario ON
KINETIC SR (Survey and Request)
KINETIC SR (Survey and Request) Installation and Configuration Guide Version 5.0 Revised October 14, 2010 Kinetic SR Installation and Configuration Guide 2007-2010, Kinetic Data, Inc. Kinetic Data, Inc,
Deploying Oracle Business Intelligence Publisher in J2EE Application Servers Release 10.1.3.2.0
Oracle Business Intelligence Publisher Deploying Oracle Business Intelligence Publisher in J2EE Application Servers Release 10.1.3.2.0 Part No. B32481-01 December 2006 Introduction Oracle BI Publisher
4 Understanding. Web Applications IN THIS CHAPTER. 4.1 Understand Web page development. 4.2 Understand Microsoft ASP.NET Web application development
4 Understanding Web Applications IN THIS CHAPTER 4.1 Understand Web page development 4.2 Understand Microsoft ASP.NET Web application development 4.3 Understand Web hosting 4.4 Understand Web services
Business Application Development Platform
Business Application Development Platform Author Copyright Last update Version Document type Sclable Business Solutions GmbH Attribution-NonCommercial-NoDerivatives 4.0 International 01/28/2014 1.0 Technical
