About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. RichFaces

Similar documents
This tutorial has been prepared for beginners to help them understand the basic functionalities of Gulp.

Scalable Vector Graphics commonly known as SVG is a XML based format to draw vector images. It is used to draw twodimentional vector images.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Jenkins

This is a brief tutorial that explains how to make use of Sqoop in Hadoop ecosystem.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Meteor

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

In this tutorial, we are going to learn how to use the various features available in Flexbox.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Drupal

This is a small tutorial where we will cover all the basic steps needed to start with Balsamiq Mockups.

This tutorial will teach you how to use Java Servlets to develop your web based applications in simple and easy steps.

Adobe Flex Tutorial i

This tutorial provides a basic understanding of how to generate professional reports using Pentaho Report Designer.

Before you start with this tutorial, you need to know basic Java programming.

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer. PySpark

This tutorial explains the key concepts of Web Dynpro with relevant screenshots for better understanding.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer ASP.NET WP

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. WordPress

This tutorial is designed for all Java enthusiasts who want to learn document type detection and content extraction using Apache Tika.

jmeter is an open source testing software. It is 100% pure Java application for load and performance testing.

This tutorial also elaborates on other related methodologies like Agile, RAD and Prototyping.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Joomla

This is an introductory tutorial designed for beginners to help them understand the basics of Radius.

This tutorial will take you through simple and practical approaches while learning AOP framework provided by Spring.

This tutorial is designed for software programmers who would like to learn the basics of ASP.NET Core from scratch.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Django

This tutorial will show you, how to use RSpec to test your code when building applications with Ruby.

Testing is the process of evaluating a system or its component(s) with the intent to find whether it satisfies the specified requirements or not.

Before proceeding with this tutorial, you should have a good understanding of the fundamental concepts of marketing.

Before you start proceeding with this tutorial, we are assuming that you are already aware about the basics of Web development.

This tutorial is designed for those who would like to understand the basics of i-mode in simple and easy steps.

SAP Lumira is known as a visual intelligence tool that is used to visualize data and create stories to provide graphical details of the data.

This tutorial explains how you can use Gradle as a build automation tool for Java as well as Groovy projects.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Gerrit

This tutorial has been prepared for beginners to help them understand the simple but effective SEO characteristics.

This tutorial will guide users on how to utilize TestLodge in reporting and maintaining the testing activities.

JSF page, 76 manage bean, 76 named status, 78 request, 75 start facet, 78 starttext and stoptext attributes, 75 style attribute, 77

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. TurboGears

This tutorial will help you understand JSON and its use within various programming languages such as PHP, PERL, Python, Ruby, Java, etc.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright DAX

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Haskell Programming

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer. Logstash

A Closer Look at XPages in IBM Lotus Domino Designer 8.5 Ray Chan Advisory I/T Specialist Lotus, IBM Software Group

Memcached is an open source, high-performance, distributed memory object caching system.

So, this tutorial is divided into various chapters and describes the 5G technology, its applications, challenges, etc., in detail.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer DBMS

Parrot is a virtual machine designed to efficiently compile and execute bytecode for interpreted languages.

This tutorial will help you in understanding IPv4 and its associated terminologies along with appropriate references and examples.

Microsoft Excel is a spreadsheet tool capable of performing calculations, analyzing data and integrating information from different programs.

JavaFX. JavaFX Overview Release E

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

This is an introductory tutorial, which covers the basics of Jython and explains how to handle its various modules and sub-modules.

You must have a basic understanding of GNU/Linux operating system and shell scripting.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Laravel

This tutorial introduces you to key DynamoDB concepts necessary for creating and deploying a highly-scalable and performance-focused database.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Avro

Dart is an open-source general-purpose programming language. It is originally developed by Google and later approved as a standard by ECMA.

Developing Applications with Java EE 6 on WebLogic Server 12c

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

Spring framework was initially written by Rod Johnson and was first released under the Apache 2.0 license in June 2003.

This tutorial discusses the basics of PouchDB along with relevant examples for easy understanding.

This tutorial will give you a quick start with Consul and make you comfortable with its various components.

This tutorial provides a basic understanding of the infrastructure and fundamental concepts of managing an infrastructure using Chef.

How to Install (then Test) the NetBeans Bundle

This tutorial is prepared for beginners to help them understand the basic-to-advanced concepts related to GPRS.

This tutorial provides a basic level understanding of the LOLCODE programming language.

JavaServer Faces Programming By Budi Kurniawan READ ONLINE

Sentences Installation Guide. Sentences Version 4.0

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright CICS

ADF Code Corner How-to bind custom declarative components to ADF. Abstract: twitter.com/adfcodecorner

This tutorial has been designed for beginners interested in learning the basic concepts of UDDI.

Standard Edition (SE) application development Enterprise Edition (EE) enterprise development Micro Edition (ME) Internet of Things (IoT) development

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer HP QC

You should have a basic understanding of Relational concepts and basic SQL. It will be good if you have worked with any other RDBMS product.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. HCatalog

Seam Tools Tutorial. Version: Final-SNAPSHOT

This is a simple tutorial that covers the basics of SAP Business Intelligence and how to handle its various other components.

JDK-WildFly-NetBeans Setup Local

Setup and Getting Startedt Customized Java EE Training:

WebGL (Web Graphics Library) is the new standard for 3D graphics on the Web, designed for rendering 2D graphics and interactive 3D graphics.

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. Graph Theory

In this brief tutorial, we will be explaining the basics of Elasticsearch and its features.

In this tutorial, we will understand how to use the OpenNLP library to build an efficient text processing service.

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. Salesforce

<link rel="stylesheet" href="

This tutorial helps the professionals aspiring to make a career in Big Data and NoSQL databases, especially the documents store.

Oracle Fusion Middleware 11g: Build Applications with ADF I

EUSurvey OSS Installation Guide

<Insert Picture Here> Advanced ADF Faces. Frank Nimphius Principal Product Manager

Java EE 6: Develop Web Applications with JSF

10.1 Getting Started with Container and Cloud-based Development

JSF Tools Reference Guide. Version: M5

This tutorial covers a foundational understanding of IPC. Each of the chapters contain related topics with simple and useful examples.

This tutorial will help computer science graduates to understand the basic-to-advanced concepts related to data warehousing.

Before proceeding with this tutorial, you must have a good understanding of Core Java and any of the Linux flavors.

Delivering Rich Internet Applications with Ajax4jsf

Contents. 1. JSF overview. 2. JSF example

EUSurvey Installation Guide

The JSF Tools Project

This tutorial is designed for software developers who want to learn how to develop quality applications with clean structure of code.

Java with Eclipse: Setup & Getting Started

Transcription:

1

About the Tutorial RichFaces is a component library developed by JBoss, which provides in-built AJAX support to JSF application. It reduces all the redundant codes that the developer has to write to create different markup in the browsers. Audience This tutorial has been prepared for the beginners to help them understand the basics of RichFaces Technology. After completing this tutorial, you will find yourself at a moderate level of expertise, from where you can take yourself to the next levels. Prerequisites Before proceeding with this tutorial, you should have a basic understanding of Java programming language, text editor, execution of programs, etc. Since we are going to develop web-based applications using RichFaces, it will be a plus if you have an understanding of other web technologies such as HTML, CSS, AJAX, JavaScript, and JSF. Copyright & Disclaimer Copyright 2017 by Tutorials Point (I) Pvt. Ltd. All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish any contents or a part of contents of this e-book in any manner without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or in this tutorial, please notify us at contact@tutorialspoint.com 2

Table of Contents About the Tutorial... 2 Audience... 2 Prerequisites... 2 Copyright & Disclaimer... 2 Table of Contents... 3 1. RICHFACES - OVERVIEW... 6 Advantages and Disadvantages... 6 2. RICHFACES - ENVIRONMENT SETUP... 7 Technical Requirements... 7 Creating a Project... 9 3. RICHFACES - ARCHITECTURE... 15 4. RICHFACES - BASIC CONCEPTS... 17 Processing AJAX Request... 17 Partial Tree Processing... 17 Partial View Updates... 17 Other a4j Tags... 18 5. RICHFACES - RICH SKIN... 33 Built-in Skin... 33 Creating/Modifying the Skin... 34 Changing the Skin at Runtime... 37 6. RICHFACES - INPUT COMPONENTS... 41 <rich:inplaceinput>... 41 <rich: inplaceselect>... 42 <rich:suggestionbox>... 44 3

<rich:combobox>... 45 <rich:inputnumberslider>... 47 <rich:calendar>... 48 <rich:inputnumberspinner>... 55 7. RICHFACES - OUTPUT COMPONENTS... 57 <rich:panel>... 57 <rich:simpletogglepanel>... 58 <rich:tabpanel>... 59 <rich:panelbar>... 60 <rich:tab>... 61 <rich:panelmenu>... 62 <rich:togglepanel>... 63 <rich:toolbar>... 66 <rich:separator>... 67 <rich:spacer>... 68 <rich:modalpanel>... 68 8. RICHFACES - ITERATION COMPONENT... 70 <rich:datatable>... 70 <rich: datadefinitionlist >... 73 <rich:dataorderedlist>... 74 <rich:datalist>... 74 <rich:datagrid>... 75 <rich:datascroller>... 76 9. RICHFACES - SELECTION COMPONENTS... 79 <rich:picklist>... 79 <rich:orderinglist>... 81 4

<rich:listshuttle >... 83 10. RICHFACES - MENU COMPONENTS... 85 <rich:dropdownmenu>... 85 <rich:contextmenu>... 86 <rich:component Control>... 88 11. RICHFACES - RICH-TREE... 91 <rich:treenode>... 91 <rich:treemodeladaptor>... 93 12. RICHFACES - ERROR HANDLING... 99 Server Side & Client Side Error Handling... 99 Resource Loading... 102 5

1. RichFaces - Overview RichFaces RichFaces is an open source component library for JSF technology. It is developed and designed by JBoss. RichFaces provides reusable markups and AJAX capabilities to a JSF developer without having any prior knowledge of front end. RichFaces was developed over JSF 2, hence it follows the same life cycle of JSF. The in-built AJAX support and customizable look and feel features has enabled a new horizon for Enterprise Java application. Advantages and Disadvantages Following are a few advantages of using RichFaces. AJAX support: RichFaces eliminates the old boilerplate AJAX, JavaScript codes to include markups in the webpages. Using RichFaces, a developer can include markups on-the-fly without having any prior knowledge of AJAX. Component Development Kit (CDK): As described earlier, the developer need not concentrate on the markups used in the application, all they need to include is RichFaces tags to use those functionalities. This automatic creation of markups will be done by a runtime environment called CDK. Resource handling: RichFaces provides additional support to create different binary files such as image, excel, spreadsheet, etc. Skinning: Skinning is a modern approach that has been introduced in JSF, which makes it very easy to control the look and feel of the application. Specially-centralized color management using different other customizable parameters make it very handy for a developer. Following are a few disadvantages of using RichFaces. Resource: This being a fairly new technology, getting good quality resource is a huge problem for rich face developer. Complex: Transition through different phases and creation of dynamic markups is the entire responsibility of CDK. Understanding internal processing of CDK is a bit complex and confusing for a traditional front-end developer. 6

2. RichFaces - Environment Setup RichFaces In this chapter, you will set up our development environment and configure your system such that you can proceed with RichFaces development. Technical Requirements As per the technical requirement you will learn how to configure JDK, Application server, or any IDE of your choice. System Requirements You can use any running system, there is no any restriction on memory, RAM and operating system. JDK Installation Before proceeding further, you must have JDK configured on your system. Please refer to the official website of oracle to download and install JDK 7 or an above version. You might have to set the environment variable for Java such that it can work properly. To verify your installation in Windows operating system, hit java version in the command prompt and as an output it will show you the Java version installed in your system. IDE Installation There are numbers of IDE available on the Internet. You can use any as you choose. For this tutorial, let us use NetBeans 8.2. You can find the download link of different IDE in the following table. IDE Name NetBeans Eclipse Intellij Installation Link https://netbeans.org/downloads/ https://www.eclipse.org/downloads/ https://www.jetbrains.com/idea/download/#section=windows It is always recommended to use a recent software version to drag out maximum facility from it. For this tutorial, we will be using NetBeans IDE 8.2 along with JDK 8. Server Requirements As an application server, you will be using Tomcat. In this chapter, you will configure the tomcat server in the system. If you are installing the latest version of NetBeans, then you can directly install Apache Tomcat along with NetBeans IDE. If you are not doing so, please download the latest version of Tomcat from the official website of the TOMCAT. Keep the extracted Tomcat files in your C drive or program files. These files will be used in the next phase. 7

Client Requirements RichFaces is a UI component. Thus, like every UI component, the internet browser will act as a client for your application. You can use any modern internet browser such as IE, Safari, Chrome, etc. Development Requirements Downloading required jars: Please visit the official website of JBOSS and download the latest stable release of the JBoss jar files. Extract the files. You will need the following jars in order to develop RichFaces Application. richfaces-a4j-4.5.17.final.jar richfaces-core-4.5.17.final.jar richfaces-rich-4.5.17.final.jar cssparser-0.9.18.jar guava-19.0.jar sac-1.3.jar 8

Creating a Project In this section, let us create a demo application that will be used later to learn more about RichFaces. Before proceeding further, it is highly recommended that you download and install all required software and jar files mentioned earlier. Step 1: Open NetBeans IDE. Go to File -> New Project. You will be redirected to the following screenshot. Step 2: Select Java Web and Web Application in Categories and Projects tab respectively and hit Next. Step 3: In the next tab, you have to provide a project name. Here, let us name it as RichFaceTutorial. Then, hit Next. You will be redirected to the following screenshot. where you will be setting up server details. 9

Step 4: Select Apache Tomcat from the dropdown and hit Add. Once you hit Add, you will be redirected to a separate screen, where you need to configure your server. To configure the server, you will need the server files downloaded in the previous section. 10

Step 5: Select Apache Tomcat or TomEE from the list as shown in the above screenshot and hit Next. You will be redirected to the following screen. 11

Step 6: In the Server location, you need to provide the downloaded Tomcat files location. Hit Browse and navigate to the required folder path and hit Finish. Once your server is added successfully, you will be redirected to the first screen. Hit Next and you will get a chance to select the different frameworks to add into the application as shown in the following screenshot. 12

Step 7: Select JavaServer Faces and in JavaServer Faces Configuration you have to select RichFaces and hit Finish. If you do not get RichFaces as an option, you can add the required jars file from the build path. After this step, your application is ready to deploy on the application server. Following is the project directory structure of the application after completing all the above-mentioned steps. 13

Step 8: Go ahead and left-click the index.xhtml file and run the file. You will see the following output in the browser. In real-life application, you might have to generate the required war file and deploy in the application server, as all the pages will be interlinked. However, for this tutorial we will be running the application page wise as we need to show different features of different tags. 14

End of ebook preview If you liked what you saw Buy it from our store @ https://store.tutorialspoint.com 15