The JBoss RichFaces and Ajax4jsf component libraries contain a wealth of UI components that can be used to accept user input in new and interesting ways. By combining these components together effectively, we can significantly enhance the visual appeal and interactivity of our JSF pages. We will look at a number of examples of these components; such as the RichFaces in-place input text field, number spinbox, slider, calendar, color picker, combo box, pick list, and rich text editor components.
Let's begin by looking at the RichFaces<rich:inplaceInput>
tag. This tag renders as an editable text control that enables users to click to edit the value of the component directly on the screen. This component allows us to control how the text becomes editable by defining the mouse event that activates the component using the editEvent
attribute. It could be set to ondoubleclick
for example. The default edit event is onclick
.
<rich:panel style...