Book Image

JBoss RichFaces 3.3

By : Demetrio Filocamo
Book Image

JBoss RichFaces 3.3

By: Demetrio Filocamo

Overview of this book

<p>JBoss RichFaces is a rich component library for JavaServer Faces and an AJAX framework that allows easy integration of AJAX capabilities into complex business applications. Do you wish to eliminate the time involved in writing JavaScript code and managing JavaScript-compatibility between browsers to build an AJAX web application quickly?<br /><br />This book goes beyond the documentation to teach you how to do that. It will show you how to get the most out of JBoss RichFaces by explaining the key components and how you can use them to enhance your applications. Most importantly, you will learn how to integrate AJAX into your applications without using JavaScript but only standard JSF components. You will learn how to create and customize your own components and add them to your new or existing applications.<br /><br />First, the book introduces you to JBoss RichFaces and its components. It uses many examples of AJAX components which, among others, include: Calendar, Data Table, ToolTip, ToolBar, Menu, RichEditor, Drag'n'Drop. All these components will help you create the web site you always imagined. Key aspects of the RichFaces framework such as the AJAX framework, skinnability, and CDK (Component Development Kit) will help you customize the look of your web application. As you progress through the book, you will see a sample application that shows you how to build an advanced contact manager. You're also going to be amazed to know about the advanced topics you will learn like developing new components, new skins, optimizing a web application, inserting components dynamically using Java instead of XHTML, and using JavaScript to manage components. This book is more than a reference with component example code: it's a manual that will guide you, step-by-step, through the development of a real AJAX JSF web application.</p>
Table of Contents (18 chapters)
JBoss RichFaces 3.3
Credits
About the Author
About the Reviewer
Preface
Index

JSF 2.0


In order to do the same in JSF 2.0, you would use the following code:

<h:inputText value="#{myBean.myProperty}" >
  <f:ajax 
         event="blur" 
         execute="@form" 
         listener="#{myBean.doSomethingListener}" 
         render="myComponent"/>
</h:inputText>

As you can see, it is not very different—we can notice a name change (obviously), the listener instead of the action, render in place of reRender, and a new attribute called execute. It works a bit like the RichFaces process attribute, telling what to send with the request, but simplified (then not so powerful like the RichFaces one). In this case, the @form value tells that all the form should be sent (you can also use, for example, @this to just send the surrounding component).